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