Massennachricht hinzugefügt
Optik an die vom Android- und Webclient angepasst Asynchrone Methoden verbessert
This commit is contained in:
@@ -7,18 +7,132 @@
|
||||
xmlns:chatKlassen="clr-namespace:ChatController.ChatKlassen"
|
||||
xmlns:core="clr-namespace:ChatController.Core"
|
||||
xmlns:chatController="clr-namespace:ChatController"
|
||||
mc:Ignorable="d" x:Name="ChatControlling"
|
||||
xmlns:utilities="clr-namespace:ChatController.Utilities"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300" d:DesignWidth="600"
|
||||
Loaded="ChatMainControl_OnLoaded"
|
||||
SnapsToDevicePixels="True" d:DataContext="{d:DesignData ChatMainControl}">
|
||||
<UserControl.Resources>
|
||||
<converter:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter" />
|
||||
<converter:StringEmptyToVisibilityConverter x:Key="StringEmptyToVisibilityConverter" />
|
||||
<converter:StringToBoolConverter x:Key="StringToBoolConverter" />
|
||||
<converter:UserProfilePictureVisibilityConverter x:Key="UserProfilePictureVisibilityConverter" />
|
||||
<converter:BroadcastCheckBoxVisibilityMultiConverter x:Key="BroadcastCheckBoxVisibilityMultiConverter" />
|
||||
|
||||
|
||||
<SolidColorBrush x:Key="DarkBackColor" Color="#FFA9B8C2" />
|
||||
<SolidColorBrush x:Key="LightBackColor" Color="#E8EFF4" />
|
||||
<!--<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>
|
||||
|
||||
<Style x:Key="MainNavigationScrollViewer" TargetType="{x:Type ScrollViewer}">
|
||||
<Setter Property="OverridesDefaultStyle" Value="True"/>
|
||||
@@ -77,30 +191,47 @@
|
||||
<Setter.Value>
|
||||
<ControlTemplate>
|
||||
<Grid>
|
||||
<Border x:Name="ItemBorder" MinHeight="20" Background="White" BorderThickness="0,0,0,1" BorderBrush="{StaticResource LightBackColor}">
|
||||
<Border x:Name="ItemBorder" MinHeight="20" Background="White" BorderThickness="0,0,0,0" BorderBrush="{StaticResource LightBackColor}">
|
||||
</Border>
|
||||
<Border x:Name="ItemContent" MinHeight="20">
|
||||
<Border x:Name="ItemContent" MinHeight="20">
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5,3,5,3" OpacityMask="{x:Null}" SnapsToDevicePixels="True">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="7"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="35"/>
|
||||
<ColumnDefinition Width="7"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="7"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<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>
|
||||
<Ellipse Grid.Column="1" Width='32' Height='32' RenderOptions.BitmapScalingMode="HighQuality">
|
||||
<Ellipse.Fill>
|
||||
<ImageBrush ImageSource='{Binding Image, UpdateSourceTrigger=PropertyChanged}' Stretch='UniformToFill' RenderOptions.BitmapScalingMode="HighQuality" />
|
||||
<ImageBrush ImageSource='{Binding Contact.Image, UpdateSourceTrigger=PropertyChanged}' Stretch='UniformToFill' RenderOptions.BitmapScalingMode="HighQuality" />
|
||||
</Ellipse.Fill>
|
||||
</Ellipse>
|
||||
<Grid Grid.Column="3" >
|
||||
<Grid Grid.Column="3">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="{Binding Path=Name, FallbackValue=FirstName}" Foreground="{Binding Path=AccentColorBrush}" FontSize="16" Margin="1" />
|
||||
<TextBlock Text="{Binding Path=ReceivedMessage.Text}" Grid.Row="1" FontSize="14" Foreground="{Binding Path=Color}" Margin="1" />
|
||||
<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" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
@@ -171,8 +302,8 @@
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="0" >
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="50"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="50"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
@@ -188,9 +319,16 @@
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<StackPanel x:Name="ReloadGruppen" Grid.Row="0" Grid.Column="1" Height="25" Width="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" />
|
||||
<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" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
@@ -201,12 +339,16 @@
|
||||
<!-- region Kontaktliste -->
|
||||
<Grid Grid.Column="0" Grid.Row="1" >
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ListView x:Name="Clientlist" HorizontalAlignment="Stretch" Grid.Row="0" Grid.Column="0" VerticalAlignment="Stretch" BorderThickness="0" Background="White"
|
||||
<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"
|
||||
ItemsSource="{Binding ContactList, UpdateSourceTrigger=PropertyChanged}"
|
||||
ItemContainerStyle="{StaticResource ContactListBoxItemStyle}" SelectionChanged="Clientlist_OnSelectionChanged" Style="{StaticResource ContactListStyle}">
|
||||
</ListView>
|
||||
@@ -254,6 +396,7 @@
|
||||
Background="{StaticResource LightBackColor}"
|
||||
ContextMenuOpening="Chat_OnContextMenuOpening"
|
||||
Padding="20"
|
||||
Visibility="{Binding Path=Chat.IsInBroadcastMode, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type chatController:ChatMainControl}}, Converter={StaticResource BoolToVisibilityConverter}}"
|
||||
d:DataContext="{d:DesignData ChatMessage}">
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
@@ -334,11 +477,15 @@
|
||||
|
||||
<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">
|
||||
<Image ToolTip="Dokument öffnen" Height="{Binding ThumbnailPlaceholderHeight, UpdateSourceTrigger=PropertyChanged}" Width="150" Source="{Binding Path=Thumbnail, UpdateSourceTrigger=PropertyChanged}" Stretch="Uniform" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
<Image MaxWidth="300" Height="{Binding PicturePlaceholderHeight, UpdateSourceTrigger=PropertyChanged}" Source="{Binding Path=PictureSource, UpdateSourceTrigger=PropertyChanged}" x:Name="imgChatMessage" Stretch="UniformToFill" />
|
||||
<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" />
|
||||
<core:OwnChatRichTextBox VerticalAlignment="Center" InlineList="{Binding MessageInlines, UpdateSourceTrigger=PropertyChanged}"
|
||||
MinWidth="0" MaxWidth="{Binding MessageMaxWidth}" FontSize="14" IsReadOnly="True"
|
||||
HorizontalAlignment="{Binding HorizontalAlignmentValue}"
|
||||
HorizontalAlignment="{Binding HorizontalAlignmentValue}" Foreground="{Binding TextColor, UpdateSourceTrigger=PropertyChanged, Mode=OneWay}"
|
||||
BorderThickness="0" Background="Transparent" IsDocumentEnabled="True" Margin="-5,0,0,0" />
|
||||
</StackPanel>
|
||||
<StackPanel DockPanel.Dock="Left" Margin="0,0,0,0">
|
||||
@@ -368,6 +515,24 @@
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
<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>
|
||||
|
||||
<Grid Grid.Row="2" Visibility="{Binding ChatMessageInputGridVisibility}" VerticalAlignment="Stretch" MinHeight="25" MaxHeight="200">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
@@ -392,6 +557,7 @@
|
||||
GotFocus="Chatbox_OnGotFocus"
|
||||
AcceptsReturn="True"
|
||||
KeyDown="Chatbox_OnKeyDownHandler"
|
||||
KeyUp="Chatbox_OnKeyUpHandler"
|
||||
TextChanged="Chatbox_OnTextChanged">
|
||||
<TextBox.Resources>
|
||||
<Style TargetType="{x:Type Border}">
|
||||
@@ -417,62 +583,29 @@
|
||||
</Style>
|
||||
</TextBlock.Resources>
|
||||
</TextBlock>
|
||||
<Button Grid.Column="1"
|
||||
Margin="2"
|
||||
x:Name="MediaButton"
|
||||
Background="Transparent"
|
||||
Width="28"
|
||||
Height="28"
|
||||
BorderThickness="0"
|
||||
Padding="2"
|
||||
VerticalAlignment="Bottom"
|
||||
ToolTip="Datei einfügen"
|
||||
Click="MediaButton_OnClick" >
|
||||
<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" >
|
||||
<Image Width="22" Height="22" Source='pack://application:,,,/ChatController;component/Ressourcen/paperclip2.png' RenderOptions.BitmapScalingMode="HighQuality" HorizontalAlignment="Center"/>
|
||||
</Button>
|
||||
<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">
|
||||
<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" />
|
||||
</Button>
|
||||
<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" />
|
||||
</Button>
|
||||
<Button x:Name="SendButton" Height="25" Content="Senden" Margin="3" Grid.Column="3" VerticalAlignment="Bottom"
|
||||
Click="SendButton_OnClick" IsEnabled="{Binding ElementName=Chatbox, Path=Text, Converter={StaticResource StringToBoolConverter}}">
|
||||
<Button.Style>
|
||||
<Style TargetType="{x:Type Button}">
|
||||
<Setter Property="BorderBrush" Value="#ff5e00" />
|
||||
<Setter Property="Background" Value="#ff5e00" />
|
||||
<Setter Property="Foreground" Value="White"></Setter>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Border x:Name="Border" Background="#ff5300" CornerRadius="5" Padding="5,2">
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="#ff9999" TargetName="Border" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="Background" Value="#ff3a00" TargetName="Border" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Background" Value="LightGray" TargetName="Border" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</Button.Style>
|
||||
</Button>
|
||||
<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}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
Reference in New Issue
Block a user