mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-23 19:49:43 +01:00
Fix scrolling when many items (e.g. All Apps) and fix Details labels update (#498)
Closes #407 (at least well enough) Closes #466 Closes #481 Related to #365, but doesn't fix that.
This commit is contained in:
@@ -33,13 +33,15 @@
|
||||
Spacing="8" />
|
||||
|
||||
<DataTemplate x:Key="TagTemplate" x:DataType="viewmodels:TagViewModel">
|
||||
<cpcontrols:Tag
|
||||
BackgroundColor="{x:Bind Background, Mode=OneWay}"
|
||||
FontSize="12"
|
||||
ForegroundColor="{x:Bind Foreground, Mode=OneWay}"
|
||||
Icon="{x:Bind Icon, Mode=OneWay}"
|
||||
Text="{x:Bind Text, Mode=OneWay}"
|
||||
ToolTipService.ToolTip="{x:Bind ToolTip, Mode=OneWay}" />
|
||||
<ItemContainer>
|
||||
<cpcontrols:Tag
|
||||
BackgroundColor="{x:Bind Background, Mode=OneWay}"
|
||||
FontSize="12"
|
||||
ForegroundColor="{x:Bind Foreground, Mode=OneWay}"
|
||||
Icon="{x:Bind Icon, Mode=OneWay}"
|
||||
Text="{x:Bind Text, Mode=OneWay}"
|
||||
ToolTipService.ToolTip="{x:Bind ToolTip, Mode=OneWay}" />
|
||||
</ItemContainer>
|
||||
</DataTemplate>
|
||||
|
||||
<!-- https://learn.microsoft.com/windows/apps/design/controls/itemsview#specify-the-look-of-the-items -->
|
||||
@@ -86,11 +88,15 @@
|
||||
Visibility="{x:Bind Subtitle, Mode=OneWay, Converter={StaticResource StringVisibilityConverter}}" />
|
||||
</StackPanel>
|
||||
|
||||
<ItemsRepeater
|
||||
<ItemsView
|
||||
Grid.Column="2"
|
||||
IsHitTestVisible="False"
|
||||
IsItemInvokedEnabled="False"
|
||||
IsTabStop="False"
|
||||
ItemTemplate="{StaticResource TagTemplate}"
|
||||
ItemsSource="{x:Bind Tags, Mode=OneWay}"
|
||||
Layout="{StaticResource HorizontalStackLayout}"
|
||||
SelectionMode="None"
|
||||
Visibility="{x:Bind HasTags, Mode=OneWay}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
|
||||
<DataTemplate x:Key="TagTemplate" x:DataType="viewModels:TagViewModel">
|
||||
<cpcontrols:Tag
|
||||
HorizontalAlignment="Left"
|
||||
BackgroundColor="{x:Bind Background, Mode=OneWay}"
|
||||
ForegroundColor="{x:Bind Foreground, Mode=OneWay}"
|
||||
Icon="{x:Bind Icon, Mode=OneWay}"
|
||||
@@ -89,15 +90,22 @@
|
||||
IsTextSelectionEnabled="True"
|
||||
Text="{x:Bind Key, Mode=OneWay}"
|
||||
TextWrapping="WrapWholeWords" />
|
||||
<ItemsRepeater
|
||||
Grid.Column="2"
|
||||
<ItemsControl
|
||||
ItemTemplate="{StaticResource TagTemplate}"
|
||||
ItemsSource="{x:Bind Tags, Mode=OneWay}"
|
||||
Visibility="{x:Bind HasTags, Mode=OneWay}">
|
||||
<ItemsRepeater.Layout>
|
||||
<toolkit:WrapLayout HorizontalSpacing="8" VerticalSpacing="8" />
|
||||
</ItemsRepeater.Layout>
|
||||
</ItemsRepeater>
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<toolkit:WrapPanel
|
||||
x:Name="TagsWrapPanel"
|
||||
MinWidth="0"
|
||||
Padding="0"
|
||||
HorizontalSpacing="8"
|
||||
Orientation="Horizontal"
|
||||
VerticalSpacing="8" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
</ItemsControl>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ResourceDictionary>
|
||||
|
||||
Reference in New Issue
Block a user