mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
NumberBox - Fixed values getting coerced between 0 and 100
Data model event cycle node - Listen to the event directly, avoiding race conditions
This commit is contained in:
1 parent
dc8147d5a7
commit
c24e57e556
2 files changed
+76
-80
No files matched your search
@@ -3,27 +3,30 @@
|
||||
xmlns:controls="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
|
||||
xmlns:attachedProperties="clr-namespace:Artemis.UI.Shared.AttachedProperties"
|
||||
xmlns:system="clr-namespace:System;assembly=System.Runtime">
|
||||
<Design.PreviewWith>
|
||||
<Border Padding="20">
|
||||
<StackPanel Spacing="20">
|
||||
<!-- Add Controls for Previewer Here -->
|
||||
<controls:NumberBox Value="99999999"
|
||||
<Design.PreviewWith>
|
||||
<Border Padding="20">
|
||||
<StackPanel Spacing="20">
|
||||
<!-- Add Controls for Previewer Here -->
|
||||
<controls:NumberBox Value="99999999"
|
||||
attachedProperties:NumberBoxAssist.PrefixText="%"
|
||||
attachedProperties:NumberBoxAssist.SuffixText="%"/>
|
||||
<controls:NumberBox Classes="condensed"
|
||||
Value="9999999"
|
||||
attachedProperties:NumberBoxAssist.PrefixText="%"
|
||||
attachedProperties:NumberBoxAssist.SuffixText="%">
|
||||
attachedProperties:NumberBoxAssist.SuffixText="%" />
|
||||
<controls:NumberBox Classes="condensed"
|
||||
Value="9999999"
|
||||
attachedProperties:NumberBoxAssist.PrefixText="%"
|
||||
attachedProperties:NumberBoxAssist.SuffixText="%">
|
||||
<DataValidationErrors.Error>
|
||||
<system:Exception/>
|
||||
<system:Exception />
|
||||
</DataValidationErrors.Error>
|
||||
</controls:NumberBox>
|
||||
</StackPanel>
|
||||
|
||||
</Border>
|
||||
</Design.PreviewWith>
|
||||
</Border>
|
||||
</Design.PreviewWith>
|
||||
|
||||
<!-- Add Styles Here -->
|
||||
<Style Selector="controls|NumberBox">
|
||||
<Setter Property="Maximum" Value="{x:Static system:Double.MaxValue}"></Setter>
|
||||
<Setter Property="Minimum" Value="{x:Static system:Double.MinValue}"></Setter>
|
||||
</Style>
|
||||
<Style Selector="controls|NumberBox /template/ TextBox.NumberBoxTextBoxStyle /template/ TextBlock#PART_Prefix">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextControlForegroundDisabled}"></Setter>
|
||||
<Setter Property="Margin" Value="-4 0 -12 0"></Setter>
|
||||
@@ -39,9 +42,7 @@
|
||||
<Style Selector="controls|NumberBox.condensed /template/ TextBox.NumberBoxTextBoxStyle /template/ TextBlock#PART_Suffix">
|
||||
<Setter Property="Margin" Value="-4 0 0 0"></Setter>
|
||||
</Style>
|
||||
|
||||
|
||||
<Style Selector="controls|NumberBox /template/ TextBox.NumberBoxTextBoxStyle">
|
||||
<Style Selector="controls|NumberBox /template/ TextBox.NumberBoxTextBoxStyle">
|
||||
<Setter Property="attachedProperties:TextBoxAssist.PrefixText" Value="{TemplateBinding attachedProperties:NumberBoxAssist.PrefixText}"></Setter>
|
||||
<Setter Property="attachedProperties:TextBoxAssist.SuffixText" Value="{TemplateBinding attachedProperties:NumberBoxAssist.SuffixText}"></Setter>
|
||||
</Style>
|
||||
|
||||
Reference in new issue
Block a user