Merge pull request #321 from irihitech/rc/293-backgroundsizing
Fix BackgroundSizing of TextBox, CalendarDatePicker, AutoCompleteBox, NumericUpDown
This commit is contained in:
commit
8524e56166
@ -17,69 +17,58 @@
|
||||
<StackPanel.Styles>
|
||||
<Style Selector="AutoCompleteBox">
|
||||
<Setter Property="Width" Value="300" />
|
||||
<Setter Property="ItemsSource">
|
||||
<Binding Path="States" />
|
||||
</Setter>
|
||||
<Setter Property="ItemTemplate">
|
||||
<DataTemplate DataType="local:StateData">
|
||||
<TextBlock Text="{Binding Name}" />
|
||||
</DataTemplate>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style Selector="AutoCompleteBox.Split">
|
||||
<Setter Property="Width" Value="100" />
|
||||
</Style>
|
||||
</StackPanel.Styles>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<AutoCompleteBox Classes="Split Large"
|
||||
ValueMemberBinding="{ReflectionBinding Name}" />
|
||||
<AutoCompleteBox Classes="Split"
|
||||
ValueMemberBinding="{ReflectionBinding Name}" />
|
||||
<AutoCompleteBox Classes="Split Small"
|
||||
ValueMemberBinding="{ReflectionBinding Name}" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<AutoCompleteBox Classes="Split"
|
||||
IsEnabled="False"
|
||||
ValueMemberBinding="{ReflectionBinding Name}" />
|
||||
<AutoCompleteBox Classes="Split Bordered"
|
||||
ValueMemberBinding="{ReflectionBinding Name}" />
|
||||
<AutoCompleteBox Classes="Split Bordered"
|
||||
IsEnabled="False"
|
||||
ValueMemberBinding="{ReflectionBinding Name}" />
|
||||
</StackPanel>
|
||||
|
||||
<AutoCompleteBox
|
||||
ItemsSource="{Binding States}"
|
||||
ValueMemberBinding="{Binding Name}"
|
||||
Watermark="Please select a State">
|
||||
<AutoCompleteBox.ItemTemplate>
|
||||
<DataTemplate DataType="local:StateData">
|
||||
<TextBlock Text="{Binding Name}" />
|
||||
</DataTemplate>
|
||||
</AutoCompleteBox.ItemTemplate>
|
||||
</AutoCompleteBox>
|
||||
Watermark="Please select a State"
|
||||
ValueMemberBinding="{Binding Name}" />
|
||||
<AutoCompleteBox
|
||||
Classes="Large"
|
||||
ItemsSource="{Binding States}"
|
||||
ValueMemberBinding="{ReflectionBinding Name}">
|
||||
<AutoCompleteBox.ItemTemplate>
|
||||
<DataTemplate DataType="local:StateData">
|
||||
<TextBlock Text="{Binding Name}" />
|
||||
</DataTemplate>
|
||||
</AutoCompleteBox.ItemTemplate>
|
||||
</AutoCompleteBox>
|
||||
ValueMemberBinding="{ReflectionBinding Name}" />
|
||||
<AutoCompleteBox
|
||||
Classes="Small"
|
||||
ItemsSource="{Binding States}"
|
||||
ValueMemberBinding="{ReflectionBinding Name}">
|
||||
<AutoCompleteBox.ItemTemplate>
|
||||
<DataTemplate DataType="local:StateData">
|
||||
<TextBlock Text="{Binding Name}" />
|
||||
</DataTemplate>
|
||||
</AutoCompleteBox.ItemTemplate>
|
||||
</AutoCompleteBox>
|
||||
ValueMemberBinding="{ReflectionBinding Name}" />
|
||||
<AutoCompleteBox
|
||||
Classes="Bordered"
|
||||
ItemsSource="{Binding States}"
|
||||
ValueMemberBinding="{ReflectionBinding Name}">
|
||||
<AutoCompleteBox.ItemTemplate>
|
||||
<DataTemplate DataType="local:StateData">
|
||||
<TextBlock Text="{Binding Name}" />
|
||||
</DataTemplate>
|
||||
</AutoCompleteBox.ItemTemplate>
|
||||
</AutoCompleteBox>
|
||||
ValueMemberBinding="{ReflectionBinding Name}" />
|
||||
<AutoCompleteBox
|
||||
IsEnabled="False"
|
||||
ItemsSource="{Binding States}"
|
||||
ValueMemberBinding="{ReflectionBinding Name}"
|
||||
Watermark="Disabled">
|
||||
<AutoCompleteBox.ItemTemplate>
|
||||
<DataTemplate DataType="local:StateData">
|
||||
<TextBlock Text="{Binding Name}" />
|
||||
</DataTemplate>
|
||||
</AutoCompleteBox.ItemTemplate>
|
||||
</AutoCompleteBox>
|
||||
<AutoCompleteBox
|
||||
Watermark="Disabled"
|
||||
ValueMemberBinding="{ReflectionBinding Name}" />
|
||||
<AutoCompleteBox
|
||||
InnerLeftContent="https://"
|
||||
InnerRightContent=".com"
|
||||
ItemsSource="{Binding States}"
|
||||
ValueMemberBinding="{ReflectionBinding Name}">
|
||||
<AutoCompleteBox.ItemTemplate>
|
||||
<DataTemplate DataType="local:StateData">
|
||||
<TextBlock Text="{Binding Name}" />
|
||||
</DataTemplate>
|
||||
</AutoCompleteBox.ItemTemplate>
|
||||
</AutoCompleteBox>
|
||||
ValueMemberBinding="{ReflectionBinding Name}" />
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
</UserControl>
|
@ -8,11 +8,22 @@
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
||||
<CalendarDatePicker />
|
||||
<CalendarDatePicker Classes="ClearButton" Width="200" />
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<CalendarDatePicker Classes="Large" />
|
||||
<CalendarDatePicker />
|
||||
<CalendarDatePicker Classes="Small" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<CalendarDatePicker IsEnabled="False" />
|
||||
<CalendarDatePicker Classes="Bordered" />
|
||||
<CalendarDatePicker Classes="Bordered" IsEnabled="False" />
|
||||
</StackPanel>
|
||||
|
||||
<CalendarDatePicker Width="500" />
|
||||
<CalendarDatePicker Classes="Large" />
|
||||
<CalendarDatePicker Classes="Small" />
|
||||
|
||||
<CalendarDatePicker Classes="ClearButton" Width="200" />
|
||||
|
||||
<CalendarDatePicker
|
||||
Name="DatePicker2"
|
||||
Margin="0,0,0,8"
|
||||
@ -23,9 +34,5 @@
|
||||
CustomDateFormatString="ddd, MMM d"
|
||||
SelectedDateFormat="Custom" />
|
||||
<CalendarDatePicker Margin="0,0,0,8" Watermark="Watermark" />
|
||||
|
||||
<CalendarDatePicker IsEnabled="False" />
|
||||
<CalendarDatePicker Classes="Bordered" />
|
||||
<CalendarDatePicker Classes="Bordered" IsEnabled="False" />
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
</UserControl>
|
@ -8,6 +8,24 @@
|
||||
d:DesignWidth="800"
|
||||
mc:Ignorable="d">
|
||||
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<NumericUpDown Classes="Large" Width="150" ButtonSpinnerLocation="Left"/>
|
||||
<NumericUpDown Width="150" ShowButtonSpinner="False" />
|
||||
<NumericUpDown Classes="Small" Width="150" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<NumericUpDown Width="150" ButtonSpinnerLocation="Left" />
|
||||
<NumericUpDown Width="150" ShowButtonSpinner="False" />
|
||||
<NumericUpDown Width="150" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<NumericUpDown Width="150" ShowButtonSpinner="False" />
|
||||
<NumericUpDown IsEnabled="False" Width="150" />
|
||||
<NumericUpDown Width="150" ButtonSpinnerLocation="Left" />
|
||||
</StackPanel>
|
||||
|
||||
<NumericUpDown
|
||||
Width="200"
|
||||
Maximum="100"
|
||||
@ -44,4 +62,4 @@
|
||||
Maximum="100"
|
||||
Minimum="0" />
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
</UserControl>
|
@ -10,6 +10,18 @@
|
||||
mc:Ignorable="d">
|
||||
<ScrollViewer>
|
||||
<StackPanel HorizontalAlignment="Left" Spacing="20">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBox Classes="Large" Width="150"/>
|
||||
<TextBox Width="150"/>
|
||||
<TextBox Classes="Small" Width="150"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBox IsEnabled="False" Width="150"/>
|
||||
<TextBox Classes="Bordered" Width="150"/>
|
||||
<TextBox Classes="Bordered" IsEnabled="False" Width="150"/>
|
||||
</StackPanel>
|
||||
|
||||
<TextBox Width="300" />
|
||||
<TextBox Width="300" Classes="Large" />
|
||||
<TextBox Width="300" Classes="Small" />
|
||||
|
@ -9,6 +9,8 @@
|
||||
</StackPanel>
|
||||
</Design.PreviewWith>
|
||||
<ControlTheme x:Key="{x:Type AutoCompleteBox}" TargetType="AutoCompleteBox">
|
||||
<Setter Property="AutoCompleteBox.VerticalAlignment" Value="Center" />
|
||||
<Setter Property="AutoCompleteBox.MinHeight" Value="{DynamicResource AutoCompleteBoxDefaultHeight}" />
|
||||
<Setter Property="AutoCompleteBox.MaxDropDownHeight" Value="{DynamicResource AutoCompleteMaxDropdownHeight}" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="AutoCompleteBox">
|
||||
@ -16,7 +18,8 @@
|
||||
<Panel>
|
||||
<TextBox
|
||||
Name="PART_TextBox"
|
||||
VerticalAlignment="Center"
|
||||
VerticalAlignment="Stretch"
|
||||
MinHeight="0"
|
||||
DataValidationErrors.Errors="{TemplateBinding (DataValidationErrors.Errors)}"
|
||||
Theme="{DynamicResource NonErrorTextBox}"
|
||||
InnerLeftContent="{TemplateBinding InnerLeftContent}"
|
||||
@ -55,7 +58,8 @@
|
||||
<Panel>
|
||||
<TextBox
|
||||
Name="PART_TextBox"
|
||||
VerticalAlignment="Center"
|
||||
VerticalAlignment="Stretch"
|
||||
MinHeight="0"
|
||||
Classes="Bordered"
|
||||
DataValidationErrors.Errors="{TemplateBinding (DataValidationErrors.Errors)}"
|
||||
Watermark="{TemplateBinding Watermark}" />
|
||||
@ -85,15 +89,11 @@
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style Selector="^.Large /template/ TextBox">
|
||||
<Style Selector="^.Large">
|
||||
<Setter Property="MinHeight" Value="{DynamicResource AutoCompleteBoxLargeHeight}" />
|
||||
</Style>
|
||||
<Style Selector="^.Small /template/ TextBox">
|
||||
<Style Selector="^.Small">
|
||||
<Setter Property="MinHeight" Value="{DynamicResource AutoCompleteBoxSmallHeight}" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
|
||||
|
||||
|
||||
|
||||
</ResourceDictionary>
|
||||
|
@ -9,12 +9,14 @@
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource CalendarDatePickerBorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="{DynamicResource CalendarDatePickerBorderThickness}" />
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource CalendarDatePickerCornerRadius}" />
|
||||
<Setter Property="BackgroundSizing" Value="OuterBorderEdge"/>
|
||||
<Setter Property="IsTodayHighlighted" Value="True" />
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="Padding" Value="8 0" />
|
||||
<Setter Property="MinHeight" Value="{DynamicResource CalendarDatePickerDefaultHeight}" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="CalendarDatePicker">
|
||||
<DataValidationErrors>
|
||||
@ -24,96 +26,96 @@
|
||||
VerticalAlignment="Stretch">
|
||||
<Border
|
||||
x:Name="Background"
|
||||
BackgroundSizing="{TemplateBinding BackgroundSizing}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
<Grid
|
||||
CornerRadius="{TemplateBinding CornerRadius}"/>
|
||||
<Grid
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
ColumnDefinitions="*, Auto, Auto">
|
||||
<TextBox
|
||||
Name="PART_TextBox"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
MinHeight="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
ColumnDefinitions="*, Auto, Auto">
|
||||
<TextBox
|
||||
Name="PART_TextBox"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
MinHeight="{DynamicResource CalendarDatePickerDefaultHeight}"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
VerticalAlignment="Stretch"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Background="Transparent"
|
||||
BorderBrush="Transparent"
|
||||
BorderThickness="0"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Theme="{DynamicResource NonErrorTextBox}"
|
||||
UseFloatingWatermark="{TemplateBinding UseFloatingWatermark}"
|
||||
Watermark="{TemplateBinding Watermark}">
|
||||
<TextBox.Styles>
|
||||
<Style Selector="TextBox#PART_TextBox:pointerover /template/ Border#PART_ContentPresenterBorder">
|
||||
<!-- By default the TextBox has its own focused state, override this to disable it here -->
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
</Style>
|
||||
<Style Selector="TextBox#PART_TextBox:focus /template/ Border#PART_ContentPresenterBorder">
|
||||
<!-- By default the TextBox has its own focused state, override this to disable it here -->
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
</Style>
|
||||
<Style Selector="TextBox#PART_TextBox:disabled">
|
||||
<Style Selector="^ /template/ Border#PART_ContentPresenterBorder">
|
||||
<!-- By default the TextBox has its own disabled state, override this to make the border background show through -->
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
</Style>
|
||||
</Style>
|
||||
</TextBox.Styles>
|
||||
</TextBox>
|
||||
<Button
|
||||
Name="ClearButton"
|
||||
Grid.Column="1"
|
||||
Padding="0,0,8,0"
|
||||
Content="{DynamicResource IconButtonClearData}"
|
||||
Command="{Binding $parent[CalendarDatePicker].Clear}"
|
||||
Focusable="False"
|
||||
IsVisible="False"
|
||||
Theme="{DynamicResource InnerIconButton}" />
|
||||
<Button
|
||||
Name="PART_Button"
|
||||
Grid.Column="2"
|
||||
Padding="0,0,8,0"
|
||||
Content="{DynamicResource CalendarDatePickerIconGlyph}"
|
||||
Focusable="False"
|
||||
Theme="{DynamicResource InnerIconButton}" />
|
||||
<Popup
|
||||
Name="PART_Popup"
|
||||
Grid.Column="0"
|
||||
HorizontalOffset="-8"
|
||||
IsLightDismissEnabled="True"
|
||||
PlacementTarget="{TemplateBinding}"
|
||||
VerticalOffset="-4">
|
||||
<Border
|
||||
Margin="8"
|
||||
Background="Transparent"
|
||||
BorderBrush="Transparent"
|
||||
BorderThickness="0"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Theme="{DynamicResource NonErrorTextBox}"
|
||||
UseFloatingWatermark="{TemplateBinding UseFloatingWatermark}"
|
||||
Watermark="{TemplateBinding Watermark}">
|
||||
<TextBox.Styles>
|
||||
<Style Selector="TextBox#PART_TextBox:pointerover /template/ Border#PART_ContentPresenterBorder">
|
||||
<!-- By default the TextBox has its own focused state, override this to disable it here -->
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
</Style>
|
||||
<Style Selector="TextBox#PART_TextBox:focus /template/ Border#PART_ContentPresenterBorder">
|
||||
<!-- By default the TextBox has its own focused state, override this to disable it here -->
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
</Style>
|
||||
<Style Selector="TextBox#PART_TextBox:disabled">
|
||||
<Style Selector="^ /template/ Border#PART_ContentPresenterBorder">
|
||||
<!-- By default the TextBox has its own disabled state, override this to make the border background show through -->
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
</Style>
|
||||
</Style>
|
||||
</TextBox.Styles>
|
||||
</TextBox>
|
||||
<Button
|
||||
Name="ClearButton"
|
||||
Grid.Column="1"
|
||||
Padding="0,0,8,0"
|
||||
Content="{DynamicResource IconButtonClearData}"
|
||||
Command="{Binding $parent[CalendarDatePicker].Clear}"
|
||||
Focusable="False"
|
||||
IsVisible="False"
|
||||
Theme="{DynamicResource InnerIconButton}" />
|
||||
<Button
|
||||
Name="PART_Button"
|
||||
Grid.Column="2"
|
||||
Padding="0,0,8,0"
|
||||
Content="{DynamicResource CalendarDatePickerIconGlyph}"
|
||||
Focusable="False"
|
||||
Theme="{DynamicResource InnerIconButton}" />
|
||||
<Popup
|
||||
Name="PART_Popup"
|
||||
Grid.Column="0"
|
||||
HorizontalOffset="-8"
|
||||
IsLightDismissEnabled="True"
|
||||
PlacementTarget="{TemplateBinding}"
|
||||
VerticalOffset="-4">
|
||||
<Border
|
||||
Margin="8"
|
||||
Background="Transparent"
|
||||
BoxShadow="{DynamicResource CalendarDatePickerPopupBoxShadows}"
|
||||
CornerRadius="{DynamicResource CalendarCornerRadius}">
|
||||
<Calendar
|
||||
Name="PART_Calendar"
|
||||
BorderThickness="0"
|
||||
CornerRadius="{Binding $parent[Border].CornerRadius}"
|
||||
DisplayDate="{TemplateBinding DisplayDate}"
|
||||
DisplayDateEnd="{TemplateBinding DisplayDateEnd}"
|
||||
DisplayDateStart="{TemplateBinding DisplayDateStart}"
|
||||
FirstDayOfWeek="{TemplateBinding FirstDayOfWeek}"
|
||||
IsTodayHighlighted="{TemplateBinding IsTodayHighlighted}"
|
||||
SelectedDate="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedDate, Mode=TwoWay}">
|
||||
</Calendar>
|
||||
</Border>
|
||||
</Popup>
|
||||
</Grid>
|
||||
</Border>
|
||||
BoxShadow="{DynamicResource CalendarDatePickerPopupBoxShadows}"
|
||||
CornerRadius="{DynamicResource CalendarCornerRadius}">
|
||||
<Calendar
|
||||
Name="PART_Calendar"
|
||||
BorderThickness="0"
|
||||
CornerRadius="{Binding $parent[Border].CornerRadius}"
|
||||
DisplayDate="{TemplateBinding DisplayDate}"
|
||||
DisplayDateEnd="{TemplateBinding DisplayDateEnd}"
|
||||
DisplayDateStart="{TemplateBinding DisplayDateStart}"
|
||||
FirstDayOfWeek="{TemplateBinding FirstDayOfWeek}"
|
||||
IsTodayHighlighted="{TemplateBinding IsTodayHighlighted}"
|
||||
SelectedDate="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedDate, Mode=TwoWay}">
|
||||
</Calendar>
|
||||
</Border>
|
||||
</Popup>
|
||||
</Grid>
|
||||
|
||||
</Panel>
|
||||
</DataValidationErrors>
|
||||
@ -128,14 +130,10 @@
|
||||
</Style>
|
||||
|
||||
<Style Selector="^.Large">
|
||||
<Style Selector="^ /template/ TextBox#PART_TextBox">
|
||||
<Setter Property="MinHeight" Value="{DynamicResource CalendarDatePickerInnerLargeHeight}" />
|
||||
</Style>
|
||||
<Setter Property="MinHeight" Value="{DynamicResource CalendarDatePickerLargeHeight}" />
|
||||
</Style>
|
||||
<Style Selector="^.Small">
|
||||
<Style Selector="^ /template/ TextBox#PART_TextBox">
|
||||
<Setter Property="MinHeight" Value="{DynamicResource CalendarDatePickerInnerSmallHeight}" />
|
||||
</Style>
|
||||
<Setter Property="MinHeight" Value="{DynamicResource CalendarDatePickerSmallHeight}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:pointerover">
|
||||
|
@ -4,8 +4,10 @@
|
||||
x:CompileBindings="True">
|
||||
<!-- Add Resources Here -->
|
||||
<ControlTheme x:Key="{x:Type NumericUpDown}" TargetType="NumericUpDown">
|
||||
<Setter Property="NumericUpDown.VerticalAlignment" Value="Center" />
|
||||
<Setter Property="NumericUpDown.VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="NumericUpDown.CornerRadius" Value="{DynamicResource NumericUpDownCornerRadius}" />
|
||||
<Setter Property="NumericUpDown.MinHeight" Value="{DynamicResource NumericUpDownDefaultHeight}" />
|
||||
<Setter Property="NumericUpDown.Template">
|
||||
<ControlTemplate TargetType="NumericUpDown">
|
||||
<DataValidationErrors>
|
||||
@ -23,7 +25,8 @@
|
||||
<TextBox
|
||||
Name="PART_TextBox"
|
||||
Height="{TemplateBinding Height}"
|
||||
MinHeight="{DynamicResource NumericUpDownWrapperDefaultHeight}"
|
||||
MinHeight="0"
|
||||
VerticalAlignment="Stretch"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
AcceptsReturn="False"
|
||||
@ -43,11 +46,11 @@
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
|
||||
<Style Selector="^.Large /template/ TextBox#PART_TextBox">
|
||||
<Setter Property="MinHeight" Value="{DynamicResource NumericUpDownWrapperLargeHeight}" />
|
||||
<Style Selector="^.Large">
|
||||
<Setter Property="MinHeight" Value="{DynamicResource NumericUpDownLargeHeight}" />
|
||||
</Style>
|
||||
<Style Selector="^.Small /template/ TextBox#PART_TextBox">
|
||||
<Setter Property="MinHeight" Value="{DynamicResource NumericUpDownWrapperSmallHeight}" />
|
||||
<Style Selector="^.Small">
|
||||
<Setter Property="MinHeight" Value="{DynamicResource NumericUpDownSmallHeight}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^:error">
|
||||
|
@ -53,11 +53,14 @@
|
||||
<Setter Property="TextBox.SelectionBrush" Value="{DynamicResource TextBoxSelectionBackground}" />
|
||||
<Setter Property="TextBox.SelectionForegroundBrush" Value="{DynamicResource TextBoxSelectionForeground}" />
|
||||
<Setter Property="TextBox.BorderThickness" Value="{DynamicResource TextBoxBorderThickness}" />
|
||||
<Setter Property="TextBox.BackgroundSizing" Value="OuterBorderEdge" />
|
||||
<Setter Property="TextBox.CornerRadius" Value="{DynamicResource TextBoxDefaultCornerRadius}" />
|
||||
<Setter Property="TextBox.FontSize" Value="14" />
|
||||
<Setter Property="TextBox.Cursor" Value="Ibeam" />
|
||||
<Setter Property="TextBox.CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" />
|
||||
<Setter Property="TextBox.Padding" Value="{DynamicResource TextBoxContentPadding}" />
|
||||
<Setter Property="TextBox.MinHeight" Value="{DynamicResource TextBoxDefaultHeight}" />
|
||||
<Setter Property="TextBox.VerticalAlignment" Value="Center" />
|
||||
<Setter Property="TextBox.VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="TextBox.FocusAdorner" Value="{x:Null}" />
|
||||
<Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="True" />
|
||||
@ -67,8 +70,8 @@
|
||||
<DataValidationErrors>
|
||||
<Border
|
||||
Name="PART_ContentPresenterBorder"
|
||||
MinHeight="{DynamicResource TextBoxWrapperDefaultHeight}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BackgroundSizing="{TemplateBinding BackgroundSizing}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
@ -198,11 +201,11 @@
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</Style>
|
||||
</Style>
|
||||
<Style Selector="^.Large /template/ Border#PART_ContentPresenterBorder">
|
||||
<Setter Property="MinHeight" Value="{DynamicResource TextBoxWrapperLargeHeight}" />
|
||||
<Style Selector="^.Large">
|
||||
<Setter Property="MinHeight" Value="{DynamicResource TextBoxLargeHeight}" />
|
||||
</Style>
|
||||
<Style Selector="^.Small /template/ Border#PART_ContentPresenterBorder">
|
||||
<Setter Property="MinHeight" Value="{DynamicResource TextBoxWrapperSmallHeight}" />
|
||||
<Style Selector="^.Small">
|
||||
<Setter Property="MinHeight" Value="{DynamicResource TextBoxSmallHeight}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="^.Bordered">
|
||||
@ -248,13 +251,15 @@
|
||||
<Setter Property="TextBox.BorderBrush" Value="{DynamicResource TextBoxDefaultBorderBrush}" />
|
||||
<Setter Property="TextBox.SelectionBrush" Value="{DynamicResource TextBoxSelectionBackground}" />
|
||||
<Setter Property="TextBox.SelectionForegroundBrush" Value="{DynamicResource TextBoxSelectionForeground}" />
|
||||
<Setter Property="TextBox.BackgroundSizing" Value="OuterBorderEdge" />
|
||||
<Setter Property="TextBox.BorderThickness" Value="{DynamicResource TextBoxBorderThickness}" />
|
||||
<Setter Property="TextBox.CornerRadius" Value="{DynamicResource TextBoxDefaultCornerRadius}" />
|
||||
<Setter Property="TextBox.FontSize" Value="14" />
|
||||
<Setter Property="TextBox.Cursor" Value="Ibeam" />
|
||||
<Setter Property="TextBox.CaretBrush" Value="{DynamicResource TextBoxTextCaretBrush}" />
|
||||
<Setter Property="TextBox.Padding" Value="{DynamicResource TextBoxContentPadding}" />
|
||||
<Setter Property="TextBox.MinHeight" Value="{DynamicResource TextBoxWrapperDefaultHeight}" />
|
||||
<Setter Property="TextBox.MinHeight" Value="{DynamicResource TextBoxDefaultHeight}" />
|
||||
<Setter Property="TextBox.VerticalAlignment" Value="Center" />
|
||||
<Setter Property="TextBox.VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="TextBox.FocusAdorner" Value="{x:Null}" />
|
||||
<Setter Property="ScrollViewer.IsScrollChainingEnabled" Value="True" />
|
||||
@ -266,6 +271,7 @@
|
||||
Name="PART_ContentPresenterBorder"
|
||||
MinHeight="{TemplateBinding MinHeight}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BackgroundSizing="{TemplateBinding BackgroundSizing}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}">
|
||||
|
@ -2,6 +2,7 @@
|
||||
<Thickness x:Key="AutoCompleteBoxPopupBorderThickness">1</Thickness>
|
||||
<Thickness x:Key="AutoCompleteBoxPopupMargin">4</Thickness>
|
||||
<CornerRadius x:Key="AutoCompleteBoxPopupCornerRadius">6</CornerRadius>
|
||||
<x:Double x:Key="AutoCompleteBoxDefaultHeight">32</x:Double>
|
||||
<x:Double x:Key="AutoCompleteBoxSmallHeight">24</x:Double>
|
||||
<x:Double x:Key="AutoCompleteBoxLargeHeight">40</x:Double>
|
||||
<x:Double x:Key="AutoCompleteMaxDropdownHeight">600</x:Double>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<StreamGeometry x:Key="CalendarDatePickerIconGlyph">M4 20V8H20V20H4ZM2 4C2 2.89543 2.89543 2 4 2H20C21.1046 2 22 2.89543 22 4V20C22 21.1046 21.1046 22 20 22H4C2.89543 22 2 21.1046 2 20V4ZM6 10.5C6 10.2239 6.22386 10 6.5 10H8.5C8.77614 10 9 10.2239 9 10.5V12.5C9 12.7761 8.77614 13 8.5 13H6.5C6.22386 13 6 12.7761 6 12.5V10.5ZM6.5 15C6.22386 15 6 15.2239 6 15.5V17.5C6 17.7761 6.22386 18 6.5 18H8.5C8.77614 18 9 17.7761 9 17.5V15.5C9 15.2239 8.77614 15 8.5 15H6.5ZM10.5 10.5C10.5 10.2239 10.7239 10 11 10H13C13.2761 10 13.5 10.2239 13.5 10.5V12.5C13.5 12.7761 13.2761 13 13 13H11C10.7239 13 10.5 12.7761 10.5 12.5V10.5ZM11 15C10.7239 15 10.5 15.2239 10.5 15.5V17.5C10.5 17.7761 10.7239 18 11 18H13C13.2761 18 13.5 17.7761 13.5 17.5V15.5C13.5 15.2239 13.2761 15 13 15H11ZM15 10.5C15 10.2239 15.2239 10 15.5 10H17.5C17.7761 10 18 10.2239 18 10.5V12.5C18 12.7761 17.7761 13 17.5 13H15.5C15.2239 13 15 12.7761 15 12.5V10.5ZM15.5 15C15.2239 15 15 15.2239 15 15.5V17.5C15 17.7761 15.2239 18 15.5 18H17.5C17.7761 18 18 17.7761 18 17.5V15.5C18 15.2239 17.7761 15 17.5 15H15.5Z</StreamGeometry>
|
||||
<Thickness x:Key="CalendarDatePickerBorderThickness">1</Thickness>
|
||||
<CornerRadius x:Key="CalendarDatePickerCornerRadius">3</CornerRadius>
|
||||
<x:Double x:Key="CalendarDatePickerInnerSmallHeight">22</x:Double>
|
||||
<x:Double x:Key="CalendarDatePickerInnerLargeHeight">38</x:Double>
|
||||
<x:Double x:Key="CalendarDatePickerDefaultHeight">32</x:Double>
|
||||
<x:Double x:Key="CalendarDatePickerSmallHeight">24</x:Double>
|
||||
<x:Double x:Key="CalendarDatePickerLargeHeight">40</x:Double>
|
||||
</ResourceDictionary>
|
@ -1,6 +1,6 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<CornerRadius x:Key="NumericUpDownCornerRadius">3</CornerRadius>
|
||||
<x:Double x:Key="NumericUpDownWrapperDefaultHeight">32</x:Double>
|
||||
<x:Double x:Key="NumericUpDownWrapperSmallHeight">24</x:Double>
|
||||
<x:Double x:Key="NumericUpDownWrapperLargeHeight">40</x:Double>
|
||||
<x:Double x:Key="NumericUpDownDefaultHeight">32</x:Double>
|
||||
<x:Double x:Key="NumericUpDownSmallHeight">24</x:Double>
|
||||
<x:Double x:Key="NumericUpDownLargeHeight">40</x:Double>
|
||||
</ResourceDictionary>
|
@ -1,8 +1,7 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<x:Double x:Key="TextBoxSmallHeight">22</x:Double>
|
||||
<x:Double x:Key="TextBoxWrapperDefaultHeight">32</x:Double>
|
||||
<x:Double x:Key="TextBoxWrapperSmallHeight">24</x:Double>
|
||||
<x:Double x:Key="TextBoxWrapperLargeHeight">40</x:Double>
|
||||
<x:Double x:Key="TextBoxDefaultHeight">32</x:Double>
|
||||
<x:Double x:Key="TextBoxSmallHeight">24</x:Double>
|
||||
<x:Double x:Key="TextBoxLargeHeight">40</x:Double>
|
||||
|
||||
<CornerRadius x:Key="TextBoxDefaultCornerRadius">3</CornerRadius>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user