feat: implement drag.
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:u="https://irihi.tech/ursa">
|
||||
<!-- Add Resources Here -->
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:u="https://irihi.tech/ursa">
|
||||
<!-- Add Resources Here -->
|
||||
<ControlTheme x:Key="{x:Type u:NumericUpDown}" TargetType="{x:Type u:NumericUpDown}">
|
||||
<Setter Property="NumericUpDown.VerticalContentAlignment" Value="Center" />
|
||||
<Setter Property="NumericUpDown.CornerRadius" Value="{DynamicResource NumericUpDownCornerRadius}" />
|
||||
@@ -16,21 +17,30 @@
|
||||
AllowSpin="{TemplateBinding AllowSpin}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
>
|
||||
<TextBox
|
||||
Name="PART_TextBox"
|
||||
Height="{TemplateBinding Height}"
|
||||
MinHeight="{DynamicResource NumericUpDownWrapperDefaultHeight}"
|
||||
AcceptsReturn="False"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
DataValidationErrors.Errors="{ReflectionBinding $parent[NumericUpDown].(DataValidationErrors.Errors)}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
IsReadOnly="{TemplateBinding IsReadOnly}"
|
||||
TextWrapping="NoWrap"
|
||||
Theme="{DynamicResource NonErrorTextBox}"
|
||||
Watermark="{TemplateBinding Watermark}" />
|
||||
BorderThickness="{TemplateBinding BorderThickness}">
|
||||
<Panel>
|
||||
<TextBox
|
||||
Name="PART_TextBox"
|
||||
Height="{TemplateBinding Height}"
|
||||
MinHeight="{DynamicResource NumericUpDownWrapperDefaultHeight}"
|
||||
AcceptsReturn="False"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
DataValidationErrors.Errors="{ReflectionBinding $parent[NumericUpDown].(DataValidationErrors.Errors)}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
IsReadOnly="{TemplateBinding IsReadOnly}"
|
||||
TextWrapping="NoWrap"
|
||||
Theme="{DynamicResource NonErrorTextBox}"
|
||||
Watermark="{TemplateBinding Watermark}" />
|
||||
<Panel
|
||||
Name="PART_DragPanel"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Background="Transparent"
|
||||
Cursor="SizeAll"
|
||||
IsVisible="{TemplateBinding TextEditable,
|
||||
Converter={x:Static BoolConverters.Not}}" />
|
||||
</Panel>
|
||||
</ButtonSpinner>
|
||||
</DataValidationErrors>
|
||||
</ControlTemplate>
|
||||
|
||||
Reference in New Issue
Block a user