Skip to content

Commit 19d8224

Browse files
committed
ux: re-design custom action control editor
Signed-off-by: leo <[email protected]>
1 parent 4b29165 commit 19d8224

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

src/Views/ConfigureCustomActionControls.axaml

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -141,24 +141,6 @@
141141
Height="28"
142142
Text="{Binding Description, Mode=TwoWay}"/>
143143

144-
<!-- BoolValue is needed by CheckBox/PathSelector -->
145-
<TextBlock Margin="0,12,0,0"
146-
Text="{DynamicResource Text.ConfigureCustomActionControls.DefaultValue}"
147-
IsVisible="{Binding Type, Converter={x:Static ObjectConverters.Equal}, ConverterParameter={x:Static m:CustomActionControlType.CheckBox}}"/>
148-
<TextBlock Margin="0,12,0,0"
149-
Text="{DynamicResource Text.ConfigureCustomActionControls.IsFolder}"
150-
IsVisible="{Binding Type, Converter={x:Static ObjectConverters.Equal}, ConverterParameter={x:Static m:CustomActionControlType.PathSelector}}"/>
151-
<CheckBox Height="28"
152-
Margin="0,4,0,0"
153-
IsChecked="{Binding BoolValue, Mode=TwoWay}">
154-
<CheckBox.IsVisible>
155-
<MultiBinding Converter="{x:Static BoolConverters.Or}">
156-
<Binding Path="Type" Converter="{x:Static ObjectConverters.Equal}" ConverterParameter="{x:Static m:CustomActionControlType.CheckBox}}"/>
157-
<Binding Path="Type" Converter="{x:Static ObjectConverters.Equal}" ConverterParameter="{x:Static m:CustomActionControlType.PathSelector}}"/>
158-
</MultiBinding>
159-
</CheckBox.IsVisible>
160-
</CheckBox>
161-
162144
<!-- StringValue -->
163145
<TextBlock Margin="0,12,0,0"
164146
Text="{DynamicResource Text.ConfigureCustomActionControls.CheckedValue}"
@@ -203,7 +185,27 @@
203185
<Binding Path="Type" Converter="{x:Static ObjectConverters.Equal}" ConverterParameter="{x:Static m:CustomActionControlType.PathSelector}"/>
204186
</MultiBinding>
205187
</TextBlock.IsVisible>
206-
</TextBlock>
188+
</TextBlock>
189+
190+
<!-- BoolValue is needed by CheckBox/PathSelector -->
191+
<Grid Margin="0,8,0,0" ColumnDefinitions="Auto,*">
192+
<Grid.IsVisible>
193+
<MultiBinding Converter="{x:Static BoolConverters.Or}">
194+
<Binding Path="Type" Converter="{x:Static ObjectConverters.Equal}" ConverterParameter="{x:Static m:CustomActionControlType.CheckBox}}"/>
195+
<Binding Path="Type" Converter="{x:Static ObjectConverters.Equal}" ConverterParameter="{x:Static m:CustomActionControlType.PathSelector}}"/>
196+
</MultiBinding>
197+
</Grid.IsVisible>
198+
<TextBlock Grid.Column="0"
199+
Text="{DynamicResource Text.ConfigureCustomActionControls.DefaultValue}"
200+
IsVisible="{Binding Type, Converter={x:Static ObjectConverters.Equal}, ConverterParameter={x:Static m:CustomActionControlType.CheckBox}}"/>
201+
<TextBlock Grid.Column="0"
202+
Text="{DynamicResource Text.ConfigureCustomActionControls.IsFolder}"
203+
IsVisible="{Binding Type, Converter={x:Static ObjectConverters.Equal}, ConverterParameter={x:Static m:CustomActionControlType.PathSelector}}"/>
204+
<CheckBox Grid.Column="1"
205+
Margin="8,0,0,0"
206+
Height="28"
207+
IsChecked="{Binding BoolValue, Mode=TwoWay}"/>
208+
</Grid>
207209
</StackPanel>
208210
</DataTemplate>
209211
</ContentControl.DataTemplates>

0 commit comments

Comments
 (0)