2017-09-12 14:32:34 +02:00
|
|
|
<UserControl x:Class="ChatController.ChatMainControl"
|
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
2020-06-17 19:36:52 +02:00
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
|
xmlns:converter="clr-namespace:ChatController.Converter"
|
|
|
|
|
xmlns:chatKlassen="clr-namespace:ChatController.ChatKlassen"
|
2021-09-07 19:32:10 +02:00
|
|
|
xmlns:core="clr-namespace:ChatController.Core"
|
|
|
|
|
xmlns:chatController="clr-namespace:ChatController"
|
2022-07-11 16:01:14 +02:00
|
|
|
xmlns:utilities="clr-namespace:ChatController.Utilities"
|
|
|
|
|
mc:Ignorable="d"
|
2017-12-11 14:32:56 +01:00
|
|
|
d:DesignHeight="300" d:DesignWidth="600"
|
2020-06-17 19:36:52 +02:00
|
|
|
Loaded="ChatMainControl_OnLoaded"
|
|
|
|
|
SnapsToDevicePixels="True" d:DataContext="{d:DesignData ChatMainControl}">
|
|
|
|
|
<UserControl.Resources>
|
|
|
|
|
<converter:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter" />
|
|
|
|
|
<converter:StringEmptyToVisibilityConverter x:Key="StringEmptyToVisibilityConverter" />
|
2021-09-07 19:32:10 +02:00
|
|
|
<converter:UserProfilePictureVisibilityConverter x:Key="UserProfilePictureVisibilityConverter" />
|
2022-07-11 16:01:14 +02:00
|
|
|
<converter:BroadcastCheckBoxVisibilityMultiConverter x:Key="BroadcastCheckBoxVisibilityMultiConverter" />
|
|
|
|
|
|
2017-12-11 14:32:56 +01:00
|
|
|
|
2022-07-11 16:01:14 +02:00
|
|
|
<!--<SolidColorBrush x:Key="DarkBackColor" Color="#A9B8C2" />-->
|
|
|
|
|
<SolidColorBrush x:Key="DarkBackColor" Color="#A9B8C2" />
|
|
|
|
|
<SolidColorBrush x:Key="LightBackColor" Color="#F3F3F3" />
|
|
|
|
|
|
|
|
|
|
<Style x:Key="OrangeButtonStyle" TargetType="{x:Type Button}">
|
|
|
|
|
<Setter Property="BorderBrush" Value="#FF5A00" />
|
|
|
|
|
<Setter Property="Background" Value="#FF5A00" />
|
|
|
|
|
<Setter Property="Foreground" Value="White"></Setter>
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
|
|
|
<Border x:Name="Border" Background="#FF5A00" CornerRadius="5" Padding="5,2">
|
|
|
|
|
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
|
|
|
|
|
</Border>
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
|
|
<Setter Property="Background" Value="#FF988F" TargetName="Border" />
|
|
|
|
|
</Trigger>
|
|
|
|
|
<Trigger Property="IsPressed" Value="True">
|
|
|
|
|
<Setter Property="Background" Value="#FF7654" TargetName="Border" />
|
|
|
|
|
</Trigger>
|
|
|
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
|
|
|
<Setter Property="Background" Value="LightGray" TargetName="Border" />
|
|
|
|
|
</Trigger>
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
|
|
<Style x:Key="CloseButtonStyle" TargetType="{x:Type Button}">
|
|
|
|
|
<Setter Property="MinWidth" Value="0" />
|
|
|
|
|
<Setter Property="MinHeight" Value="0" />
|
|
|
|
|
<Setter Property="Width" Value="Auto" />
|
|
|
|
|
<Setter Property="Height" Value="Auto" />
|
|
|
|
|
<Setter Property="Background" Value="Transparent" />
|
|
|
|
|
<Setter Property="Focusable" Value="false" />
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
|
|
|
<ControlTemplate.Resources>
|
|
|
|
|
<Storyboard x:Key="Timeline1">
|
|
|
|
|
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="glow" Storyboard.TargetProperty="(UIElement.Opacity)">
|
|
|
|
|
<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1" />
|
|
|
|
|
</DoubleAnimationUsingKeyFrames>
|
|
|
|
|
<DoubleAnimation Storyboard.TargetName="border" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" To="1.3" Duration="0:0:0.2" />
|
|
|
|
|
<DoubleAnimation Storyboard.TargetName="border" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" To="1.3" Duration="0:0:0.2" />
|
|
|
|
|
</Storyboard>
|
|
|
|
|
<Storyboard x:Key="Timeline2">
|
|
|
|
|
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="glow" Storyboard.TargetProperty="(UIElement.Opacity)">
|
|
|
|
|
<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0" />
|
|
|
|
|
</DoubleAnimationUsingKeyFrames>
|
|
|
|
|
<DoubleAnimation Storyboard.TargetName="border" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" Duration="0:0:0.2" />
|
|
|
|
|
<DoubleAnimation Storyboard.TargetName="border" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" Duration="0:0:0.2" />
|
|
|
|
|
</Storyboard>
|
|
|
|
|
</ControlTemplate.Resources>
|
|
|
|
|
<Grid SnapsToDevicePixels="true" x:Name="grid" MinWidth="20" MinHeight="20">
|
|
|
|
|
<Border x:Name="border" BorderBrush="#FF000000" BorderThickness="1,1,1,1" CornerRadius="3,3,3,3" Padding="0,0,0,0" Margin="0,0,0,0">
|
|
|
|
|
<Border.Background>
|
|
|
|
|
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
|
|
|
|
|
<GradientStop Color="#FF450202" Offset="0" />
|
|
|
|
|
<GradientStop Color="#FFC61A1A" Offset="1" />
|
|
|
|
|
</LinearGradientBrush>
|
|
|
|
|
</Border.Background>
|
|
|
|
|
<Grid>
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="0.5*" />
|
|
|
|
|
<RowDefinition Height="0.5*" />
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
<Border Opacity="0" HorizontalAlignment="Stretch" x:Name="glow" Width="Auto" Grid.RowSpan="2" CornerRadius="3,3,3,3">
|
|
|
|
|
<Border.Background>
|
|
|
|
|
<RadialGradientBrush>
|
|
|
|
|
<RadialGradientBrush.RelativeTransform>
|
|
|
|
|
<TransformGroup>
|
|
|
|
|
<ScaleTransform ScaleX="1.702" ScaleY="2.243" />
|
|
|
|
|
<SkewTransform AngleX="0" AngleY="0" />
|
|
|
|
|
<RotateTransform Angle="0" />
|
|
|
|
|
<TranslateTransform X="-0.368" Y="-0.152" />
|
|
|
|
|
</TransformGroup>
|
|
|
|
|
</RadialGradientBrush.RelativeTransform>
|
|
|
|
|
<GradientStop Color="#B2FFFFFF" Offset="0" />
|
|
|
|
|
<GradientStop Color="#00FF9E9A" Offset="1" />
|
|
|
|
|
</RadialGradientBrush>
|
|
|
|
|
</Border.Background>
|
|
|
|
|
</Border>
|
|
|
|
|
<Border Grid.Row="0" HorizontalAlignment="Stretch" Margin="0,0,0,0" x:Name="shine" Width="Auto" CornerRadius="3,3,0,0">
|
|
|
|
|
<Border.Background>
|
|
|
|
|
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
|
|
|
|
|
<GradientStop Color="#99FFFFFF" Offset="0" />
|
|
|
|
|
<GradientStop Color="#33FFFFFF" Offset="1" />
|
|
|
|
|
</LinearGradientBrush>
|
|
|
|
|
</Border.Background>
|
|
|
|
|
</Border>
|
|
|
|
|
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontFamily="Webdings" FontSize="16" Foreground="#FFFFFFFF" TextWrapping="Wrap"
|
|
|
|
|
Grid.Row="0" Grid.RowSpan="2">
|
|
|
|
|
<Run Text="r" />
|
|
|
|
|
</TextBlock>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
</Grid>
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
|
|
<Trigger.EnterActions>
|
|
|
|
|
<BeginStoryboard Storyboard="{StaticResource Timeline1}" />
|
|
|
|
|
</Trigger.EnterActions>
|
|
|
|
|
<Trigger.ExitActions>
|
|
|
|
|
<BeginStoryboard x:Name="Timeline2_BeginStoryboard" Storyboard="{StaticResource Timeline2}" />
|
|
|
|
|
</Trigger.ExitActions>
|
|
|
|
|
</Trigger>
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
2017-12-11 14:32:56 +01:00
|
|
|
|
2020-06-17 19:36:52 +02:00
|
|
|
<Style x:Key="MainNavigationScrollViewer" TargetType="{x:Type ScrollViewer}">
|
|
|
|
|
<Setter Property="OverridesDefaultStyle" Value="True"/>
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="{x:Type ScrollViewer}">
|
|
|
|
|
<Grid>
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition/>
|
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition/>
|
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
|
|
<ScrollContentPresenter Grid.Column="0"/>
|
|
|
|
|
|
|
|
|
|
<ScrollBar Name="PART_VerticalScrollBar"
|
2017-12-11 14:32:56 +01:00
|
|
|
Value="{TemplateBinding VerticalOffset}"
|
|
|
|
|
Maximum="{TemplateBinding ScrollableHeight}"
|
|
|
|
|
ViewportSize="{TemplateBinding ViewportHeight}"
|
|
|
|
|
Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
|
2019-05-14 13:37:20 +02:00
|
|
|
Grid.Row="0" Grid.Column="1"/>
|
2020-06-17 19:36:52 +02:00
|
|
|
<ScrollBar Name="PART_HorizontalScrollBar"
|
2017-12-11 14:32:56 +01:00
|
|
|
Orientation="Horizontal"
|
|
|
|
|
Grid.Row="1"
|
|
|
|
|
Grid.Column="0"
|
|
|
|
|
Value="{TemplateBinding HorizontalOffset}"
|
|
|
|
|
Maximum="{TemplateBinding ScrollableWidth}"
|
|
|
|
|
ViewportSize="{TemplateBinding ViewportWidth}"
|
|
|
|
|
Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"/>
|
|
|
|
|
|
2020-06-17 19:36:52 +02:00
|
|
|
</Grid>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
<ControlTemplate x:Key="ContactListBoxTemplate" TargetType="{x:Type ListBox}">
|
|
|
|
|
<Border x:Name="Bd" SnapsToDevicePixels="True" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}">
|
|
|
|
|
<ScrollViewer Focusable="False" Padding="{TemplateBinding Padding}" Style="{StaticResource MainNavigationScrollViewer}" HorizontalScrollBarVisibility="Disabled">
|
|
|
|
|
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
|
|
|
</ScrollViewer>
|
|
|
|
|
</Border>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
<Style x:Key="ContactListStyle" TargetType="{x:Type ListBox}">
|
|
|
|
|
<Setter Property="Template" Value="{StaticResource ContactListBoxTemplate}" />
|
|
|
|
|
</Style>
|
|
|
|
|
|
2022-05-27 11:50:37 +02:00
|
|
|
<!-- region Styling Kontaktliste -->
|
2020-06-17 19:36:52 +02:00
|
|
|
<Style x:Key="ContactListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
|
|
|
|
|
<Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorLevel=1, AncestorType={x:Type ItemsControl}, Mode=FindAncestor}}" />
|
|
|
|
|
<Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorLevel=1, AncestorType={x:Type ItemsControl}, Mode=FindAncestor}}" />
|
|
|
|
|
<Setter Property="Margin" Value="0,0,0,0" />
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate>
|
|
|
|
|
<Grid>
|
2022-07-11 16:01:14 +02:00
|
|
|
<Border x:Name="ItemBorder" MinHeight="20" Background="White" BorderThickness="0,0,0,0" BorderBrush="{StaticResource LightBackColor}">
|
2020-06-17 19:36:52 +02:00
|
|
|
</Border>
|
2022-07-11 16:01:14 +02:00
|
|
|
<Border x:Name="ItemContent" MinHeight="20">
|
2020-06-17 19:36:52 +02:00
|
|
|
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5,3,5,3" OpacityMask="{x:Null}" SnapsToDevicePixels="True">
|
|
|
|
|
<Grid.ColumnDefinitions>
|
2022-07-11 16:01:14 +02:00
|
|
|
<ColumnDefinition Width="Auto"/>
|
2020-06-17 19:36:52 +02:00
|
|
|
<ColumnDefinition Width="35"/>
|
|
|
|
|
<ColumnDefinition Width="7"/>
|
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
|
<ColumnDefinition Width="7"/>
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
</Grid.ColumnDefinitions>
|
2022-07-11 16:01:14 +02:00
|
|
|
<CheckBox Grid.Column="0" VerticalAlignment="Center" Margin="0,0,7,0"
|
|
|
|
|
Click="ContactCheckBox_OnClick" Checked="ContactCheckBox_OnChecked" Unchecked="ContactCheckBox_OnChecked"
|
|
|
|
|
IsChecked="{Binding Path=(utilities:ListItemHelper.IsChecked), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
|
|
|
|
|
<CheckBox.Visibility>
|
|
|
|
|
<MultiBinding Converter="{StaticResource BroadcastCheckBoxVisibilityMultiConverter}">
|
|
|
|
|
<Binding Path="Chat.IsInBroadcastMode" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type chatController:ChatMainControl}}" UpdateSourceTrigger="PropertyChanged" />
|
|
|
|
|
<Binding Path="Contact.IsChatMessageInputGridVisible" />
|
|
|
|
|
</MultiBinding>
|
|
|
|
|
</CheckBox.Visibility>
|
|
|
|
|
<CheckBox.Style>
|
|
|
|
|
<Style TargetType="{x:Type CheckBox}">
|
|
|
|
|
<Style.Triggers>
|
|
|
|
|
<DataTrigger Binding="{Binding Path=(utilities:ListItemHelper.IsChecked), Mode=TwoWay}" Value="False" />
|
|
|
|
|
</Style.Triggers>
|
|
|
|
|
</Style>
|
|
|
|
|
</CheckBox.Style>
|
|
|
|
|
</CheckBox>
|
2020-06-17 19:36:52 +02:00
|
|
|
<Ellipse Grid.Column="1" Width='32' Height='32' RenderOptions.BitmapScalingMode="HighQuality">
|
|
|
|
|
<Ellipse.Fill>
|
2022-07-11 16:01:14 +02:00
|
|
|
<ImageBrush ImageSource='{Binding Contact.Image, UpdateSourceTrigger=PropertyChanged}' Stretch='UniformToFill' RenderOptions.BitmapScalingMode="HighQuality" />
|
2020-06-17 19:36:52 +02:00
|
|
|
</Ellipse.Fill>
|
|
|
|
|
</Ellipse>
|
2022-07-11 16:01:14 +02:00
|
|
|
<Grid Grid.Column="3">
|
2020-06-17 19:36:52 +02:00
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="*" />
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
</Grid.RowDefinitions>
|
2022-07-11 16:01:14 +02:00
|
|
|
<TextBlock Text="{Binding Path=Contact.Name, FallbackValue=FirstName}" Foreground="{Binding Path=Contact.AccentColorBrush}" FontSize="16" Margin="1" />
|
|
|
|
|
<TextBlock Text="{Binding Path=Contact.ReceivedMessage.Text}" Grid.Row="1" FontSize="14" Foreground="{Binding Path=Contact.Color}" Margin="1" />
|
2020-06-17 19:36:52 +02:00
|
|
|
</Grid>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
|
|
<Setter Property="Background" TargetName="ItemBorder" Value="{StaticResource DarkBackColor}" />
|
|
|
|
|
</Trigger>
|
|
|
|
|
|
|
|
|
|
<Trigger Property="ListBoxItem.IsSelected" Value="True">
|
|
|
|
|
<Setter Property="Background" TargetName="ItemBorder" Value="{StaticResource DarkBackColor}" />
|
|
|
|
|
</Trigger>
|
|
|
|
|
<MultiTrigger>
|
|
|
|
|
<MultiTrigger.Conditions>
|
|
|
|
|
<Condition Property="ListBoxItem.IsSelected" Value="True" />
|
|
|
|
|
<Condition Property="Selector.IsSelectionActive" Value="False" />
|
|
|
|
|
</MultiTrigger.Conditions>
|
|
|
|
|
<Setter Property="Background" TargetName="ItemBorder" Value="{StaticResource DarkBackColor}" />
|
|
|
|
|
</MultiTrigger>
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
2022-05-27 11:50:37 +02:00
|
|
|
<!-- endregion Styling Kontaktliste -->
|
2020-06-17 19:36:52 +02:00
|
|
|
|
2022-05-27 11:50:37 +02:00
|
|
|
<!-- region Styling Gruppensuchtemplate -->
|
2020-06-17 19:36:52 +02:00
|
|
|
<ControlTemplate x:Key="SearchTextBoxTemplate" TargetType="{x:Type TextBox}">
|
|
|
|
|
<Border x:Name="Bd" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="2,2,2,2">
|
|
|
|
|
<Grid>
|
2017-12-11 14:32:56 +01:00
|
|
|
<Grid.ColumnDefinitions>
|
2020-06-17 19:36:52 +02:00
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
|
<ColumnDefinition />
|
2017-12-11 14:32:56 +01:00
|
|
|
</Grid.ColumnDefinitions>
|
2020-06-17 19:36:52 +02:00
|
|
|
<ScrollViewer Grid.Column="1" x:Name="PART_ContentHost" Margin="0,2,0,0" />
|
|
|
|
|
<Canvas Grid.Column="0" Width="14" Margin="3,4,2,2">
|
|
|
|
|
<Ellipse Stroke="#FFA0A0A0" Height="10" Width="10" StrokeThickness="2" Fill="{x:Null}" />
|
|
|
|
|
<Line Fill="#FFFFFFFF" Stretch="Fill" Stroke="#FFA0A0A0" Canvas.Left="6" Canvas.Top="7.4" Y1="0" Y2="5" StrokeThickness="3" X2="4" />
|
|
|
|
|
</Canvas>
|
2017-12-11 14:32:56 +01:00
|
|
|
</Grid>
|
2020-06-17 19:36:52 +02:00
|
|
|
</Border>
|
2017-12-11 14:32:56 +01:00
|
|
|
<ControlTemplate.Triggers>
|
2020-06-17 19:36:52 +02:00
|
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
|
|
|
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
|
|
|
|
|
</Trigger>
|
2017-12-11 14:32:56 +01:00
|
|
|
</ControlTemplate.Triggers>
|
2020-06-17 19:36:52 +02:00
|
|
|
</ControlTemplate>
|
2022-05-27 11:50:37 +02:00
|
|
|
<!-- endregion Styling Gruppensuchtemplate -->
|
2021-07-14 19:33:50 +02:00
|
|
|
|
|
|
|
|
<Style TargetType="{x:Type Rectangle}">
|
|
|
|
|
<Setter Property="Fill" Value="{Binding Path=Foreground, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type UserControl}}}" />
|
|
|
|
|
<Setter Property="Width" Value="12" />
|
|
|
|
|
<Setter Property="Height" Value="40" />
|
|
|
|
|
</Style>
|
2020-06-17 19:36:52 +02:00
|
|
|
</UserControl.Resources>
|
|
|
|
|
<Grid x:Name="RootGrid">
|
|
|
|
|
<Border x:Name="rootBorder" Background="{StaticResource DarkBackColor}" Padding="0" Margin="0" BorderThickness="0">
|
2021-07-14 19:33:50 +02:00
|
|
|
<Grid>
|
2020-06-17 19:36:52 +02:00
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="250" />
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
</Grid.RowDefinitions>
|
2017-09-12 14:32:34 +02:00
|
|
|
|
2020-06-17 19:36:52 +02:00
|
|
|
<Grid Grid.Column="0" Grid.Row="0" >
|
|
|
|
|
<Grid.RowDefinitions>
|
2022-07-11 16:01:14 +02:00
|
|
|
<RowDefinition Height="50"/>
|
|
|
|
|
<RowDefinition Height="*"/>
|
2020-06-17 19:36:52 +02:00
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
</Grid.ColumnDefinitions>
|
2017-09-12 14:32:34 +02:00
|
|
|
|
2022-05-27 11:50:37 +02:00
|
|
|
<!-- region Gruppensuche und Gruppenliste aktualisieren -->
|
2020-06-17 19:36:52 +02:00
|
|
|
<Grid Grid.Column="0" Grid.Row="0" >
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
|
</Grid.ColumnDefinitions>
|
2017-09-12 14:32:34 +02:00
|
|
|
|
2022-07-11 16:01:14 +02:00
|
|
|
<StackPanel x:Name="ReloadGruppen" Grid.Row="0" Grid.Column="1" Height="25" HorizontalAlignment="Right" Orientation="Horizontal" VerticalAlignment="Center" Visibility="Visible" Margin="0,0,3,0">
|
|
|
|
|
<Button Background="Transparent" HorizontalAlignment="Right" BorderThickness="0"
|
|
|
|
|
VerticalAlignment="Center" VerticalContentAlignment="Center" Width="25" Height="25" Click="ButtonReloadGruppen_OnClick" >
|
|
|
|
|
<Image ToolTip="Gruppen Aktualisieren" Margin="0,0,0,0" Width="20" Height="20"
|
|
|
|
|
Source="pack://application:,,,/ChatController;component/Ressourcen/SymbolRefresh32.png" RenderOptions.BitmapScalingMode="HighQuality" HorizontalAlignment="Center" />
|
|
|
|
|
</Button>
|
|
|
|
|
<Button HorizontalAlignment="Right" Background="Transparent" VerticalAlignment="Center" VerticalContentAlignment="Center"
|
|
|
|
|
Click="BroadcastButton_OnClick" Style="{StaticResource OrangeButtonStyle}" Margin="5,0,0,0">
|
|
|
|
|
<Image ToolTip="Nachricht an mehrere Empfänger schicken" Margin="0" Width="20" Height="20"
|
|
|
|
|
Source="pack://application:,,,/ChatController;component/Ressourcen/TasksSolid.png" RenderOptions.BitmapScalingMode="HighQuality" HorizontalAlignment="Center" />
|
2020-06-17 19:36:52 +02:00
|
|
|
</Button>
|
|
|
|
|
</StackPanel>
|
2017-09-12 14:32:34 +02:00
|
|
|
|
2020-06-17 19:36:52 +02:00
|
|
|
<TextBox Grid.Column="0" x:Name="Suche" Height="22" HorizontalAlignment="Stretch" Margin="5" TabIndex="0" Template="{DynamicResource SearchTextBoxTemplate}" BorderThickness="0,0,0,0" TextChanged="Suche_OnTextChanged" />
|
|
|
|
|
</Grid>
|
2022-05-27 11:50:37 +02:00
|
|
|
<!-- endregion Gruppensuche und Gruppenliste aktualisieren -->
|
2017-09-12 14:32:34 +02:00
|
|
|
|
2022-05-27 11:50:37 +02:00
|
|
|
<!-- region Kontaktliste -->
|
2020-06-17 19:36:52 +02:00
|
|
|
<Grid Grid.Column="0" Grid.Row="1" >
|
|
|
|
|
<Grid.RowDefinitions>
|
2022-07-11 16:01:14 +02:00
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
|
<RowDefinition Height="*"/>
|
2020-06-17 19:36:52 +02:00
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
</Grid.ColumnDefinitions>
|
2022-07-11 16:01:14 +02:00
|
|
|
<CheckBox Grid.Row="0" Margin="5" x:Name="SelectAllContactsCheckBox" FontSize="16" Content="Alle auswählen" VerticalContentAlignment="Center" VerticalAlignment="Center" Height="35"
|
|
|
|
|
Click="SelectAllContacts_OnClick"
|
|
|
|
|
Visibility="{Binding Path=Chat.IsInBroadcastMode, Converter={StaticResource BoolToVisibilityConverter}, ConverterParameter=reverse}" />
|
|
|
|
|
<ListView x:Name="Clientlist" HorizontalAlignment="Stretch" Grid.Row="1" Grid.Column="0" VerticalAlignment="Stretch" BorderThickness="0" Background="White"
|
2020-06-17 19:36:52 +02:00
|
|
|
ItemsSource="{Binding ContactList, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
ItemContainerStyle="{StaticResource ContactListBoxItemStyle}" SelectionChanged="Clientlist_OnSelectionChanged" Style="{StaticResource ContactListStyle}">
|
|
|
|
|
</ListView>
|
|
|
|
|
</Grid>
|
2022-05-27 11:50:37 +02:00
|
|
|
<!-- endregion Kontaktliste -->
|
2020-06-17 19:36:52 +02:00
|
|
|
</Grid>
|
2017-09-12 14:32:34 +02:00
|
|
|
|
2020-06-17 19:36:52 +02:00
|
|
|
<Grid Grid.Column="1" Grid.Row="0" x:Name="GridRechts">
|
2017-09-12 14:32:34 +02:00
|
|
|
<Grid.ColumnDefinitions>
|
2020-06-17 19:36:52 +02:00
|
|
|
<ColumnDefinition Width="*"/>
|
2017-09-12 14:32:34 +02:00
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<Grid.RowDefinitions>
|
2020-06-17 19:36:52 +02:00
|
|
|
<RowDefinition Height="50"/>
|
|
|
|
|
<RowDefinition Height="*" />
|
|
|
|
|
<RowDefinition Height="Auto"/>
|
2017-09-12 14:32:34 +02:00
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
2020-08-06 16:05:23 +02:00
|
|
|
<Grid Grid.Row="0" HorizontalAlignment="Left" Background="Transparent" VerticalAlignment="Center" Height="50" PreviewMouseDown="CurrentContactImage_OnMouseDoubleClick">
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="50" />
|
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
</Grid.ColumnDefinitions>
|
2020-06-17 19:36:52 +02:00
|
|
|
|
2020-08-06 16:05:23 +02:00
|
|
|
<Ellipse Width='40' Height='40' VerticalAlignment="Center" RenderOptions.BitmapScalingMode="HighQuality">
|
|
|
|
|
<Ellipse.Fill >
|
|
|
|
|
<ImageBrush ImageSource='{Binding Path=ThreadExceptionImageSource, UpdateSourceTrigger=PropertyChanged}' Stretch="UniformToFill"/>
|
|
|
|
|
</Ellipse.Fill>
|
|
|
|
|
</Ellipse>
|
|
|
|
|
|
|
|
|
|
<TextBlock Grid.Column="1" VerticalAlignment="Center" Margin="8" TextWrapping="Wrap" Text="{Binding CurrentContactInformationString}" FontSize="16" Foreground="{Binding CurrencContactInfoForeground}" />
|
|
|
|
|
</Grid>
|
2017-09-12 14:32:34 +02:00
|
|
|
|
2021-07-14 19:33:50 +02:00
|
|
|
<ListBox x:Name="ChatListBox"
|
|
|
|
|
ItemsSource="{Binding ChatMessages, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
|
ScrollViewer.CanContentScroll="False"
|
|
|
|
|
VerticalAlignment="Stretch"
|
|
|
|
|
Grid.Row="1"
|
|
|
|
|
VirtualizingStackPanel.IsVirtualizing="True"
|
|
|
|
|
BorderThickness="0"
|
|
|
|
|
VirtualizingStackPanel.VirtualizationMode="Recycling"
|
|
|
|
|
SelectionMode="Extended"
|
|
|
|
|
MouseDoubleClick="Chat_OnMouseDoubleClick"
|
|
|
|
|
ScrollViewer.ScrollChanged="Chat_OnScrollChanged"
|
|
|
|
|
Background="{StaticResource LightBackColor}"
|
|
|
|
|
ContextMenuOpening="Chat_OnContextMenuOpening"
|
|
|
|
|
Padding="20"
|
2022-07-11 16:01:14 +02:00
|
|
|
Visibility="{Binding Path=Chat.IsInBroadcastMode, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type chatController:ChatMainControl}}, Converter={StaticResource BoolToVisibilityConverter}}"
|
2021-07-14 19:33:50 +02:00
|
|
|
d:DataContext="{d:DesignData ChatMessage}">
|
2020-06-17 19:36:52 +02:00
|
|
|
<ListBox.ItemContainerStyle>
|
|
|
|
|
<Style TargetType="ListBoxItem">
|
|
|
|
|
<Setter Property="HorizontalAlignment" Value="{Binding HorizontalAlignmentValue}" />
|
|
|
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
|
|
|
|
<Setter Property="Background" Value="Transparent"></Setter>
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="{x:Type ListBoxItem}">
|
|
|
|
|
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1,1,1,1"
|
|
|
|
|
Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true" CornerRadius="8" Background="{Binding BorderBrush}" >
|
|
|
|
|
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
|
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
|
|
|
|
|
</Border>
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
|
|
<Setter Property="Background" TargetName="Bd" Value="{Binding HighlightedBorderBrush}"></Setter>
|
|
|
|
|
</Trigger>
|
|
|
|
|
<Trigger Property="IsSelected" Value="true">
|
|
|
|
|
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
|
|
|
|
|
</Trigger>
|
|
|
|
|
<MultiTrigger>
|
|
|
|
|
<MultiTrigger.Conditions>
|
|
|
|
|
<Condition Property="IsSelected" Value="true"/>
|
|
|
|
|
<Condition Property="Selector.IsSelectionActive" Value="false"/>
|
|
|
|
|
</MultiTrigger.Conditions>
|
|
|
|
|
<Setter Property="Background" TargetName="Bd" Value="{Binding BorderBrush}"/>
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}}"/>
|
|
|
|
|
<Setter TargetName="Bd" Property="CornerRadius" Value="8" />
|
|
|
|
|
<Setter TargetName="Bd" Property="BorderThickness" Value="1,1,1,1" />
|
|
|
|
|
</MultiTrigger>
|
|
|
|
|
<MultiTrigger>
|
|
|
|
|
<MultiTrigger.Conditions>
|
|
|
|
|
<Condition Property="IsSelected" Value="true" />
|
|
|
|
|
<Condition Property="Selector.IsSelectionActive" Value="true" />
|
|
|
|
|
</MultiTrigger.Conditions>
|
|
|
|
|
<Setter Property="Background" TargetName="Bd" Value="{Binding HighlightedBorderBrush}"/>
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}}"/>
|
|
|
|
|
<Setter TargetName="Bd" Property="CornerRadius" Value="8" />
|
|
|
|
|
<Setter TargetName="Bd" Property="BorderThickness" Value="1" />
|
|
|
|
|
</MultiTrigger>
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
</ListBox.ItemContainerStyle>
|
|
|
|
|
<ListBox.ItemTemplate>
|
|
|
|
|
<DataTemplate DataType="chatKlassen:ChatMessage">
|
|
|
|
|
<StackPanel>
|
|
|
|
|
<Border>
|
2021-08-04 17:04:18 +02:00
|
|
|
<Grid HorizontalAlignment="Stretch" Background="Transparent" MaxWidth="500">
|
2020-06-17 19:36:52 +02:00
|
|
|
<Grid.ColumnDefinitions>
|
2021-09-07 19:32:10 +02:00
|
|
|
<ColumnDefinition Width="Auto" />
|
2020-06-17 19:36:52 +02:00
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
|
<ColumnDefinition Width="*" />
|
2021-09-07 19:32:10 +02:00
|
|
|
<ColumnDefinition Width="Auto" />
|
2020-06-17 19:36:52 +02:00
|
|
|
</Grid.ColumnDefinitions>
|
2017-09-12 14:32:34 +02:00
|
|
|
|
2021-09-07 19:32:10 +02:00
|
|
|
<Ellipse Grid.Column="0"
|
|
|
|
|
Margin="2,5,2,2" VerticalAlignment="Top" Width="32" Height="32" RenderOptions.BitmapScalingMode="HighQuality">
|
|
|
|
|
<Ellipse.Fill>
|
|
|
|
|
<ImageBrush ImageSource="{Binding Path=ProfilePicture, UpdateSourceTrigger=PropertyChanged}" Stretch="UniformToFill" RenderOptions.BitmapScalingMode="HighQuality" />
|
|
|
|
|
</Ellipse.Fill>
|
|
|
|
|
<Ellipse.Visibility>
|
|
|
|
|
<MultiBinding Converter="{StaticResource UserProfilePictureVisibilityConverter}">
|
|
|
|
|
<Binding Path="IsMyMessage" UpdateSourceTrigger="PropertyChanged" />
|
|
|
|
|
<Binding Path="CurrentContact.IsGroupChat" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type chatController:ChatMainControl}}" UpdateSourceTrigger="PropertyChanged" />
|
|
|
|
|
</MultiBinding>
|
|
|
|
|
</Ellipse.Visibility>
|
|
|
|
|
</Ellipse>
|
|
|
|
|
|
|
|
|
|
<Separator Grid.Column="0" Grid.ColumnSpan="2" Visibility="{Binding IsSeparator, Converter={StaticResource BoolToVisibilityConverter}, ConverterParameter=reverse}" VerticalContentAlignment="Center" />
|
|
|
|
|
<Label Content="{Binding SeparatorTimeString}" HorizontalAlignment="Center" Grid.Column="2" Visibility="{Binding IsSeparator, Converter={StaticResource BoolToVisibilityConverter}, ConverterParameter=reverse}" />
|
|
|
|
|
<Separator Grid.Column="3" Grid.ColumnSpan="2" Visibility="{Binding IsSeparator, Converter={StaticResource BoolToVisibilityConverter}, ConverterParameter=reverse}" />
|
|
|
|
|
|
|
|
|
|
<DockPanel Grid.Column="1" Grid.ColumnSpan="3" MinHeight="15" Margin="5" LastChildFill="True" Visibility="{Binding IsSeparator, Converter={StaticResource BoolToVisibilityConverter}}">
|
|
|
|
|
<StackPanel DockPanel.Dock="Bottom" Orientation="Vertical">
|
2022-07-11 16:01:14 +02:00
|
|
|
<Image ToolTip="Dokument öffnen" Height="{Binding ThumbnailPlaceholderHeight, UpdateSourceTrigger=PropertyChanged}" Width="150"
|
|
|
|
|
Source="{Binding Path=Thumbnail, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
Stretch="Uniform" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
|
|
|
|
<Image MaxHeight="300"
|
|
|
|
|
Source="{Binding Path=PictureSource, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
x:Name="imgChatMessage" Stretch="Uniform" RenderOptions.BitmapScalingMode="HighQuality" />
|
2022-05-27 11:50:37 +02:00
|
|
|
<core:OwnChatRichTextBox VerticalAlignment="Center" InlineList="{Binding MessageInlines, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
|
MinWidth="0" MaxWidth="{Binding MessageMaxWidth}" FontSize="14" IsReadOnly="True"
|
2022-07-11 16:01:14 +02:00
|
|
|
HorizontalAlignment="{Binding HorizontalAlignmentValue}" Foreground="{Binding TextColor, UpdateSourceTrigger=PropertyChanged, Mode=OneWay}"
|
2022-05-27 11:50:37 +02:00
|
|
|
BorderThickness="0" Background="Transparent" IsDocumentEnabled="True" Margin="-5,0,0,0" />
|
2020-06-17 19:36:52 +02:00
|
|
|
</StackPanel>
|
|
|
|
|
<StackPanel DockPanel.Dock="Left" Margin="0,0,0,0">
|
|
|
|
|
<TextBlock Text="{Binding UserTimeStringLeft}" MaxWidth="{Binding TimeStringMaxWidth}" FontSize="11" HorizontalAlignment="Left" TextAlignment="Left" VerticalAlignment="Center" Foreground="{Binding Foreground}" />
|
|
|
|
|
</StackPanel>
|
|
|
|
|
<StackPanel DockPanel.Dock="Right" Margin="5,0,0,5">
|
|
|
|
|
<TextBlock Text="{Binding UserTimeStringRight}" MaxWidth="{Binding TimeStringMaxWidth}" FontSize="11" HorizontalAlignment="Right" TextAlignment="Right" VerticalAlignment="Center" Foreground="{Binding Foreground}" />
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</DockPanel>
|
2021-09-07 19:32:10 +02:00
|
|
|
|
|
|
|
|
<Ellipse Grid.Column="4"
|
|
|
|
|
Margin="2,5,2,2" VerticalAlignment="Top" Width="32" Height="32" RenderOptions.BitmapScalingMode="HighQuality">
|
|
|
|
|
<Ellipse.Fill>
|
|
|
|
|
<ImageBrush ImageSource="{Binding Path=ProfilePicture, UpdateSourceTrigger=PropertyChanged}" Stretch="UniformToFill" RenderOptions.BitmapScalingMode="HighQuality" />
|
|
|
|
|
</Ellipse.Fill>
|
|
|
|
|
<Ellipse.Visibility>
|
|
|
|
|
<MultiBinding Converter="{StaticResource UserProfilePictureVisibilityConverter}" ConverterParameter="reverse">
|
|
|
|
|
<Binding Path="IsMyMessage" UpdateSourceTrigger="PropertyChanged" />
|
|
|
|
|
<Binding Path="CurrentContact.IsGroupChat" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type chatController:ChatMainControl}}" UpdateSourceTrigger="PropertyChanged" />
|
|
|
|
|
</MultiBinding>
|
|
|
|
|
</Ellipse.Visibility>
|
|
|
|
|
</Ellipse>
|
2020-06-17 19:36:52 +02:00
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
</ListBox.ItemTemplate>
|
|
|
|
|
</ListBox>
|
2017-09-12 14:32:34 +02:00
|
|
|
|
2022-07-11 16:01:14 +02:00
|
|
|
<Grid Grid.Row="1" Grid.Column="0" Visibility="{Binding Path=Chat.IsInBroadcastMode, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource BoolToVisibilityConverter}, ConverterParameter=reverse}">
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
|
<RowDefinition Height="*" />
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
<Button Grid.Row="0" Grid.Column="0" Margin="5" Height="20" Width="20" HorizontalAlignment="Right" Style="{DynamicResource CloseButtonStyle}" Click="AbortBroadcastButton_OnClick" />
|
|
|
|
|
<StackPanel Grid.Row="1" Orientation="Vertical" Margin="5" VerticalAlignment="Center">
|
|
|
|
|
<TextBlock Text="{Binding BroadcastInfoText, UpdateSourceTrigger=PropertyChanged}" Foreground="Black"
|
|
|
|
|
HorizontalAlignment="Center" TextWrapping="Wrap" TextAlignment="Center" FontSize="16" Margin="20, 0" />
|
|
|
|
|
<ProgressBar Margin="20, 5" Value="{Binding BroadcastProgressValue, UpdateSourceTrigger=PropertyChanged}" Height="20" />
|
|
|
|
|
<Image MaxHeight="300" RenderOptions.BitmapScalingMode="HighQuality"
|
|
|
|
|
Source="{Binding Path=BroadcastMessage.BroadcastMessageImageSource, UpdateSourceTrigger=PropertyChanged}" Stretch="Uniform"
|
|
|
|
|
/>
|
|
|
|
|
<Button Content="Abbrechen" Width="75" Style="{StaticResource OrangeButtonStyle}" Height="25" Margin="0, 5"
|
|
|
|
|
Click="CancelBroadcastButton_OnClick" />
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Grid>
|
|
|
|
|
|
2020-06-17 19:36:52 +02:00
|
|
|
<Grid Grid.Row="2" Visibility="{Binding ChatMessageInputGridVisibility}" VerticalAlignment="Stretch" MinHeight="25" MaxHeight="200">
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
<TextBox x:Name="Chatbox"
|
|
|
|
|
Grid.Column="0"
|
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
|
TextWrapping="Wrap"
|
|
|
|
|
VerticalScrollBarVisibility="Auto"
|
|
|
|
|
Visibility="Visible"
|
|
|
|
|
BorderThickness="0"
|
|
|
|
|
VerticalContentAlignment="Top"
|
2021-07-14 19:33:50 +02:00
|
|
|
MinHeight="69" MaxHeight="200"
|
2020-06-17 19:36:52 +02:00
|
|
|
FontSize="15"
|
|
|
|
|
Padding="2"
|
|
|
|
|
ToolTip="Schreiben Sie hier eine Nachricht hinein"
|
|
|
|
|
Margin="2"
|
|
|
|
|
VerticalAlignment="Stretch"
|
|
|
|
|
GotFocus="Chatbox_OnGotFocus"
|
2021-07-14 19:33:50 +02:00
|
|
|
AcceptsReturn="True"
|
2020-08-06 16:05:23 +02:00
|
|
|
KeyDown="Chatbox_OnKeyDownHandler"
|
2022-07-11 16:01:14 +02:00
|
|
|
KeyUp="Chatbox_OnKeyUpHandler"
|
2020-08-06 16:05:23 +02:00
|
|
|
TextChanged="Chatbox_OnTextChanged">
|
2020-06-17 19:36:52 +02:00
|
|
|
<TextBox.Resources>
|
|
|
|
|
<Style TargetType="{x:Type Border}">
|
|
|
|
|
<Setter Property="CornerRadius" Value="2"/>
|
|
|
|
|
</Style>
|
|
|
|
|
</TextBox.Resources>
|
|
|
|
|
</TextBox>
|
|
|
|
|
<TextBlock Padding="4,2,2,2"
|
|
|
|
|
Margin="2"
|
|
|
|
|
Grid.Column="0"
|
|
|
|
|
Text="Nachricht schreiben..."
|
|
|
|
|
Foreground="DimGray"
|
|
|
|
|
IsHitTestVisible="False"
|
|
|
|
|
VerticalAlignment="Stretch"
|
|
|
|
|
MinHeight="25" MaxHeight="200"
|
|
|
|
|
FontSize="15"
|
|
|
|
|
Height="{Binding ElementName=Chatbox, Path=ActualHeight}"
|
|
|
|
|
HorizontalAlignment="Stretch"
|
|
|
|
|
Visibility="{Binding ElementName=Chatbox, Path=Text, Converter={StaticResource StringEmptyToVisibilityConverter}}">
|
|
|
|
|
<TextBlock.Resources>
|
|
|
|
|
<Style TargetType="{x:Type Border}">
|
|
|
|
|
<Setter Property="CornerRadius" Value="2"/>
|
|
|
|
|
</Style>
|
|
|
|
|
</TextBlock.Resources>
|
|
|
|
|
</TextBlock>
|
2022-07-11 16:01:14 +02:00
|
|
|
<Button Grid.Column="1" Margin="2" x:Name="MediaButton" Background="Transparent"
|
|
|
|
|
Width="28" Height="28" BorderThickness="0" Padding="2"
|
|
|
|
|
Visibility="{Binding Chat.IsInBroadcastMode, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource BoolToVisibilityConverter}}"
|
|
|
|
|
VerticalAlignment="Bottom" ToolTip="Datei einfügen" Click="MediaButton_OnClick" >
|
2020-06-17 19:36:52 +02:00
|
|
|
<Image Width="22" Height="22" Source='pack://application:,,,/ChatController;component/Ressourcen/paperclip2.png' RenderOptions.BitmapScalingMode="HighQuality" HorizontalAlignment="Center"/>
|
|
|
|
|
</Button>
|
2022-07-11 16:01:14 +02:00
|
|
|
<Button Grid.Column="1" Margin="2" Background="Transparent"
|
|
|
|
|
Width="28" Height="28" BorderThickness="0" Padding="2"
|
|
|
|
|
Visibility="{Binding Path=Chat.IsInBroadcastMode, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource BoolToVisibilityConverter}, ConverterParameter=reverse}"
|
|
|
|
|
VerticalAlignment="Bottom" ToolTip="Datei einfügen" Click="AddMediaFileToBroadcastMessage_OnClick">
|
|
|
|
|
<Image Width="22" Height="22" Source="pack://application:,,,/ChatController;component/Ressourcen/paperclip2.png" RenderOptions.BitmapScalingMode="HighQuality" HorizontalAlignment="Center" />
|
2020-06-17 19:36:52 +02:00
|
|
|
</Button>
|
2022-07-11 16:01:14 +02:00
|
|
|
<Button Grid.Column="2" Width="28" Height="28" BorderThickness="0"
|
|
|
|
|
Background="Transparent" x:Name="EmojiButton" Margin="2" Padding="0"
|
|
|
|
|
VerticalAlignment="Bottom" ToolTip="Emoji einfügen" Click="EmojiButton_OnClick">
|
|
|
|
|
<Image Width="24" Height="24" Source='pack://application:,,,/ChatController;component/Ressourcen/glucklicher.png' RenderOptions.BitmapScalingMode="HighQuality" HorizontalAlignment="Center" />
|
2020-06-17 19:36:52 +02:00
|
|
|
</Button>
|
2022-07-11 16:01:14 +02:00
|
|
|
<Button x:Name="SendButton" Height="25" Content="Senden" Margin="3" Grid.Column="3" VerticalAlignment="Bottom" Style="{StaticResource OrangeButtonStyle}"
|
|
|
|
|
Visibility="{Binding Chat.IsInBroadcastMode, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource BoolToVisibilityConverter}}"
|
|
|
|
|
Click="SendButton_OnClick" IsEnabled="{Binding IsSendButtonEnabled, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
|
|
<Button Height="25" Content="Senden" Margin="3" Grid.Column="3" VerticalAlignment="Bottom" Style="{StaticResource OrangeButtonStyle}"
|
|
|
|
|
Visibility="{Binding Path=Chat.IsInBroadcastMode, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource BoolToVisibilityConverter}, ConverterParameter=reverse}"
|
|
|
|
|
Click="SendBroatcastButton_OnClick" IsEnabled="{Binding IsBroadcastButtonEnabled, UpdateSourceTrigger=PropertyChanged}" />
|
2020-06-17 19:36:52 +02:00
|
|
|
</Grid>
|
|
|
|
|
</Grid>
|
2017-09-12 14:32:34 +02:00
|
|
|
</Grid>
|
2020-06-17 19:36:52 +02:00
|
|
|
</Border>
|
2017-09-12 14:32:34 +02:00
|
|
|
</Grid>
|
|
|
|
|
</UserControl>
|