58 lines
2.7 KiB
XML
58 lines
2.7 KiB
XML
<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"
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
xmlns:local="using:kawwa"
|
|
x:Class="kawwa.BinkControl">
|
|
<UserControl.Resources>
|
|
<ResourceDictionary>
|
|
<ResourceDictionary.ThemeDictionaries>
|
|
<ResourceDictionary x:Key="Light">
|
|
<SolidColorBrush x:Key='BackgroundBrush'>#F0F0F0</SolidColorBrush>
|
|
<SolidColorBrush x:Key='ForegroundBrush'>#000</SolidColorBrush>
|
|
<SolidColorBrush x:Key='DimBrush'>#888</SolidColorBrush>
|
|
</ResourceDictionary>
|
|
<ResourceDictionary x:Key="Dark">
|
|
<SolidColorBrush x:Key='BackgroundBrush'>#111</SolidColorBrush>
|
|
<SolidColorBrush x:Key='ForegroundBrush'>#EEE</SolidColorBrush>
|
|
<SolidColorBrush x:Key='DimBrush'>#777</SolidColorBrush>
|
|
</ResourceDictionary>
|
|
</ResourceDictionary.ThemeDictionaries>
|
|
</ResourceDictionary>
|
|
</UserControl.Resources>
|
|
<Grid>
|
|
<!--
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
-->
|
|
<ScrollViewer>
|
|
<ItemsControl x:Name="binkItemsControl">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate x:DataType="{x:Type local:BinkPost}">
|
|
<StackPanel Margin="0,8,0,4" Width="800" HorizontalAlignment="Center">
|
|
<Border Background="{DynamicResource BackgroundBrush}" CornerRadius="8" Padding="12">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<StackPanel Grid.Row="0" Orientation="Horizontal">
|
|
<TextBlock Foreground="{DynamicResource ForegroundBrush}" Text="~" />
|
|
<SelectableTextBlock Foreground="{DynamicResource ForegroundBrush}" Text="{Binding User}" />
|
|
<TextBlock Text=" " />
|
|
<TextBlock Foreground="{DynamicResource DimBrush}" Text="{Binding TimeString}" />
|
|
</StackPanel>
|
|
<SelectableTextBlock Foreground="{DynamicResource ForegroundBrush}" Margin="10,5,0,0" Grid.Row="1" TextWrapping="Wrap" Text="{Binding Body}" />
|
|
</Grid>
|
|
</Border>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</ScrollViewer>
|
|
</Grid>
|
|
</UserControl>
|