Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WPF adding a third party ResourceDictionary to App.xaml?

Tags:

c#

wpf

xaml

This may well be a stupid question, but I cannot find an answer...

I am just getting started with WPF, and am trying to add a ResourceDictionary to my project.

this one here:

https://monotone.codeplex.com/

So I downloaded the zip file, and unzipped it to:

MyProjectDir/MonoTone

I have added the following to my App.xaml

 <Application x:Class="TestWPF.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:TestWPF"
             xmlns:xcad="http://schemas.xceed.com/wpf/xaml/avalondock"
             StartupUri="MainWindow.xaml">

    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>

                <ResourceDictionary Source="Monotone/Monotone.Colors.xaml" />
                <ResourceDictionary Source="Monotone/Monotone.Brushes.xaml" />
                <ResourceDictionary Source="Monotone/Monotone.MahApps.xaml" />
                <ResourceDictionary Source="Monotone/Monotone.xaml" />
                <ResourceDictionary Source="Monotone/Monotone.ExtendedWPFToolkit.xaml" />
                <ResourceDictionary Source="Monotone/Monotone.ColorBox.xaml" />

            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>

    </Application.Resources>

</Application>

as here:

https://monotone.codeplex.com/wikipage?title=Installing%20Monotone&referringTitle=Documentation

Now Intelsense is underlining the xaml paths, and cannot find the files.

I have added a reference to the dll. What am i missing?

Thank you.

like image 913
anti Avatar asked Dec 08 '25 22:12

anti


1 Answers

First, try including the Monotone catalog in the solution by clicking on show all files icon in solution explorer.

Second, as shown in below screen, pinpoint the exact path as in the first line of example. Example

like image 194
Janis S. Avatar answered Dec 10 '25 12:12

Janis S.