aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/Controls/RemoteDesktopControl.xaml
blob: e40d1466811c8016d26ae94514ba01946eec6c4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<UserControl x:Class="Tango.FSE.PPCConsole.Controls.RemoteDesktopControl"
             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" 
             xmlns:global="clr-namespace:Tango.FSE.PPCConsole"
             xmlns:vm="clr-namespace:Tango.FSE.PPCConsole.ViewModels"
             xmlns:win="clr-namespace:Tango.FSE.Common.WindowsManager;assembly=Tango.FSE.Common"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:controls="clr-namespace:Tango.FSE.Common.Controls;assembly=Tango.FSE.Common"
             xmlns:material="http://materialdesigninxaml.net/winfx/xaml/themes"
             xmlns:local="clr-namespace:Tango.FSE.PPCConsole.Controls"
             mc:Ignorable="d" 
             d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:RemoteDesktopViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.RemoteDesktopViewVM}" Foreground="{StaticResource FSE_PrimaryForegroundBrush}" Focusable="False" x:Name="remoteDesktopControl">
    <Grid>
        <Border CornerRadius="15" BorderBrush="{StaticResource FSE_BorderBrush}" BorderThickness="1">
            <Grid>
                <Border CornerRadius="1" BorderThickness="30">
                    <Border.BorderBrush>
                        <LinearGradientBrush>
                            <GradientStop Color="#101010" Offset="0" />
                            <GradientStop Color="#202020" Offset="1" />
                        </LinearGradientBrush>
                    </Border.BorderBrush>
                    <Border BorderThickness="1">
                        <Border.BorderBrush>
                            <LinearGradientBrush>
                                <GradientStop Color="#3E3E3E" Offset="0" />
                                <GradientStop Color="#101010" Offset="0.5" />
                                <GradientStop Color="#3E3E3E" Offset="1" />
                            </LinearGradientBrush>
                        </Border.BorderBrush>
                        <Border.Background>
                            <ImageBrush ImageSource="{StaticResource FSE_PPC_Back}" />
                        </Border.Background>
                        <Border Width="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight,Converter={StaticResource MathOperatorConverter},ConverterParameter='/1.6',FallbackValue=500,TargetNullValue=500}">
                            <Grid>
                                <Image x:Name="img" FocusVisualStyle="{x:Null}" Focusable="True" Source="{Binding Source}" RenderOptions.BitmapScalingMode="Fant" Stretch="Fill" Visibility="{Binding RemoteDesktopProvider.InSession,Converter={StaticResource BooleanToVisibilityConverter}}"></Image>
                                <Rectangle x:Name="rectSnapshot" Fill="White" IsHitTestVisible="False" Opacity="0"></Rectangle>
                            </Grid>
                        </Border>
                    </Border>
                </Border>

                <Grid HorizontalAlignment="Right" VerticalAlignment="Top">
                    <StackPanel Margin="0 5 27 0" Orientation="Horizontal">
                        <controls:IconButton Cursor="Hand" ToolTip="Take snapshot" x:Name="btnSnapshot" Click="BtnSnapshot_Click" Command="{Binding TakeSnapshotCommand}" IsEnabled="{Binding RemoteDesktopProvider.InSession}" Icon="ImagePlus" Width="24" Height="24" Padding="0" />
                        <material:PackIcon Margin="2 0 0 0" ToolTip="Active communication channel is active" Visibility="{Binding RemoteDesktopProvider.IsWebRtcActive,Converter={StaticResource BooleanToVisibilityConverter}}" VerticalAlignment="Center" Kind="LightningBoltCircle" Width="16" Height="16" Foreground="{StaticResource FSE_GreenBrush}" />
                        <controls:IconButton Margin="5 0 0 0" Cursor="Hand" ToolTip="Open in separate window" Icon="OpenInNew" Width="24" Height="24" Padding="0" Command="{Binding WindowsManager.DetachToWindowCommand}" CommandParameter="{Binding ElementName=remoteDesktopControl}" Visibility="{Binding ElementName=remoteDesktopControl,Path=(win:WindowsManagerHelper.IsDetached),Converter={StaticResource BooleanToVisibilityInverseConverter}}" />
                    </StackPanel>
                </Grid>
            </Grid>
        </Border>
    </Grid>
</UserControl>