|
91 | 91 | </Setter>
|
92 | 92 | </Style>
|
93 | 93 |
|
94 |
| - <Style x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}"> |
| 94 | + <Style x:Key="MaterialDesignComboBoxToggleButton" TargetType="{x:Type ToggleButton}"> |
95 | 95 | <Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}"/>
|
96 | 96 | <Setter Property="OverridesDefaultStyle" Value="true"/>
|
97 | 97 | <Setter Property="IsTabStop" Value="false"/>
|
|
174 | 174 | </Border>
|
175 | 175 | </Border>
|
176 | 176 | </Popup>
|
177 |
| - <ToggleButton x:Name="toggleButton" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}" |
| 177 | + <ToggleButton x:Name="toggleButton" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource MaterialDesignComboBoxToggleButton}" |
178 | 178 | />
|
179 | 179 | <TextBlock x:Name="Hint"
|
180 | 180 | Margin="{TemplateBinding Padding}"
|
|
279 | 279 | </Border>
|
280 | 280 | </Border>
|
281 | 281 | </Popup>
|
282 |
| - <ToggleButton x:Name="toggleButton" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}" |
| 282 | + <ToggleButton x:Name="toggleButton" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource MaterialDesignComboBoxToggleButton}" |
283 | 283 | />
|
284 | 284 | <TextBlock x:Name="Hint"
|
285 | 285 | Margin="{TemplateBinding Padding}"
|
|
332 | 332 | </ControlTemplate.Triggers>
|
333 | 333 | </ControlTemplate>
|
334 | 334 |
|
335 |
| - <Style x:Key="ComboBoxEditableTextBox" TargetType="{x:Type TextBox}"> |
| 335 | + <Style x:Key="MaterialDesignComboBoxEditableTextBox" TargetType="{x:Type TextBox}"> |
336 | 336 | <Setter Property="OverridesDefaultStyle" Value="true"/>
|
337 | 337 | <Setter Property="AllowDrop" Value="true"/>
|
338 | 338 | <Setter Property="MinWidth" Value="0"/>
|
|
373 | 373 | </ScrollViewer>
|
374 | 374 | </Border>
|
375 | 375 | </Popup>
|
376 |
| - <ToggleButton x:Name="toggleButton" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}"/> |
| 376 | + <ToggleButton x:Name="toggleButton" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource MaterialDesignComboBoxToggleButton}"/> |
377 | 377 | <Border x:Name="border" Background="Transparent" Margin="{TemplateBinding BorderThickness}">
|
378 | 378 | <Grid>
|
379 | 379 | <TextBlock x:Name="Hint"
|
|
384 | 384 | Text="{TemplateBinding wpf:TextField.Hint}"
|
385 | 385 | IsHitTestVisible="False"
|
386 | 386 | Visibility="{TemplateBinding Text, Converter={StaticResource TextFieldHintVisibilityConverter}}" />
|
387 |
| - <TextBox x:Name="PART_EditableTextBox" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}" Style="{StaticResource ComboBoxEditableTextBox}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/> |
| 387 | + <TextBox x:Name="PART_EditableTextBox" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}" Style="{StaticResource MaterialDesignComboBoxEditableTextBox}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/> |
388 | 388 | </Grid>
|
389 | 389 | </Border>
|
390 | 390 | <Border BorderBrush="{DynamicResource PrimaryHueMidBrush}" BorderThickness="0 0 0 2"
|
|
480 | 480 | </ScrollViewer>
|
481 | 481 | </Border>
|
482 | 482 | </Popup>
|
483 |
| - <ToggleButton x:Name="toggleButton" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}" |
| 483 | + <ToggleButton x:Name="toggleButton" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource MaterialDesignComboBoxToggleButton}" |
484 | 484 | Margin="0 14 0 0"/>
|
485 | 485 | <Border x:Name="border" Background="Transparent" Margin="{TemplateBinding BorderThickness}">
|
486 | 486 | <Grid Margin="0 14 0 0">
|
487 | 487 | <TextBlock x:Name="Hint"
|
488 |
| - Margin="{TemplateBinding Padding}" |
489 |
| - HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
490 |
| - VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
491 |
| - Opacity="{Binding Path=(wpf:TextField.HintOpacity), RelativeSource={RelativeSource TemplatedParent}}" |
492 |
| - Text="{TemplateBinding wpf:TextField.Hint}" |
493 |
| - IsHitTestVisible="False" /> |
494 |
| - <TextBox x:Name="PART_EditableTextBox" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}" Style="{StaticResource ComboBoxEditableTextBox}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/> |
| 488 | + FontSize="{TemplateBinding FontSize}" |
| 489 | + Margin="{TemplateBinding Padding}" |
| 490 | + HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
| 491 | + VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
| 492 | + Opacity="{Binding Path=(wpf:TextField.HintOpacity), RelativeSource={RelativeSource TemplatedParent}}" |
| 493 | + Text="{TemplateBinding wpf:TextField.Hint}" |
| 494 | + IsHitTestVisible="False" /> |
| 495 | + <TextBox x:Name="PART_EditableTextBox" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Padding}" Style="{StaticResource MaterialDesignComboBoxEditableTextBox}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/> |
495 | 496 | </Grid>
|
496 | 497 | </Border>
|
497 | 498 | <Border BorderBrush="{DynamicResource PrimaryHueMidBrush}" BorderThickness="0 0 0 2"
|
|
0 commit comments