|
326 | 326 | <TextBox x:Name="MaterialDesignFloatingHintTextBoxDefaults" Style="{StaticResource MaterialDesignFloatingHintTextBox}" />
|
327 | 327 | <TextBox x:Name="MaterialDesignFilledTextBoxDefaults" Style="{StaticResource MaterialDesignFilledTextBox}" />
|
328 | 328 | <TextBox x:Name="MaterialDesignOutlinedTextBoxDefaults" Style="{StaticResource MaterialDesignOutlinedTextBox}" />
|
329 |
| - <RichTextBox x:Name="MaterialDesignRichTextBoxDefaults" Style="{StaticResource MaterialDesignRichTextBox}" /> |
| 329 | + <RichTextBox x:Name="MaterialDesignFloatingHintRichTextBoxDefaults" Style="{StaticResource MaterialDesignFloatingHintRichTextBox}" /> |
| 330 | + <RichTextBox x:Name="MaterialDesignFilledRichTextBoxDefaults" Style="{StaticResource MaterialDesignFilledRichTextBox}" /> |
| 331 | + <RichTextBox x:Name="MaterialDesignOutlinedRichTextBoxDefaults" Style="{StaticResource MaterialDesignOutlinedRichTextBox}" /> |
330 | 332 | <PasswordBox x:Name="MaterialDesignFloatingHintPasswordBoxDefaults" Style="{StaticResource MaterialDesignFloatingHintPasswordBox}" />
|
331 | 333 | <PasswordBox x:Name="MaterialDesignFilledPasswordBoxDefaults" Style="{StaticResource MaterialDesignFilledPasswordBox}" />
|
332 | 334 | <PasswordBox x:Name="MaterialDesignOutlinedPasswordBoxDefaults" Style="{StaticResource MaterialDesignOutlinedPasswordBox}" />
|
|
582 | 584 | Text="RichTextBox styles" />
|
583 | 585 | <Grid>
|
584 | 586 | <Grid.Resources>
|
585 |
| - <Style TargetType="{x:Type RichTextBox}" BasedOn="{StaticResource MaterialDesignRichTextBox}"> |
| 587 | + <Style TargetType="{x:Type RichTextBox}" BasedOn="{StaticResource MaterialDesignFloatingHintRichTextBox}"> |
| 588 | + <Setter Property="AcceptsReturn" Value="False" /> |
586 | 589 | <Setter Property="FontSize" Value="{Binding SelectedFontSize, Converter={StaticResource FontSizeConverter}}" />
|
587 | 590 | <Setter Property="Height" Value="{Binding SelectedCustomHeight}" />
|
588 | 591 |
|
589 |
| - <!-- TODO: This is needed in order to avoid the RichTextBox only showing a single character per line?!?! There must be a bug somewhere! Min/MinWidth both "work" --> |
| 592 | + <!-- TODO: This is needed in order to avoid the RichTextBox only showing a single character per line?!?! There must be a bug somewhere! Min/MinWidth both "work". Also happens with default style!! --> |
590 | 593 | <!-- Also note that it does not work correctly, it now simply allows characters up to the width defined below before wrapping to the next line. -->
|
591 |
| - <Setter Property="MinWidth" Value="100" /> |
| 594 | + <Setter Property="MinWidth" Value="180" /> |
592 | 595 | <Setter Property="Padding">
|
593 | 596 | <Setter.Value>
|
594 | 597 | <MultiBinding Converter="{StaticResource CustomPaddingConverter}">
|
595 |
| - <Binding ElementName="MaterialDesignRichTextBoxDefaults" Path="Padding" /> |
| 598 | + <Binding ElementName="MaterialDesignFloatingHintRichTextBoxDefaults" Path="Padding" /> |
| 599 | + <Binding Path="ApplyCustomPadding" /> |
| 600 | + <Binding Path="SelectedCustomPadding" /> |
| 601 | + </MultiBinding> |
| 602 | + </Setter.Value> |
| 603 | + </Setter> |
| 604 | + <Setter Property="VerticalContentAlignment" Value="{Binding SelectedVerticalAlignment}" /> |
| 605 | + <Setter Property="local:SmartHint.RichTextBoxText" Value="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" /> |
| 606 | + <Setter Property="materialDesign:HintAssist.FontFamily" Value="{Binding SelectedFontFamily}" /> |
| 607 | + <Setter Property="materialDesign:HintAssist.IsFloating" Value="{Binding FloatHint}" /> |
| 608 | + <Setter Property="materialDesign:TextFieldAssist.HasClearButton" Value="{Binding ShowClearButton}" /> |
| 609 | + <Setter Property="materialDesign:TextFieldAssist.HasLeadingIcon" Value="{Binding ShowLeadingIcon}" /> |
| 610 | + <Setter Property="materialDesign:TextFieldAssist.HasTrailingIcon" Value="{Binding ShowTrailingIcon}" /> |
| 611 | + <Setter Property="materialDesign:TextFieldAssist.LeadingIcon" Value="{StaticResource LeadingIcon}" /> |
| 612 | + <Setter Property="materialDesign:TextFieldAssist.LeadingIconSize" Value="{Binding SelectedLeadingIconSize}" /> |
| 613 | + <Setter Property="materialDesign:TextFieldAssist.PrefixText" Value="{Binding PrefixText}" /> |
| 614 | + <Setter Property="materialDesign:TextFieldAssist.SuffixText" Value="{Binding SuffixText}" /> |
| 615 | + <Setter Property="materialDesign:TextFieldAssist.TrailingIcon" Value="{StaticResource TrailingIcon}" /> |
| 616 | + <Setter Property="materialDesign:TextFieldAssist.TrailingIconSize" Value="{Binding SelectedTrailingIconSize}" /> |
| 617 | + <Setter Property="materialDesign:TextFieldAssist.IconVerticalAlignment" Value="{Binding SelectedIconVerticalAlignment}" /> |
| 618 | + <Setter Property="materialDesign:TextFieldAssist.RippleOnFocusEnabled" Value="{Binding RippleOnFocus}" /> |
| 619 | + <Setter Property="materialDesign:TextFieldAssist.PrefixTextVisibility" Value="{Binding SelectedPrefixVisibility}" /> |
| 620 | + <Setter Property="materialDesign:TextFieldAssist.PrefixTextHintBehavior" Value="{Binding SelectedPrefixHintBehavior}" /> |
| 621 | + <Setter Property="materialDesign:TextFieldAssist.SuffixTextVisibility" Value="{Binding SelectedSuffixVisibility}" /> |
| 622 | + <Setter Property="materialDesign:TextFieldAssist.SuffixTextHintBehavior" Value="{Binding SelectedSuffixHintBehavior}" /> |
| 623 | + <Setter Property="materialDesign:TextFieldAssist.NewSpecHighlightingEnabled" Value="{Binding NewSpecHighlightingEnabled}" /> |
| 624 | + </Style> |
| 625 | + </Grid.Resources> |
| 626 | + <Grid.ColumnDefinitions> |
| 627 | + <ColumnDefinition SharedSizeGroup="SizeGroupStyleName" /> |
| 628 | + <ColumnDefinition x:Name="RichTextBoxColumnDefinition" Width="*" /> |
| 629 | + <ColumnDefinition Width="*" /> |
| 630 | + <ColumnDefinition Width="*" /> |
| 631 | + <ColumnDefinition Width="*" /> |
| 632 | + </Grid.ColumnDefinitions> |
| 633 | + |
| 634 | + <TextBlock Grid.Column="0" Style="{StaticResource StyleNameIndicator}">MaterialDesignFloatingHintRichTextBox</TextBlock> |
| 635 | + <local:InputElementContentControl Grid.Column="1"> |
| 636 | + <RichTextBox /> |
| 637 | + </local:InputElementContentControl> |
| 638 | + <local:InputElementContentControl Grid.Column="2"> |
| 639 | + <RichTextBox HorizontalContentAlignment="Center" /> |
| 640 | + </local:InputElementContentControl> |
| 641 | + <local:InputElementContentControl Grid.Column="3"> |
| 642 | + <RichTextBox HorizontalContentAlignment="Right" /> |
| 643 | + </local:InputElementContentControl> |
| 644 | + <local:InputElementContentControl Grid.Column="4"> |
| 645 | + <RichTextBox HorizontalContentAlignment="Stretch" /> |
| 646 | + </local:InputElementContentControl> |
| 647 | + </Grid> |
| 648 | + |
| 649 | + <Grid> |
| 650 | + <Grid.Resources> |
| 651 | + <Style TargetType="{x:Type RichTextBox}" BasedOn="{StaticResource MaterialDesignFilledRichTextBox}"> |
| 652 | + <Setter Property="AcceptsReturn" Value="False" /> |
| 653 | + <Setter Property="FontSize" Value="{Binding SelectedFontSize, Converter={StaticResource FontSizeConverter}}" /> |
| 654 | + <Setter Property="Height" Value="{Binding SelectedCustomHeight}" /> |
| 655 | + |
| 656 | + <!-- TODO: This is needed in order to avoid the RichTextBox only showing a single character per line?!?! There must be a bug somewhere! Min/MinWidth both "work". Also happens with default style!! --> |
| 657 | + <!-- Also note that it does not work correctly, it now simply allows characters up to the width defined below before wrapping to the next line. --> |
| 658 | + <Setter Property="MinWidth" Value="180" /> |
| 659 | + <Setter Property="Padding"> |
| 660 | + <Setter.Value> |
| 661 | + <MultiBinding Converter="{StaticResource CustomPaddingConverter}"> |
| 662 | + <Binding ElementName="MaterialDesignFilledRichTextBoxDefaults" Path="Padding" /> |
| 663 | + <Binding Path="ApplyCustomPadding" /> |
| 664 | + <Binding Path="SelectedCustomPadding" /> |
| 665 | + </MultiBinding> |
| 666 | + </Setter.Value> |
| 667 | + </Setter> |
| 668 | + <Setter Property="VerticalContentAlignment" Value="{Binding SelectedVerticalAlignment}" /> |
| 669 | + <Setter Property="local:SmartHint.RichTextBoxText" Value="{Binding RelativeSource={RelativeSource Self}, Path=Tag}" /> |
| 670 | + <Setter Property="materialDesign:HintAssist.FontFamily" Value="{Binding SelectedFontFamily}" /> |
| 671 | + <Setter Property="materialDesign:HintAssist.IsFloating" Value="{Binding FloatHint}" /> |
| 672 | + <Setter Property="materialDesign:TextFieldAssist.HasClearButton" Value="{Binding ShowClearButton}" /> |
| 673 | + <Setter Property="materialDesign:TextFieldAssist.HasLeadingIcon" Value="{Binding ShowLeadingIcon}" /> |
| 674 | + <Setter Property="materialDesign:TextFieldAssist.HasTrailingIcon" Value="{Binding ShowTrailingIcon}" /> |
| 675 | + <Setter Property="materialDesign:TextFieldAssist.LeadingIcon" Value="{StaticResource LeadingIcon}" /> |
| 676 | + <Setter Property="materialDesign:TextFieldAssist.LeadingIconSize" Value="{Binding SelectedLeadingIconSize}" /> |
| 677 | + <Setter Property="materialDesign:TextFieldAssist.PrefixText" Value="{Binding PrefixText}" /> |
| 678 | + <Setter Property="materialDesign:TextFieldAssist.SuffixText" Value="{Binding SuffixText}" /> |
| 679 | + <Setter Property="materialDesign:TextFieldAssist.TrailingIcon" Value="{StaticResource TrailingIcon}" /> |
| 680 | + <Setter Property="materialDesign:TextFieldAssist.TrailingIconSize" Value="{Binding SelectedTrailingIconSize}" /> |
| 681 | + <Setter Property="materialDesign:TextFieldAssist.IconVerticalAlignment" Value="{Binding SelectedIconVerticalAlignment}" /> |
| 682 | + <Setter Property="materialDesign:TextFieldAssist.RippleOnFocusEnabled" Value="{Binding RippleOnFocus}" /> |
| 683 | + <Setter Property="materialDesign:TextFieldAssist.PrefixTextVisibility" Value="{Binding SelectedPrefixVisibility}" /> |
| 684 | + <Setter Property="materialDesign:TextFieldAssist.PrefixTextHintBehavior" Value="{Binding SelectedPrefixHintBehavior}" /> |
| 685 | + <Setter Property="materialDesign:TextFieldAssist.SuffixTextVisibility" Value="{Binding SelectedSuffixVisibility}" /> |
| 686 | + <Setter Property="materialDesign:TextFieldAssist.SuffixTextHintBehavior" Value="{Binding SelectedSuffixHintBehavior}" /> |
| 687 | + <Setter Property="materialDesign:TextFieldAssist.NewSpecHighlightingEnabled" Value="{Binding NewSpecHighlightingEnabled}" /> |
| 688 | + </Style> |
| 689 | + </Grid.Resources> |
| 690 | + <Grid.ColumnDefinitions> |
| 691 | + <ColumnDefinition SharedSizeGroup="SizeGroupStyleName" /> |
| 692 | + <ColumnDefinition Width="*" /> |
| 693 | + <ColumnDefinition Width="*" /> |
| 694 | + <ColumnDefinition Width="*" /> |
| 695 | + <ColumnDefinition Width="*" /> |
| 696 | + </Grid.ColumnDefinitions> |
| 697 | + |
| 698 | + <TextBlock Grid.Column="0" Style="{StaticResource StyleNameIndicator}">MaterialDesignFilledHintRichTextBox</TextBlock> |
| 699 | + <local:InputElementContentControl Grid.Column="1"> |
| 700 | + <RichTextBox /> |
| 701 | + </local:InputElementContentControl> |
| 702 | + <local:InputElementContentControl Grid.Column="2"> |
| 703 | + <RichTextBox HorizontalContentAlignment="Center" /> |
| 704 | + </local:InputElementContentControl> |
| 705 | + <local:InputElementContentControl Grid.Column="3"> |
| 706 | + <RichTextBox HorizontalContentAlignment="Right" /> |
| 707 | + </local:InputElementContentControl> |
| 708 | + <local:InputElementContentControl Grid.Column="4"> |
| 709 | + <RichTextBox HorizontalContentAlignment="Stretch" /> |
| 710 | + </local:InputElementContentControl> |
| 711 | + </Grid> |
| 712 | + |
| 713 | + <Grid> |
| 714 | + <Grid.Resources> |
| 715 | + <Style TargetType="{x:Type RichTextBox}" BasedOn="{StaticResource MaterialDesignOutlinedRichTextBox}"> |
| 716 | + <Setter Property="AcceptsReturn" Value="False" /> |
| 717 | + <Setter Property="FontSize" Value="{Binding SelectedFontSize, Converter={StaticResource FontSizeConverter}}" /> |
| 718 | + <Setter Property="Height" Value="{Binding SelectedCustomHeight}" /> |
| 719 | + |
| 720 | + <!-- TODO: This is needed in order to avoid the RichTextBox only showing a single character per line?!?! There must be a bug somewhere! Min/MinWidth both "work". Also happens with default style!! --> |
| 721 | + <!-- Also note that it does not work correctly, it now simply allows characters up to the width defined below before wrapping to the next line. --> |
| 722 | + <Setter Property="MinWidth" Value="180" /> |
| 723 | + <Setter Property="Padding"> |
| 724 | + <Setter.Value> |
| 725 | + <MultiBinding Converter="{StaticResource CustomPaddingConverter}"> |
| 726 | + <Binding ElementName="MaterialDesignOutlinedRichTextBoxDefaults" Path="Padding" /> |
596 | 727 | <Binding Path="ApplyCustomPadding" />
|
597 | 728 | <Binding Path="SelectedCustomPadding" />
|
598 | 729 | </MultiBinding>
|
|
628 | 759 | <ColumnDefinition Width="*" />
|
629 | 760 | </Grid.ColumnDefinitions>
|
630 | 761 |
|
631 |
| - <TextBlock Grid.Column="0" Style="{StaticResource StyleNameIndicator}">MaterialDesignRichTextBox</TextBlock> |
| 762 | + <TextBlock Grid.Column="0" Style="{StaticResource StyleNameIndicator}">MaterialDesignOutlinedRichTextBox</TextBlock> |
632 | 763 | <local:InputElementContentControl Grid.Column="1">
|
633 | 764 | <RichTextBox />
|
634 | 765 | </local:InputElementContentControl>
|
|
0 commit comments