mirror of
https://github.com/hawkeye-stan/msfs-popout-panel-manager.git
synced 2024-11-22 05:40:11 +00:00
550 lines
37 KiB
XML
550 lines
37 KiB
XML
<UserControl
|
|
x:Class="MSFSPopoutPanelManager.MainApp.AppUserControl.ProfileCard"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:appUserControl="clr-namespace:MSFSPopoutPanelManager.MainApp.AppUserControl"
|
|
xmlns:c="clr-namespace:CalcBinding;assembly=CalcBinding"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:domain="clr-namespace:MSFSPopoutPanelManager.DomainModel.Profile;assembly=DomainModel"
|
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
|
xmlns:viewmodel="clr-namespace:MSFSPopoutPanelManager.MainApp.ViewModel"
|
|
Width="900"
|
|
Height="535"
|
|
mc:Ignorable="d">
|
|
<UserControl.Resources>
|
|
<appUserControl:StringToHudBarTypeConverter x:Key="StringToHudBarTypeConverter" />
|
|
<system:Double x:Key="IconSize">22</system:Double>
|
|
<system:Double x:Key="ButtonSize">28</system:Double>
|
|
<Style
|
|
x:Key="ToggleButton"
|
|
BasedOn="{StaticResource MaterialDesignSwitchToggleButton}"
|
|
TargetType="ToggleButton">
|
|
<Setter Property="Margin" Value="4,0,4,0" />
|
|
</Style>
|
|
<Style
|
|
x:Key="TextBlockLabel"
|
|
BasedOn="{StaticResource {x:Type TextBlock}}"
|
|
TargetType="TextBlock">
|
|
<Setter Property="FontSize" Value="14" />
|
|
<Setter Property="TextWrapping" Value="Wrap" />
|
|
<Setter Property="Margin" Value="5,0,0,0" />
|
|
<Setter Property="LineHeight" Value="18" />
|
|
</Style>
|
|
<Style
|
|
x:Key="TxtBlockDisableWhenLocked"
|
|
BasedOn="{StaticResource TextBlockLabel}"
|
|
TargetType="TextBlock">
|
|
<d:Style.DataContext>
|
|
<x:Type Type="viewmodel:ProfileCardViewModel" />
|
|
</d:Style.DataContext>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding ActiveProfile.IsLocked}" Value="True">
|
|
<Setter Property="Foreground" Value="DimGray" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
<Style
|
|
x:Key="TxtBlockDisableWhenLockedInner"
|
|
BasedOn="{StaticResource TextBlockLabel}"
|
|
TargetType="TextBlock">
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding DataContext.ProfileData.ActiveProfile.IsLocked, RelativeSource={RelativeSource AncestorType=UserControl, Mode=FindAncestor}}" Value="True">
|
|
<Setter Property="Foreground" Value="DimGray" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
<Style
|
|
x:Key="TxtBlockDisableWhenLockedOrPanelSourceEdit"
|
|
BasedOn="{StaticResource TextBlockLabel}"
|
|
TargetType="TextBlock">
|
|
<d:Style.DataContext>
|
|
<x:Type Type="viewmodel:ProfileCardViewModel" />
|
|
</d:Style.DataContext>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding ActiveProfile.IsLocked}" Value="True">
|
|
<Setter Property="Foreground" Value="DimGray" />
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding ActiveProfile.IsEditingPanelSource}" Value="True">
|
|
<Setter Property="Foreground" Value="DimGray" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
<Style
|
|
x:Key="CmbBoxDisableWhenLocked"
|
|
BasedOn="{StaticResource MaterialDesignComboBox}"
|
|
TargetType="ComboBox">
|
|
<d:Style.DataContext>
|
|
<x:Type Type="viewmodel:ProfileCardViewModel" />
|
|
</d:Style.DataContext>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding ActiveProfile.IsLocked}" Value="True">
|
|
<Setter Property="Foreground" Value="DimGray" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</UserControl.Resources>
|
|
<Grid d:DataContext="{d:DesignInstance viewmodel:ProfileCardViewModel}">
|
|
<materialDesign:Card
|
|
x:Name="RootCard"
|
|
Width="900"
|
|
Height="535"
|
|
UniformCornerRadius="16">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="44" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="55" />
|
|
</Grid.RowDefinitions>
|
|
<materialDesign:ColorZone
|
|
Grid.Row="0"
|
|
materialDesign:ElevationAssist.Elevation="Dp2"
|
|
DockPanel.Dock="Top"
|
|
Mode="PrimaryDark">
|
|
<StackPanel Height="44" Margin="16,6,8,0">
|
|
<DockPanel>
|
|
<StackPanel Width="812" Orientation="Horizontal">
|
|
<TextBox
|
|
x:Name="TxtBoxProfileTitle"
|
|
Margin="8,0,0,0"
|
|
FontSize="22"
|
|
FontWeight="Medium"
|
|
Foreground="White"
|
|
KeyDown="TxtBoxProfileTitle_KeyDown"
|
|
Text="{Binding ActiveProfile.Name, Mode=TwoWay}">
|
|
<TextBox.Style>
|
|
<Style BasedOn="{StaticResource MaterialDesignTextBox}" TargetType="TextBox">
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding ElementName=ToggleButtonEditProfileTitle, Path=IsChecked}" Value="False">
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
<Setter Property="IsReadOnly" Value="true" />
|
|
<Setter Property="IsHitTestVisible" Value="false" />
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding ElementName=ToggleButtonEditProfileTitle, Path=IsChecked}" Value="True">
|
|
<Setter Property="IsReadOnly" Value="false" />
|
|
<Setter Property="IsHitTestVisible" Value="true" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</TextBox.Style>
|
|
</TextBox>
|
|
<ToggleButton
|
|
x:Name="ToggleButtonEditProfileTitle"
|
|
Width="16"
|
|
Height="16"
|
|
Margin="8,0,0,0"
|
|
materialDesign:ToggleButtonAssist.OnContent="{materialDesign:PackIcon Kind=PencilOff,
|
|
Size=14}"
|
|
Click="ToggleButtonEditProfileTitle_Click"
|
|
IsChecked="False"
|
|
Style="{StaticResource MaterialDesignActionDarkToggleButton}"
|
|
ToolTip="Edit aircraft profile name">
|
|
<materialDesign:PackIcon
|
|
Width="14"
|
|
Height="14"
|
|
Kind="Pencil" />
|
|
</ToggleButton>
|
|
</StackPanel>
|
|
<Button
|
|
x:Name="BtnDeleteProfile"
|
|
Width="{StaticResource ButtonSize}"
|
|
Height="{StaticResource ButtonSize}"
|
|
Command="{Binding DeleteProfileCommand}"
|
|
IsEnabled="True"
|
|
KeyboardNavigation.AcceptsReturn="False"
|
|
Style="{StaticResource MaterialDesignIconForegroundButton}"
|
|
ToolTip="Delete profile">
|
|
<materialDesign:PackIcon
|
|
Width="{StaticResource IconSize}"
|
|
Height="{StaticResource IconSize}"
|
|
Kind="DeleteOutline" />
|
|
</Button>
|
|
</DockPanel>
|
|
</StackPanel>
|
|
</materialDesign:ColorZone>
|
|
|
|
<DockPanel Grid.Row="1">
|
|
<Expander Style="{DynamicResource CustomMaterialDesignExpander}">
|
|
<Expander.Header>
|
|
<DockPanel>
|
|
<StackPanel
|
|
Width="600"
|
|
DockPanel.Dock="Left"
|
|
Orientation="Horizontal">
|
|
<TextBlock
|
|
Height="20"
|
|
Margin="0,0,10,0"
|
|
Style="{StaticResource MaterialDesignSubtitle1TextBlock}">
|
|
Active Aircraft:
|
|
</TextBlock>
|
|
<TextBlock Height="20" Text="{c:Binding 'FlightSimData.AircraftName == null ? "Aircraft binding information is currently unavailable" : FlightSimData.AircraftName'}">
|
|
<TextBlock.Style>
|
|
<Style BasedOn="{StaticResource MaterialDesignSubtitle1TextBlock}" TargetType="{x:Type TextBlock}">
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding ProfileData.IsAircraftBoundToProfile}" Value="True">
|
|
<Setter Property="Foreground" Value="LightGreen" />
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding ProfileData.IsAircraftBoundToProfile}" Value="False">
|
|
<Setter Property="Foreground" Value="White" />
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding ProfileData.IsAllowedAddAircraftBinding}" Value="False">
|
|
<Setter Property="Foreground" Value="White" />
|
|
<Setter Property="ToolTip" Value="Aircraft is currently bound to another profile" />
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding FlightSimData.HasAircraftName}" Value="False">
|
|
<Setter Property="Foreground" Value="AntiqueWhite" />
|
|
<Setter Property="ToolTip" Value="No aircraft has been loaded by the game yet" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</TextBlock.Style>
|
|
</TextBlock>
|
|
<ToggleButton
|
|
Width="{StaticResource ButtonSize}"
|
|
Height="{StaticResource IconSize}"
|
|
Margin="10,0,0,0"
|
|
materialDesign:ToggleButtonAssist.OnContent="{materialDesign:PackIcon Kind=AirplaneMinus,
|
|
Size={StaticResource IconSize}}"
|
|
Background="Transparent"
|
|
Command="{Binding ToggleAircraftBindingCommand}"
|
|
IsChecked="{Binding ProfileData.IsAircraftBoundToProfile, Mode=OneWay}"
|
|
Style="{StaticResource MaterialDesignActionSecondaryToggleButton}"
|
|
ToolTip="Toggle aircraft binding to profile"
|
|
Visibility="{c:Binding 'FlightSimData.HasAircraftName and ProfileData.IsAllowedAddAircraftBinding'}">
|
|
<materialDesign:PackIcon
|
|
Width="{StaticResource IconSize}"
|
|
Height="{StaticResource IconSize}"
|
|
Kind="AirplanePlus" />
|
|
</ToggleButton>
|
|
</StackPanel>
|
|
<StackPanel Width="200" DockPanel.Dock="Right">
|
|
<TextBlock HorizontalAlignment="Right" VerticalAlignment="Center">
|
|
<TextBlock.Style>
|
|
<Style BasedOn="{StaticResource MaterialDesignSubtitle1TextBlock}" TargetType="{x:Type TextBlock}">
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{c:Binding 'FlightSimData.AircraftName != null and AppSettingData.ApplicationSetting.AutoPopOutSetting.IsEnabled and ProfileData.IsAircraftBoundToProfile'}" Value="True">
|
|
<Setter Property="Foreground" Value="LightGreen" />
|
|
<Setter Property="Text" Value="(Auto Pop Out is Active)" />
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{c:Binding 'FlightSimData.AircraftName != null and (!AppSettingData.ApplicationSetting.AutoPopOutSetting.IsEnabled or !ProfileData.IsAircraftBoundToProfile)'}" Value="True">
|
|
<Setter Property="Foreground" Value="Red" />
|
|
<Setter Property="Text" Value="(Auto Pop Out is Inactive)" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</TextBlock.Style>
|
|
</TextBlock>
|
|
</StackPanel>
|
|
</DockPanel>
|
|
</Expander.Header>
|
|
<StackPanel Margin="22,0,0,8">
|
|
<Separator Margin="0,0,0,10" />
|
|
<WrapPanel>
|
|
<ToggleButton IsChecked="{Binding ActiveProfile.ProfileSetting.PowerOnRequiredForColdStart, Mode=TwoWay}" Style="{StaticResource ToggleButton}" />
|
|
<TextBlock Style="{StaticResource TextBlockLabel}" ToolTip="During cold start, Pop Out Manager will first turn on power and avionics for the aircraft in order 
to pop out the instrumentation panels. After pop out is completed, Pop Out Manager will then 
turn off aircraft power and avionics to put the aircraft back to cold and dark state.">Power on is required to pop out panels on cold start (for G1000 based aircraft ONLY if needed)</TextBlock>
|
|
</WrapPanel>
|
|
|
|
<WrapPanel Margin="0,8,0,0">
|
|
<ToggleButton
|
|
IsChecked="{Binding ActiveProfile.ProfileSetting.IncludeInGamePanels, Mode=TwoWay, NotifyOnTargetUpdated=True}"
|
|
IsHitTestVisible="{c:Binding '!ActiveProfile.IsLocked',
|
|
Mode=OneWay}"
|
|
Style="{StaticResource ToggleButton}"
|
|
TargetUpdated="IncludeInGamePanel_TargetUpdated" />
|
|
<TextBlock Style="{StaticResource TxtBlockDisableWhenLocked}" ToolTip="Add in-game menu bar panels such as VFR Map, Checklist, ATC, etc. to profile to enable panel size and location management and touch support">Include in-game menu bar panels for pop out management and touch screen support</TextBlock>
|
|
</WrapPanel>
|
|
|
|
|
|
<WrapPanel Margin="0,8,0,0">
|
|
<ToggleButton
|
|
IsChecked="{Binding ActiveProfile.ProfileSetting.NumPadConfig.IsEnabled, Mode=TwoWay, NotifyOnTargetUpdated=True}"
|
|
IsHitTestVisible="{c:Binding '!ActiveProfile.IsLocked',
|
|
Mode=OneWay}"
|
|
Style="{StaticResource ToggleButton}"
|
|
TargetUpdated="AddNumPad_TargetUpdated" />
|
|
<TextBlock Style="{StaticResource TxtBlockDisableWhenLocked}" ToolTip="Add a virtual keyboard NumPad to the game that has MSFS focused before sending key command">Add a virtual keyboard NumPad</TextBlock>
|
|
</WrapPanel>
|
|
|
|
<WrapPanel Name="WrapPanelSwitchWindow" Margin="0,8,0,0">
|
|
<ToggleButton
|
|
IsChecked="{Binding ActiveProfile.ProfileSetting.SwitchWindowConfig.IsEnabled, Mode=TwoWay, NotifyOnTargetUpdated=True}"
|
|
IsHitTestVisible="{c:Binding '!ActiveProfile.IsLocked',
|
|
Mode=OneWay}"
|
|
Style="{StaticResource ToggleButton}"
|
|
TargetUpdated="AddSwitchWindow_TargetUpdated" />
|
|
<TextBlock Style="{StaticResource TxtBlockDisableWhenLocked}" ToolTip="Add a switch window command bar to the game">Add a switch window command bar</TextBlock>
|
|
</WrapPanel>
|
|
|
|
<StackPanel Margin="0,8,0,0" Orientation="Horizontal">
|
|
<WrapPanel>
|
|
<ToggleButton
|
|
IsChecked="{Binding ActiveProfile.ProfileSetting.HudBarConfig.IsEnabled, Mode=TwoWay, NotifyOnTargetUpdated=True}"
|
|
IsHitTestVisible="{c:Binding '!ActiveProfile.IsLocked',
|
|
Mode=OneWay}"
|
|
Style="{StaticResource ToggleButton}"
|
|
TargetUpdated="AddHudBar_TargetUpdated" />
|
|
<TextBlock Style="{StaticResource TxtBlockDisableWhenLocked}" ToolTip="Add an HUD bar to the game">Add a HUD Bar</TextBlock>
|
|
<ComboBox
|
|
x:Name="ComboBoxHudBarType"
|
|
Width="130"
|
|
Margin="10,-4,0,0"
|
|
FontSize="14"
|
|
IsEnabled="{c:Binding '!ActiveProfile.IsLocked and ActiveProfile.ProfileSetting.HudBarConfig.IsEnabled',
|
|
Mode=OneWay}"
|
|
ItemsSource="{Binding HudBarTypes}"
|
|
SelectedValue="{Binding ActiveProfile.ProfileSetting.HudBarConfig.HudBarType, Mode=TwoWay, Converter={StaticResource StringToHudBarTypeConverter}}"
|
|
Style="{StaticResource CmbBoxDisableWhenLocked}" />
|
|
</WrapPanel>
|
|
</StackPanel>
|
|
|
|
<StackPanel Margin="0,8,0,0" Orientation="Vertical">
|
|
<WrapPanel>
|
|
<ToggleButton
|
|
IsChecked="{Binding ActiveProfile.ProfileSetting.RefocusOnDisplay.IsEnabled, Mode=TwoWay, NotifyOnTargetUpdated=True}"
|
|
IsHitTestVisible="{c:Binding '!ActiveProfile.IsLocked',
|
|
Mode=OneWay}"
|
|
Style="{StaticResource ToggleButton}"
|
|
TargetUpdated="AddRefocusDisplay_TargetUpdated" />
|
|
<TextBlock Style="{StaticResource TxtBlockDisableWhenLocked}" ToolTip="Automatically set focus back to game window after a period of inactivity after touching the designated monitor. This is overcome a bug in MSFS where NVIDIA frame generation does not work when focus is not in the game window.">Enable entire monitor display to have game refocus function when touch</TextBlock>
|
|
</WrapPanel>
|
|
<WrapPanel
|
|
Margin="36,0,0,0"
|
|
IsHitTestVisible="{c:Binding !ActiveProfile.IsLocked}"
|
|
Orientation="Horizontal"
|
|
Visibility="{Binding ActiveProfile.ProfileSetting.RefocusOnDisplay.IsEnabled, Converter={StaticResource BooleanToVisibilityConverter}, Mode=OneWay}">
|
|
<WrapPanel Orientation="Vertical" Visibility="{Binding ActiveProfile.ProfileSetting.RefocusOnDisplay.IsEnabled, Converter={StaticResource BooleanToVisibilityConverter}, Mode=OneWay}">
|
|
<ItemsControl
|
|
Margin="0"
|
|
Padding="8"
|
|
ItemsSource="{Binding ActiveProfile.ProfileSetting.RefocusOnDisplay.Monitors, Mode=TwoWay}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate DataType="{x:Type domain:MonitorInfo}">
|
|
<WrapPanel Margin="0,0,0,4" Orientation="Horizontal">
|
|
<CheckBox
|
|
VerticalAlignment="Center"
|
|
Command="{Binding DataContext.RefocusDisplaySelectionUpdatedCommand, RelativeSource={RelativeSource AncestorType=UserControl, Mode=FindAncestor}}"
|
|
CommandParameter="{Binding Name}"
|
|
IsChecked="{Binding IsSelected, Mode=TwoWay}" />
|
|
<WrapPanel
|
|
Margin="8,0,0,0"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock
|
|
Margin="0,0,5,0"
|
|
FontWeight="Bold"
|
|
Style="{StaticResource TxtBlockDisableWhenLockedInner}"
|
|
Text="{Binding Name}" />
|
|
<TextBlock Style="{StaticResource TxtBlockDisableWhenLockedInner}" Text="(" />
|
|
<TextBlock Style="{StaticResource TxtBlockDisableWhenLockedInner}" Text="{Binding Width}" />
|
|
<TextBlock Style="{StaticResource TxtBlockDisableWhenLockedInner}" Text="x" />
|
|
<TextBlock Style="{StaticResource TxtBlockDisableWhenLockedInner}" Text="{Binding Height}" />
|
|
<TextBlock Style="{StaticResource TxtBlockDisableWhenLockedInner}" Text=")" />
|
|
</WrapPanel>
|
|
</WrapPanel>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</WrapPanel>
|
|
<Button
|
|
Width="160"
|
|
Margin="20,0,0,0"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
Command="{Binding RefocusDisplayRefreshedCommand}"
|
|
Style="{StaticResource MaterialDesignOutlinedLightButton}">
|
|
Refresh Display List
|
|
</Button>
|
|
</WrapPanel>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Expander>
|
|
</DockPanel>
|
|
<StackPanel Grid.Row="2">
|
|
<Separator Margin="0,-1,0,0" />
|
|
<WrapPanel Margin="24,8,0,4">
|
|
<TextBlock
|
|
Width="260"
|
|
Style="{StaticResource MaterialDesignBody1TextBlock}"
|
|
Text="Pop Out Panels" />
|
|
<StackPanel
|
|
Width="490"
|
|
Height="20"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock
|
|
Width="315"
|
|
VerticalAlignment="Center"
|
|
IsEnabled="False"
|
|
Style="{StaticResource TxtBlockDisableWhenLockedOrPanelSourceEdit}"
|
|
Text="Use legacy custom camera to select panel source" />
|
|
<ToggleButton
|
|
Width="50"
|
|
HorizontalAlignment="Left"
|
|
IsChecked="{Binding ActiveProfile.IsUsedLegacyCameraSystem, Mode=TwoWay, NotifyOnTargetUpdated=True}"
|
|
IsHitTestVisible="{c:Binding '!(ActiveProfile.IsEditingPanelSource or ActiveProfile.IsLocked)'}"
|
|
Style="{StaticResource ToggleButton}"
|
|
ToolTip="Switch panel selection method between using custom camera view or fixed camera view" />
|
|
</StackPanel>
|
|
<ToggleButton
|
|
Width="{StaticResource ButtonSize}"
|
|
Height="{StaticResource ButtonSize}"
|
|
Margin="0,0,0,0"
|
|
materialDesign:ToggleButtonAssist.OnContent="{materialDesign:PackIcon Kind=CrosshairsGps,
|
|
Size={StaticResource IconSize}}"
|
|
Background="Transparent"
|
|
Command="{Binding ToggleEditPanelSourceCommand}"
|
|
IsChecked="{Binding ActiveProfile.IsEditingPanelSource, Mode=TwoWay}"
|
|
IsEnabled="{c:Binding '!ActiveProfile.IsLocked'}"
|
|
KeyboardNavigation.AcceptsReturn="False"
|
|
ToolTip="Toggle editing of panel source">
|
|
<materialDesign:PackIcon
|
|
Width="{StaticResource IconSize}"
|
|
Height="{StaticResource IconSize}"
|
|
Kind="Crosshairs" />
|
|
<ToggleButton.Style>
|
|
<Style BasedOn="{StaticResource MaterialDesignActionSecondaryToggleButton}" TargetType="ToggleButton">
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding ActiveProfile.IsEditingPanelSource}" Value="True">
|
|
<Setter Property="Foreground" Value="LightGreen" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</ToggleButton.Style>
|
|
</ToggleButton>
|
|
|
|
<Button
|
|
Width="{StaticResource ButtonSize}"
|
|
Height="{StaticResource ButtonSize}"
|
|
Margin="8,0,0,0"
|
|
Command="{Binding AddPanelCommand}"
|
|
KeyboardNavigation.AcceptsReturn="False"
|
|
Style="{StaticResource MaterialDesignIconForegroundButton}"
|
|
ToolTip="Add pop out panel">
|
|
<materialDesign:PackIcon
|
|
Width="{StaticResource IconSize}"
|
|
Height="{StaticResource IconSize}"
|
|
Kind="PlusThick" />
|
|
</Button>
|
|
<ToggleButton
|
|
Width="{StaticResource ButtonSize}"
|
|
Height="{StaticResource ButtonSize}"
|
|
Margin="8,0,0,0"
|
|
materialDesign:ToggleButtonAssist.OnContent="{materialDesign:PackIcon Kind=LockOutline,
|
|
Size={StaticResource IconSize}}"
|
|
Background="Transparent"
|
|
Command="{Binding ToggleLockProfileCommand}"
|
|
IsChecked="{Binding ActiveProfile.IsLocked, Mode=TwoWay}"
|
|
KeyboardNavigation.AcceptsReturn="False"
|
|
ToolTip="Lock and unlock pop out panel settings">
|
|
<materialDesign:PackIcon
|
|
Width="{StaticResource IconSize}"
|
|
Height="{StaticResource IconSize}"
|
|
Kind="UnlockedOutline" />
|
|
<ToggleButton.Style>
|
|
<Style BasedOn="{StaticResource MaterialDesignActionSecondaryToggleButton}" TargetType="ToggleButton">
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding ActiveProfile.IsLocked}" Value="True">
|
|
<Setter Property="Foreground" Value="LightGreen" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</ToggleButton.Style>
|
|
</ToggleButton>
|
|
</WrapPanel>
|
|
<appUserControl:PopOutPanelListEmpty Visibility="{c:Binding 'ActiveProfile.PanelConfigs.Count == 0'}" />
|
|
<appUserControl:PopOutPanelList Visibility="{c:Binding 'ActiveProfile.PanelConfigs.Count > 0'}" />
|
|
</StackPanel>
|
|
<StackPanel Grid.Row="3">
|
|
<Separator Margin="0,5,0,0" />
|
|
<Grid>
|
|
<Button
|
|
x:Name="BtnStartPopOut"
|
|
Width="Auto"
|
|
Margin="250,10,250,0"
|
|
Command="{Binding StartPopOutCommand}"
|
|
Content="Start Pop Out"
|
|
Foreground="White"
|
|
KeyboardNavigation.AcceptsReturn="False"
|
|
Style="{StaticResource MaterialDesignOutlinedButton}"
|
|
ToolTip="Start pop out process" />
|
|
<Button
|
|
x:Name="BtnClosePopOut"
|
|
Width="Auto"
|
|
Margin="0,10,50,0"
|
|
HorizontalAlignment="Right"
|
|
Command="{Binding ClosePopOutCommand}"
|
|
Content="Close All Pop Outs"
|
|
Foreground="White"
|
|
KeyboardNavigation.AcceptsReturn="False"
|
|
Style="{StaticResource MaterialDesignOutlinedButton}"
|
|
ToolTip="Close all opened pop outs that are controlled by Popout Panel Manager" />
|
|
<StackPanel>
|
|
<materialDesign:Snackbar
|
|
x:Name="SnackbarMessage"
|
|
HorizontalAlignment="Stretch"
|
|
Background="DimGray"
|
|
Foreground="White"
|
|
IsActive="{Binding ActiveProfile.IsEditingPanelSource}">
|
|
<materialDesign:SnackbarMessage>
|
|
<StackPanel
|
|
Width="800"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock Margin="160,0,0,0" VerticalAlignment="Center">Please complete editing of source panel locations by clicking</TextBlock>
|
|
<materialDesign:PackIcon
|
|
Width="{StaticResource IconSize}"
|
|
Height="{StaticResource IconSize}"
|
|
Margin="5,0,5,0"
|
|
Foreground="LightGreen"
|
|
Kind="CrosshairsGps" />
|
|
<TextBlock VerticalAlignment="Center">above to enable Start Pop Out</TextBlock>
|
|
</StackPanel>
|
|
</materialDesign:SnackbarMessage>
|
|
</materialDesign:Snackbar>
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<materialDesign:Snackbar
|
|
x:Name="SnackbarMessage2"
|
|
HorizontalAlignment="Stretch"
|
|
Background="DimGray"
|
|
Foreground="White"
|
|
IsActive="{Binding ActiveProfile.HasUnidentifiedPanelSource}">
|
|
<materialDesign:SnackbarMessage>
|
|
<StackPanel
|
|
Width="800"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock Margin="250,0,0,0" VerticalAlignment="Center">Please identify all source panel locations to enable Start Pop Out</TextBlock>
|
|
</StackPanel>
|
|
</materialDesign:SnackbarMessage>
|
|
</materialDesign:Snackbar>
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<materialDesign:Snackbar
|
|
x:Name="SnackbarMessage3"
|
|
HorizontalAlignment="Stretch"
|
|
Background="DimGray"
|
|
Foreground="White"
|
|
IsActive="{Binding ActiveProfile.IsDisabledStartPopOut}">
|
|
<materialDesign:SnackbarMessage>
|
|
<StackPanel
|
|
Width="800"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock Margin="250,0,0,0" VerticalAlignment="Center">Pop out in progress. Please wait and do not move your mouse.</TextBlock>
|
|
</StackPanel>
|
|
</materialDesign:SnackbarMessage>
|
|
</materialDesign:Snackbar>
|
|
</StackPanel>
|
|
</Grid>
|
|
</StackPanel>
|
|
</Grid>
|
|
</materialDesign:Card>
|
|
</Grid>
|
|
</UserControl>
|