mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 11:46:30 +02:00
63 lines
3.3 KiB
Plaintext
63 lines
3.3 KiB
Plaintext
|
|
<?xml version="1.0" encoding="utf-8" ?>
|
||
|
|
<Page
|
||
|
|
x:Class="Microsoft.CmdPal.UI.Settings.ExtensionsPage"
|
||
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
|
|
xmlns:controls="using:CommunityToolkit.WinUI.Controls"
|
||
|
|
xmlns:converters="using:CommunityToolkit.WinUI.Converters"
|
||
|
|
xmlns:cpcontrols="using:Microsoft.CmdPal.UI.Controls"
|
||
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||
|
|
xmlns:helpers="using:Microsoft.CmdPal.UI.Helpers"
|
||
|
|
xmlns:local="using:Microsoft.CmdPal.UI.Settings"
|
||
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
|
|
xmlns:ui="using:CommunityToolkit.WinUI"
|
||
|
|
xmlns:viewmodels="using:Microsoft.CmdPal.UI.ViewModels"
|
||
|
|
mc:Ignorable="d">
|
||
|
|
|
||
|
|
<Grid>
|
||
|
|
<Grid.RowDefinitions>
|
||
|
|
<RowDefinition Height="Auto" />
|
||
|
|
<RowDefinition Height="*" />
|
||
|
|
</Grid.RowDefinitions>
|
||
|
|
<ScrollViewer Grid.Row="1" Padding="0,0,8,0">
|
||
|
|
<Grid Padding="8,16,8,8">
|
||
|
|
<StackPanel
|
||
|
|
MaxWidth="1000"
|
||
|
|
HorizontalAlignment="Stretch"
|
||
|
|
Spacing="{StaticResource SettingsCardSpacing}">
|
||
|
|
|
||
|
|
<ItemsRepeater ItemsSource="{x:Bind viewModel.CommandProviders, Mode=OneWay}" Layout="{StaticResource VerticalStackLayout}">
|
||
|
|
<ItemsRepeater.ItemTemplate>
|
||
|
|
<DataTemplate x:DataType="viewmodels:ProviderSettingsViewModel">
|
||
|
|
<controls:SettingsCard
|
||
|
|
Click="SettingsCard_Click"
|
||
|
|
DataContext="{x:Bind}"
|
||
|
|
Description="{x:Bind ExtensionSubtext, Mode=OneWay}"
|
||
|
|
Header="{x:Bind DisplayName, Mode=OneWay}"
|
||
|
|
IsClickEnabled="True">
|
||
|
|
<controls:SettingsCard.HeaderIcon>
|
||
|
|
<cpcontrols:ContentIcon>
|
||
|
|
<cpcontrols:ContentIcon.Content>
|
||
|
|
<cpcontrols:IconBox
|
||
|
|
Width="20"
|
||
|
|
Height="20"
|
||
|
|
AutomationProperties.AccessibilityView="Raw"
|
||
|
|
SourceKey="{x:Bind Icon, Mode=OneWay}"
|
||
|
|
SourceRequested="{x:Bind helpers:IconCacheProvider.SourceRequested}" />
|
||
|
|
</cpcontrols:ContentIcon.Content>
|
||
|
|
</cpcontrols:ContentIcon>
|
||
|
|
</controls:SettingsCard.HeaderIcon>
|
||
|
|
|
||
|
|
<!-- In the near future: add a toggle to actually expose if a extension is enabled -->
|
||
|
|
<!-- <ToggleSwitch IsOn="{x:Bind IsEnabled, Mode=TwoWay}" /> -->
|
||
|
|
|
||
|
|
</controls:SettingsCard>
|
||
|
|
</DataTemplate>
|
||
|
|
</ItemsRepeater.ItemTemplate>
|
||
|
|
</ItemsRepeater>
|
||
|
|
</StackPanel>
|
||
|
|
</Grid>
|
||
|
|
</ScrollViewer>
|
||
|
|
</Grid>
|
||
|
|
</Page>
|