HP Sta

HP Sta

  • 1.6k
  • 156
  • 6k

Pages versus Windows

Apr 12 2020 2:53 AM
I have a RibbonWindow as start window and now I want to create an input option for persons, articles etc.
 
 
If I use further windows they will all open as new windows.
 
Since not so many controls are needed, I wanted to use pages that are displayed in the RibbonWindow.
Therefore I have the following entry in the RibbonWindow
  1. <Frame x:Name="WorkZone" Grid.Row="2" Grid.RowSpan="2" NavigationUIVisibility="Hidden"></Frame>  
In the CodeBehind the page is displayed with
 
  1. private void BtnLief_Click(object sender, RoutedEventArgs e)  
  2.         {  
  3.             WorkZone.NavigationService.Navigate(new Uri("PageRSTGruppen.xaml", UriKind.Relative));  
  4.         }  
 
This works. 
When I click on Close the page should be closed.
 
 
 
 
 
 
 
Problem is, there is no "Close()" option in the page.
 
How can I remove the page from the RibbonWindow or where can I find an example?
Maybe this is not a good approach with pages and I should work with windows?
 
Thanks a lot
Greeting
Hans-Peter