feat: update property name.
This commit is contained in:
@@ -21,6 +21,6 @@
|
|||||||
<u:NumericByteUpDown Name="inputByte" Step="1" Value="3" EmptyInputValue="1"></u:NumericByteUpDown>
|
<u:NumericByteUpDown Name="inputByte" Step="1" Value="3" EmptyInputValue="1"></u:NumericByteUpDown>
|
||||||
<TextBlock Text="{Binding #inputByte.Value}"></TextBlock>
|
<TextBlock Text="{Binding #inputByte.Value}"></TextBlock>
|
||||||
<TextBlock Text="Drag"></TextBlock>
|
<TextBlock Text="Drag"></TextBlock>
|
||||||
<u:NumericIntUpDown Step="1" Value="2" Watermark="Input Value" TextEditable="False" />
|
<u:NumericIntUpDown Step="1" Value="2" Watermark="Input Value" IsTextEditable="False" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
Cursor="SizeAll"
|
Cursor="SizeAll"
|
||||||
IsVisible="{TemplateBinding TextEditable,
|
IsVisible="{TemplateBinding IsTextEditable,
|
||||||
Converter={x:Static BoolConverters.Not}}" />
|
Converter={x:Static BoolConverters.Not}}" />
|
||||||
</Panel>
|
</Panel>
|
||||||
</ButtonSpinner>
|
</ButtonSpinner>
|
||||||
|
|||||||
@@ -27,13 +27,13 @@ public abstract class NumericUpDown : TemplatedControl
|
|||||||
private Point? _point;
|
private Point? _point;
|
||||||
protected internal bool _updateFromTextInput;
|
protected internal bool _updateFromTextInput;
|
||||||
|
|
||||||
public static readonly StyledProperty<bool> TextEditableProperty = AvaloniaProperty.Register<NumericUpDown, bool>(
|
public static readonly StyledProperty<bool> IsTextEditableProperty = AvaloniaProperty.Register<NumericUpDown, bool>(
|
||||||
nameof(TextEditable), defaultValue: true);
|
nameof(IsTextEditable), defaultValue: true);
|
||||||
|
|
||||||
public bool TextEditable
|
public bool IsTextEditable
|
||||||
{
|
{
|
||||||
get => GetValue(TextEditableProperty);
|
get => GetValue(IsTextEditableProperty);
|
||||||
set => SetValue(TextEditableProperty, value);
|
set => SetValue(IsTextEditableProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static readonly StyledProperty<bool> IsReadOnlyProperty = AvaloniaProperty.Register<NumericUpDown, bool>(
|
public static readonly StyledProperty<bool> IsReadOnlyProperty = AvaloniaProperty.Register<NumericUpDown, bool>(
|
||||||
@@ -207,7 +207,7 @@ public abstract class NumericUpDown : TemplatedControl
|
|||||||
|
|
||||||
private void OnDragPanelPointerMoved(object sender, PointerEventArgs e)
|
private void OnDragPanelPointerMoved(object sender, PointerEventArgs e)
|
||||||
{
|
{
|
||||||
if (TextEditable) return;
|
if (IsTextEditable) return;
|
||||||
if(!e.GetCurrentPoint(this).Properties.IsLeftButtonPressed) return;
|
if(!e.GetCurrentPoint(this).Properties.IsLeftButtonPressed) return;
|
||||||
var point = e.GetPosition(this);
|
var point = e.GetPosition(this);
|
||||||
var delta = point - _point;
|
var delta = point - _point;
|
||||||
|
|||||||
Reference in New Issue
Block a user