61 lines
2.7 KiB
XML
61 lines
2.7 KiB
XML
<Page
|
|
x:Class="WPFluent.Gallery.Views.Pages.Windows.WindowsPage"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:controls="clr-namespace:WPFluent.Gallery.Controls"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="clr-namespace:WPFluent.Gallery.Views.Pages.Windows"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:models="clr-namespace:WPFluent.Gallery.Models"
|
|
xmlns:ui="https://github.com/ShrlAlgo/WPFluent"
|
|
Title="WindowsPage"
|
|
|
|
d:DataContext="{d:DesignInstance local:WindowsPage,
|
|
IsDesignTimeCreatable=False}"
|
|
d:DesignHeight="450"
|
|
d:DesignWidth="800"
|
|
|
|
|
|
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
|
mc:Ignorable="d">
|
|
|
|
<Grid>
|
|
<ItemsControl ItemsSource="{Binding ViewModel.WindowCards, Mode=OneWay}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate DataType="{x:Type models:WindowCard}">
|
|
<ui:CardAction
|
|
Margin="4"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch"
|
|
Command="{Binding ViewModel.OpenWindowCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=local:WindowsPage}, Mode=OneWay}"
|
|
CommandParameter="{Binding Value, Mode=OneTime}"
|
|
Icon="{Binding Icon, Mode=OneTime}"
|
|
IsChevronVisible="True">
|
|
<StackPanel>
|
|
<ui:TextBlock
|
|
Margin="0"
|
|
FontTypography="BodyStrong"
|
|
Text="{Binding Name, Mode=OneTime}"
|
|
TextWrapping="WrapWithOverflow" />
|
|
<ui:TextBlock
|
|
Appearance="Tertiary"
|
|
Text="{Binding Description, Mode=OneTime}"
|
|
TextWrapping="WrapWithOverflow" />
|
|
</StackPanel>
|
|
</ui:CardAction>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<ui:VirtualizingWrapPanel
|
|
IsItemsHost="True"
|
|
ItemSize="290,80"
|
|
Orientation="Vertical"
|
|
SpacingMode="Uniform"
|
|
StretchItems="True" />
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
</ItemsControl>
|
|
</Grid>
|
|
</Page>
|