|
1 | | -<UserControl x:Class="MaterialDesignColors.WpfExample.Buttons" |
| 1 | +<UserControl x:Class="MaterialDesignColors.WpfExample.Buttons" |
2 | 2 | xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
3 | 3 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
4 | | - xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
5 | | - xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 4 | + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 5 | + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
6 | 6 | xmlns:system="clr-namespace:System;assembly=mscorlib" |
7 | 7 | xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" |
8 | 8 | xmlns:materialDesignConverters="clr-namespace:MaterialDesignThemes.Wpf.Converters;assembly=MaterialDesignThemes.Wpf" |
|
131 | 131 | <RowDefinition Height="*"/> |
132 | 132 | <RowDefinition Height="*"/> |
133 | 133 | <RowDefinition Height="*"/> |
134 | | - <RowDefinition Height="*" /> |
| 134 | + <RowDefinition Height="*"/> |
| 135 | + <RowDefinition Height="*"/> |
135 | 136 | </Grid.RowDefinitions> |
136 | 137 | <TextBlock Grid.Column="0" Grid.Row="0" Style="{StaticResource MaterialDesignTitleTextBlock}" Margin="8,8,8,16">OPTIONS</TextBlock> |
137 | 138 | <TextBox Grid.Column="0" Grid.Row="1" materialDesign:HintAssist.Hint="Setting 1" Text="200"/> |
|
152 | 153 | <ComboBoxItem>250%</ComboBoxItem> |
153 | 154 | <ComboBoxItem>501%</ComboBoxItem> |
154 | 155 | </ComboBox> |
| 156 | + |
| 157 | + <StackPanel Grid.Row="5" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Right"> |
| 158 | + <Button Content="_Save" Command="{x:Static materialDesign:PopupBox.ClosePopupCommand}" /> |
| 159 | + <Button Content="_Cancel" Command="{x:Static materialDesign:PopupBox.ClosePopupCommand}"> |
| 160 | + <Button.Style> |
| 161 | + <Style TargetType="Button" BasedOn="{StaticResource MaterialDesignPopupBoxButton}"> |
| 162 | + <Setter Property="Foreground" Value="Red" /> |
| 163 | + </Style> |
| 164 | + </Button.Style> |
| 165 | + </Button> |
| 166 | + </StackPanel> |
155 | 167 | </Grid> |
156 | 168 |
|
157 | 169 | </materialDesign:PopupBox> |
|
270 | 282 | <smtx:XamlDisplay Key="buttons_26" Margin="5 0 0 0"> |
271 | 283 | <Grid Width="124"> |
272 | 284 | <!-- raised button with progress, useful to auto dismiss/accept something --> |
273 | | - <Button Command="{Binding DismissComand}" |
| 285 | + <Button Command="{Binding DismissCommand}" |
274 | 286 | Style="{StaticResource MaterialDesignRaisedButton}" |
275 | 287 | HorizontalAlignment="Left" |
276 | 288 | materialDesign:ButtonProgressAssist.Value="{Binding DismissButtonProgress}" |
|
302 | 314 | <!-- floating action button with progress --> |
303 | 315 | <TextBlock Margin="24 0 0 0" VerticalAlignment="Center">Click Me:</TextBlock> |
304 | 316 | <Button Style="{StaticResource MaterialDesignFloatingActionLightButton}" Margin="8 0 0 0" |
305 | | - Command="{Binding SaveComand}" |
| 317 | + Command="{Binding SaveCommand}" |
306 | 318 | materialDesign:ButtonProgressAssist.IsIndicatorVisible="{Binding IsSaving}" |
307 | 319 | materialDesign:ButtonProgressAssist.Value="{Binding SaveProgress}"> |
308 | 320 | <!-- simple example of toggling/animating pack icon with a data trigger--> |
|
596 | 608 | <materialDesign:RatingBar Value="3" x:Name="BasicRatingBar" ValueChanged="BasicRatingBar_ValueChanged"/> |
597 | 609 | </smtx:XamlDisplay> |
598 | 610 | <TextBlock Text="{Binding ElementName=BasicRatingBar, Path=Value, StringFormat=Rating: {0}}" VerticalAlignment="Top" Margin="10,2,0,0" /> |
| 611 | + |
599 | 612 | <smtx:XamlDisplay Key="buttons_59" Margin="24 0 0 5"> |
600 | 613 | <materialDesign:RatingBar x:Name="CustomRatingBar" Max="3" Value="2" Orientation="Vertical"> |
601 | 614 | <materialDesign:RatingBar.ValueItemTemplate> |
|
611 | 624 | </materialDesign:RatingBar> |
612 | 625 | </smtx:XamlDisplay> |
613 | 626 | <TextBlock Text="{Binding ElementName=CustomRatingBar, Path=Value, StringFormat=Rating: {0}}" VerticalAlignment="Top" Margin="10,2,0,0" /> |
| 627 | + |
| 628 | + <smtx:XamlDisplay Key="buttons_62" VerticalContentAlignment="Top" Margin="5 0 0 5"> |
| 629 | + <materialDesign:RatingBar Value="4" IsReadOnly="True" x:Name="ReadOnlyRatingBar"/> |
| 630 | + </smtx:XamlDisplay> |
| 631 | + <TextBlock Text="{Binding ElementName=ReadOnlyRatingBar, Path=Value, StringFormat=Readonly Rating: {0}}" VerticalAlignment="Top" Margin="10,2,0,0" /> |
614 | 632 | </StackPanel> |
615 | 633 | </Grid> |
616 | 634 | </UserControl> |
|
0 commit comments