Re: Simulating modal dialog inside a view
Posted: 03 Jun 2019, 10:55
Each UserControl is defined in separate xaml files, then you can reference them in any other xaml just by including an instance of the code-behind class:
MyUserControl.xaml
MainWindow.xaml
MyUserControl.xaml
Code: Select all
<UserControl x:Class="Testing.MyUserControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
...
</UserControl>
Code: Select all
<UserControl x:Class="Testing.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Testing">
<Grid x:Name="LayoutRoot">
...
<local:MyUserControl />
...
</Grid>
</UserControl>