diff options
author | Rory& <root@rory.gay> | 2024-01-08 13:55:15 +0100 |
---|---|---|
committer | Rory& <root@rory.gay> | 2024-01-08 13:56:32 +0100 |
commit | ede3857084bc7c6e65b7d36cbf913b09596e2787 (patch) | |
tree | b94694c307fb831ea5e63fabde0dbb5f56f02941 /MatrixRoomUtils.Desktop/Components/Pages | |
parent | Small changes (diff) | |
download | MatrixUtils-ede3857084bc7c6e65b7d36cbf913b09596e2787.tar.xz |
Internal changes to policy list viewer (extensibility), fix duplicating change handler for room list page (performance), use /state in room list page before sync
Diffstat (limited to 'MatrixRoomUtils.Desktop/Components/Pages')
-rw-r--r-- | MatrixRoomUtils.Desktop/Components/Pages/RoomList.axaml | 21 | ||||
-rw-r--r-- | MatrixRoomUtils.Desktop/Components/Pages/RoomList.axaml.cs | 15 |
2 files changed, 36 insertions, 0 deletions
diff --git a/MatrixRoomUtils.Desktop/Components/Pages/RoomList.axaml b/MatrixRoomUtils.Desktop/Components/Pages/RoomList.axaml new file mode 100644 index 0000000..0e43d99 --- /dev/null +++ b/MatrixRoomUtils.Desktop/Components/Pages/RoomList.axaml @@ -0,0 +1,21 @@ +<UserControl xmlns="https://github.com/avaloniaui" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:components="clr-namespace:MatrixRoomUtils.Desktop.Components.Pages" + xmlns:components1="clr-namespace:MatrixRoomUtils.Desktop.Components" + xmlns:abstractions="clr-namespace:MatrixRoomUtils.Abstractions;assembly=MatrixRoomUtils.Abstractions" + + mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" + x:Class="MatrixRoomUtils.Desktop.Components.Pages.RoomList" + x:DataType="components:RoomList" + DataContext="{Binding $self}" + > + <ListBox ItemsSource="{Binding Rooms}"> + <ListBox.ItemTemplate> + <DataTemplate DataType="abstractions:RoomInfo"> + <components1:RoomListEntry Room="{Binding Path=.}"/> + </DataTemplate> + </ListBox.ItemTemplate> + </ListBox> +</UserControl> diff --git a/MatrixRoomUtils.Desktop/Components/Pages/RoomList.axaml.cs b/MatrixRoomUtils.Desktop/Components/Pages/RoomList.axaml.cs new file mode 100644 index 0000000..53c3063 --- /dev/null +++ b/MatrixRoomUtils.Desktop/Components/Pages/RoomList.axaml.cs @@ -0,0 +1,15 @@ +using System.Collections.ObjectModel; +using Avalonia; +using Avalonia.Controls; +using Avalonia.Markup.Xaml; +using MatrixRoomUtils.Abstractions; + +namespace MatrixRoomUtils.Desktop.Components.Pages; + +public partial class RoomList : UserControl { + private ObservableCollection<RoomInfo> Rooms { get; set; } = new(); + + public RoomList() { + InitializeComponent(); + } +} \ No newline at end of file |