|
408 | 408 | </Grid> |
409 | 409 |
|
410 | 410 | <!-- Reveal style PasswordBox variants --> |
411 | | - <TextBlock Style="{StaticResource MaterialDesignHeadline6TextBlock}" Text="PasswordBox 'reveal' styles" Margin="0,40,0,0" /> |
| 411 | + <StackPanel Orientation="Horizontal" Margin="0,40,0,0"> |
| 412 | + <TextBlock Style="{StaticResource MaterialDesignHeadline6TextBlock}" Text="PasswordBox 'reveal' styles" /> |
| 413 | + <CheckBox x:Name="PasswordBoxesRevealedCheckBox" Content="IsPasswordRevealed" Margin="20,0,0,0" /> |
| 414 | + </StackPanel> |
| 415 | + |
412 | 416 | <Grid> |
413 | 417 | <Grid.Resources> |
414 | 418 | <Style TargetType="{x:Type PasswordBox}" BasedOn="{StaticResource MaterialDesignFloatingHintRevealPasswordBox}"> |
|
417 | 421 | <Setter Property="materialDesign:TextFieldAssist.LeadingIcon" Value="{StaticResource LeadingIcon}" /> |
418 | 422 | <Setter Property="materialDesign:HintAssist.IsFloating" Value="{Binding FloatHint}" /> |
419 | 423 | <Setter Property="materialDesign:PasswordBoxAssist.Password" Value="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" /> |
| 424 | + <Setter Property="materialDesign:PasswordBoxAssist.IsPasswordRevealed" Value="{Binding ElementName=PasswordBoxesRevealedCheckBox, Path=IsChecked}" /> |
420 | 425 | <Setter Property="Padding"> |
421 | 426 | <Setter.Value> |
422 | 427 | <MultiBinding Converter="{StaticResource CustomPaddingConverter}"> |
|
458 | 463 | <Setter Property="materialDesign:TextFieldAssist.LeadingIcon" Value="{StaticResource LeadingIcon}" /> |
459 | 464 | <Setter Property="materialDesign:HintAssist.IsFloating" Value="{Binding FloatHint}" /> |
460 | 465 | <Setter Property="materialDesign:PasswordBoxAssist.Password" Value="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" /> |
| 466 | + <Setter Property="materialDesign:PasswordBoxAssist.IsPasswordRevealed" Value="{Binding ElementName=PasswordBoxesRevealedCheckBox, Path=IsChecked}" /> |
461 | 467 | <Setter Property="Padding"> |
462 | 468 | <Setter.Value> |
463 | 469 | <MultiBinding Converter="{StaticResource CustomPaddingConverter}"> |
|
499 | 505 | <Setter Property="materialDesign:TextFieldAssist.LeadingIcon" Value="{StaticResource LeadingIcon}" /> |
500 | 506 | <Setter Property="materialDesign:HintAssist.IsFloating" Value="{Binding FloatHint}" /> |
501 | 507 | <Setter Property="materialDesign:PasswordBoxAssist.Password" Value="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" /> |
| 508 | + <Setter Property="materialDesign:PasswordBoxAssist.IsPasswordRevealed" Value="{Binding ElementName=PasswordBoxesRevealedCheckBox, Path=IsChecked}" /> |
502 | 509 | <Setter Property="Padding"> |
503 | 510 | <Setter.Value> |
504 | 511 | <MultiBinding Converter="{StaticResource CustomPaddingConverter}"> |
|
534 | 541 | </Grid> |
535 | 542 |
|
536 | 543 | <!-- ComboBox variants --> |
537 | | - <TextBlock Style="{StaticResource MaterialDesignHeadline6TextBlock}" Text="ComboBox styles" Margin="0,40,0,0" /> |
| 544 | + <StackPanel Orientation="Horizontal" Margin="0,40,0,0"> |
| 545 | + <TextBlock Style="{StaticResource MaterialDesignHeadline6TextBlock}" Text="ComboBox styles" /> |
| 546 | + <CheckBox x:Name="ComboBoxesEditableCheckBox" Content="IsEditable" Margin="20,0,0,0" /> |
| 547 | + </StackPanel> |
538 | 548 | <Grid> |
539 | 549 | <Grid.Resources> |
540 | 550 | <Style TargetType="{x:Type ComboBox}" BasedOn="{StaticResource MaterialDesignFloatingHintComboBox}"> |
|
544 | 554 | <Setter Property="materialDesign:HintAssist.IsFloating" Value="{Binding FloatHint}" /> |
545 | 555 | <Setter Property="Text" Value="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" /> |
546 | 556 | <Setter Property="ItemsSource" Value="{Binding ComboBoxOptions}" /> |
547 | | - <Setter Property="IsEditable" Value="True" /> |
| 557 | + <Setter Property="IsEditable" Value="{Binding ElementName=ComboBoxesEditableCheckBox, Path=IsChecked}" /> |
548 | 558 | <Setter Property="Padding"> |
549 | 559 | <Setter.Value> |
550 | 560 | <MultiBinding Converter="{StaticResource CustomPaddingConverter}"> |
|
587 | 597 | <Setter Property="materialDesign:HintAssist.IsFloating" Value="{Binding FloatHint}" /> |
588 | 598 | <Setter Property="Text" Value="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" /> |
589 | 599 | <Setter Property="ItemsSource" Value="{Binding ComboBoxOptions}" /> |
590 | | - <Setter Property="IsEditable" Value="True" /> |
| 600 | + <Setter Property="IsEditable" Value="{Binding ElementName=ComboBoxesEditableCheckBox, Path=IsChecked}" /> |
591 | 601 | <Setter Property="Padding"> |
592 | 602 | <Setter.Value> |
593 | 603 | <MultiBinding Converter="{StaticResource CustomPaddingConverter}"> |
|
630 | 640 | <Setter Property="materialDesign:HintAssist.IsFloating" Value="{Binding FloatHint}" /> |
631 | 641 | <Setter Property="Text" Value="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" /> |
632 | 642 | <Setter Property="ItemsSource" Value="{Binding ComboBoxOptions}" /> |
633 | | - <Setter Property="IsEditable" Value="True" /> |
| 643 | + <Setter Property="IsEditable" Value="{Binding ElementName=ComboBoxesEditableCheckBox, Path=IsChecked}" /> |
634 | 644 | <Setter Property="Padding"> |
635 | 645 | <Setter.Value> |
636 | 646 | <MultiBinding Converter="{StaticResource CustomPaddingConverter}"> |
|
0 commit comments