Question

I'm new in WPF (.NET 4.0, VS2010) and try to include a property grid. My XAML Markup looks like the following:

<Window x:Class="MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:WpfToolkit="clr-namespace:Xceed.Wpf.Toolkit.PropertyGrid;assembly=WPFToolkit.Extended"
    Title="MainWindow" Height="350" Width="525">
    <Grid>
        <WpfToolkit:PropertyGrid Name="Grid" />
    </Grid>
</Window>

Now I get the error that the assembly 'WPFToolkit.Extended' was not found. I have included the reference to the dll Xceed.Wpf.Toolkit.dll in my application.

Why does it not work? Have I to include more references or what can be the mistake? Thanks for any Response.

Was it helpful?

Solution

I could solve the problem. My fault was that I had not unblocked the zip file containing the dll. After this I have to change the source for the namespace in the Markup to an uri. Below the final markup:

<Window x:Class="MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:WpfToolkit="http://schemas.xceed.com/wpf/xaml/toolkit"
    Title="MainWindow" Height="350" Width="525">
    <Grid>
        <WpfToolkit:PropertyGrid Name="Grid" />
    </Grid>
</Window>

OTHER TIPS

Check your project properties. Under application, what is selected under target framework? By default with a new project, '.Net Framework 4 Client Profile' is selected. If the extended library uses parts of .net that beyond the client profile, you will need to select '.Net Framekwork 4' instead to use the extended functionality.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top