locked
Help With Background Image of Grid Windows Store App RRS feed

  • Question

  • I am trying to change the background image of my my App but it only accepts default Four images that are placed in Assets folder. ie Logo.png, widelogo.png etc. OR it accepts an PNG with same name as these files in Assets folder. 

    But I want to attach a BG Image with different name i.e Background.png. I am trying this XAML but it shows nothing:

       <Grid.Background>
                <ImageBrush Stretch="Fill" ImageSource="Pics/bg.png"/>
       </Grid.Background>

    I am new. Plz Guide me.
    • Moved by Tina-Shi Thursday, June 18, 2015 6:32 AM reated to the windows store
    Wednesday, June 17, 2015 6:11 AM

Answers

  • You need to add the bg.png image to the Pics folder of your project.

    Right-click on your project in the solution explorer (to the right where you see the project files) in Visual Studio and choose Add->New Folder and name the new folder "Pics".

    Then you right-click on the newly added "Pics" folder and choose Add->Existing Item and browse to your bg.png file on your hard drive and select it and add it.

    Hope that helps.

    Please remember to close your threads by marking helpful posts as answer and then start a new thread if you have a new question. Please don't ask several questions in the same thread.

    Thursday, June 18, 2015 8:49 AM

All replies

  • Hi Kamran377,

    Thank you for posting in MSDN forum.

    Since this issue is related to the Windows Store app development, so we will move this case to this Windows store app forum, you will get better support.

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, June 18, 2015 6:30 AM
  • You need to add the bg.png image to the Pics folder of your project.

    Right-click on your project in the solution explorer (to the right where you see the project files) in Visual Studio and choose Add->New Folder and name the new folder "Pics".

    Then you right-click on the newly added "Pics" folder and choose Add->Existing Item and browse to your bg.png file on your hard drive and select it and add it.

    Hope that helps.

    Please remember to close your threads by marking helpful posts as answer and then start a new thread if you have a new question. Please don't ask several questions in the same thread.

    Thursday, June 18, 2015 8:49 AM