test with codedfasdfadsf
| Comments Thanks for visiting! Just a fair warning this post is fairly 'old' in tech terms and may contain outdated information and/or broken links or pictures. Please verify info and feel free to contact me if questions!
here is some csharp code:
<UserControl.Resources>
<ResourceDictionary x:Key="Collection" >
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary x:Name="dict" Source="/Resources.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
public static T Load<T>(this string xaml) where T : UIElement
{
T child = null;
Canvas c = XamlReader.Load("<Canvas xmlns:sj='clr-namespace:Slidentity;assembly=Slidentity' "
+ "xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' "
+ "xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>"
+ xaml + "</Canvas>") as Canvas;
child = c.Children[0] as T;
c.Children.Remove(child);
return child;
}
dfad
Please enjoy some of these other recent posts...
Comments