wakka/BinkPage.xaml
2025-05-12 02:41:58 -05:00

54 lines
2.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<Page
x:Class="wakka.BinkPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:wakka"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<CommandBar DefaultLabelPosition="Right" Grid.Row="0">
<AppBarButton Icon="Refresh" Label="Update" Click="GetNewBinksButton" />
<AppBarButton Icon="Add" Label="Post" Click="OnBinkCreate" />
</CommandBar>
<ContentDialog
x:Name="binkComposeDialog"
Title="New Bink"
PrimaryButtonText="Bink!"
CloseButtonText="Cancel"
PrimaryButtonClick="BinkSubmit">
<TextBox
PlaceholderText="Your bink here..."
Width="300"
Height="150"
TextWrapping="Wrap"
AcceptsReturn="True"
TextChanged="OnTextChanged"
x:Name="binkComposeBox"/>
</ContentDialog>
<ListView x:Name="binksListView" SelectionMode="None" Padding="5,10,5,10" Grid.Row="1">
<ListView.ItemTemplate>
<DataTemplate x:DataType="local:BinkPost">
<StackPanel MaxWidth="1000" CornerRadius="8" Padding="10,10,10,10" Background="{ThemeResource CardBackgroundFillColorSecondaryBrush}" Margin="0,0,0,20">
<StackPanel Orientation="Horizontal">
<TextBlock Text="~"/>
<TextBlock IsTextSelectionEnabled="True" Text="{x:Bind User}"/>
<TextBlock Margin="10,0,0,0" Foreground="{ThemeResource TextFillColorTertiaryBrush}" Text="{x:Bind TimeString}"/>
</StackPanel>
<TextBlock TextWrapping="WrapWholeWords" IsTextSelectionEnabled="True" Margin="5,5,0,0" Text="{x:Bind Body}" />
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
</Page>