开发者

Problem adding OfficeBlack2007 theme on WPF ribbon

I started a ribbon tutorial, and everything went fine until i added this line to the code for applying the theme:

this.Resources.MergedDictionaries.Add(Microsoft.Windows.Controls.Ribbon.PopularApplicationSkins.Office2007B开发者_Python百科lack);

I tried adding it in XAML as well, i know it won't work but i tried anyway using this answer: WPF - MergedDictionary using RibbonControlsLibrary in xaml

And added the XAML:

<Window.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="/RibbonControlsLibrary;component/Themes/Office2007Black.xaml" />
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
</Window.Resources>

But the problem is still there. The error is: "An error occurred while finding the resource dictionary" when i try adding the XAML, and the error is : "The type or namespace name PopularApplicatinSkins does not exist in the namespace Microsoft.Windows.Controls.Ribbon, are you missing an assembly reference?"

And browsing the project folder, i cannot see any folder named Theme.

How should i proceed?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