English 中文(简体)
解析在 wpf 不工作的 back uri
原标题:resolving pack uri not working in wpf

虽然我发现了很多"包装问题"的问题 但我的问题没有得到答案

我有一个棱晶溶液, 我想要一个 MyApplication. resources 组装, 收藏我所有应用程序的宽样式和模板 。

  • Step 1: I ve created the solution (WpfUsercontrollibrary)
  • Step 2: folder /Themes was created
  • Step 3: Generic.Ribbon.xaml was created
  • Step 4: Generic.xaml was created
  • Step 5: Generic.xaml has a MergedDictionary part to merge all the Generic.xxx.xaml files
  • Step 6: MyApplication.Resources assembly referenced in prism module assembly
  • Step 7: loading the Generic.xaml in my module view (type: Microsoft.Windows.Controls.Ribbon.RibbonTab

    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="/MyApplication.Resources;component/Themes/Generic.xaml"/>
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
    

我也尝试过绝对变式

<ResourceDictionary Source="pack://application:,,,/ElairoCRM.Resources;component/Themes/Generic.xaml"/>

以上所有步骤都由MSDN doku 和互联网上的许多堆叠流问题和 wpf 资源指导来验证。

但没什么用,我错过了什么吗?

提前感谢您

Edit: I ve forgot the error that occured:

XamlParseException with inner exception FileNotFoundException having the message: The file or assembly "MyApplication.Resources, culture=neutral" or one of its dependencies, was not found.

问题回答

我独自解决了这个问题。 我复制了资源组的 Generic. xaml 文件, 从主题文件夹复制到组装根, 并将组装参数改成组件/ Geneneric. xaml 。 现在一切都正常了。 我没有发现任何关于这种行为的文件 。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签