|
2 | 2 | x:Class="LightBulb.Views.Components.Settings.GeneralSettingsTabView" |
3 | 3 | xmlns="https://github.com/avaloniaui" |
4 | 4 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 5 | + xmlns:behaviors="clr-namespace:LightBulb.Behaviors" |
5 | 6 | xmlns:converters="clr-namespace:LightBulb.Converters" |
6 | 7 | xmlns:settings="clr-namespace:LightBulb.ViewModels.Components.Settings"> |
7 | 8 | <Design.DataContext> |
|
15 | 16 | <TextBox |
16 | 17 | MinWidth="24" |
17 | 18 | HorizontalAlignment="Right" |
18 | | - DockPanel.Dock="Right" |
19 | | - Text="{Binding DayTemperature, Converter={x:Static converters:DoubleToStringConverter.Instance}}" /> |
| 19 | + DockPanel.Dock="Right"> |
| 20 | + <Interaction.Behaviors> |
| 21 | + <behaviors:LostFocusUpdateBindingBehavior Text="{Binding DayTemperature, Converter={x:Static converters:DoubleToStringConverter.Instance}}" /> |
| 22 | + </Interaction.Behaviors> |
| 23 | + </TextBox> |
20 | 24 | </DockPanel> |
21 | 25 | <Slider |
22 | 26 | Margin="0,12,0,0" |
|
34 | 38 | <TextBox |
35 | 39 | MinWidth="24" |
36 | 40 | HorizontalAlignment="Right" |
37 | | - DockPanel.Dock="Right" |
38 | | - Text="{Binding NightTemperature, Converter={x:Static converters:DoubleToStringConverter.Instance}}" /> |
| 41 | + DockPanel.Dock="Right"> |
| 42 | + <Interaction.Behaviors> |
| 43 | + <behaviors:LostFocusUpdateBindingBehavior Text="{Binding NightTemperature, Converter={x:Static converters:DoubleToStringConverter.Instance}}" /> |
| 44 | + </Interaction.Behaviors> |
| 45 | + </TextBox> |
39 | 46 | </DockPanel> |
40 | 47 | <Slider |
41 | 48 | Margin="0,12,0,0" |
|
66 | 73 | <TextBox |
67 | 74 | MinWidth="24" |
68 | 75 | HorizontalAlignment="Right" |
69 | | - DockPanel.Dock="Right" |
70 | | - Text="{Binding DayBrightness, Converter={x:Static converters:FractionToPercentageStringConverter.Instance}}" /> |
| 76 | + DockPanel.Dock="Right"> |
| 77 | + <Interaction.Behaviors> |
| 78 | + <behaviors:LostFocusUpdateBindingBehavior Text="{Binding DayBrightness, Converter={x:Static converters:FractionToPercentageStringConverter.Instance}}" /> |
| 79 | + </Interaction.Behaviors> |
| 80 | + </TextBox> |
71 | 81 | </DockPanel> |
72 | 82 | <Slider |
73 | 83 | Margin="0,12,0,0" |
|
98 | 108 | <TextBox |
99 | 109 | MinWidth="24" |
100 | 110 | HorizontalAlignment="Right" |
101 | | - DockPanel.Dock="Right" |
102 | | - Text="{Binding NightBrightness, Converter={x:Static converters:FractionToPercentageStringConverter.Instance}}" /> |
| 111 | + DockPanel.Dock="Right"> |
| 112 | + <Interaction.Behaviors> |
| 113 | + <behaviors:LostFocusUpdateBindingBehavior Text="{Binding NightBrightness, Converter={x:Static converters:FractionToPercentageStringConverter.Instance}}" /> |
| 114 | + </Interaction.Behaviors> |
| 115 | + </TextBox> |
103 | 116 | </DockPanel> |
104 | 117 | <Slider |
105 | 118 | Margin="0,12,0,0" |
|
117 | 130 | <TextBox |
118 | 131 | MinWidth="48" |
119 | 132 | HorizontalAlignment="Right" |
120 | | - DockPanel.Dock="Right" |
121 | | - Text="{Binding ConfigurationTransitionDuration, Converter={x:Static converters:TimeSpanToDurationStringConverter.Instance}}" /> |
| 133 | + DockPanel.Dock="Right"> |
| 134 | + <Interaction.Behaviors> |
| 135 | + <behaviors:LostFocusUpdateBindingBehavior Text="{Binding ConfigurationTransitionDuration, Converter={x:Static converters:TimeSpanToDurationStringConverter.Instance}}" /> |
| 136 | + </Interaction.Behaviors> |
| 137 | + </TextBox> |
122 | 138 | </DockPanel> |
123 | 139 | <Slider |
124 | 140 | Margin="0,12,0,0" |
|
134 | 150 | <TextBox |
135 | 151 | MinWidth="24" |
136 | 152 | HorizontalAlignment="Right" |
137 | | - DockPanel.Dock="Right" |
138 | | - Text="{Binding ConfigurationTransitionOffset, Converter={x:Static converters:FractionToPercentageStringConverter.Instance}}" /> |
| 153 | + DockPanel.Dock="Right"> |
| 154 | + <Interaction.Behaviors> |
| 155 | + <behaviors:LostFocusUpdateBindingBehavior Text="{Binding ConfigurationTransitionOffset, Converter={x:Static converters:FractionToPercentageStringConverter.Instance}}" /> |
| 156 | + </Interaction.Behaviors> |
| 157 | + </TextBox> |
139 | 158 | </DockPanel> |
140 | 159 | <Slider |
141 | 160 | Margin="0,12,0,0" |
|
0 commit comments