http://www.axelerate.com/SilverlightSamples/Silverlight3D/
Is good one i got the source code from Code Plex . then i will apply the image from Xaml page it was applied.
But when i am going to apply the image from code behind it cant work in here i am posting my code
From Xaml
From Code Behind
BitmapImage bitmapImage = new BitmapImage(new Uri("Pat.jpg", UriKind.Relative));
myImageBrush.ImageSource = bitmapImage;
dmat.Brush = myImageBrush;
but when i am executing it cause error Object reference not set to an instance of an object
But
Image path is correct ..
for example
Xaml page
Code Behind
private void MYbTN_Click(object sender, RoutedEventArgs e)
{
myBrush.ImageSource = new BitmapImage(new Uri("Pat.jpg", UriKind.Relative));
}
its working fine .. Image will be changed
but i want to change image through code behind
Bill GatesPosted Jan 6, 2009, 2:43 PM
Hey, looks like finally I found a great step by step tutorial for silverlight.
Do check this tutorial, its worth seeing.
http://silverlight-dotnet.blogspot.com/
Cheers!
Bechir BejaouiPosted Dec 21, 2008, 4:57 PM