I want to work with a DataGrid in Kaxaml. How do I reference the toolkit dll?
Building on top of Todd White's solution (& this is future reference for myself too) your XAML in Kaxaml would reference a 3rd party library as follows:
<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:dxlc="clr-namespace:DevExpress.Xpf.LayoutControl;assembly=DevExpress.Xpf.LayoutControl.v13.2"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- Layout Control Start -->
<dxlc:LayoutControl Orientation="Horizontal">
</dxlc:LayoutControl>
<!-- Layout Control End -->
</UserControl>
Now you can use such namespace:
xmlns:dg="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit"
Another option would be to make a junction and add a probing path to Kaxaml's config.
Make Junction to code
Modify Kaxaml.exe.config
<runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <probing privatePath="ProbeFolder"/> </assemblyBinding> </runtime>
When mapping custom classes and namespaces in XAML using the clr-namespace/assembly notation, you can't specify the path of the assembly containing the class but just the assembly's name (more details can be found on MSDN), since all referenced assemblies must be linked during the XAML compilation via the project file.
Kaxaml doesn't support the concept of a project since it doesn't do any compilation but rather dynamically parses and renders the XAML entered in the editor "on-the-fly" by using the System.Windows.Markup.XamlReader class.
This means that when using Kaxaml you can only reference classes contained in the assemblies that are part of the .NET Framework.