开发者

WPF - Using DynamicResource into a loose XAML

开发者 https://www.devze.com 2023-01-29 01:04 出处:网络
I\'m doing a plug-in for an external app, and i need to put a loose xaml which contains my values. I did it successfully using a path like \"pack://siteoforigin,,,/Strings.xaml\".

I'm doing a plug-in for an external app, and i need to put a loose xaml which contains my values.

I did it successfully using a path like "pack://siteoforigin,,,/Strings.xaml".

But I can't succeed by putting it into a parent folder (except using absolute paths).

I mean, I have something like this :

/ProjectRoot
    /Bin
         main.exe
         plugin.dll
    /Conf
         strings.xaml

The app is started from the Conf folder, and call the 开发者_开发知识库main.exe from here like this :

 ..\Bin\main.exe

How can I refer to my xaml ?

Of course a path like " pack://siteoforigin,,,/../Conf/strings.xaml " isn't working.

There is other way than putting it into the same (or subfolder) as my dll ?

Can I use an environmnent variable which can give me the starting path ?

Thanks in advance.


In my case, i just add to remove the reference to the dictionnary ressource. The wpf core found automatically the file and manage it....

So i just remove the "include".

0

精彩评论

暂无评论...
验证码 换一张
取 消