Skip to content

Commit dff675e

Browse files
authored
Fix #933 (#1673)
* Add Disabled ComboBox with Hint to Demo * Change Line to Path of DashedLine in ComboBox Template * Delete Trigger of Height of TextBox * revert "Delete Trigger of Height of TextBox"
1 parent 2c1f803 commit dff675e

File tree

2 files changed

+24
-9
lines changed

2 files changed

+24
-9
lines changed

MainDemo.Wpf/TextFields.xaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,17 @@
263263
</smtx:XamlDisplay>
264264
<smtx:XamlDisplay Key="fields_15" Margin="16 0 0 0">
265265
<PasswordBox Password="01234" IsEnabled="False" MinWidth="72"/>
266-
</smtx:XamlDisplay>
267-
</StackPanel>
268-
</StackPanel>
266+
</smtx:XamlDisplay>
267+
<smtx:XamlDisplay Key="fields_33">
268+
<ComboBox
269+
IsEnabled="False"
270+
materialDesign:HintAssist.Hint="Disabled Combo with Hint"
271+
materialDesign:HintAssist.IsFloating="True" >
272+
<ComboBoxItem IsSelected="True">Selected</ComboBoxItem>
273+
</ComboBox>
274+
</smtx:XamlDisplay>
275+
</StackPanel>
276+
</StackPanel>
269277

270278
<smtx:XamlDisplay Key="fields_16" Grid.Row="5" Grid.Column="1" Margin="0 8">
271279
<TextBox Style="{StaticResource MaterialDesignFloatingHintTextBox}"

MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.ComboBox.xaml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -487,12 +487,19 @@
487487
<wpf:PackIcon Margin="0" Kind="CloseCircle" />
488488
</Button>
489489
</StackPanel>
490-
</Grid>
491-
<Line x:Name="DashedLine" Grid.ColumnSpan="2" Grid.Column="0" VerticalAlignment="Bottom"
492-
Visibility="{Binding Path=IsEnabled, RelativeSource={RelativeSource Self}, Converter={StaticResource InverseBoolToVisConverter}}"
493-
StrokeThickness="{Binding BorderThickness.Bottom, ElementName=toggleButton, Converter={StaticResource DivisionMathConverter}, ConverterParameter=0.75}" StrokeDashArray="1,2.5" StrokeDashCap="Round"
494-
X1="0" X2="{Binding ActualWidth, ElementName=toggleButton}" Y1="0" Y2="0"
495-
Stroke="{TemplateBinding BorderBrush}" Opacity="0.56" />
490+
</Grid>
491+
<Path x:Name="DashedLine"
492+
Grid.ColumnSpan="2"
493+
Grid.Column="0"
494+
VerticalAlignment="Bottom"
495+
Visibility="{Binding Path=IsEnabled, RelativeSource={RelativeSource Self}, Converter={StaticResource InverseBoolToVisConverter}}"
496+
Data="M 0,0 L 1,0"
497+
Stretch="Fill"
498+
StrokeThickness="{Binding BorderThickness.Bottom, ElementName=toggleButton, Converter={StaticResource DivisionMathConverter}, ConverterParameter=0.75}"
499+
StrokeDashArray="1,2.5"
500+
StrokeDashCap="Round"
501+
Stroke="{TemplateBinding BorderBrush}"
502+
Opacity="0.56" />
496503
<wpf:Underline x:Name="Underline"
497504
Grid.ColumnSpan="2"
498505
wpf:TextFieldAssist.UnderlineBrush="{Binding Path=(wpf:TextFieldAssist.UnderlineBrush), RelativeSource={RelativeSource TemplatedParent}}"

0 commit comments

Comments
 (0)