|
18 | 18 |
|
19 | 19 | <controls:OmnibarMode |
20 | 20 | IsDefault="True" |
| 21 | + ModeName="Path" |
21 | 22 | Text="Path..." |
22 | | - TextPlaceholder="Enter text..." |
23 | | - ToolTip="Path"> |
| 23 | + TextPlaceholder="Enter text..."> |
24 | 24 | <controls:OmnibarMode.IconOnActive> |
25 | 25 | <controls:ThemedIcon IsFilled="True" Style="{StaticResource App.ThemedIcons.Omnibar.Path}" /> |
26 | 26 | </controls:OmnibarMode.IconOnActive> |
|
52 | 52 | </controls:OmnibarMode> |
53 | 53 |
|
54 | 54 | <controls:OmnibarMode |
| 55 | + ModeName="Palette" |
55 | 56 | SuggestionItemsSource="{x:Bind DummyItems1, Mode=OneWay}" |
56 | | - TextPlaceholder="Enter a palette command..." |
57 | | - ToolTip="Palette"> |
| 57 | + TextPlaceholder="Enter a palette command..."> |
58 | 58 | <controls:OmnibarMode.IconOnActive> |
59 | 59 | <controls:ThemedIcon IsFilled="True" Style="{StaticResource App.ThemedIcons.Omnibar.Commands}" /> |
60 | 60 | </controls:OmnibarMode.IconOnActive> |
|
96 | 96 | </controls:OmnibarMode.SuggestionItemTemplate> |
97 | 97 | </controls:OmnibarMode> |
98 | 98 |
|
99 | | - <controls:OmnibarMode TextPlaceholder="Enter a search query..." ToolTip="Search"> |
| 99 | + <controls:OmnibarMode ModeName="Search" TextPlaceholder="Enter a search query..."> |
100 | 100 | <controls:OmnibarMode.IconOnActive> |
101 | 101 | <controls:ThemedIcon IsFilled="True" Style="{StaticResource App.ThemedIcons.Omnibar.Search}" /> |
102 | 102 | </controls:OmnibarMode.IconOnActive> |
|
121 | 121 | </controls:SamplePanel.SideContent> |
122 | 122 | </controls:SamplePanel> |
123 | 123 |
|
| 124 | + <controls:SamplePanel Header="Custom usage"> |
| 125 | + <controls:SamplePanel.MainContent> |
| 126 | + <StackPanel Spacing="12"> |
| 127 | + |
| 128 | + <TextBlock Text="Using WinUI font glyphs:" /> |
| 129 | + |
| 130 | + <controls:Omnibar x:Name="Omnibar2" IsEnabled="{x:Bind Omnibar2IsEnableToggleSwitch.IsOn, Mode=OneWay}"> |
| 131 | + |
| 132 | + <controls:OmnibarMode |
| 133 | + IsDefault="True" |
| 134 | + ModeName="Path" |
| 135 | + Text="Path..." |
| 136 | + TextPlaceholder="Enter text..."> |
| 137 | + <controls:OmnibarMode.IconOnActive> |
| 138 | + <FontIcon FontSize="14" Glyph="" /> |
| 139 | + </controls:OmnibarMode.IconOnActive> |
| 140 | + <controls:OmnibarMode.IconOnInactive> |
| 141 | + <FontIcon FontSize="14" Glyph="" /> |
| 142 | + </controls:OmnibarMode.IconOnInactive> |
| 143 | + <controls:OmnibarMode.ContentOnInactive> |
| 144 | + <Grid Padding="16,0" ColumnSpacing="16"> |
| 145 | + <Grid.ColumnDefinitions> |
| 146 | + <ColumnDefinition Width="Auto" /> |
| 147 | + <ColumnDefinition Width="*" /> |
| 148 | + <ColumnDefinition Width="Auto" /> |
| 149 | + </Grid.ColumnDefinitions> |
| 150 | + <Image |
| 151 | + Grid.Column="0" |
| 152 | + Width="16" |
| 153 | + Height="16" |
| 154 | + Source="/Data/DummyIcon1.png" /> |
| 155 | + <TextBlock |
| 156 | + Grid.Column="1" |
| 157 | + VerticalAlignment="Center" |
| 158 | + Text="Breadcrumb goes here" /> |
| 159 | + <FontIcon |
| 160 | + Grid.Column="2" |
| 161 | + FontSize="14" |
| 162 | + Glyph="" /> |
| 163 | + </Grid> |
| 164 | + </controls:OmnibarMode.ContentOnInactive> |
| 165 | + </controls:OmnibarMode> |
| 166 | + |
| 167 | + <controls:OmnibarMode ModeName="Palette" TextPlaceholder="Enter a palette command..."> |
| 168 | + <controls:OmnibarMode.IconOnActive> |
| 169 | + <FontIcon FontSize="14" Glyph="" /> |
| 170 | + </controls:OmnibarMode.IconOnActive> |
| 171 | + <controls:OmnibarMode.IconOnInactive> |
| 172 | + <FontIcon FontSize="14" Glyph="" /> |
| 173 | + </controls:OmnibarMode.IconOnInactive> |
| 174 | + </controls:OmnibarMode> |
| 175 | + |
| 176 | + <controls:OmnibarMode ModeName="Search" TextPlaceholder="Enter a search query..."> |
| 177 | + <controls:OmnibarMode.IconOnActive> |
| 178 | + <FontIcon FontSize="14" Glyph="" /> |
| 179 | + </controls:OmnibarMode.IconOnActive> |
| 180 | + <controls:OmnibarMode.IconOnInactive> |
| 181 | + <FontIcon FontSize="14" Glyph="" /> |
| 182 | + </controls:OmnibarMode.IconOnInactive> |
| 183 | + </controls:OmnibarMode> |
| 184 | + |
| 185 | + </controls:Omnibar> |
| 186 | + |
| 187 | + </StackPanel> |
| 188 | + </controls:SamplePanel.MainContent> |
| 189 | + <controls:SamplePanel.SideContent> |
| 190 | + <StackPanel Spacing="12"> |
| 191 | + <ToggleSwitch |
| 192 | + x:Name="Omnibar2IsEnableToggleSwitch" |
| 193 | + Header="Enable/disable Omnibar:" |
| 194 | + IsOn="True" /> |
| 195 | + <TextBox |
| 196 | + Header="Current selected mode:" |
| 197 | + IsReadOnly="True" |
| 198 | + Text="{x:Bind Omnibar2.CurrentSelectedMode, Mode=OneWay}" /> |
| 199 | + </StackPanel> |
| 200 | + </controls:SamplePanel.SideContent> |
| 201 | + </controls:SamplePanel> |
| 202 | + |
124 | 203 | </StackPanel> |
125 | 204 | </Page> |
0 commit comments