-
sfernandez
Site Admin
- Posts: 3008
- Joined:
Re: Simulating modal dialog inside a view
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>
Re: Simulating modal dialog inside a view
ok,thanksEach 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.xamlMainWindow.xamlCode: 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>
Who is online
Users browsing this forum: saji8k and 9 guests