I am trying to embed a XAML file as a resource of my C ++ / CLI project (using DevStudio 2005). I found several ways to do this, but none of them work properly.
Method 1. Deploy it as your own resource. I used the .rc file to include .xaml. I can easily download it using my own Win32 calls. Problem: The project does not recompile if I modify the xaml file.
Method 2. Insert it using the linker. I used the linker option "Embed Managed Resourcfe File" and added my xaml file there. I can easily use GetManifestResourceStream () after loading. Problem: The project does not recompile if I modify the xaml file.
Method 3. Paste it using "Add Existing Item" I tried to add the xaml file using "Project-> Add-> Existing Item" and then open the xaml file. Problem. When I look at the properties of the xaml file, I cannot find the "Build Tool" to compile / insert it. Can i get from somewhere Is there a command line command on the command line?
Method 4. Paste it using a .resx file I tried several things, but I was not able to load it at runtime using GetResourceStream (). To do this, I will need a step-by-step procedure.
Can someone tell me which method should I use?
source
share