Created
October 7, 2018 08:06
-
-
Save Iyemon-018/793013159cfac93d76e930dcfa9525d1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<UserControl x:Class="MaterialDesign.Dialog.Example.Dialogs.MessageDialog" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:local="clr-namespace:MaterialDesign.Dialog.Example.Dialogs" | |
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:system="clr-namespace:System;assembly=mscorlib" | |
xmlns:viewModels="clr-namespace:MaterialDesign.Dialog.Example.Dialogs.ViewModels" | |
d:DataContext="{d:DesignInstance {x:Type viewModels:MessageDialogViewModel}, | |
IsDesignTimeCreatable=True}" | |
mc:Ignorable="d"> | |
<Grid x:Name="LayoutRoot"> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="*" /> | |
<RowDefinition Height="Auto" /> | |
<RowDefinition Height="Auto" /> | |
</Grid.RowDefinitions> | |
<Border Grid.Row="0"> | |
<Grid Margin="12,12,12,8"> | |
<Grid.ColumnDefinitions> | |
<ColumnDefinition Width="Auto" /> | |
<ColumnDefinition Width="*" /> | |
</Grid.ColumnDefinitions> | |
<materialDesign:PackIcon Width="48" | |
Height="48" | |
VerticalAlignment="Top" | |
Foreground="{StaticResource PrimaryHueMidBrush}" | |
Kind="HelpCircleOutline" /> | |
<TextBlock Grid.Column="1" | |
Margin="8,8,0,8" | |
VerticalAlignment="Top" | |
FontSize="24" | |
Text="{Binding Message, Mode=OneWay}" /> | |
</Grid> | |
</Border> | |
<Border Grid.Row="1" | |
Height="2" | |
CornerRadius="2" | |
Margin="16,0"> | |
<Border.Background> | |
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1"> | |
<GradientStop Offset="0" Color="#FFD0D0D0" /> | |
<GradientStop Offset="1" Color="#FFA0A0A0" /> | |
<GradientStop Offset="0.49" Color="#FFD0D0D0" /> | |
<GradientStop Offset="0.5" Color="#FFA0A0A0" /> | |
</LinearGradientBrush> | |
</Border.Background> | |
</Border> | |
<Border Grid.Row="2"> | |
<StackPanel Margin="16,12" | |
HorizontalAlignment="Right" | |
Orientation="Horizontal"> | |
<Button Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}" | |
Content="はい" | |
IsDefault="True" | |
Style="{StaticResource MaterialDesignFlatButton}"> | |
<Button.CommandParameter> | |
<system:Boolean>True</system:Boolean> | |
</Button.CommandParameter> | |
</Button> | |
<Button Margin="24,0,0,0" | |
Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}" | |
Content="いいえ" | |
IsCancel="True" | |
Style="{StaticResource MaterialDesignFlatButton}"> | |
<Button.CommandParameter> | |
<system:Boolean>False</system:Boolean> | |
</Button.CommandParameter> | |
</Button> | |
</StackPanel> | |
</Border> | |
</Grid> | |
</UserControl> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment