Dark Theme, added styling for messages

This commit is contained in:
Patrick Hellebrand
2021-09-23 14:36:21 +02:00
committed by Felix Hartmann (PEA3-Fe-FI)
parent 59d4827965
commit 179ce2b1bb
2 changed files with 7 additions and 6 deletions

View File

@@ -6,7 +6,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:models="using:PolyChat.Models" xmlns:models="using:PolyChat.Models"
mc:Ignorable="d" mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" RequestedTheme="Dark">
<Grid> <Grid>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="224"/> <ColumnDefinition Width="224"/>
@@ -97,13 +97,13 @@
</Grid> </Grid>
<!-- CHAT --> <!-- CHAT -->
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Hidden"> <ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Hidden">
<ListView x:Name="listViewMessages" VerticalAlignment="Bottom" Margin="4 16"> <ListView x:Name="listViewMessages" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="4 16">
<ListView.ItemTemplate> <ListView.ItemTemplate>
<DataTemplate x:DataType="models:ChatMessage"> <DataTemplate x:DataType="models:ChatMessage">
<StackPanel x:Name="Message" Margin="0 4" Padding="16 8" CornerRadius="4" Background="{ThemeResource SystemAccentColor}"> <StackPanel x:Name="Message" MaxWidth="320" Margin="0 4" Padding="16 8" CornerRadius="4" Background="{ThemeResource SystemAccentColor}">
<TextBlock Text="{x:Bind Content}"/> <TextBlock Text="{x:Bind Content}" Foreground="{ThemeResource SystemAltHighColor}" TextWrapping="WrapWholeWords" FontSize="14"/>
<TextBlock Text="{x:Bind TimeStamp.ToShortDateString()}"/> <TextBlock Text="{x:Bind TimeStamp.ToString()}" Foreground="{ThemeResource SystemAltMediumColor}"/>
<TextBlock Text="{x:Bind Foreign}"/> <TextBlock Text="{x:Bind Foreign}" Foreground="{ThemeResource SystemAltMediumLowColor}" FontStyle="Italic" />
</StackPanel> </StackPanel>
</DataTemplate> </DataTemplate>
</ListView.ItemTemplate> </ListView.ItemTemplate>

View File

@@ -81,6 +81,7 @@ namespace PolyChat
public async void OnOpenNewChatDialog(object sender = null, RoutedEventArgs e = null) public async void OnOpenNewChatDialog(object sender = null, RoutedEventArgs e = null)
{ {
// test
/* /*
OnIncomingMessage( OnIncomingMessage(
"1.1.1.1", "1.1.1.1",