2025-12-01 09:37:47 +08:00
|
|
|
<UserControl
|
|
|
|
|
x:Class="Microsoft.PowerToys.Settings.UI.Controls.QuickAccessList"
|
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
|
xmlns:local="using:Microsoft.PowerToys.Settings.UI.Controls"
|
|
|
|
|
xmlns:tkcontrols="using:CommunityToolkit.WinUI.Controls"
|
|
|
|
|
xmlns:tkconverters="using:CommunityToolkit.WinUI.Converters">
|
|
|
|
|
|
|
|
|
|
<UserControl.Resources>
|
|
|
|
|
<tkconverters:BoolToVisibilityConverter
|
|
|
|
|
x:Key="BoolToVisibilityConverter"
|
|
|
|
|
FalseValue="Collapsed"
|
|
|
|
|
TrueValue="Visible" />
|
|
|
|
|
<tkconverters:StringVisibilityConverter x:Key="StringVisibilityConverter" />
|
|
|
|
|
</UserControl.Resources>
|
|
|
|
|
|
|
|
|
|
<ItemsControl ItemsSource="{x:Bind ItemsSource, Mode=OneWay}">
|
|
|
|
|
<ItemsControl.ItemsPanel>
|
|
|
|
|
<ItemsPanelTemplate>
|
2025-12-10 12:57:07 +01:00
|
|
|
<tkcontrols:WrapPanel HorizontalAlignment="Stretch" VerticalSpacing="12" />
|
2025-12-01 09:37:47 +08:00
|
|
|
</ItemsPanelTemplate>
|
|
|
|
|
</ItemsControl.ItemsPanel>
|
|
|
|
|
<ItemsControl.ItemTemplate>
|
|
|
|
|
<DataTemplate x:DataType="local:QuickAccessItem">
|
|
|
|
|
<local:FlyoutMenuButton
|
|
|
|
|
AutomationProperties.Name="{x:Bind Title}"
|
|
|
|
|
Command="{x:Bind Command}"
|
|
|
|
|
CommandParameter="{x:Bind CommandParameter}"
|
|
|
|
|
Visibility="{x:Bind Visible, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}">
|
|
|
|
|
<local:FlyoutMenuButton.Content>
|
|
|
|
|
<TextBlock
|
|
|
|
|
Style="{StaticResource CaptionTextBlockStyle}"
|
|
|
|
|
Text="{x:Bind Title}"
|
|
|
|
|
TextAlignment="Center"
|
|
|
|
|
TextWrapping="Wrap" />
|
|
|
|
|
</local:FlyoutMenuButton.Content>
|
|
|
|
|
<local:FlyoutMenuButton.Icon>
|
2025-12-10 12:57:07 +01:00
|
|
|
<Image>
|
2025-12-01 09:37:47 +08:00
|
|
|
<Image.Source>
|
|
|
|
|
<BitmapImage UriSource="{x:Bind Icon}" />
|
|
|
|
|
</Image.Source>
|
|
|
|
|
</Image>
|
|
|
|
|
</local:FlyoutMenuButton.Icon>
|
|
|
|
|
<ToolTipService.ToolTip>
|
|
|
|
|
<ToolTip Content="{x:Bind Description}" Visibility="{x:Bind Description, Converter={StaticResource StringVisibilityConverter}}" />
|
|
|
|
|
</ToolTipService.ToolTip>
|
|
|
|
|
</local:FlyoutMenuButton>
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
</ItemsControl.ItemTemplate>
|
|
|
|
|
</ItemsControl>
|
|
|
|
|
</UserControl>
|