|
423 | 423 | Style="{StaticResource MaterialDesignFilledPasswordBox}"
|
424 | 424 | materialDesign:HintAssist.Hint="Password (validated)"
|
425 | 425 | materialDesign:HintAssist.HelperText="Helper text"
|
426 |
| - domain1:PasswordHelper.Attach="True" |
427 |
| - domain1:PasswordHelper.Password="{Binding Path=Password1, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnExceptions=True}"> |
428 |
| - </PasswordBox> |
| 426 | + materialDesign:PasswordBoxAssist.Password="{Binding Path=Password1Validated, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnExceptions=True}"/> |
429 | 427 | </StackPanel>
|
430 | 428 | </smtx:XamlDisplay>
|
431 | 429 | </Grid>
|
|
570 | 568 | Style="{StaticResource MaterialDesignOutlinedPasswordBox}"
|
571 | 569 | materialDesign:HintAssist.Hint="Password (validated)"
|
572 | 570 | materialDesign:HintAssist.HelperText="Helper text"
|
573 |
| - domain1:PasswordHelper.Attach="True" |
574 |
| - domain1:PasswordHelper.Password="{Binding Path=Password2, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnExceptions=True}"> |
575 |
| - </PasswordBox> |
| 571 | + materialDesign:PasswordBoxAssist.Password="{Binding Path=Password2Validated, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnExceptions=True}" /> |
576 | 572 | </StackPanel>
|
577 | 573 | </smtx:XamlDisplay>
|
578 | 574 | </Grid>
|
579 | 575 |
|
| 576 | + <Grid Margin="0 48 0 0"> |
| 577 | + <Grid.Resources> |
| 578 | + <Style TargetType="{x:Type smtx:XamlDisplay}" BasedOn="{StaticResource {x:Type smtx:XamlDisplay}}"> |
| 579 | + <Setter Property="Width" Value="200"/> |
| 580 | + <Setter Property="VerticalAlignment" Value="Top"/> |
| 581 | + <Setter Property="Margin" Value="0 0 16 0"/> |
| 582 | + </Style> |
| 583 | + |
| 584 | + <Style TargetType="CheckBox" BasedOn="{StaticResource {x:Type CheckBox}}"> |
| 585 | + <Setter Property="Margin" Value="0 8"/> |
| 586 | + <Setter Property="IsChecked" Value="True"/> |
| 587 | + </Style> |
| 588 | + </Grid.Resources> |
| 589 | + <Grid.ColumnDefinitions> |
| 590 | + <ColumnDefinition Width="Auto" /> |
| 591 | + <ColumnDefinition Width="Auto" /> |
| 592 | + <ColumnDefinition Width="Auto" /> |
| 593 | + <ColumnDefinition Width="Auto" /> |
| 594 | + </Grid.ColumnDefinitions> |
| 595 | + <Grid.RowDefinitions> |
| 596 | + <RowDefinition Height="Auto"/> |
| 597 | + <RowDefinition Height="100" /> |
| 598 | + <RowDefinition Height="Auto" /> |
| 599 | + </Grid.RowDefinitions> |
| 600 | + |
| 601 | + <TextBlock |
| 602 | + Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="4" |
| 603 | + Margin="0 0 0 10" |
| 604 | + Style="{StaticResource MaterialDesignHeadline5TextBlock}" |
| 605 | + Text="'Reveal' style PasswordBoxes"/> |
| 606 | + |
| 607 | + <smtx:XamlDisplay |
| 608 | + UniqueKey="reveal_password_default" |
| 609 | + Grid.Column="0" |
| 610 | + Grid.Row="1" |
| 611 | + VerticalAlignment="Top"> |
| 612 | + <StackPanel> |
| 613 | + <CheckBox |
| 614 | + x:Name="RevealPasswordDefaultEnabled" |
| 615 | + Content="Enabled" /> |
| 616 | + <PasswordBox |
| 617 | + Style="{StaticResource MaterialDesignRevealPasswordBox}" |
| 618 | + IsEnabled="{Binding ElementName=RevealPasswordDefaultEnabled, Path=IsChecked}" |
| 619 | + materialDesign:PasswordBoxAssist.Password="{Binding Password1, Mode=TwoWay}" |
| 620 | + materialDesign:HintAssist.Hint="Password" |
| 621 | + materialDesign:TextFieldAssist.HasClearButton="True" |
| 622 | + materialDesign:HintAssist.HelperText="Bound to Password1"/> |
| 623 | + </StackPanel> |
| 624 | + </smtx:XamlDisplay> |
| 625 | + |
| 626 | + <smtx:XamlDisplay |
| 627 | + UniqueKey="reveal_password_floating" |
| 628 | + Grid.Column="1" |
| 629 | + Grid.Row="1" |
| 630 | + VerticalAlignment="Top"> |
| 631 | + <StackPanel> |
| 632 | + <CheckBox |
| 633 | + x:Name="RevealPasswordFloatingEnabled" |
| 634 | + Content="Enabled" /> |
| 635 | + <PasswordBox |
| 636 | + Style="{StaticResource MaterialDesignFloatingHintRevealPasswordBox}" |
| 637 | + IsEnabled="{Binding ElementName=RevealPasswordFloatingEnabled, Path=IsChecked}" |
| 638 | + materialDesign:PasswordBoxAssist.Password="{Binding Password2, Mode=TwoWay}" |
| 639 | + materialDesign:HintAssist.Hint="Password" |
| 640 | + materialDesign:TextFieldAssist.HasClearButton="True" |
| 641 | + materialDesign:HintAssist.HelperText="Bound to Password2"/> |
| 642 | + </StackPanel> |
| 643 | + </smtx:XamlDisplay> |
| 644 | + |
| 645 | + <smtx:XamlDisplay |
| 646 | + UniqueKey="reveal_password_filled" |
| 647 | + Grid.Column="2" |
| 648 | + Grid.Row="1" |
| 649 | + VerticalAlignment="Top"> |
| 650 | + <StackPanel> |
| 651 | + <CheckBox |
| 652 | + x:Name="RevealPasswordFilledEnabled" |
| 653 | + Content="Enabled" /> |
| 654 | + <PasswordBox |
| 655 | + Style="{StaticResource MaterialDesignFilledRevealPasswordBox}" |
| 656 | + IsEnabled="{Binding ElementName=RevealPasswordFilledEnabled, Path=IsChecked}" |
| 657 | + Password="Set from XAML" |
| 658 | + materialDesign:HintAssist.Hint="Password" |
| 659 | + materialDesign:TextFieldAssist.HasClearButton="True" |
| 660 | + materialDesign:HintAssist.HelperText="Not bound password"/> |
| 661 | + </StackPanel> |
| 662 | + </smtx:XamlDisplay> |
| 663 | + |
| 664 | + <smtx:XamlDisplay |
| 665 | + UniqueKey="reveal_password_outlined" |
| 666 | + Grid.Column="3" |
| 667 | + Grid.Row="1" |
| 668 | + VerticalAlignment="Top"> |
| 669 | + <StackPanel> |
| 670 | + <CheckBox |
| 671 | + x:Name="RevealPasswordOutlinedEnabled" |
| 672 | + Content="Enabled" /> |
| 673 | + <PasswordBox |
| 674 | + Style="{StaticResource MaterialDesignOutlinedRevealPasswordBox}" |
| 675 | + IsEnabled="{Binding ElementName=RevealPasswordOutlinedEnabled, Path=IsChecked}" |
| 676 | + materialDesign:HintAssist.Hint="Password" |
| 677 | + materialDesign:TextFieldAssist.HasClearButton="True" |
| 678 | + materialDesign:HintAssist.HelperText="Not bound password"/> |
| 679 | + </StackPanel> |
| 680 | + </smtx:XamlDisplay> |
| 681 | + |
| 682 | + <Button Grid.Column="0" Grid.Row="2" Command="{Binding SetPassword1FromViewModelCommand}" Margin="0 0 45 0" Content="Set from VM" VerticalAlignment="Top" /> |
| 683 | + <Button Grid.Column="1" Grid.Row="2" Command="{Binding SetPassword2FromViewModelCommand}" Margin="0 0 45 0" Content="Set from VM" VerticalAlignment="Top" /> |
| 684 | + </Grid> |
| 685 | + |
580 | 686 | <Grid
|
581 | 687 | VerticalAlignment="Top"
|
582 | 688 | HorizontalAlignment="Left"
|
|
0 commit comments