|
692 | 692 | <WrapPanel> |
693 | 693 | <StackPanel Width="256" Margin="0,0,16,16"> |
694 | 694 | <TextBlock Margin="0,0,0,8" |
695 | | - VerticalAlignment="Center" |
696 | | - Style="{StaticResource MaterialDesignSubtitle1TextBlock}" |
697 | | - Text="Simple source list" /> |
| 695 | + VerticalAlignment="Center" |
| 696 | + Style="{StaticResource MaterialDesignSubtitle1TextBlock}" |
| 697 | + Text="Simple source list" /> |
698 | 698 |
|
699 | 699 | <smtx:XamlDisplay UniqueKey="fields_autosuggestion_1"> |
700 | 700 | <materialDesign:AutoSuggestBox VerticalAlignment="Bottom" |
701 | | - Suggestions="{Binding AutoSuggestBox1Suggestions}" |
702 | | - Text="{Binding AutoSuggestBox1Text, UpdateSourceTrigger=PropertyChanged}" /> |
| 701 | + Suggestions="{Binding AutoSuggestBox1Suggestions}" |
| 702 | + Text="{Binding AutoSuggestBox1Text, UpdateSourceTrigger=PropertyChanged}" /> |
703 | 703 | </smtx:XamlDisplay> |
704 | 704 | </StackPanel> |
705 | 705 |
|
706 | 706 | <StackPanel Width="256" Margin="0,0,16,16"> |
707 | 707 | <TextBlock Margin="0,0,0,8" |
708 | | - Style="{StaticResource MaterialDesignSubtitle1TextBlock}" |
709 | | - Text="AutoSuggestBox with ItemTemplate" /> |
| 708 | + Style="{StaticResource MaterialDesignSubtitle1TextBlock}" |
| 709 | + Text="AutoSuggestBox with ItemTemplate" /> |
710 | 710 | <smtx:XamlDisplay UniqueKey="fields_autosuggestion_2"> |
711 | 711 | <materialDesign:AutoSuggestBox materialDesign:HintAssist.HelperText="Select color" |
712 | | - materialDesign:HintAssist.Hint="Color" |
713 | | - materialDesign:TextFieldAssist.HasClearButton="True" |
714 | | - DropDownElevation="Dp0" |
715 | | - Suggestions="{Binding AutoSuggestBox2Suggestions}" |
716 | | - Text="{Binding AutoSuggestBox2Text, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" |
717 | | - ValueMember="Key"> |
| 712 | + materialDesign:HintAssist.Hint="Color" |
| 713 | + materialDesign:TextFieldAssist.HasClearButton="True" |
| 714 | + DropDownElevation="Dp0" |
| 715 | + Suggestions="{Binding AutoSuggestBox2Suggestions}" |
| 716 | + Text="{Binding AutoSuggestBox2Text, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" |
| 717 | + ValueMember="Key"> |
718 | 718 | <materialDesign:AutoSuggestBox.ItemTemplate> |
719 | 719 | <DataTemplate> |
720 | 720 | <DockPanel> |
721 | 721 | <Border Width="20" |
722 | | - Height="20" |
723 | | - Background="{Binding Value, Converter={StaticResource ColorToBrushConverter}}" |
724 | | - CornerRadius="10" /> |
| 722 | + Height="20" |
| 723 | + Background="{Binding Value, Converter={StaticResource ColorToBrushConverter}}" |
| 724 | + CornerRadius="10" /> |
725 | 725 | <TextBlock Margin="10,0,0,0" Text="{Binding Key}" /> |
726 | 726 | </DockPanel> |
727 | 727 | </DataTemplate> |
|
733 | 733 |
|
734 | 734 | <StackPanel Width="256" Margin="0,0,16,16"> |
735 | 735 | <TextBlock Margin="0,0,0,8" |
736 | | - Style="{StaticResource MaterialDesignSubtitle1TextBlock}" |
737 | | - Text="Filled AutoSuggestBox" /> |
| 736 | + Style="{StaticResource MaterialDesignSubtitle1TextBlock}" |
| 737 | + Text="Filled AutoSuggestBox" /> |
738 | 738 | <smtx:XamlDisplay UniqueKey="fields_autosuggestion_3"> |
739 | 739 | <materialDesign:AutoSuggestBox materialDesign:HintAssist.Hint="Color" |
740 | | - materialDesign:TextFieldAssist.HasClearButton="True" |
741 | | - DropDownElevation="Dp0" |
742 | | - Style="{StaticResource MaterialDesignFilledAutoSuggestBox}" |
743 | | - Suggestions="{Binding AutoSuggestBox2Suggestions}" |
744 | | - Text="{Binding AutoSuggestBox2Text, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" |
745 | | - ValueMember="Key"> |
| 740 | + materialDesign:TextFieldAssist.HasClearButton="True" |
| 741 | + DropDownElevation="Dp0" |
| 742 | + Style="{StaticResource MaterialDesignFilledAutoSuggestBox}" |
| 743 | + Suggestions="{Binding AutoSuggestBox2Suggestions}" |
| 744 | + Text="{Binding AutoSuggestBox2Text, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" |
| 745 | + ValueMember="Key"> |
746 | 746 | <materialDesign:AutoSuggestBox.ItemTemplate> |
747 | 747 | <DataTemplate> |
748 | 748 | <DockPanel> |
749 | 749 | <Border Width="20" |
750 | | - Height="20" |
751 | | - Background="{Binding Value, Converter={StaticResource ColorToBrushConverter}}" |
752 | | - CornerRadius="10" /> |
| 750 | + Height="20" |
| 751 | + Background="{Binding Value, Converter={StaticResource ColorToBrushConverter}}" |
| 752 | + CornerRadius="10" /> |
753 | 753 | <TextBlock Margin="10,0,0,0" Text="{Binding Key}" /> |
754 | 754 | </DockPanel> |
755 | 755 | </DataTemplate> |
|
760 | 760 |
|
761 | 761 | <StackPanel Width="256" Margin="0,0,16,16"> |
762 | 762 | <TextBlock Margin="0,0,0,8" |
763 | | - Style="{StaticResource MaterialDesignSubtitle1TextBlock}" |
764 | | - Text="Outlined AutoSuggestBox" /> |
| 763 | + Style="{StaticResource MaterialDesignSubtitle1TextBlock}" |
| 764 | + Text="Outlined AutoSuggestBox" /> |
765 | 765 | <smtx:XamlDisplay UniqueKey="fields_autosuggestion_4"> |
766 | 766 | <materialDesign:AutoSuggestBox materialDesign:HintAssist.Hint="Color" |
767 | | - materialDesign:TextFieldAssist.HasClearButton="True" |
768 | | - DropDownElevation="Dp0" |
769 | | - Style="{StaticResource MaterialDesignOutlinedAutoSuggestBox}" |
770 | | - Suggestions="{Binding AutoSuggestBox2Suggestions}" |
771 | | - Text="{Binding AutoSuggestBox2Text, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" |
772 | | - ValueMember="Key"> |
| 767 | + materialDesign:TextFieldAssist.HasClearButton="True" |
| 768 | + DropDownElevation="Dp0" |
| 769 | + Style="{StaticResource MaterialDesignOutlinedAutoSuggestBox}" |
| 770 | + Suggestions="{Binding AutoSuggestBox2Suggestions}" |
| 771 | + Text="{Binding AutoSuggestBox2Text, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" |
| 772 | + ValueMember="Key"> |
773 | 773 | <materialDesign:AutoSuggestBox.ItemTemplate> |
774 | 774 | <DataTemplate> |
775 | 775 | <DockPanel> |
776 | 776 | <Border Width="20" |
777 | | - Height="20" |
778 | | - Background="{Binding Value, Converter={StaticResource ColorToBrushConverter}}" |
779 | | - CornerRadius="10" /> |
| 777 | + Height="20" |
| 778 | + Background="{Binding Value, Converter={StaticResource ColorToBrushConverter}}" |
| 779 | + CornerRadius="10" /> |
780 | 780 | <TextBlock Margin="10,0,0,0" Text="{Binding Key}" /> |
781 | 781 | </DockPanel> |
782 | 782 | </DataTemplate> |
783 | 783 | </materialDesign:AutoSuggestBox.ItemTemplate> |
784 | 784 | </materialDesign:AutoSuggestBox> |
785 | 785 | </smtx:XamlDisplay> |
786 | 786 | </StackPanel> |
| 787 | + |
| 788 | + <StackPanel Width="512" Margin="0,0,16,16"> |
| 789 | + <TextBlock Margin="0,0,0,8" |
| 790 | + Style="{StaticResource MaterialDesignSubtitle1TextBlock}" |
| 791 | + Text="AutoSuggestBox with interactable content" /> |
| 792 | + <smtx:XamlDisplay UniqueKey="fields_autosuggestion_5"> |
| 793 | + <materialDesign:AutoSuggestBox materialDesign:HintAssist.Hint="Username" |
| 794 | + materialDesign:TextFieldAssist.HasLeadingIcon="True" |
| 795 | + materialDesign:TextFieldAssist.LeadingIcon="User" |
| 796 | + DropDownBackground="{DynamicResource MaterialDesign.Brush.ToolBar.Background}" |
| 797 | + DropDownElevation="Dp24" |
| 798 | + DropDownMaxHeight="500" |
| 799 | + Suggestions="{Binding AutoSuggestBox3Suggestions}" |
| 800 | + Text="{Binding AutoSuggestBox3Text, UpdateSourceTrigger=PropertyChanged}"> |
| 801 | + <materialDesign:AutoSuggestBox.ItemTemplate> |
| 802 | + <DataTemplate> |
| 803 | + <Grid HorizontalAlignment="Stretch"> |
| 804 | + <Grid.ColumnDefinitions> |
| 805 | + <ColumnDefinition Width="*" /> |
| 806 | + <ColumnDefinition Width="auto" /> |
| 807 | + </Grid.ColumnDefinitions> |
| 808 | + <TextBlock Grid.Column="0" |
| 809 | + VerticalAlignment="Center" |
| 810 | + Text="{Binding .}" /> |
| 811 | + <Button Grid.Column="1" |
| 812 | + Padding="2,0,0,0" |
| 813 | + Command="{Binding DataContext.RemoveAutoSuggestBox3SuggestionCommand, RelativeSource={RelativeSource AncestorType=UserControl}}" |
| 814 | + CommandParameter="{Binding .}" |
| 815 | + Focusable="False" |
| 816 | + Style="{StaticResource MaterialDesignToolButton}"> |
| 817 | + <materialDesign:PackIcon Width="16" |
| 818 | + Height="16" |
| 819 | + Margin="0" |
| 820 | + Kind="CloseCircle" /> |
| 821 | + </Button> |
| 822 | + </Grid> |
| 823 | + </DataTemplate> |
| 824 | + </materialDesign:AutoSuggestBox.ItemTemplate> |
| 825 | + </materialDesign:AutoSuggestBox> |
| 826 | + </smtx:XamlDisplay> |
| 827 | + </StackPanel> |
| 828 | + |
| 829 | + |
| 830 | + |
787 | 831 | </WrapPanel> |
788 | 832 | </StackPanel> |
789 | 833 | </UserControl> |
0 commit comments