bib_Talk_Chatprogramm/bibtalk/bib-talk/UI/MainWindow.xaml

185 lines
9.5 KiB
Plaintext
Raw Normal View History

2024-06-10 15:57:04 +02:00
<Window x:Class="bib_talk.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
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"
Title="MainWindow"
Height="700"
Width="1000"
WindowStyle="None"
AllowsTransparency="True"
Background="Transparent"
WindowStartupLocation="CenterScreen" ResizeMode="NoResize">
<Window.Resources>
2024-06-18 12:53:58 +02:00
2024-06-10 15:57:04 +02:00
<Style x:Key="InvisibleButtonStyle" TargetType="Button">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="OverridesDefaultStyle" Value="True"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="Transparent"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="Transparent"/>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="NoHoverButtonStyle" TargetType="Button">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
2024-06-18 12:53:58 +02:00
2024-06-10 15:57:04 +02:00
<Border CornerRadius="15" BorderThickness="20" BorderBrush="#FF282828">
<Grid Margin="-10,-10,-10,-10" Background="#FF282828">
<Grid.RowDefinitions>
<RowDefinition Height="289*"/>
<RowDefinition Height="392*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="632*"/>
<ColumnDefinition Width="115*"/>
<ColumnDefinition Width="118*"/>
<ColumnDefinition Width="115*"/>
</Grid.ColumnDefinitions>
2024-06-10 15:57:04 +02:00
<!-- Draggable Area -->
<Grid VerticalAlignment="Top" Height="45" Background="Transparent" MouseLeftButtonDown="DraggableArea_MouseLeftButtonDown" Margin="0,-21,0,0" Grid.ColumnSpan="4">
2024-06-10 15:57:04 +02:00
</Grid>
2024-06-10 15:57:04 +02:00
<!-- Close Button -->
<Button Style="{StaticResource InvisibleButtonStyle}"
Width="21"
Height="22"
2024-06-10 15:57:04 +02:00
VerticalAlignment="Top"
HorizontalAlignment="Right"
Click="CloseButton_Click" Grid.Column="3" RenderTransformOrigin="0.057,0.564" Margin="0,-5,0,0">
2024-06-10 15:57:04 +02:00
<TextBlock Text="❌"
FontSize="15"
2024-06-10 15:57:04 +02:00
Foreground="White"
FontWeight="Bold"
HorizontalAlignment="Center"
VerticalAlignment="Top"/>
2024-06-10 15:57:04 +02:00
</Button>
<Grid Margin="298,17,0,176" Grid.ColumnSpan="4">
2024-06-18 12:53:58 +02:00
<Popup x:Name="popup" Placement="Center" IsOpen="False" LostFocus="Popup_LostFocus">
<StackPanel Background="White" Orientation="Vertical" Width="200" Height="150" Margin="10">
<Button Content="Button 1" Click="Button1_Click" Margin="5"/>
<Button Content="Button 2" Click="Button2_Click" Margin="5"/>
<Button Content="Button 3" Click="Button3_Click" Margin="5"/>
</StackPanel>
</Popup>
<Rectangle Stroke="#FF6332A0" Fill="#FF6332A0" Width="682"/>
<TextBlock Text="Global Chat" Margin="108,25,206,21" FontSize="40" Foreground="White" />
<Image Source="/UI/logo - Copy.png" Stretch="Fill" Margin="-55,-118,499,0">
</Image>
2024-06-18 12:58:00 +02:00
<Button Content="⋮" HorizontalAlignment="Left" Margin="638,8,0,0" VerticalAlignment="Top" Width="19" Height="70" Background="{x:Null}" BorderBrush="{x:Null}" Foreground="White" FontSize="58" Click="ChatFenster_Click"/>
</Grid>
<Grid Margin="76,17,339,176">
2024-06-18 12:53:58 +02:00
<Rectangle Stroke="#FF282828" Fill="#FF282828"/>
<TextBlock Text="Chats" Foreground="White" FontSize="22" Margin="10,18,134,39" />
<TextBox
FontSize="20"
BorderBrush="Transparent"
Margin="10,61,10,10"
Background="#FF6332A0"
Foreground="White"
SelectionBrush="#FF6332A0" KeyDown="messageBox_KeyDown" RenderTransformOrigin="0.5,0.5">
<TextBox.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="-1" ScaleY="-1"/>
<SkewTransform/>
<RotateTransform Angle="-180"/>
<TranslateTransform/>
</TransformGroup>
</TextBox.RenderTransform>
</TextBox>
</Grid>
<Grid Margin="0,17,561,0" Grid.RowSpan="2">
<Rectangle Stroke="#FF323134" Fill="#FF323134"/>
</Grid>
<ListBox x:Name="onlineUsersListBox" Margin="76,112,339,0" d:ItemsSource="{d:SampleData ItemCount=5}" Background="#FF323134" BorderBrush="{x:Null}" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Grid.RowSpan="2">
2024-06-10 15:57:04 +02:00
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Width="205" Height="60">
2024-06-10 15:57:04 +02:00
<Ellipse Width="10" Height="10" Fill="Green" Margin="5"/>
<Image Source="{Binding ProfileImagePath}" Width="50" Height="50" Stretch="Fill">
<Image.Clip>
<EllipseGeometry Center="25,25" RadiusX="25" RadiusY="25"/>
</Image.Clip>
</Image>
<TextBlock Text="{Binding Username}" FontWeight="Bold" Foreground="#FF6332A0" RenderTransformOrigin="0.51,0.532" FontSize="18" Width="123" Height="30" Margin="10,0,0,0"/>
2024-06-10 15:57:04 +02:00
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<TextBlock HorizontalAlignment="Left" x:Name="loggedInUser" Margin="0,-3,0,0" TextWrapping="Wrap" Text="xxxx" VerticalAlignment="Top" Height="20" Width="184" Foreground="White" RenderTransformOrigin="0.6,0.591"/>
<ListBox x:Name="chatlistbox" Margin="298,112,0,50" d:ItemsSource="{d:SampleData ItemCount=5}" Background="#FF323134" BorderBrush="{x:Null}" Foreground="#FF6332A0" ScrollViewer.VerticalScrollBarVisibility="Hidden" ScrollViewer.HorizontalScrollBarVisibility="Hidden" Grid.ColumnSpan="4" Grid.RowSpan="2">
2024-06-10 15:57:04 +02:00
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Margin="5">
<TextBlock Text="{Binding Username}" FontWeight="Bold" FontSize="20"/>
<TextBlock Text="{Binding Timestamp, StringFormat='{}{0:yyyy-MM-dd HH:mm:ss}'}" Foreground="Gray"/>
<TextBlock TextWrapping="Wrap" Text="{Binding Text}" FontSize="16" Foreground="White"/>
2024-06-10 15:57:04 +02:00
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
2024-06-10 15:57:04 +02:00
<TextBox
x:Name="messageBox"
2024-06-10 15:57:04 +02:00
FontSize="20"
BorderBrush="Transparent"
2024-06-18 12:53:58 +02:00
Margin="298,346,76,0"
2024-06-10 15:57:04 +02:00
Background="#FF323134"
Foreground="White"
SelectionBrush="#FF6332A0" KeyDown="messageBox_KeyDown" Grid.ColumnSpan="4" Grid.Row="1"/>
<Button x:Name="weiterbutton" Click="send_Click" Content="Weiter" Foreground="White" Background="#FF6332A0" BorderThickness="0" Margin="44,346,10,0" BorderBrush="{x:Null}" Style="{StaticResource NoHoverButtonStyle}" RenderTransformOrigin="0.279,0.633" Grid.Column="3" Grid.Row="1"/>
<Button x:Name="uplaodpb" Click="uploadpbclick" Content="Upload" Foreground="White" Background="#FF6332A0" BorderThickness="0" Margin="10,351,574,5" BorderBrush="{x:Null}" Style="{StaticResource NoHoverButtonStyle}" RenderTransformOrigin="0.279,0.633" Grid.Row="1"/>
2024-06-11 10:16:22 +02:00
2024-06-10 15:57:04 +02:00
2024-06-18 12:53:58 +02:00
2024-06-10 15:57:04 +02:00
</Grid>
</Border>
</Window>