XAML page for Silverlight background image pattern
I would like to setup a background image pattern that repeats in all the XAML page for Silverlight. Please help me.
I would like to setup a background image pattern that repeats in all the XAML page for Silverlight. Please help me.
Â
Try to work just  the following:
Uri uri = new Uri("images/main.jpg", UriKind.Relative);
ImageSource imgSource = new BitmapImage(uri);
imgMain.Source = imgSource;
 Your problem should be solved by the way hopefully. Best wishes for you.
Hi Olivia,
Try this one.
// Code to execute when the application is launching (eg, from Start)
// This code will not execute when the application is reactivated
private void Application_Launching(object sender, LaunchingEventArgs e)
{
   ImageBrush brush = new ImageBrush
   {
       ImageSource = new System.Windows.Media.Imaging.BitmapImage(new Uri("/Images/AppBackground.jpg", UriKind.Relative)),
       Opacity = 0.5d
   };
   this.RootFrame.Background = brush;
}
I hope this will fix your problem.
Â
Thanks.