mirror of
https://github.com/BililiveRecorder/BililiveRecorder.git
synced 2024-12-26 12:15:42 +08:00
51 lines
2.5 KiB
XML
51 lines
2.5 KiB
XML
<ui:Page
|
|
x:Class="BililiveRecorder.WPF.Pages.RoomListPage"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:ui="http://schemas.modernwpf.com/2019"
|
|
xmlns:local="clr-namespace:BililiveRecorder.WPF.Pages"
|
|
xmlns:mock="clr-namespace:BililiveRecorder.WPF.MockData"
|
|
xmlns:controls="clr-namespace:BililiveRecorder.WPF.Controls"
|
|
xmlns:converters="clr-namespace:BililiveRecorder.WPF.Converters"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="1000" d:DesignWidth="960"
|
|
d:DataContext="{d:DesignInstance mock:MockRecorder,IsDesignTimeCreatable=True}"
|
|
DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=local:RootPage},Path=DataContext.Recorder,Mode=OneWay}"
|
|
Title="房间列表">
|
|
<ui:Page.Resources>
|
|
<DataTemplate x:Key="NormalRoomCardTemplate">
|
|
<ui:ThemeShadowChrome IsShadowEnabled="True" Depth="10">
|
|
<controls:RoomCard DeleteRequested="RoomCard_DeleteRequested" />
|
|
</ui:ThemeShadowChrome>
|
|
</DataTemplate>
|
|
|
|
<DataTemplate x:Key="AddRoomCardTemplate">
|
|
<ui:ThemeShadowChrome IsShadowEnabled="True" Depth="10">
|
|
<controls:AddRoomCard AddRoomRequested="AddRoomCard_AddRoomRequested"/>
|
|
</ui:ThemeShadowChrome>
|
|
</DataTemplate>
|
|
<converters:NullValueTemplateSelector
|
|
x:Key="SelectorTemplate"
|
|
Normal="{StaticResource NormalRoomCardTemplate}"
|
|
Null="{StaticResource AddRoomCardTemplate}"/>
|
|
<ui:UniformGridLayout
|
|
x:Key="UniformGridLayout"
|
|
MinItemWidth="230"
|
|
MinItemHeight="120"
|
|
MinRowSpacing="7"
|
|
MinColumnSpacing="5" />
|
|
<converters:RoomListInterceptConverter x:Key="RoomListInterceptConverter"/>
|
|
</ui:Page.Resources>
|
|
<ui:ItemsRepeaterScrollHost>
|
|
<ScrollViewer>
|
|
<ui:ItemsRepeater
|
|
HorizontalAlignment="Stretch" Margin="8"
|
|
Layout="{StaticResource UniformGridLayout}"
|
|
ItemsSource="{Binding Converter={StaticResource RoomListInterceptConverter},Mode=OneWay}"
|
|
ItemTemplate="{StaticResource SelectorTemplate}" />
|
|
</ScrollViewer>
|
|
</ui:ItemsRepeaterScrollHost>
|
|
</ui:Page>
|