I am trying to load a Frame on a click of a specific button. I have to recreate an App (from Delphi to C#). This means, I cannot change anything (Anything Layout related). I have a couple of buttons, with icons on top, with a second Grid right under the buttons.
When I start the App, it instantly Loads up the Frame (I am not allowed, to show the frame) Here is my code, to load the frame:
<Grid Margin="0,58,0,0" Grid.ColumnSpan="2">
<Frame Name="Page1" Source="/View/_Test/Page1.xaml"/>
</Grid>
This works, as it should. Next step for me, is to load the frame (and close it by a different button) on click of one of the buttons, shown in the Picture above. Buttons code:
<Button Content="" HorizontalAlignment="Left" Height="25" Margin="217,21,0,0" VerticalAlignment="Top" Width="25" BorderBrush="{x:Null}">
<Button.Background>
<ImageBrush ImageSource="Pictures\bmp00001.bmp" Stretch="Fill"/>
</Button.Background>
</Button>
How do I load and close a frame on click of a button?