|
17 | 17 | </UserControl.Resources>
|
18 | 18 |
|
19 | 19 | <ScrollViewer HorizontalScrollBarVisibility="Auto" >
|
20 |
| - <codeDisplayer:XamlDisplayerPanel > |
21 |
| - <TextBlock TextWrapping="Wrap" MaxWidth="300" Margin="32">Dialogs are supported via the DialogHost control which was designed to work with MVVM/binding, code-behind, routed commands, and a pure code-based API.</TextBlock> |
22 |
| - <TextBlock TextWrapping="Wrap" MaxWidth="300" HorizontalAlignment="Center" VerticalAlignment="Top" |
23 |
| - Margin="8 0 8 0" |
| 20 | + <codeDisplayer:XamlDisplayerPanel HorizontalAlignment="Center"> |
| 21 | + <TextBlock TextWrapping="Wrap" MaxWidth="800" Style="{StaticResource MaterialDesignHeadlineTextBlock}" codeDisplayer:XamlDisplayer.DisplayCode="False">Dialogs are supported via the DialogHost control which was designed to work with MVVM/binding, code-behind, routed commands, and a pure code-based API.</TextBlock> |
| 22 | + <TextBlock TextWrapping="Wrap" MaxWidth="800" Style="{StaticResource MaterialDesignSubheadingTextBlock}" HorizontalAlignment="Center" VerticalAlignment="Top" |
| 23 | + Margin="8 0 8 0" codeDisplayer:XamlDisplayer.DisplayCode="False" |
24 | 24 | >SAMPLE 1: Localised dialog encapsulating specific content, launched from a routed command, response handled in code-behind.</TextBlock>
|
25 | 25 | <materialDesign:DialogHost DialogClosing="Sample1_DialogHost_OnDialogClosing"
|
26 | 26 | HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
78 | 78 | </Grid>
|
79 | 79 | </Border>
|
80 | 80 | </materialDesign:DialogHost>
|
81 |
| - <TextBlock MaxWidth="300" TextWrapping="Wrap" VerticalAlignment="Top" Margin="8 0 8 0">SAMPLE 2: Top level dialog, using OpenDialog, passing content via the Parameter. You can pass a view model, provided a corresponding DataTemplate can be found in the scope of the root DialogHost.</TextBlock> |
| 81 | + <TextBlock MaxWidth="800" Style="{StaticResource MaterialDesignSubheadingTextBlock}" TextWrapping="Wrap" VerticalAlignment="Top" Margin="8 0 8 0" codeDisplayer:XamlDisplayer.DisplayCode="False">SAMPLE 2: Top level dialog, using OpenDialog, passing content via the Parameter. You can pass a view model, provided a corresponding DataTemplate can be found in the scope of the root DialogHost.</TextBlock> |
82 | 82 | <StackPanel VerticalAlignment="Center">
|
83 | 83 | <!--the request to open the dialog will bubble up to the top-most DialogHost, but we can used the attached property based event to handle the response -->
|
84 | 84 | <Button Command="{x:Static materialDesign:DialogHost.OpenDialogCommand}"
|
|
104 | 104 | PASS MODEL
|
105 | 105 | </Button>
|
106 | 106 | </StackPanel>
|
107 |
| - <TextBlock MaxWidth="300" TextWrapping="Wrap" VerticalAlignment="Top" Margin="8 0 8 0">SAMPLE 3: Open and listen to the dialog entirely from code in a view model.</TextBlock> |
| 107 | + <TextBlock MaxWidth="800" Style="{StaticResource MaterialDesignSubheadingTextBlock}" TextWrapping="Wrap" VerticalAlignment="Top" Margin="8 0 8 0" codeDisplayer:XamlDisplayer.DisplayCode="False">SAMPLE 3: Open and listen to the dialog entirely from code in a view model.</TextBlock> |
108 | 108 | <StackPanel >
|
109 | 109 | <!-- Executes a command on DialogsViewModel.cs, which will launch the dialog from code -->
|
110 | 110 | <Button Command="{Binding RunDialogCommand}"
|
|
116 | 116 | EXTENDED
|
117 | 117 | </Button>
|
118 | 118 | </StackPanel>
|
119 |
| - <TextBlock TextWrapping="Wrap" HorizontalAlignment="Center" VerticalAlignment="Top" |
120 |
| - Margin="8 0 8 0" MaxWidth="300" |
| 119 | + <TextBlock MaxWidth="800" Style="{StaticResource MaterialDesignSubheadingTextBlock}" TextWrapping="Wrap" HorizontalAlignment="Center" VerticalAlignment="Top" |
| 120 | + Margin="8 0 8 0" codeDisplayer:XamlDisplayer.DisplayCode="False" |
121 | 121 | >SAMPLE 4: Dialog managed from view model using IsOpen and custom commands (ignoring the provided routed commands).</TextBlock>
|
122 | 122 | <materialDesign:DialogHost HorizontalAlignment="Center" VerticalAlignment="Center"
|
123 | 123 | IsOpen="{Binding IsSample4DialogOpen}"
|
|
0 commit comments