Background image behind application bar

I upload an image to my page using

<Grid x:Name="LayoutRoot"> <Grid.Background> <ImageBrush ImageSource="../Images/kisses.jpg" Stretch="Fill"/> </Grid.Background> ... 

This works fine, except for one. I would like to use the same image as the splash screen, and when the application is downloaded and the splash screen disappears and the background of the page loads, I want the transition to be visually seamless. Thus, the image fills all 800 vertical pixels when it is a splash screen and only (800 - ApplicationBarHeight) when it is the background of the page. Therefore, I decided that this is due to the fact that I have this for LayoutGrid, and not for PhoneApplicationPage. But when I try to put it behind PhoneApplicationPage (and make LayoutGrid transparent), this will not work. Here is what I am trying. Why is this not working?

 <phone:PhoneApplicationPage.Background> <ImageBrush ImageSource="../Images/kisses.jpg" Stretch="Fill"/> </phone:PhoneApplicationPage.Background> 

Thanks.

+4
source share
2 answers

You should load the image into LayoutRoot and set the Opacity of the ApplicationBar to 99% - this way the image should be displayed at full height / per AppBar.

I canโ€™t check it myself at the moment, but if it doesnโ€™t work, I will watch the second time I get back to the PC :)

+3
source

2 steps:
(one)
in
<phone:PhoneApplicationPage set shell: SystemTray.IsVisible = "False"


(2)

 <Grid x:Name="LayoutRoot"> <Grid.Background> <ImageBrush ImageSource="Assets/Images/Flowers.png"></ImageBrush> </Grid.Background> 
+1
source

Source: https://habr.com/ru/post/1397171/


All Articles