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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Priya LingeRank #785 · 2.9K reputationPosted Aug 2, 2011, 9:26 PM EDT
I again tried the same thing its working here.
Please see attached file.
Thanks.
Priya LingeRank #785 · 2.9K reputationPosted Aug 2, 2011, 8:31 PM EDT
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.
mahesh112 reputationPosted Aug 2, 2011, 8:59 PM EDT
mahesh112 reputationPosted Aug 2, 2011, 10:18 PM EDT