hi
In Silverlight 4 Application, how can i set LargeIconTemplate of OutlookBarGroup to BitmapImage in Code?
Thanks
Hi
That's exactly my answer
Hi,You can use Binding in the above sample (the MyClass class has a property Image and returns the same image):DataTemplate dt = (DataTemplate)XamlReader.Load(@"<DataTemplate xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""><Image Source=""{Binding Image}""/></DataTemplate>");outlookBar.Groups[0].DataContext = new MyClass();outlookBar.Groups[0].LargeIconTemplate = dt;RegardsMarin
Hi,
Thanks for Attention, but in my scenario, BitmapImage is a property of one class in another silverlight module, loaded by that class , and now i want to create group for that class and set the LargeIconTemplate of group to icon (BitmapImage) of that class.
Hi,You can create a data template from code:dt = (DataTemplate)XamlReader.Load( @"<DataTemplate xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""> <Image Source=""/Silverlight102;component/LargeImage.png""/> </DataTemplate>");outlookBar.Groups[0].LargeIconTemplate = dt;Regards,Marin