<Window x:Class="Immense.RemoteControl.Desktop.UI.WPF.Views.PromptForAccessWindow"
        x:Name="ThisWindow"
        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:Immense.RemoteControl.Desktop.UI.WPF.Views"
        mc:Ignorable="d"
        WindowStyle="None"
        xmlns:vm="clr-namespace:Immense.RemoteControl.Desktop.UI.WPF.ViewModels"
        xmlns:fakes="clr-namespace:Immense.RemoteControl.Desktop.UI.WPF.ViewModels.Fakes"
        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="{Binding Icon}"
        d:DataContext="{d:DesignInstance Type=fakes:FakePromptForAccessViewModel, IsDesignTimeCreatable=True}"
        ContentRendered="Window_ContentRendered">

    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Immense.RemoteControl.Desktop.UI.WPF;component/Resources/Styles.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <Border Height="50" Background="{Binding TitleBackgroundColor}">
            <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Image Grid.Column="0" Height="50" Width="50"  Margin="0,0,10,0" Source="{Binding Icon}"></Image>
                <TextBlock Grid.Column="1" Text="Remote Control Request"  Foreground="{Binding TitleForegroundColor}" FontWeight="Bold" FontSize="20" VerticalAlignment="Center" />
                <Button Grid.Column="2" Style="{StaticResource TitlebarButton}" Click="MinimizeButton_Click" Content="____" Foreground="{Binding TitleButtonForegroundColor}" Background="{Binding TitleBackgroundColor}"/>
                <Button Grid.Column="3" Style="{StaticResource TitlebarButton}" Click="CloseButton_Click" Content="X" Foreground="{Binding TitleButtonForegroundColor}" Background="{Binding TitleBackgroundColor}" />
            </Grid>
        </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 ViewModel.SetResultYesCommand, ElementName=ThisWindow}"
                    CommandParameter="{Binding ElementName=ThisWindow, Mode=OneWay}"></Button>
            <Button Width="60" Height="40" Content="No" Margin="10"
                    Style="{StaticResource NormalButton}"
                    Command="{Binding ViewModel.SetResultNoCommand, ElementName=ThisWindow}"
                    CommandParameter="{Binding ElementName=ThisWindow, Mode=OneWay}"></Button>
        </StackPanel>

    </Grid>
</Window>
