misc: format codes & fix some typos.
This commit is contained in:
@@ -13,14 +13,14 @@
|
||||
<UserControl.Styles>
|
||||
<Style Selector="Button">
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="Margin" Value="8"></Setter>
|
||||
<Setter Property="Margin" Value="8" />
|
||||
</Style>
|
||||
</UserControl.Styles>
|
||||
<StackPanel HorizontalAlignment="Left">
|
||||
<ComboBox ItemsSource="{Binding Icons}" SelectedItem="{Binding SelectedIcon}" />
|
||||
<ToggleSwitch Content="Try Long Message" IsChecked="{Binding UseLong}"></ToggleSwitch>
|
||||
<ToggleSwitch Content="Show Title" IsChecked="{Binding UseTitle}"></ToggleSwitch>
|
||||
<ToggleSwitch Content="Overlay" IsChecked="{Binding UseOverlay}"></ToggleSwitch>
|
||||
<ToggleSwitch Content="Try Long Message" IsChecked="{Binding UseLong}" />
|
||||
<ToggleSwitch Content="Show Title" IsChecked="{Binding UseTitle}" />
|
||||
<ToggleSwitch Content="Overlay" IsChecked="{Binding UseOverlay}" />
|
||||
<Button Command="{Binding DefaultMessageBoxCommand}" Content="Default" />
|
||||
<Button Command="{Binding OkCommand}" Content="OK" />
|
||||
<Button Command="{Binding OkCancelCommand}" Content="OKCancel" />
|
||||
@@ -28,8 +28,8 @@
|
||||
<Button Command="{Binding YesNoCancelCommand}" Content="YesNoCancel" />
|
||||
|
||||
<TextBlock>
|
||||
<Run Text="Last Clicked Result: "></Run>
|
||||
<Run Text="{Binding Result}"></Run>
|
||||
<Run Text="Last Clicked Result: " />
|
||||
<Run Text="{Binding Result}" />
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
@@ -36,99 +36,99 @@
|
||||
BackgroundSizing="InnerBorderEdge"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
IsHitTestVisible="False" />
|
||||
IsHitTestVisible="False" />
|
||||
<Panel Margin="{TemplateBinding WindowDecorationMargin}" Background="Transparent" />
|
||||
<VisualLayerManager>
|
||||
<Grid RowDefinitions="Auto, *, Auto">
|
||||
<Grid
|
||||
Grid.Row="0"
|
||||
Margin="24,24,24,0"
|
||||
ColumnDefinitions="Auto, *, Auto">
|
||||
<PathIcon
|
||||
Name="PART_Icon"
|
||||
Grid.Column="0"
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Classes="ExtraLarge"
|
||||
Margin="0,0,8,0"
|
||||
VerticalAlignment="Center"
|
||||
IsHitTestVisible="False" />
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="16"
|
||||
FontWeight="{DynamicResource TextBlockTitleFontWeight}"
|
||||
IsHitTestVisible="False"
|
||||
Text="{TemplateBinding Title}"
|
||||
TextTrimming="CharacterEllipsis"
|
||||
TextWrapping="NoWrap" />
|
||||
<Button
|
||||
Name="{x:Static u:MessageBoxWindow.PART_CloseButton}"
|
||||
Grid.Column="2"
|
||||
Theme="{DynamicResource CloseButton}" />
|
||||
</Grid>
|
||||
<Grid
|
||||
Grid.Row="1"
|
||||
MaxWidth="{DynamicResource MessageBoxWindowContentMaxWidth}"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
ColumnDefinitions="Auto, *">
|
||||
<ScrollViewer
|
||||
Grid.Column="1"
|
||||
MaxHeight="300"
|
||||
HorizontalScrollBarVisibility="Disabled"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
<ContentPresenter
|
||||
Name="PART_ContentPresenter"
|
||||
Grid.Row="0"
|
||||
Margin="24,24,24,0"
|
||||
ColumnDefinitions="Auto, *, Auto">
|
||||
<PathIcon
|
||||
Name="PART_Icon"
|
||||
Grid.Column="0"
|
||||
Theme="{StaticResource InnerPathIcon}"
|
||||
Classes="ExtraLarge"
|
||||
Margin="0,0,8,0"
|
||||
VerticalAlignment="Center"
|
||||
Content="{TemplateBinding Content}"
|
||||
TextAlignment="Left"
|
||||
TextWrapping="Wrap" />
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
IsHitTestVisible="False" />
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="16"
|
||||
FontWeight="{DynamicResource TextBlockTitleFontWeight}"
|
||||
IsHitTestVisible="False"
|
||||
Text="{TemplateBinding Title}"
|
||||
TextTrimming="CharacterEllipsis"
|
||||
TextWrapping="NoWrap" />
|
||||
<Button
|
||||
Name="{x:Static u:MessageBoxWindow.PART_CloseButton}"
|
||||
Grid.Column="2"
|
||||
Theme="{DynamicResource CloseButton}" />
|
||||
</Grid>
|
||||
<Grid
|
||||
Grid.Row="1"
|
||||
MaxWidth="{DynamicResource MessageBoxWindowContentMaxWidth}"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
ColumnDefinitions="Auto, *">
|
||||
<ScrollViewer
|
||||
Grid.Column="1"
|
||||
MaxHeight="300"
|
||||
HorizontalScrollBarVisibility="Disabled"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
<ContentPresenter
|
||||
Name="PART_ContentPresenter"
|
||||
VerticalAlignment="Center"
|
||||
Content="{TemplateBinding Content}"
|
||||
TextAlignment="Left"
|
||||
TextWrapping="Wrap" />
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
<StackPanel
|
||||
Grid.Row="2"
|
||||
Margin="24,0,24,24"
|
||||
HorizontalAlignment="Right"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
Name="{x:Static u:MessageBoxWindow.PART_CancelButton}"
|
||||
Margin="8,0,0,0" />
|
||||
<Button
|
||||
Name="{x:Static u:MessageBoxWindow.PART_NoButton}"
|
||||
Margin="8,0,0,0" />
|
||||
<Button
|
||||
Name="{x:Static u:MessageBoxWindow.PART_YesButton}"
|
||||
Margin="8,0,0,0" />
|
||||
<Button
|
||||
Name="{x:Static u:MessageBoxWindow.PART_OKButton}"
|
||||
Margin="8,0,0,0" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
Grid.Row="2"
|
||||
Margin="24,0,24,24"
|
||||
HorizontalAlignment="Right"
|
||||
Orientation="Horizontal">
|
||||
<Button
|
||||
Name="{x:Static u:MessageBoxWindow.PART_CancelButton}"
|
||||
Margin="8,0,0,0" />
|
||||
<Button
|
||||
Name="{x:Static u:MessageBoxWindow.PART_NoButton}"
|
||||
Margin="8,0,0,0" />
|
||||
<Button
|
||||
Name="{x:Static u:MessageBoxWindow.PART_YesButton}"
|
||||
Margin="8,0,0,0" />
|
||||
<Button
|
||||
Name="{x:Static u:MessageBoxWindow.PART_OKButton}"
|
||||
Margin="8,0,0,0" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</VisualLayerManager>
|
||||
</Panel>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
<Style Selector="^ /template/ Button#PART_CancelButton">
|
||||
<Setter Property="Grid.Column" Value="0"/>
|
||||
<Setter Property="helpers:ClassHelper.Classes" Value="Tertiary"/>
|
||||
<Setter Property="Content" Value="{DynamicResource STRING_MENU_DIALOG_CANCEL}"/>
|
||||
<Setter Property="Grid.Column" Value="0" />
|
||||
<Setter Property="helpers:ClassHelper.Classes" Value="Tertiary" />
|
||||
<Setter Property="Content" Value="{DynamicResource STRING_MENU_DIALOG_CANCEL}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Button#PART_NoButton">
|
||||
<Setter Property="Grid.Column" Value="1"></Setter>
|
||||
<Setter Property="helpers:ClassHelper.Classes" Value="Danger"/>
|
||||
<Setter Property="Content" Value="{DynamicResource STRING_MENU_DIALOG_NO}"/>
|
||||
<Setter Property="Theme" Value="{DynamicResource SolidButton}"/>
|
||||
<Setter Property="Grid.Column" Value="1" />
|
||||
<Setter Property="helpers:ClassHelper.Classes" Value="Danger" />
|
||||
<Setter Property="Content" Value="{DynamicResource STRING_MENU_DIALOG_NO}" />
|
||||
<Setter Property="Theme" Value="{DynamicResource SolidButton}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Button#PART_YesButton">
|
||||
<Setter Property="Grid.Column" Value="2"></Setter>
|
||||
<Setter Property="helpers:ClassHelper.Classes" Value="Primary"/>
|
||||
<Setter Property="Content" Value="{DynamicResource STRING_MENU_DIALOG_YES}"/>
|
||||
<Setter Property="Theme" Value="{DynamicResource SolidButton}"/>
|
||||
<Setter Property="Grid.Column" Value="2" />
|
||||
<Setter Property="helpers:ClassHelper.Classes" Value="Primary" />
|
||||
<Setter Property="Content" Value="{DynamicResource STRING_MENU_DIALOG_YES}" />
|
||||
<Setter Property="Theme" Value="{DynamicResource SolidButton}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Button#PART_OKButton">
|
||||
<Setter Property="Grid.Column" Value="3"></Setter>
|
||||
<Setter Property="helpers:ClassHelper.Classes" Value="Primary"/>
|
||||
<Setter Property="Content" Value="{DynamicResource STRING_MENU_DIALOG_OK}"/>
|
||||
<Setter Property="Theme" Value="{DynamicResource SolidButton}"/>
|
||||
<Setter Property="Grid.Column" Value="3" />
|
||||
<Setter Property="helpers:ClassHelper.Classes" Value="Primary" />
|
||||
<Setter Property="Content" Value="{DynamicResource STRING_MENU_DIALOG_OK}" />
|
||||
<Setter Property="Theme" Value="{DynamicResource SolidButton}" />
|
||||
</Style>
|
||||
<Style Selector="^[MessageIcon=None] /template/ PathIcon#PART_Icon">
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
@@ -268,27 +268,27 @@
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Button#PART_CancelButton">
|
||||
<Setter Property="Grid.Column" Value="0"/>
|
||||
<Setter Property="helpers:ClassHelper.Classes" Value="Tertiary"/>
|
||||
<Setter Property="Content" Value="{DynamicResource STRING_MENU_DIALOG_CANCEL}"/>
|
||||
<Setter Property="Grid.Column" Value="0" />
|
||||
<Setter Property="helpers:ClassHelper.Classes" Value="Tertiary" />
|
||||
<Setter Property="Content" Value="{DynamicResource STRING_MENU_DIALOG_CANCEL}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Button#PART_NoButton">
|
||||
<Setter Property="Grid.Column" Value="1"></Setter>
|
||||
<Setter Property="helpers:ClassHelper.Classes" Value="Danger"/>
|
||||
<Setter Property="Content" Value="{DynamicResource STRING_MENU_DIALOG_NO}"/>
|
||||
<Setter Property="Theme" Value="{DynamicResource SolidButton}"/>
|
||||
<Setter Property="Grid.Column" Value="1" />
|
||||
<Setter Property="helpers:ClassHelper.Classes" Value="Danger" />
|
||||
<Setter Property="Content" Value="{DynamicResource STRING_MENU_DIALOG_NO}" />
|
||||
<Setter Property="Theme" Value="{DynamicResource SolidButton}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Button#PART_YesButton">
|
||||
<Setter Property="Grid.Column" Value="2"></Setter>
|
||||
<Setter Property="helpers:ClassHelper.Classes" Value="Primary"/>
|
||||
<Setter Property="Content" Value="{DynamicResource STRING_MENU_DIALOG_YES}"/>
|
||||
<Setter Property="Theme" Value="{DynamicResource SolidButton}"/>
|
||||
<Setter Property="Grid.Column" Value="2" />
|
||||
<Setter Property="helpers:ClassHelper.Classes" Value="Primary" />
|
||||
<Setter Property="Content" Value="{DynamicResource STRING_MENU_DIALOG_YES}" />
|
||||
<Setter Property="Theme" Value="{DynamicResource SolidButton}" />
|
||||
</Style>
|
||||
<Style Selector="^ /template/ Button#PART_OKButton">
|
||||
<Setter Property="Grid.Column" Value="3"></Setter>
|
||||
<Setter Property="helpers:ClassHelper.Classes" Value="Primary"/>
|
||||
<Setter Property="Content" Value="{DynamicResource STRING_MENU_DIALOG_OK}"/>
|
||||
<Setter Property="Theme" Value="{DynamicResource SolidButton}"/>
|
||||
<Setter Property="Grid.Column" Value="3" />
|
||||
<Setter Property="helpers:ClassHelper.Classes" Value="Primary" />
|
||||
<Setter Property="Content" Value="{DynamicResource STRING_MENU_DIALOG_OK}" />
|
||||
<Setter Property="Theme" Value="{DynamicResource SolidButton}" />
|
||||
</Style>
|
||||
<Style Selector="^[MessageIcon=None] /template/ PathIcon#PART_Icon">
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<x:String x:Key="STRING_MENU_BRING_FORWARD">上移一层</x:String>
|
||||
<x:String x:Key="STRING_MENU_SEND_BACKWARD">下移一层</x:String>
|
||||
<x:String x:Key="STRING_MENU_SEND_TO_BACK">置于底层</x:String>
|
||||
<x:String x:Key="STRING_MENU_DIALOG_OK">确认</x:String>
|
||||
<x:String x:Key="STRING_MENU_DIALOG_OK">确定</x:String>
|
||||
<x:String x:Key="STRING_MENU_DIALOG_CANCEL">取消</x:String>
|
||||
<x:String x:Key="STRING_MENU_DIALOG_YES">是</x:String>
|
||||
<x:String x:Key="STRING_MENU_DIALOG_NO">否</x:String>
|
||||
@@ -16,7 +16,7 @@
|
||||
<x:String x:Key="STRING_THEME_TOGGLE_DARK">暗色</x:String>
|
||||
<x:String x:Key="STRING_THEME_TOGGLE_LIGHT">亮色</x:String>
|
||||
<x:String x:Key="STRING_THEME_TOGGLE_SYSTEM">跟随系统</x:String>
|
||||
<x:String x:Key="STRING_DATE_TIME_CONFIRM">确认</x:String>
|
||||
<x:String x:Key="STRING_DATE_TIME_CONFIRM">确定</x:String>
|
||||
<x:String x:Key="STRING_DATE_TIME_START_TIME">开始时间</x:String>
|
||||
<x:String x:Key="STRING_DATE_TIME_END_TIME">结束时间</x:String>
|
||||
</ResourceDictionary>
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<x:Double x:Key="MessageBoxWindowContentMaxWidth">300</x:Double>
|
||||
<x:Double x:Key="MessageBoxWindowContentMaxWidth">320</x:Double>
|
||||
</ResourceDictionary>
|
||||
|
||||
Reference in New Issue
Block a user