c# - Set background image of app by a button click event -


When a button is pressed, the background image of the app can be changed to an image in the project.

I have tried to set the background image by modifying the visibility of an XAML image control, whose source points to the image in the project. But the problem in this case is that the image hides some XML controls. At the visibility set = right, I tried to set the "back to" and opacity options, but they have no advantage.

Please indicate that if this problem is resolved or help me get the right image XAML property to get my solution.

You can set VisualBrush to set your image as background You can use your basic element (in this case grid) in your code, press the button BackgroundImage set the property to your image path and if you have some kind of change notification for this property then The image will be replaced.

  & lt; Grid.Background & gt; & Lt; Visualbrush Tile Mode = "None" Opacity = "{Bounding Background Opacity}" & gt; & Lt; VisualBrush.Visual & gt; & Lt; Image source = "{bound background background}" & gt; & Lt; / Image & gt; & Lt; /VisualBrush.Visual> & Lt; / VisualBrush & gt; & Lt; /Grid.Background>    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -