Remotely/Desktop.Win/Views/PromptForAccessWindow.xaml

77 lines
3.5 KiB
XML

<Window x:Class="Remotely.Desktop.Win.Views.PromptForAccessWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Remotely.Desktop.Win.Views"
mc:Ignorable="d"
WindowStyle="None"
xmlns:ViewModels="clr-namespace:Remotely.Desktop.Win.ViewModels"
ResizeMode="CanResizeWithGrip"
MouseLeftButtonDown="Window_MouseLeftButtonDown"
WindowStartupLocation="CenterScreen"
AllowsTransparency="True"
BorderBrush="DimGray"
BorderThickness="1"
Topmost="True"
Title="Remote Control Request"
MinHeight="200"
MinWidth="250"
Height="275"
Width="450"
Icon="/Assets/favicon.ico"
ContentRendered="Window_ContentRendered">
<Window.DataContext>
<ViewModels:PromptForAccessWindowViewModel />
</Window.DataContext>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Border Height="50" Background="#FF464646">
<DockPanel Margin="10,0,0,0">
<DockPanel>
<Image Height="50" Width="50" Source="/Assets/Remotely_Icon.png" Margin="0,0,10,0"></Image>
<TextBlock Foreground="#FF1D90F1" FontWeight="Bold" FontSize="20" VerticalAlignment="Center">
Remote Control Request
</TextBlock>
</DockPanel>
<Button Style="{StaticResource TitlebarButton}" Click="CloseButton_Click" Content="X" />
<Button Style="{StaticResource TitlebarButton}" Click="MinimizeButton_Click" Content="_"/>
</DockPanel>
</Border>
<StackPanel Grid.Row="1">
<TextBlock Style="{StaticResource SectionHeader}" FontWeight="Bold" FontSize="18" Foreground="DimGray" Margin="10" TextWrapping="Wrap">
A remote control session has been requested.
</TextBlock>
<TextBlock Style="{StaticResource SectionHeader}" FontWeight="Bold" FontSize="18" Foreground="DimGray" Margin="10" TextWrapping="Wrap">
<Run>Would you like to allow </Run>
<Run Text="{Binding RequesterName}"></Run>
<Run> from </Run>
<Run Text="{Binding OrganizationName}"></Run>
<Run> to control your computer?</Run>
</TextBlock>
</StackPanel>
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Top">
<Button Width="60" Height="40" Content="Yes" Margin="10"
Style="{StaticResource NormalButton}"
Command="{Binding SetResultYes}"
CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PromptForAccessWindow}}}"></Button>
<Button Width="60" Height="40" Content="No" Margin="10"
Style="{StaticResource NormalButton}"
Command="{Binding SetResultNo}"
CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:PromptForAccessWindow}}}"></Button>
</StackPanel>
</Grid>
</Window>