|
5 | 5 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
6 | 6 | xmlns:system="clr-namespace:System;assembly=mscorlib"
|
7 | 7 | xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
| 8 | + xmlns:wpfExample="clr-namespace:MaterialDesignColors.WpfExample" |
8 | 9 | mc:Ignorable="d"
|
9 | 10 | d:DesignHeight="300" d:DesignWidth="300">
|
10 | 11 | <UserControl.Resources>
|
|
13 | 14 | <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Button.xaml" />
|
14 | 15 | <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.CheckBox.xaml" />
|
15 | 16 | <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.ListBox.xaml" />
|
| 17 | + <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.PopupBox.xaml" /> |
16 | 18 | <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.RadioButton.xaml" />
|
17 | 19 | <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.ToggleButton.xaml" />
|
18 | 20 | </ResourceDictionary.MergedDictionaries>
|
|
33 | 35 | <RowDefinition Height="Auto" />
|
34 | 36 | </Grid.RowDefinitions>
|
35 | 37 | <TextBlock>Buttons</TextBlock>
|
36 |
| - <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0 24 0 0"> |
37 |
| - <Button Style="{StaticResource MaterialDesignFloatingActionLightButton}" |
38 |
| - Margin="0 0 8 0" HorizontalAlignment="Left" |
39 |
| - ToolTip="X"> |
40 |
| - <Viewbox Width="24" Height="24"> |
41 |
| - <Canvas Width="24" Height="24"> |
42 |
| - <Path Data="M12,20A7,7 0 0,1 5,13A7,7 0 0,1 12,6A7,7 0 0,1 19,13A7,7 0 0,1 12,20M12,4A9,9 0 0,0 3,13A9,9 0 0,0 12,22A9,9 0 0,0 21,13A9,9 0 0,0 12,4M12.5,8H11V14L15.75,16.85L16.5,15.62L12.5,13.25V8M7.88,3.39L6.6,1.86L2,5.71L3.29,7.24L7.88,3.39M22,5.72L17.4,1.86L16.11,3.39L20.71,7.25L22,5.72Z" Fill="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Button}, Path=Foreground}" /> |
43 |
| - </Canvas> |
44 |
| - </Viewbox> |
45 |
| - </Button> |
46 |
| - <Button Style="{StaticResource MaterialDesignFloatingActionButton}" |
47 |
| - Margin="0 0 8 0" HorizontalAlignment="Left"> |
48 |
| - <Viewbox Width="24" Height="24"> |
49 |
| - <Canvas Width="24" Height="24"> |
50 |
| - <Path Data="M12,20A7,7 0 0,1 5,13A7,7 0 0,1 12,6A7,7 0 0,1 19,13A7,7 0 0,1 12,20M12,4A9,9 0 0,0 3,13A9,9 0 0,0 12,22A9,9 0 0,0 21,13A9,9 0 0,0 12,4M12.5,8H11V14L15.75,16.85L16.5,15.62L12.5,13.25V8M7.88,3.39L6.6,1.86L2,5.71L3.29,7.24L7.88,3.39M22,5.72L17.4,1.86L16.11,3.39L20.71,7.25L22,5.72Z" Fill="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Button}, Path=Foreground}" /> |
51 |
| - </Canvas> |
52 |
| - </Viewbox> |
53 |
| - </Button> |
54 |
| - <Button Style="{StaticResource MaterialDesignFloatingActionDarkButton}" |
55 |
| - Margin="0 0 8 0" HorizontalAlignment="Left"> |
56 |
| - <Viewbox Width="24" Height="24"> |
57 |
| - <Canvas Width="24" Height="24"> |
58 |
| - <Path Data="M12,20A7,7 0 0,1 5,13A7,7 0 0,1 12,6A7,7 0 0,1 19,13A7,7 0 0,1 12,20M12,4A9,9 0 0,0 3,13A9,9 0 0,0 12,22A9,9 0 0,0 21,13A9,9 0 0,0 12,4M12.5,8H11V14L15.75,16.85L16.5,15.62L12.5,13.25V8M7.88,3.39L6.6,1.86L2,5.71L3.29,7.24L7.88,3.39M22,5.72L17.4,1.86L16.11,3.39L20.71,7.25L22,5.72Z" Fill="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Button}, Path=Foreground}" /> |
59 |
| - </Canvas> |
60 |
| - </Viewbox> |
61 |
| - </Button> |
62 |
| - <Button Style="{StaticResource MaterialDesignFloatingActionAccentButton}" |
63 |
| - Margin="0 0 8 0" HorizontalAlignment="Left"> |
64 |
| - <Viewbox Width="24" Height="24"> |
65 |
| - <Canvas Width="24" Height="24"> |
66 |
| - <Path Data="M12,20A7,7 0 0,1 5,13A7,7 0 0,1 12,6A7,7 0 0,1 19,13A7,7 0 0,1 12,20M12,4A9,9 0 0,0 3,13A9,9 0 0,0 12,22A9,9 0 0,0 21,13A9,9 0 0,0 12,4M12.5,8H11V14L15.75,16.85L16.5,15.62L12.5,13.25V8M7.88,3.39L6.6,1.86L2,5.71L3.29,7.24L7.88,3.39M22,5.72L17.4,1.86L16.11,3.39L20.71,7.25L22,5.72Z" Fill="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Button}, Path=Foreground}" /> |
67 |
| - </Canvas> |
68 |
| - </Viewbox> |
69 |
| - </Button> |
70 |
| - </StackPanel> |
| 38 | + <Grid Grid.Row="1" > |
| 39 | + <StackPanel Orientation="Horizontal" Margin="0 24 0 0"> |
| 40 | + <Button Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}" |
| 41 | + Margin="0 0 8 0" HorizontalAlignment="Left" |
| 42 | + ToolTip="MaterialDesignFloatingActionMiniLightButton"> |
| 43 | + <Viewbox Width="24" Height="24"> |
| 44 | + <Canvas Width="24" Height="24"> |
| 45 | + <Path Data="M12,20A7,7 0 0,1 5,13A7,7 0 0,1 12,6A7,7 0 0,1 19,13A7,7 0 0,1 12,20M12,4A9,9 0 0,0 3,13A9,9 0 0,0 12,22A9,9 0 0,0 21,13A9,9 0 0,0 12,4M12.5,8H11V14L15.75,16.85L16.5,15.62L12.5,13.25V8M7.88,3.39L6.6,1.86L2,5.71L3.29,7.24L7.88,3.39M22,5.72L17.4,1.86L16.11,3.39L20.71,7.25L22,5.72Z" Fill="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Button}, Path=Foreground}" /> |
| 46 | + </Canvas> |
| 47 | + </Viewbox> |
| 48 | + </Button> |
| 49 | + <Button Style="{StaticResource MaterialDesignFloatingActionMiniButton}" |
| 50 | + Margin="0 0 8 0" HorizontalAlignment="Left" |
| 51 | + ToolTip="MaterialDesignFloatingActionMiniButton"> |
| 52 | + <Viewbox Width="24" Height="24"> |
| 53 | + <Canvas Width="24" Height="24"> |
| 54 | + <Path Data="M12,20A7,7 0 0,1 5,13A7,7 0 0,1 12,6A7,7 0 0,1 19,13A7,7 0 0,1 12,20M12,4A9,9 0 0,0 3,13A9,9 0 0,0 12,22A9,9 0 0,0 21,13A9,9 0 0,0 12,4M12.5,8H11V14L15.75,16.85L16.5,15.62L12.5,13.25V8M7.88,3.39L6.6,1.86L2,5.71L3.29,7.24L7.88,3.39M22,5.72L17.4,1.86L16.11,3.39L20.71,7.25L22,5.72Z" Fill="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Button}, Path=Foreground}" /> |
| 55 | + </Canvas> |
| 56 | + </Viewbox> |
| 57 | + </Button> |
| 58 | + <Button Style="{StaticResource MaterialDesignFloatingActionMiniDarkButton}" |
| 59 | + Margin="0 0 8 0" HorizontalAlignment="Left" |
| 60 | + ToolTip="MaterialDesignFloatingActionMiniDarkButton"> |
| 61 | + <Viewbox Width="24" Height="24"> |
| 62 | + <Canvas Width="24" Height="24"> |
| 63 | + <Path Data="M12,20A7,7 0 0,1 5,13A7,7 0 0,1 12,6A7,7 0 0,1 19,13A7,7 0 0,1 12,20M12,4A9,9 0 0,0 3,13A9,9 0 0,0 12,22A9,9 0 0,0 21,13A9,9 0 0,0 12,4M12.5,8H11V14L15.75,16.85L16.5,15.62L12.5,13.25V8M7.88,3.39L6.6,1.86L2,5.71L3.29,7.24L7.88,3.39M22,5.72L17.4,1.86L16.11,3.39L20.71,7.25L22,5.72Z" Fill="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Button}, Path=Foreground}" /> |
| 64 | + </Canvas> |
| 65 | + </Viewbox> |
| 66 | + </Button> |
| 67 | + <Button Style="{StaticResource MaterialDesignFloatingActionMiniAccentButton}" |
| 68 | + Margin="0 0 8 0" HorizontalAlignment="Left" |
| 69 | + ToolTip="MaterialDesignFloatingActionMiniAccentButton"> |
| 70 | + <Viewbox Width="24" Height="24"> |
| 71 | + <Canvas Width="24" Height="24"> |
| 72 | + <Path Data="M12,20A7,7 0 0,1 5,13A7,7 0 0,1 12,6A7,7 0 0,1 19,13A7,7 0 0,1 12,20M12,4A9,9 0 0,0 3,13A9,9 0 0,0 12,22A9,9 0 0,0 21,13A9,9 0 0,0 12,4M12.5,8H11V14L15.75,16.85L16.5,15.62L12.5,13.25V8M7.88,3.39L6.6,1.86L2,5.71L3.29,7.24L7.88,3.39M22,5.72L17.4,1.86L16.11,3.39L20.71,7.25L22,5.72Z" Fill="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Button}, Path=Foreground}" /> |
| 73 | + </Canvas> |
| 74 | + </Viewbox> |
| 75 | + </Button> |
| 76 | + <Button Style="{StaticResource MaterialDesignFloatingActionLightButton}" |
| 77 | + Margin="0 0 8 0" HorizontalAlignment="Left" |
| 78 | + ToolTip="MaterialDesignFloatingActionLightButton"> |
| 79 | + <Viewbox Width="24" Height="24"> |
| 80 | + <Canvas Width="24" Height="24"> |
| 81 | + <Path Data="M12,20A7,7 0 0,1 5,13A7,7 0 0,1 12,6A7,7 0 0,1 19,13A7,7 0 0,1 12,20M12,4A9,9 0 0,0 3,13A9,9 0 0,0 12,22A9,9 0 0,0 21,13A9,9 0 0,0 12,4M12.5,8H11V14L15.75,16.85L16.5,15.62L12.5,13.25V8M7.88,3.39L6.6,1.86L2,5.71L3.29,7.24L7.88,3.39M22,5.72L17.4,1.86L16.11,3.39L20.71,7.25L22,5.72Z" Fill="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Button}, Path=Foreground}" /> |
| 82 | + </Canvas> |
| 83 | + </Viewbox> |
| 84 | + </Button> |
| 85 | + <Button Style="{StaticResource MaterialDesignFloatingActionButton}" |
| 86 | + Margin="0 0 8 0" HorizontalAlignment="Left" |
| 87 | + ToolTip="MaterialDesignFloatingActionButton"> |
| 88 | + <Viewbox Width="24" Height="24"> |
| 89 | + <Canvas Width="24" Height="24"> |
| 90 | + <Path Data="M12,20A7,7 0 0,1 5,13A7,7 0 0,1 12,6A7,7 0 0,1 19,13A7,7 0 0,1 12,20M12,4A9,9 0 0,0 3,13A9,9 0 0,0 12,22A9,9 0 0,0 21,13A9,9 0 0,0 12,4M12.5,8H11V14L15.75,16.85L16.5,15.62L12.5,13.25V8M7.88,3.39L6.6,1.86L2,5.71L3.29,7.24L7.88,3.39M22,5.72L17.4,1.86L16.11,3.39L20.71,7.25L22,5.72Z" Fill="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Button}, Path=Foreground}" /> |
| 91 | + </Canvas> |
| 92 | + </Viewbox> |
| 93 | + </Button> |
| 94 | + <Button Style="{StaticResource MaterialDesignFloatingActionDarkButton}" |
| 95 | + Margin="0 0 8 0" HorizontalAlignment="Left" |
| 96 | + ToolTip="MaterialDesignFloatingActionDarkButton"> |
| 97 | + <Viewbox Width="24" Height="24"> |
| 98 | + <Canvas Width="24" Height="24"> |
| 99 | + <Path Data="M12,20A7,7 0 0,1 5,13A7,7 0 0,1 12,6A7,7 0 0,1 19,13A7,7 0 0,1 12,20M12,4A9,9 0 0,0 3,13A9,9 0 0,0 12,22A9,9 0 0,0 21,13A9,9 0 0,0 12,4M12.5,8H11V14L15.75,16.85L16.5,15.62L12.5,13.25V8M7.88,3.39L6.6,1.86L2,5.71L3.29,7.24L7.88,3.39M22,5.72L17.4,1.86L16.11,3.39L20.71,7.25L22,5.72Z" Fill="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Button}, Path=Foreground}" /> |
| 100 | + </Canvas> |
| 101 | + </Viewbox> |
| 102 | + </Button> |
| 103 | + <Button Style="{StaticResource MaterialDesignFloatingActionAccentButton}" |
| 104 | + Margin="0 0 8 0" HorizontalAlignment="Left" |
| 105 | + ToolTip="MaterialDesignFloatingActionAccentButton"> |
| 106 | + <Viewbox Width="24" Height="24"> |
| 107 | + <Canvas Width="24" Height="24"> |
| 108 | + <Path Data="M12,20A7,7 0 0,1 5,13A7,7 0 0,1 12,6A7,7 0 0,1 19,13A7,7 0 0,1 12,20M12,4A9,9 0 0,0 3,13A9,9 0 0,0 12,22A9,9 0 0,0 21,13A9,9 0 0,0 12,4M12.5,8H11V14L15.75,16.85L16.5,15.62L12.5,13.25V8M7.88,3.39L6.6,1.86L2,5.71L3.29,7.24L7.88,3.39M22,5.72L17.4,1.86L16.11,3.39L20.71,7.25L22,5.72Z" Fill="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Button}, Path=Foreground}" /> |
| 109 | + </Canvas> |
| 110 | + </Viewbox> |
| 111 | + </Button> |
| 112 | + <materialDesign:PopupBox Style="{StaticResource MaterialDesignMultiFloatingActionPopupBox}" |
| 113 | + PlacementMode="BottomAndAlignCentres" |
| 114 | + ToolTipService.Placement="Right" |
| 115 | + ToolTip="PopupBox, Style MaterialDesignMultiFloatingActionPopupBox"> |
| 116 | + <StackPanel> |
| 117 | + <Button ToolTip="One">1</Button> |
| 118 | + <Button ToolTip="Two">2</Button> |
| 119 | + <Button ToolTip="Three">3</Button> |
| 120 | + </StackPanel> |
| 121 | + </materialDesign:PopupBox> |
| 122 | + </StackPanel> |
| 123 | + <materialDesign:PopupBox Style="{StaticResource MaterialDesignMultiFloatingActionAccentPopupBox}" |
| 124 | + PlacementMode="BottomAndAlignCentres" |
| 125 | + HorizontalAlignment="Right" |
| 126 | + ToggleCheckedContentCommand="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=wpfExample:Buttons}, Path=FloatingActionDemoCommand}" |
| 127 | + ToggleCheckedContentCommandParameter="wowsers" |
| 128 | + Margin="0 0 48 0" |
| 129 | + ToolTip="PopupBox, Style MaterialDesignMultiFloatingActionAccentPopupBox"> |
| 130 | + <materialDesign:PopupBox.ToggleCheckedContent> |
| 131 | + <Viewbox Width="24" Height="24"> |
| 132 | + <Canvas Width="24" Height="24"> |
| 133 | + <Path Data="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z" Fill="Black" /> |
| 134 | + </Canvas> |
| 135 | + </Viewbox> |
| 136 | + </materialDesign:PopupBox.ToggleCheckedContent> |
| 137 | + <StackPanel> |
| 138 | + <Button ToolTip="One">1</Button> |
| 139 | + <Button ToolTip="Two">2</Button> |
| 140 | + <Button ToolTip="Three">3</Button> |
| 141 | + </StackPanel> |
| 142 | + </materialDesign:PopupBox> |
| 143 | + </Grid> |
71 | 144 | <StackPanel Grid.Row="2" Orientation="Horizontal" Margin="0 16 0 0">
|
72 | 145 | <Button Style="{StaticResource MaterialDesignRaisedLightButton}" Margin="0 0 8 0" Width="100"
|
73 | 146 | ToolTip="Resource name: MaterialDesignRaisedLightButton">
|
|
0 commit comments