1

リボンのチュートリアルを開始しましたが、テーマを適用するコードに次の行を追加するまで、すべてがうまくいきました。

this.Resources.MergedDictionaries.Add(Microsoft.Windows.Controls.Ribbon.PopularApplicationSkins.Office2007Black);

XAMLにも追加しようとしましたが、うまくいかないことはわかっていますが、とにかくこの回答を使用してみました: WPF - MergedDictionary using RibbonControlsLibrary in xaml

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?

4

0 に答える 0