VideoPage.xaml 14.2 KB
Newer Older
Nicolas Jager's avatar
Nicolas Jager committed
1 2 3 4 5 6 7
<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:local="using:RingClientUWP"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
8 9
    mc:Ignorable="d"
    NavigationCacheMode="Enabled">
Nicolas Jager's avatar
Nicolas Jager committed
10 11

    <Page.Resources>
12
        <SolidColorBrush x:Key="SemiTransparentBlack" Color="#808080" Opacity="0.5"/>
Nicolas Jager's avatar
Nicolas Jager committed
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
        <Storyboard x:Name="myStoryboard">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="_controlsBar_"
                             Storyboard.TargetProperty="Opacity"
                             Duration="0:0:4">
                <LinearDoubleKeyFrame Value="1" KeyTime="0:0:0" />
                <LinearDoubleKeyFrame Value="1" KeyTime="0:0:2" />
                <LinearDoubleKeyFrame Value="0" KeyTime="0:0:4" />

            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="_headerBar_"
                             Storyboard.TargetProperty="Opacity"
                             Duration="0:0:4">
                <LinearDoubleKeyFrame Value="1" KeyTime="0:0:0" />
                <LinearDoubleKeyFrame Value="1" KeyTime="0:0:2" />
                <LinearDoubleKeyFrame Value="0" KeyTime="0:0:4" />
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </Page.Resources>

    <SplitView x:Name="_videoSplitView_" IsPaneOpen="False" OpenPaneLength="400" PanePlacement="Right">
        <SplitView.Pane>
            <Frame x:Name="_chatPanel_"/>
        </SplitView.Pane>
        <SplitView.Content>
37
            <Grid Background="#000000">
Nicolas Jager's avatar
Nicolas Jager committed
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
                <Image x:Name="_videoControl_"
                       PointerMoved="_videoControl__PointerMoved"
                       Stretch="UniformToFill"/>
                <StackPanel x:Name="_headerBar_"
                            Background="{StaticResource SemiTransparentBlack}"
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Top"
                            Height="50">
                    <TextBlock x:Name="_callee_"
                               Text="callee"
                               Foreground="White"
                               Margin="20,10"/>
                </StackPanel>
                <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"/>
60
                            <Setter Property="Background" Value="Black"/>
