I want to show image as background in silverlight page.i have included this code in xaml:
it's showing image but when i run my project then it was not showing background image for a page.how can i solve this problem?
Thanks in advance
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Priya LingePosted Aug 3, 2011, 1:26 AM
I again tried the same thing its working here.
Please see attached file.
Thanks.
maheshPosted Aug 3, 2011, 2:18 AM
maheshPosted Aug 3, 2011, 12:59 AM
Priya LingePosted Aug 3, 2011, 12:31 AM
Please try this.
public MainPage()
{
InitializeComponent();
Loaded += new RoutedEventHandler(MainPage_Loaded);
}
void MainPage_Loaded(object sender, RoutedEventArgs e)
{
ImageBrush image = new ImageBrush();
image.ImageSource = new BitmapImage(new Uri("/PortfolioInsight;component/Images/business_ppt_background.jpg", UriKind.Relative));
}
Hope this will help you.
Thanks.