|
129 | 129 | <TextBlock Margin="0,12,0,0" Text="{DynamicResource Text.ConfigureCustomActionControls.Type}"/> |
130 | 130 | <ComboBox Margin="0,4,0,0" Height="28" HorizontalAlignment="Stretch" SelectedIndex="{Binding Type, Mode=TwoWay}"> |
131 | 131 | <ComboBoxItem Content="TextBox"/> |
132 | | - <ComboBoxItem Content="Path Selector"/> |
| 132 | + <ComboBoxItem Content="PathSelector"/> |
133 | 133 | <ComboBoxItem Content="CheckBox"/> |
134 | 134 | <ComboBoxItem Content="ComboBox"/> |
135 | 135 | </ComboBox> |
|
146 | 146 | Text="{DynamicResource Text.ConfigureCustomActionControls.Description.Tip}" |
147 | 147 | Foreground="{DynamicResource Brush.FG2}"/> |
148 | 148 |
|
149 | | - <!-- Default value/Options --> |
| 149 | + <!-- BoolValue is needed by CheckBox/PathSelector --> |
150 | 150 | <TextBlock Margin="0,12,0,0" |
151 | 151 | Text="{DynamicResource Text.ConfigureCustomActionControls.DefaultValue}" |
152 | | - IsVisible="{Binding Type, Converter={x:Static ObjectConverters.NotEqual}, ConverterParameter={x:Static m:CustomActionControlType.ComboBox}}"/> |
| 152 | + IsVisible="{Binding Type, Converter={x:Static ObjectConverters.Equal}, ConverterParameter={x:Static m:CustomActionControlType.CheckBox}}"/> |
| 153 | + <TextBlock Margin="0,12,0,0" |
| 154 | + Text="{DynamicResource Text.ConfigureCustomActionControls.IsFolder}" |
| 155 | + IsVisible="{Binding Type, Converter={x:Static ObjectConverters.Equal}, ConverterParameter={x:Static m:CustomActionControlType.PathSelector}}"/> |
| 156 | + <CheckBox Height="28" |
| 157 | + Margin="0,4,0,0" |
| 158 | + IsChecked="{Binding BoolValue, Mode=TwoWay}"> |
| 159 | + <CheckBox.IsVisible> |
| 160 | + <MultiBinding Converter="{x:Static BoolConverters.Or}"> |
| 161 | + <Binding Path="Type" Converter="{x:Static ObjectConverters.Equal}" ConverterParameter="{x:Static m:CustomActionControlType.CheckBox}}"/> |
| 162 | + <Binding Path="Type" Converter="{x:Static ObjectConverters.Equal}" ConverterParameter="{x:Static m:CustomActionControlType.PathSelector}}"/> |
| 163 | + </MultiBinding> |
| 164 | + </CheckBox.IsVisible> |
| 165 | + </CheckBox> |
| 166 | + |
| 167 | + <!-- StringValue --> |
| 168 | + <TextBlock Margin="0,12,0,0" |
| 169 | + Text="{DynamicResource Text.ConfigureCustomActionControls.CheckedValue}" |
| 170 | + IsVisible="{Binding Type, Converter={x:Static ObjectConverters.Equal}, ConverterParameter={x:Static m:CustomActionControlType.CheckBox}}"/> |
153 | 171 | <TextBlock Margin="0,12,0,0" |
154 | 172 | Text="{DynamicResource Text.ConfigureCustomActionControls.Options}" |
155 | 173 | IsVisible="{Binding Type, Converter={x:Static ObjectConverters.Equal}, ConverterParameter={x:Static m:CustomActionControlType.ComboBox}}"/> |
156 | | - <TextBox Margin="0,4,0,0" |
157 | | - CornerRadius="3" |
158 | | - Height="28" |
159 | | - Text="{Binding StringValue, Mode=TwoWay}" |
160 | | - IsVisible="{Binding Type, Converter={x:Static ObjectConverters.NotEqual}, ConverterParameter={x:Static m:CustomActionControlType.CheckBox}}"/> |
161 | | - <TextBlock Margin="0,2,0,0" |
162 | | - Classes="small" |
163 | | - TextWrapping="Wrap" |
164 | | - Text="{DynamicResource Text.Configure.CustomAction.Arguments.Tip}" |
165 | | - Foreground="{DynamicResource Brush.FG2}" |
166 | | - IsVisible="{Binding Type, Converter={x:Static ObjectConverters.NotEqual}, ConverterParameter={x:Static m:CustomActionControlType.CheckBox}}"> |
| 174 | + <TextBlock Margin="0,12,0,0" |
| 175 | + Text="{DynamicResource Text.ConfigureCustomActionControls.DefaultValue}"> |
167 | 176 | <TextBlock.IsVisible> |
168 | 177 | <MultiBinding Converter="{x:Static BoolConverters.Or}"> |
169 | 178 | <Binding Path="Type" Converter="{x:Static ObjectConverters.Equal}" ConverterParameter="{x:Static m:CustomActionControlType.TextBox}"/> |
170 | 179 | <Binding Path="Type" Converter="{x:Static ObjectConverters.Equal}" ConverterParameter="{x:Static m:CustomActionControlType.PathSelector}"/> |
171 | 180 | </MultiBinding> |
172 | 181 | </TextBlock.IsVisible> |
173 | 182 | </TextBlock> |
| 183 | + <TextBox Margin="0,4,0,0" |
| 184 | + CornerRadius="3" |
| 185 | + Height="28" |
| 186 | + Text="{Binding StringValue, Mode=TwoWay}"/> |
| 187 | + <TextBlock Margin="0,2,0,0" |
| 188 | + Classes="small" |
| 189 | + TextWrapping="Wrap" |
| 190 | + Text="{DynamicResource Text.ConfigureCustomActionControls.CheckedValue.Tip}" |
| 191 | + IsVisible="{Binding Type, Converter={x:Static ObjectConverters.Equal}, ConverterParameter={x:Static m:CustomActionControlType.CheckBox}}" |
| 192 | + Foreground="{DynamicResource Brush.FG2}"/> |
174 | 193 | <TextBlock Margin="0,2,0,0" |
175 | 194 | Classes="small" |
176 | 195 | TextWrapping="Wrap" |
177 | 196 | Text="{DynamicResource Text.ConfigureCustomActionControls.Options.Tip}" |
178 | 197 | Foreground="{DynamicResource Brush.FG2}" |
179 | 198 | IsVisible="{Binding Type, Converter={x:Static ObjectConverters.Equal}, ConverterParameter={x:Static m:CustomActionControlType.ComboBox}}"> |
180 | 199 | </TextBlock> |
181 | | - <CheckBox Height="28" |
182 | | - Margin="0,4,0,0" |
183 | | - IsChecked="{Binding BoolValue, Mode=TwoWay}" |
184 | | - IsVisible="{Binding Type, Converter={x:Static ObjectConverters.Equal}, ConverterParameter={x:Static m:CustomActionControlType.CheckBox}}"/> |
185 | | - |
186 | | - <!-- PathSelector needs a bool to determine whether we want a folder or a file --> |
187 | | - <TextBlock Margin="0,12,0,0" |
188 | | - Text="{DynamicResource Text.ConfigureCustomActionControls.IsFolder}" |
189 | | - IsVisible="{Binding Type, Converter={x:Static ObjectConverters.Equal}, ConverterParameter={x:Static m:CustomActionControlType.PathSelector}}"/> |
190 | | - <CheckBox Height="28" |
191 | | - Margin="0,4,0,0" |
192 | | - IsChecked="{Binding BoolValue, Mode=TwoWay}" |
193 | | - IsVisible="{Binding Type, Converter={x:Static ObjectConverters.Equal}, ConverterParameter={x:Static m:CustomActionControlType.PathSelector}}"/> |
194 | | - |
195 | | - <!-- CheckBox needs a checked value for commandline --> |
196 | | - <TextBlock Margin="0,12,0,0" |
197 | | - Text="{DynamicResource Text.ConfigureCustomActionControls.CheckedValue}" |
198 | | - IsVisible="{Binding Type, Converter={x:Static ObjectConverters.Equal}, ConverterParameter={x:Static m:CustomActionControlType.CheckBox}}"/> |
199 | | - <TextBox Margin="0,4,0,0" |
200 | | - CornerRadius="3" |
201 | | - Height="28" |
202 | | - Text="{Binding StringValue, Mode=TwoWay}" |
203 | | - IsVisible="{Binding Type, Converter={x:Static ObjectConverters.Equal}, ConverterParameter={x:Static m:CustomActionControlType.CheckBox}}"/> |
204 | 200 | <TextBlock Margin="0,2,0,0" |
205 | 201 | Classes="small" |
206 | 202 | TextWrapping="Wrap" |
207 | | - Text="{DynamicResource Text.ConfigureCustomActionControls.CheckedValue.Tip}" |
208 | | - IsVisible="{Binding Type, Converter={x:Static ObjectConverters.Equal}, ConverterParameter={x:Static m:CustomActionControlType.CheckBox}}" |
209 | | - Foreground="{DynamicResource Brush.FG2}"/> |
| 203 | + Text="{DynamicResource Text.Configure.CustomAction.Arguments.Tip}" |
| 204 | + Foreground="{DynamicResource Brush.FG2}"> |
| 205 | + <TextBlock.IsVisible> |
| 206 | + <MultiBinding Converter="{x:Static BoolConverters.Or}"> |
| 207 | + <Binding Path="Type" Converter="{x:Static ObjectConverters.Equal}" ConverterParameter="{x:Static m:CustomActionControlType.TextBox}"/> |
| 208 | + <Binding Path="Type" Converter="{x:Static ObjectConverters.Equal}" ConverterParameter="{x:Static m:CustomActionControlType.PathSelector}"/> |
| 209 | + </MultiBinding> |
| 210 | + </TextBlock.IsVisible> |
| 211 | + </TextBlock> |
210 | 212 | </StackPanel> |
211 | 213 | </DataTemplate> |
212 | 214 | </ContentControl.DataTemplates> |
|
0 commit comments