Nicolas Jager's avatar
Nicolas Jager committed
61
                            <Setter Property="Foreground" Value="White"/>
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
                            <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}">
                                            <VisualStateManager.VisualStateGroups>
                                                <VisualStateGroup x:Name="CommonStates">
                                                    <VisualState x:Name="PointerOver">
                                                        <Storyboard>
                                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background"
                                                                                           Storyboard.TargetName="ContentPresenter">
                                                                <DiscreteObjectKeyFrame KeyTime="0"
                                                                                        Value="Gray"/>
                                                            </ObjectAnimationUsingKeyFrames>
                                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground"
                                                                                           Storyboard.TargetName="ContentPresenter">
                                                                <DiscreteObjectKeyFrame KeyTime="0"
                                                                                        Value="White"/>
                                                            </ObjectAnimationUsingKeyFrames>
                                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush"
                                                                                           Storyboard.TargetName="ContentPresenter">
                                                                <DiscreteObjectKeyFrame KeyTime="0"
                                                                                        Value="White"/>
                                                            </ObjectAnimationUsingKeyFrames>
                                                        </Storyboard>
                                                    </VisualState>
                                                    <VisualState x:Name="Normal">
                                                        <Storyboard>
                                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background"
                                                                                           Storyboard.TargetName="ContentPresenter">
                                                                <DiscreteObjectKeyFrame KeyTime="0"
                                                                                        Value="Black"/>
                                                            </ObjectAnimationUsingKeyFrames>
                                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground"
                                                                                           Storyboard.TargetName="ContentPresenter">
                                                                <DiscreteObjectKeyFrame KeyTime="0"
                                                                                        Value="White"/>
                                                            </ObjectAnimationUsingKeyFrames>
                                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush"
                                                                                           Storyboard.TargetName="ContentPresenter">
                                                                <DiscreteObjectKeyFrame KeyTime="0"
                                                                                        Value="Gray"/>
                                                            </ObjectAnimationUsingKeyFrames>
                                                            <PointerUpThemeAnimation Storyboard.TargetName="RootGrid"/>
                                                        </Storyboard>
                                                    </VisualState>
                                                    <VisualState x:Name="Pressed">
                                                        <Storyboard>
                                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background"
                                                                                           Storyboard.TargetName="ContentPresenter">
                                                                <DiscreteObjectKeyFrame KeyTime="0"
                                                                                        Value="White"/>
                                                            </ObjectAnimationUsingKeyFrames>
                                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground"
                                                                                           Storyboard.TargetName="ContentPresenter">
                                                                <DiscreteObjectKeyFrame KeyTime="0"
                                                                                        Value="Black"/>
                                                            </ObjectAnimationUsingKeyFrames>
                                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush"
                                                                                           Storyboard.TargetName="ContentPresenter">
                                                                <DiscreteObjectKeyFrame KeyTime="0"
                                                                                        Value="Gray"/>
                                                            </ObjectAnimationUsingKeyFrames>
                                                            <PointerDownThemeAnimation Storyboard.TargetName="RootGrid"/>
                                                        </Storyboard>
                                                    </VisualState>
                                                </VisualStateGroup>
                                            </VisualStateManager.VisualStateGroups>
                                            <ContentPresenter x:Name="ContentPresenter"
                                                              AutomationProperties.AccessibilityView="Raw"
                                                              BorderBrush="{TemplateBinding BorderBrush}"
                                                              BorderThickness="{TemplateBinding BorderThickness}"
                                                              ContentTemplate="{TemplateBinding ContentTemplate}"
                                                              ContentTransitions="{TemplateBinding ContentTransitions}"
                                                              Content="{TemplateBinding Content}"
                                                              HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                              Padding="{TemplateBinding Padding}"
                                                              VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                        </Grid>
                                    </ControlTemplate>
                                </Setter.Value>
                            </Setter>
Nicolas Jager's avatar
Nicolas Jager committed
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163
                        </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">
164
                        <SymbolIcon Symbol="Message" HorizontalAlignment="Left" Width="20"/>
Nicolas Jager's avatar
Nicolas Jager committed
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193
                    </Button>
                    <Button x:Name="_btnAddFriend_"
                            PointerEntered="btnAny_entered"
                            PointerExited="btnAny_exited"
                            Tapped="_btnAddFriend__Tapped">
                        <SymbolIcon Symbol="AddFriend"/>
                    </Button>
                    <Button x:Name="_btnSwitch_"
                            PointerEntered="btnAny_entered"
                            PointerExited="btnAny_exited"
                            Tapped="_btnSwitch__Tapped">
                        <SymbolIcon Symbol="Switch"/>
                    </Button>
                    <Button x:Name="_btnMicrophone_"
                            PointerEntered="btnAny_entered"
                            PointerExited="btnAny_exited"
                            Tapped="_btnMicrophone__Tapped">
                        <SymbolIcon Symbol="Microphone"/>
                    </Button>
                    <Button x:Name="_btnVideo_"
                            PointerEntered="btnAny_entered"
                            PointerExited="btnAny_exited"
                            Tapped="_btnVideo__Tapped">
                        <SymbolIcon Symbol="Video"/>
                    </Button>
                    <Button x:Name="_btnMemo_"
                            PointerEntered="btnAny_entered"
                            PointerExited="btnAny_exited"
                            Tapped="_btnMemo__Tapped">
194
                        <SymbolIcon Symbol="Memo"/>
Nicolas Jager's avatar
Nicolas Jager committed
195 196 197 198 199
                    </Button>
                    <Button x:Name="_btnHQ_"
                            PointerEntered="btnAny_entered"
                            PointerExited="btnAny_exited"
                            Tapped="_btnHQ__Tapped">
200
                        <TextBlock FontSize="12" Text="HQ"/>
Nicolas Jager's avatar
Nicolas Jager committed
201 202 203 204 205
                    </Button>
                </StackPanel>
            </Grid>
        </SplitView.Content>
    </SplitView>
206
</Page>