blob: 42a599254b5e0d2bcd836cbdf31e7ce968b298f9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
<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:viewModels="clr-namespace:ModerationClient.ViewModels"
xmlns:libMatrix="clr-namespace:LibMatrix;assembly=LibMatrix"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="ModerationClient.Views.RoomView"
x:DataType="viewModels:RoomViewModel">
<Grid RowDefinitions="32,*">
<Grid>
<Image Source="{CompiledBinding RoomIconBitmap}"></Image>
<Label Content="{CompiledBinding Room.Name}" />
</Grid>
<Grid Grid.Row="1" Grid.ColumnDefinitions="*,1,200">
<!-- timeline -->
<ScrollViewer Grid.Column="0" Background="#222222">
<ItemsControl ItemsSource="{CompiledBinding Room.RenderedTimeline}">
<ItemsControl.ItemTemplate>
<!-- <DataTemplate DataType="libMatrix:StateEventResponse"> -->
<!-- <Grid ColumnDefinitions="32, *"> -->
<!-- <Image></Image> -->
<!-- <Grid Grid.Column="1" RowDefinitions="*,*"> -->
<!-- <TextBlock Text="{CompiledBinding Sender}" /> -->
<!-- <TextBlock Grid.Row="1" Text="{CompiledBinding RawContent}" /> -->
<!-- </Grid> -->
<!-- </Grid> -->
<!-- </DataTemplate> -->
<DataTemplate DataType="Control">
<ContentControl Content="{Binding}" />
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
<GridSplitter Grid.Column="1" Background="Black" ResizeDirection="Columns" />
<!-- members -->
<ScrollViewer Grid.Column="2" Background="#222222">
<ItemsControl ItemsSource="{CompiledBinding Users}">
<ItemsControl.ItemTemplate>
<DataTemplate DataType="viewModels:RoomMember">
<Grid ColumnDefinitions="32,*" Margin="0,4">
<Image Source="{CompiledBinding UserAvatarBitmap}" Height="32" Width="32" Margin="0,0,4,0" />
<Grid Grid.Column="1" RowDefinitions="*,*">
<TextBlock Text="{CompiledBinding DisplayName}" />
<TextBlock Grid.Row="1" Text="{CompiledBinding UserId}" FontSize="10" FontStyle="Italic" />
</Grid>
<WrapPanel Children=""></WrapPanel>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</Grid>
</Grid>
</UserControl>
|