views:

66

answers:

1

Hi,

I have been trying to add components from a third party application but they never seem to work or they draw incorrectly. I can take my xaml file and move it to the sample project that came with the third party control and it would perfect but just not in my own project. (I am using Visual Studio 2008). I have tried numerous times to try to find a difference between my project and the sample projects but I just can't find anything.

Any help would be appreciated.

A: 

Are you choosing the correct XML namespaces? I know those were a bit confusing when I first started working in XML.

<Window
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:sui="clr-namespace:SuperUI.Controls;assembly=SuperUI">
    <sui:SuperButton>...</sui:SuperButton>
</Window>

Note the last 'xmlns'. These are sorta like "using sui = SuperUI.Controls;" in C#, only they are required in XML. If you're referencing a namespace in your own assembly, you can omit the 'assembly=...' part of it. This may be why your XAML works in one assembly but not another.

If you aren't sure what those attributes should be set to, let Intellisense handle it. Your options will appear when you type the '=' character.

YotaXP
It is still not drawing even with the right namespace. It compiles and runs perfectly just nothing appears in the place of the control.
grizzley