Message Alignment First Try

This commit is contained in:
Patrick Hellebrand
2021-09-23 16:05:20 +02:00
parent de2d135fdf
commit 0a1ff66e38
3 changed files with 16 additions and 29 deletions

View File

@@ -98,10 +98,11 @@
<ListView x:Name="listViewMessages" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="4 16">
<ListView.ItemTemplate>
<DataTemplate x:DataType="models:ChatMessage">
<StackPanel x:Name="Message" MaxWidth="320" Margin="0 4" Padding="16 8" CornerRadius="4" Background="{ThemeResource SystemAccentColor}">
<TextBlock Text="{x:Bind Content}" Foreground="{ThemeResource SystemAltHighColor}" TextWrapping="WrapWholeWords" FontSize="14"/>
<TextBlock Text="{x:Bind TimeStamp.ToString()}" Foreground="{ThemeResource SystemAltMediumColor}"/>
<TextBlock Text="{x:Bind Foreign}" Foreground="{ThemeResource SystemAltMediumLowColor}" FontStyle="Italic" />
<StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
<StackPanel HorizontalAlignment="{x:Bind Align}" x:Name="Message" MaxWidth="320" Margin="0 4" Padding="16 8" CornerRadius="4" Background="{ThemeResource SystemAccentColor}">
<TextBlock Text="{x:Bind Content}" Foreground="{ThemeResource SystemAltHighColor}" TextWrapping="WrapWholeWords" FontSize="14"/>
<TextBlock Text="{x:Bind TimeStamp.ToString()}" Foreground="{ThemeResource SystemAltMediumColor}"/>
</StackPanel>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>