<!-- ********************************************************************** | |
* Copyright (C) 2016 by Savoir-faire Linux * | |
* Author: Jäger Nicolas<nicolas.jager@savoirfairelinux.com> * | |
* Author: Traczyk Andreas<andreas.traczyk@savoirfairelinux.com> * | |
* * | |
* This program is free software; you can redistribute it and/or modify * | |
* it under the terms of the GNU General Public License as published by * | |
* the Free Software Foundation; either version 3 of the License, or * | |
* (at your option) any later version. * | |
* * | |
* This program is distributed in the hope that it will be useful, * | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of * | |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | |
* GNU General Public License for more details. * | |
* * | |
* You should have received a copy of the GNU General Public License * | |
* along with this program. If not, see <http://www.gnu.org/licenses/> . * | |
***********************************************************************--> | |
<Page x:Class="RingClientUWP.Views.VideoPage" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:ctl="using:RingClientUWP.Controls" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:local="using:RingClientUWP" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:uc="using:RingClientUWP.UserAndCustomControls" | |
xmlns:views="using:RingClientUWP.Views" | |
NavigationCacheMode="Enabled" | |
mc:Ignorable="d"> | |
<Page.Resources> | |
<SolidColorBrush x:Key="SemiTransparentBlack" | |
Opacity="0.5" | |
Color="#808080" /> | |
<Storyboard x:Name="fadeVideoControlsStoryboard"> | |
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="_controlsBar_" | |
Storyboard.TargetProperty="Opacity" | |
Duration="0:0:4"> | |
<LinearDoubleKeyFrame KeyTime="0:0:0" Value="1" /> | |
<LinearDoubleKeyFrame KeyTime="0:0:2" Value="1" /> | |
<LinearDoubleKeyFrame KeyTime="0:0:4" Value="0" /> | |
</DoubleAnimationUsingKeyFrames> | |
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="_headerBar_" | |
Storyboard.TargetProperty="Opacity" | |
Duration="0:0:4"> | |
<LinearDoubleKeyFrame KeyTime="0:0:0" Value="1" /> | |
<LinearDoubleKeyFrame KeyTime="0:0:2" Value="1" /> | |
<LinearDoubleKeyFrame KeyTime="0:0:4" Value="0" /> | |
</DoubleAnimationUsingKeyFrames> | |
</Storyboard> | |
<DataTemplate x:Key="ConversationMessageTemplate" x:DataType="local:ConversationMessage"> | |
<Grid Margin="12,0,20,0" HorizontalAlignment="{x:Bind FromContact, Converter={StaticResource _bubbleHorizontalAlignement_}}"> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="*" /> | |
<RowDefinition Height="{x:Bind MessageIndex, Converter={StaticResource _MessageChainBreakToHeight_}, Mode=OneWay}" /> | |
</Grid.RowDefinitions> | |
<!-- avatar, message spikes, and message body --> | |
<Grid Grid.Row="0"> | |
<Grid.ColumnDefinitions> | |
<ColumnDefinition Width="40" /> | |
<ColumnDefinition Width="10" /> | |
<ColumnDefinition Width="2*" /> | |
<ColumnDefinition Width="8*" /> | |
</Grid.ColumnDefinitions> | |
<!-- avatar --> | |
<Grid Grid.Column="0" | |
Visibility="{x:Bind MessageIndex, Converter={StaticResource _MessageChainBreakToVisibility_}, ConverterParameter=First}"> | |
<Ellipse Width="36" | |
Height="36" | |
Canvas.ZIndex="1" | |
Margin="0,2,0,0" | |
HorizontalAlignment="Center" | |
VerticalAlignment="Top" | |
Visibility="{x:Bind FromContact, Converter={StaticResource _boolToVisibility_}}"> | |
<Ellipse.Fill> | |
<ImageBrush x:Name="_contactAvatar_" ImageSource="{x:Bind MessageAvatar, Mode=OneWay}" /> | |
</Ellipse.Fill> | |
</Ellipse> | |
<Grid Width="36" | |
Height="36" | |
Canvas.ZIndex="0" | |
Margin="0,2,0,0" | |
HorizontalAlignment="Center" | |
VerticalAlignment="Top" | |
Visibility="{x:Bind MessageIndex, Converter={StaticResource _MessageChainBreakToVisibility_}, ConverterParameter=First}"> | |
<Grid Visibility="{x:Bind FromContact, Converter={StaticResource _boolToVisibility_}}"> | |
<Ellipse x:Name="_defaultAvatar_" Fill="{x:Bind MessageAvatarColorBrush, Mode=OneWay}" /> | |
<TextBlock HorizontalAlignment="Center" | |
VerticalAlignment="Center" | |
FontFamily="Arial" | |
FontSize="21" | |
Foreground="White" | |
Text="{x:Bind MessageAvatarInitial, Mode=OneWay}" | |
TextAlignment="Center" /> | |
</Grid> | |
</Grid> | |
</Grid> | |
<!-- left spike --> | |
<Grid Grid.Column="1" Visibility="{x:Bind MessageIndex, Converter={StaticResource _MessageChainBreakToVisibility_}, ConverterParameter=First}"> | |
<Polygon Name="_chatLeftBubbleSpike_" | |
Fill="{x:Bind FromContact, Converter={StaticResource _bubbleBackground_}}" | |
Points="10,0,0,5,10,10" | |
Visibility="{x:Bind FromContact, Converter={StaticResource _boolToVisibility_}}"> | |
<Polygon.RenderTransform> | |
<TranslateTransform X="8" Y="15" /> | |
</Polygon.RenderTransform> | |
</Polygon> | |
</Grid> | |
<!-- message --> | |
<Border Grid.Column="3" | |
Width="auto" | |
Height="auto" | |
Margin="5" | |
Padding="10,6,10,6" | |
Background="{x:Bind FromContact, Converter={StaticResource _bubbleBackground_}}" | |
CornerRadius="10"> | |
<ContentPresenter> | |
<RichTextBlock x:Name="_msgContent_" | |
uc:TextBlockExtension.FormattedText="{x:Bind Payload}" | |
Foreground="#ff303030" | |
IsTextSelectionEnabled="True" | |
TextWrapping="Wrap"> | |
<Paragraph /> | |
</RichTextBlock> | |
</ContentPresenter> | |
</Border> | |
<!-- right spike --> | |
<Grid Grid.Column="3" Visibility="{x:Bind MessageIndex, Converter={StaticResource _MessageChainBreakToVisibility_}, ConverterParameter=First}"> | |
<Polygon Name="_chatRightBubbleSpike_" | |
HorizontalAlignment="Right" | |
Fill="{x:Bind FromContact, Converter={StaticResource _bubbleBackground_}}" | |
Points="0,0,10,5,0,10" | |
Visibility="{x:Bind FromContact, Converter={StaticResource _boolToVisibility_}, ConverterParameter=Inverted}"> | |
<Polygon.RenderTransform> | |
<TranslateTransform X="3" Y="15" /> | |
</Polygon.RenderTransform> | |
</Polygon> | |
</Grid> | |
</Grid> | |
<!-- message info --> | |
<Grid Grid.Row="1"> | |
<StackPanel x:Name="_messageInfo_" | |
Margin="10,0,10,0" | |
HorizontalAlignment="{x:Bind FromContact, Converter={StaticResource _bubbleHorizontalAlignement_}}" | |
Orientation="Horizontal"> | |
<TextBlock x:Name="_messageTimeFrom_" | |
FontSize="10" | |
Foreground="Gray" | |
Text="{x:Bind MessageIndex, Converter={StaticResource _MessageDateTimeString_}}" | |
Visibility="{x:Bind FromContact, Converter={StaticResource _boolToVisibility_}}"> | |
<TextBlock.RenderTransform> | |
<TranslateTransform X="50" /> | |
</TextBlock.RenderTransform> | |
</TextBlock> | |
<TextBlock x:Name="_messageTimeTo_" | |
FontSize="10" | |
Foreground="Gray" | |
Text="{x:Bind MessageIndex, Converter={StaticResource _MessageDateTimeString_}}" | |
Visibility="{x:Bind FromContact, Converter={StaticResource _boolToVisibility_}, ConverterParameter=Inverted}" /> | |
</StackPanel> | |
</Grid> | |
</Grid> | |
</DataTemplate> | |
<Style x:Key="MessageSendBox" TargetType="TextBox"> | |
<Setter Property="MinWidth" Value="{ThemeResource TextControlThemeMinWidth}" /> | |
<Setter Property="MinHeight" Value="{ThemeResource TextControlThemeMinHeight}" /> | |
<Setter Property="Foreground" Value="Black" /> | |
<Setter Property="Background" Value="White" /> | |
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" /> | |
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" /> | |
<Setter Property="ScrollViewer.HorizontalScrollMode" Value="Auto" /> | |
<Setter Property="ScrollViewer.VerticalScrollMode" Value="Auto" /> | |
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden" /> | |
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden" /> | |
<Setter Property="ScrollViewer.IsDeferredScrollingEnabled" Value="False" /> | |
<Setter Property="Padding" Value="4,0,8,4" /> | |
<Setter Property="Template"> | |
<Setter.Value> | |
<ControlTemplate TargetType="TextBox"> | |
<Grid> | |
<Grid.ColumnDefinitions> | |
<ColumnDefinition Width="*" /> | |
<ColumnDefinition Width="Auto" /> | |
</Grid.ColumnDefinitions> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="Auto" /> | |
<RowDefinition Height="*" /> | |
</Grid.RowDefinitions> | |
<Border Grid.Row="1" | |
x:Name="BackgroundElement" | |
Grid.RowSpan="1" | |
Grid.ColumnSpan="2" | |
Margin="0" | |
Background="{TemplateBinding Background}" | |
BorderBrush="{StaticResource RingBlueMidBrush}" | |
BorderThickness="0" | |
Opacity="1" /> | |
<ContentPresenter Grid.Row="0" | |
x:Name="HeaderContentPresenter" | |
Grid.ColumnSpan="2" | |
Margin="0,0,0,0" | |
Padding="2,4,2,2" | |
x:DeferLoadStrategy="Lazy" | |
Content="{TemplateBinding Header}" | |
ContentTemplate="{TemplateBinding HeaderTemplate}" | |
FontWeight="Normal" | |
Foreground="{ThemeResource SystemControlForegroundBaseHighBrush}" | |
Visibility="Collapsed" /> | |
<ScrollViewer Grid.Row="1" | |
x:Name="ContentElement" | |
Margin="{TemplateBinding BorderThickness}" | |
Padding="{TemplateBinding Padding}" | |
VerticalAlignment="Center" | |
AutomationProperties.AccessibilityView="Raw" | |
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" | |
HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}" | |
IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}" | |
IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}" | |
IsTabStop="False" | |
IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}" | |
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" | |
VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}" | |
ZoomMode="Disabled" /> | |
<Button Grid.Row="1" | |
Grid.Column="1" | |
x:Name="_sendBtn_" | |
MinWidth="34" | |
Margin="8,0,0,0" | |
VerticalAlignment="Stretch" | |
Background="Transparent" | |
BorderThickness="0" | |
Click="_sendBtn__Click" | |
Content="" | |
FontFamily="Segoe MDL2 Assets" | |
FontSize="20" | |
IsTabStop="False" | |
Style="{StaticResource FlatRoundSendButton}" | |
Visibility="Visible"> | |
<ToolTipService.ToolTip> | |
<TextBlock x:Uid="_tt_send_message_" /> | |
</ToolTipService.ToolTip> | |
</Button> | |
<ContentControl Grid.Row="1" | |
x:Name="PlaceholderTextContentPresenter" | |
Grid.ColumnSpan="2" | |
Margin="{TemplateBinding BorderThickness}" | |
Padding="{TemplateBinding Padding}" | |
VerticalAlignment="Center" | |
Content="{TemplateBinding PlaceholderText}" | |
Foreground="Gray" | |
IsHitTestVisible="False" | |
IsTabStop="False" /> | |
</Grid> | |
</ControlTemplate> | |
</Setter.Value> | |
</Setter> | |
</Style> | |
</Page.Resources> | |
<Grid x:Name="_videoContent_" SizeChanged="_videoContent__SizeChanged"> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="*" /> | |
<RowDefinition x:Name="_rowChatBx_" Height="0*" /> | |
</Grid.RowDefinitions> | |
<Grid.ColumnDefinitions> | |
<ColumnDefinition Width="*" /> | |
<ColumnDefinition x:Name="_colChatBx_" Width="0*" /> | |
</Grid.ColumnDefinitions> | |
<!-- actual video --> | |
<Grid Grid.Row="0" | |
Background="#000000" | |
PointerMoved="_videoControl__PointerMoved"> | |
<Border x:Name="_smartInfoBorder_" | |
MinWidth="140" | |
Margin="10" | |
Padding="20" | |
HorizontalAlignment="Right" | |
VerticalAlignment="Top" | |
Background="#80a0a0f0" | |
Canvas.ZIndex="100000" | |
CornerRadius="10" | |
IsHitTestVisible="False" | |
Visibility="Collapsed"> | |
<StackPanel Orientation="Vertical"> | |
<TextBlock x:Name="_si_CallId_" | |
Margin="0,0,0,10" | |
FontWeight="SemiBold" | |
Foreground="GreenYellow" /> | |
<TextBlock FontWeight="ExtraBold" | |
Foreground="GreenYellow" | |
Text="You: " /> | |
<Grid> | |
<Grid.RowDefinitions> | |
<RowDefinition /> | |
<RowDefinition /> | |
<RowDefinition /> | |
<RowDefinition /> | |
</Grid.RowDefinitions> | |
<Grid.ColumnDefinitions> | |
<ColumnDefinition Width="120" /> | |
<ColumnDefinition Width="*" /> | |
</Grid.ColumnDefinitions> | |
<TextBlock Grid.Row="0" | |
Grid.Column="0" | |
x:Uid="_si_fps_" | |
Foreground="GreenYellow" /> | |
<TextBlock Grid.Row="0" | |
Grid.Column="1" | |
x:Name="_si_fps1_" | |
Foreground="GreenYellow" /> | |
<TextBlock Grid.Row="1" | |
Grid.Column="0" | |
x:Uid="_si_videoCodec_" | |
Foreground="GreenYellow" /> | |
<TextBlock Grid.Row="1" | |
Grid.Column="1" | |
x:Name="_si_vc1_" | |
Foreground="GreenYellow" /> | |
<TextBlock Grid.Row="2" | |
Grid.Column="0" | |
x:Uid="_si_audioCodec_" | |
Foreground="GreenYellow" /> | |
<TextBlock Grid.Row="2" | |
Grid.Column="1" | |
x:Name="_si_ac1_" | |
Foreground="GreenYellow" /> | |
<TextBlock Grid.Row="3" | |
Grid.Column="0" | |
x:Uid="_si_resolution_" | |
Foreground="GreenYellow" /> | |
<TextBlock Grid.Row="3" | |
Grid.Column="1" | |
x:Name="_si_res1_" | |
Foreground="GreenYellow" /> | |
</Grid> | |
<TextBlock Margin="0,10,0,0" | |
FontWeight="ExtraBold" | |
Foreground="GreenYellow" | |
Text="Peer: " /> | |
<Grid> | |
<Grid.RowDefinitions> | |
<RowDefinition /> | |
<RowDefinition /> | |
<RowDefinition /> | |
<RowDefinition /> | |
</Grid.RowDefinitions> | |
<Grid.ColumnDefinitions> | |
<ColumnDefinition Width="120" /> | |
<ColumnDefinition Width="*" /> | |
</Grid.ColumnDefinitions> | |
<TextBlock Grid.Row="0" | |
Grid.Column="0" | |
x:Uid="_si_fps_" | |
Foreground="GreenYellow" /> | |
<TextBlock Grid.Row="0" | |
Grid.Column="1" | |
x:Name="_si_fps2_" | |
Foreground="GreenYellow" /> | |
<TextBlock Grid.Row="1" | |
Grid.Column="0" | |
x:Uid="_si_videoCodec_" | |
Foreground="GreenYellow" /> | |
<TextBlock Grid.Row="1" | |
Grid.Column="1" | |
x:Name="_si_vc2_" | |
Foreground="GreenYellow" /> | |
<TextBlock Grid.Row="2" | |
Grid.Column="0" | |
x:Uid="_si_audioCodec_" | |
Foreground="GreenYellow" /> | |
<TextBlock Grid.Row="2" | |
Grid.Column="1" | |
x:Name="_si_ac2_" | |
Foreground="GreenYellow" /> | |
<TextBlock Grid.Row="3" | |
Grid.Column="0" | |
x:Uid="_si_resolution_" | |
Foreground="GreenYellow" /> | |
<TextBlock Grid.Row="3" | |
Grid.Column="1" | |
x:Name="_si_res2_" | |
Foreground="GreenYellow" /> | |
</Grid> | |
</StackPanel> | |
</Border> | |
<StackPanel x:Name="_headerBar_" | |
Height="60" | |
Padding="10,10,10,0" | |
HorizontalAlignment="Stretch" | |
VerticalAlignment="Top" | |
Background="{StaticResource SemiTransparentBlack}" | |
Canvas.ZIndex="99999" | |
IsHitTestVisible="False" | |
Orientation="Horizontal"> | |
<!-- avatar --> | |
<Grid> | |
<Grid Grid.Column="0" | |
x:Name="_contactBarAvatarGrid_"> | |
<Ellipse Width="36" | |
Height="36" | |
Margin="0,2,0,0" | |
HorizontalAlignment="Center" | |
VerticalAlignment="Top"> | |
<Ellipse.Fill> | |
<ImageBrush x:Name="_contactBarAvatar_" /> | |
</Ellipse.Fill> | |
</Ellipse> | |
</Grid> | |
<Grid Grid.Column="0" | |
x:Name="_defaultContactBarAvatarGrid_" | |
Width="36" | |
Height="36" | |
Margin="0,2,0,0" | |
HorizontalAlignment="Center" | |
VerticalAlignment="Top"> | |
<Ellipse x:Name="_defaultAvatar_" Fill="#ff808080" /> | |
<TextBlock x:Name="_defaultAvatarInitial_" | |
HorizontalAlignment="Center" | |
VerticalAlignment="Center" | |
FontFamily="Arial" | |
FontSize="21" | |
Foreground="White" | |
Text="?" | |
TextAlignment="Center" /> | |
</Grid> | |
</Grid> | |
<StackPanel Orientation="Vertical"> | |
<TextBlock x:Name="_contactName_" | |
Margin="20,0,20,0" | |
FontWeight="SemiBold" | |
Foreground="White" | |
Text="[TEXT MISSING]" /> | |
<TextBlock x:Name="_callTime_" | |
Margin="20,0" | |
Foreground="WhiteSmoke"/> | |
</StackPanel> | |
</StackPanel> | |
<!-- video --> | |
<Image Grid.Column="0" | |
Name="_IncomingVideoImage_" | |
Canvas.ZIndex="-1" | |
DoubleTapped="IncomingVideoImage_DoubleTapped" /> | |
<TextBlock Grid.Column="0" | |
Name="_callPaused_" | |
HorizontalAlignment="Center" | |
VerticalAlignment="Center" | |
Canvas.ZIndex="-1" | |
FontFamily="Segoe MDL2 Assets" | |
FontSize="200" | |
Foreground="White" | |
Text="" | |
Visibility="Collapsed" /> | |
<!-- camera preview --> | |
<Canvas Name="_PreviewImageRect_" | |
HorizontalAlignment="Right" | |
VerticalAlignment="Bottom" | |
PointerCaptureLost="PreviewImage_PointerReleased" | |
PointerReleased="PreviewImage_PointerReleased"> | |
<Polygon Name="_PreviewImageResizer_" | |
Canvas.ZIndex="99999" | |
ManipulationMode="TranslateY" | |
PointerEntered="PreviewImageResizer_PointerEntered" | |
PointerExited="PreviewImageResizer_PointerExited" | |
PointerPressed="PreviewImageResizer_Pressed" | |
PointerReleased="PreviewImageResizer_PointerReleased" | |
Points="0,0,20,0,0,20" | |
Visibility="Collapsed"> | |
<Polygon.Fill> | |
<ImageBrush ImageSource="Assets/grid.png" Opacity=".9" /> | |
</Polygon.Fill> | |
</Polygon> | |
<CaptureElement Name="_PreviewImage_" | |
Width="20" | |
Height="20" | |
ManipulationMode="All" | |
Stretch="Uniform" | |
Visibility="Collapsed" /> | |
</Canvas> | |
<StackPanel x:Name="_controlsBar_" | |
HorizontalAlignment="Center" | |
VerticalAlignment="Bottom" | |
Orientation="Horizontal"> | |
<StackPanel.Resources> | |
<Style TargetType="Button"> | |
<Setter Property="Margin" Value="10,30" /> | |
<Setter Property="Width" Value="40" /> | |
<Setter Property="Height" Value="40" /> | |
<Setter Property="Background" Value="Black" /> | |
<Setter Property="Foreground" Value="White" /> | |
<Setter Property="BorderBrush" Value="Gray" /> | |
<Setter Property="BorderThickness" Value="{ThemeResource ButtonBorderThemeThickness}" /> | |
<Setter Property="Template"> | |
<Setter.Value> | |
<ControlTemplate TargetType="Button"> | |
<Grid x:Name="RootGrid" Background="{TemplateBinding Background}"> | |
<ContentPresenter x:Name="ContentPresenter" | |
Padding="{TemplateBinding Padding}" | |
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" | |
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" | |
AutomationProperties.AccessibilityView="Raw" | |
BorderBrush="{TemplateBinding BorderBrush}" | |
BorderThickness="{TemplateBinding BorderThickness}" | |
Content="{TemplateBinding Content}" | |
ContentTemplate="{TemplateBinding ContentTemplate}" | |
ContentTransitions="{TemplateBinding ContentTransitions}" /> | |
<VisualStateManager.VisualStateGroups> | |
<VisualStateGroup x:Name="CommonStates"> | |
<VisualState x:Name="PointerOver"> | |
<Storyboard> | |
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background"> | |
<DiscreteObjectKeyFrame KeyTime="0" Value="Gray" /> | |
</ObjectAnimationUsingKeyFrames> | |
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground"> | |
<DiscreteObjectKeyFrame KeyTime="0" Value="White" /> | |
</ObjectAnimationUsingKeyFrames> | |
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush"> | |
<DiscreteObjectKeyFrame KeyTime="0" Value="White" /> | |
</ObjectAnimationUsingKeyFrames> | |
</Storyboard> | |
</VisualState> | |
<VisualState x:Name="Normal"> | |
<Storyboard> | |
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background"> | |
<DiscreteObjectKeyFrame KeyTime="0" Value="Black" /> | |
</ObjectAnimationUsingKeyFrames> | |
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground"> | |
<DiscreteObjectKeyFrame KeyTime="0" Value="White" /> | |
</ObjectAnimationUsingKeyFrames> | |
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush"> | |
<DiscreteObjectKeyFrame KeyTime="0" Value="Gray" /> | |
</ObjectAnimationUsingKeyFrames> | |
<PointerUpThemeAnimation Storyboard.TargetName="RootGrid" /> | |
</Storyboard> | |
</VisualState> | |
<VisualState x:Name="Pressed"> | |
<Storyboard> | |
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Background"> | |
<DiscreteObjectKeyFrame KeyTime="0" Value="White" /> | |
</ObjectAnimationUsingKeyFrames> | |
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground"> | |
<DiscreteObjectKeyFrame KeyTime="0" Value="Black" /> | |
</ObjectAnimationUsingKeyFrames> | |
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="BorderBrush"> | |
<DiscreteObjectKeyFrame KeyTime="0" Value="Gray" /> | |
</ObjectAnimationUsingKeyFrames> | |
<PointerDownThemeAnimation Storyboard.TargetName="RootGrid" /> | |
</Storyboard> | |
</VisualState> | |
</VisualStateGroup> | |
</VisualStateManager.VisualStateGroups> | |
</Grid> | |
</ControlTemplate> | |
</Setter.Value> | |
</Setter> | |
</Style> | |
</StackPanel.Resources> | |
<Button x:Name="_btnHangUp_" | |
PointerEntered="btnAny_entered" | |
PointerExited="btnAny_exited" | |
Tapped="_btnHangUp__Tapped"> | |
<SymbolIcon Symbol="HangUp" /> | |
</Button> | |
<Button x:Name="_btnPause_" | |
PointerEntered="btnAny_entered" | |
PointerExited="btnAny_exited" | |
Tapped="_btnPause__Tapped"> | |
<SymbolIcon Symbol="Pause" /> | |
</Button> | |
<Button x:Name="_btnChat_" | |
PointerEntered="btnAny_entered" | |
PointerExited="btnAny_exited" | |
Tapped="_btnChat__Tapped"> | |
<SymbolIcon Width="20" | |
HorizontalAlignment="Left" | |
Symbol="Message" /> | |
</Button> | |
<Button x:Name="_btnToggleOrientation_" | |
Content="" | |
DoubleTapped="_btnToggleOrientation__Tapped" | |
FontFamily="Segoe MDL2 Assets" | |
PointerEntered="btnAny_entered" | |
PointerExited="btnAny_exited" | |
Tapped="_btnToggleOrientation__Tapped" | |
Visibility="Visible"> | |
<ToolTipService.ToolTip> | |
<TextBlock x:Uid="_tt_change_orientation_" /> | |
</ToolTipService.ToolTip> | |
</Button> | |
<Button x:Name="_btnAddFriend_" | |
PointerEntered="btnAny_entered" | |
PointerExited="btnAny_exited" | |
Tapped="_btnAddFriend__Tapped" | |
Visibility="Collapsed"> | |
<SymbolIcon Symbol="AddFriend" /> | |
</Button> | |
<Button x:Name="_btnSwitch_" | |
PointerEntered="btnAny_entered" | |
PointerExited="btnAny_exited" | |
Tapped="_btnSwitch__Tapped" | |
Visibility="Collapsed"> | |
<SymbolIcon Symbol="Switch" /> | |
</Button> | |
<Button x:Name="_btnMicrophone_" | |
PointerEntered="btnAny_entered" | |
PointerExited="btnAny_exited" | |
Tapped="_btnMicrophone__Click"> | |
<Grid> | |
<SymbolIcon Symbol="Microphone" /> | |
<TextBlock x:Name="_txbkMicrophoneMuted_" | |
FontFamily="Segoe MDL2 Assets" | |
FontSize="16" | |
FontWeight="Bold" | |
Foreground="Red" | |
IsHitTestVisible="True" | |
Text="" | |
Visibility="Collapsed"> | |
<TextBlock.RenderTransform> | |
<TranslateTransform X="1" Y="2" /> | |
</TextBlock.RenderTransform> | |
</TextBlock> | |
</Grid> | |
</Button> | |
<!-- Tapped="_btnVideo__Tapped" --> | |
<Button x:Name="_btnVideo_" | |
Click="_btnVideo__Click" | |
PointerEntered="btnAny_entered" | |
PointerExited="btnAny_exited"> | |
<Grid> | |
<SymbolIcon Symbol="Video" /> | |
<TextBlock x:Name="_txbkVideoMuted_" | |
FontFamily="Segoe MDL2 Assets" | |
FontSize="16" | |
FontWeight="Bold" | |
Foreground="Red" | |
IsHitTestVisible="True" | |
Text="" | |
Visibility="Collapsed"> | |
<TextBlock.RenderTransform> | |
<TranslateTransform X="1" Y="2" /> | |
</TextBlock.RenderTransform> | |
</TextBlock> | |
</Grid> | |
</Button> | |
<Button x:Name="_btnMemo_" | |
PointerEntered="btnAny_entered" | |
PointerExited="btnAny_exited" | |
Tapped="_btnMemo__Tapped" | |
Visibility="Collapsed"> | |
<SymbolIcon Symbol="Memo" /> | |
</Button> | |
<Button x:Name="_btnHQ_" | |
PointerEntered="btnAny_entered" | |
PointerExited="btnAny_exited" | |
Tapped="_btnHQ__Tapped" | |
Visibility="Collapsed"> | |
<TextBlock FontSize="12" | |
Text="HQ" /> | |
</Button> | |
</StackPanel> | |
</Grid> | |
<!-- in call chat box --> | |
<Grid Grid.Row="1" | |
Grid.Column="0" | |
x:Name="_chatPanelGrid_"> | |
<Grid Background="{ThemeResource RingMessagePageBrush}"> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="auto" /> | |
<RowDefinition Height="*" /> | |
<RowDefinition Height="auto" /> | |
</Grid.RowDefinitions> | |
<!-- resize bar --> | |
<Grid Grid.Row="1" | |
x:Name="_chatPanelResizeBarGrid_" | |
Width="auto" | |
Height="4" | |
HorizontalAlignment="Stretch" | |
VerticalAlignment="Top" | |
Background="Transparent" | |
Canvas.ZIndex="99999" | |
ManipulationMode="All" | |
Opacity=".5" | |
PointerEntered="_chatPanelResizeBarGrid__PointerEntered" | |
PointerExited="_chatPanelResizeBarGrid__PointerExited" | |
PointerPressed="_chatPanelResizeBarGrid__PointerPressed" | |
PointerReleased="_chatPanelResizeBarGrid__PointerReleased" /> | |
<ScrollViewer Grid.Row="1" | |
x:Name="_scrollView_" | |
VerticalAlignment="Bottom" | |
BorderBrush="{StaticResource RingBlueMidBrush}" | |
BorderThickness="0,0,0,0" | |
ScrollViewer.VerticalScrollBarVisibility="Auto"> | |
<StackPanel> | |
<Rectangle Height="12" Fill="Transparent" /> | |
<ListBox x:Name="_messagesList_" | |
Margin="0" | |
Padding="0" | |
Background="{StaticResource RingMessagePageBrush}" | |
ItemContainerStyle="{StaticResource messageBubbleStyle}" | |
ItemTemplate="{StaticResource ConversationMessageTemplate}" /> | |
<Rectangle Height="12" Fill="Transparent" /> | |
</StackPanel> | |
</ScrollViewer> | |
<StackPanel Grid.Row="2" Orientation="Vertical"> | |
<Rectangle Grid.Row="0" | |
Height="1" | |
Margin="16,0,16,0" | |
Fill="LightGray" /> | |
<Grid MinHeight="52" | |
MaxHeight="112" | |
Margin="0" | |
Padding="0" | |
Background="{ThemeResource RingMessagePageBrush}"> | |
<TextBox x:Name="_messageTextBox_" | |
x:Uid="_messageTextBox_" | |
MinHeight="24" | |
Margin="16,0,16,0" | |
HorizontalAlignment="Stretch" | |
VerticalAlignment="Center" | |
AcceptsReturn="True" | |
Background="White" | |
IsSpellCheckEnabled="False" | |
IsTabStop="True" | |
ScrollViewer.VerticalScrollBarVisibility="Auto" | |
Style="{StaticResource MessageSendBox}" | |
TextChanged="_messageTextBox__TextChanged" | |
TextWrapping="Wrap" /> | |
</Grid> | |
</StackPanel> | |
</Grid> | |
</Grid> | |
</Grid> | |
</Page> |