1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2024-11-24 14:50:10 +00:00
msfs-popout-panel-manager/MainApp/AppUserControl/PopOutPanelCard/PanelTargetField.xaml
2024-02-27 21:44:21 -05:00

84 lines
3.9 KiB
XML

<UserControl
x:Class="MSFSPopoutPanelManager.MainApp.AppUserControl.PopOutPanelCard.PanelTargetField"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:c="clr-namespace:CalcBinding;assembly=CalcBinding"
xmlns:converter="clr-namespace:MSFSPopoutPanelManager.MainApp.Converter"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:system="clr-namespace:System;assembly=System.Runtime"
xmlns:viewModel="clr-namespace:MSFSPopoutPanelManager.MainApp.ViewModel"
mc:Ignorable="d">
<UserControl.Resources>
<system:Double x:Key="LeftRightIconSize">18</system:Double>
<converter:StringEmptyConverter x:Key="StringEmptyConverter" />
<Style
x:Key="BtnLeftRight"
BasedOn="{StaticResource MaterialDesignIconForegroundButton}"
TargetType="Button">
<Setter Property="Width" Value="30" />
<Setter Property="Height" Value="30" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
</Style>
</UserControl.Resources>
<StackPanel
Width="220"
HorizontalAlignment="Center"
d:DataContext="{d:DesignInstance viewModel:PopOutPanelSourceCardViewModel}"
Orientation="Horizontal">
<TextBox
Width="140"
Margin="65,0,0,0"
Padding="0"
VerticalAlignment="Center"
HorizontalContentAlignment="Left"
materialDesign:HintAssist.FloatingScale="1"
materialDesign:HintAssist.Hint="Fixed Camera"
BorderBrush="Transparent"
IsHitTestVisible="False"
IsReadOnly="True"
Style="{StaticResource MaterialDesignFloatingHintTextBox}"
Text="{Binding DataItem.FixedCameraConfig.Name, Converter={StaticResource StringEmptyConverter}, ConverterParameter='N/A'}"
Visibility="{c:Binding '!DataItem.IsEditingPanel'}" />
<StackPanel
Margin="25,0,0,0"
HorizontalAlignment="Center"
Orientation="Horizontal"
Visibility="{c:Binding 'DataItem.IsEditingPanel'}">
<Button
x:Name="BtnPrevCameraSelection"
Margin="10,12,0,0"
Click="PopupBoxCameraSelectionPrev_Clicked"
Style="{StaticResource BtnLeftRight}">
<materialDesign:PackIcon
Width="{StaticResource LeftRightIconSize}"
Height="{StaticResource LeftRightIconSize}"
Kind="ArrowLeft" />
</Button>
<ComboBox
x:Name="ComboBoxCameraSelection"
Width="120"
Padding="0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
HorizontalContentAlignment="Left"
materialDesign:HintAssist.FloatingHintHorizontalAlignment="Left"
materialDesign:HintAssist.FloatingScale="1"
materialDesign:HintAssist.Hint="Fixed Camera"
SelectionChanged="ComboBoxCameraSelection_OnSelectionChanged"
Style="{StaticResource MaterialDesignFloatingHintComboBox}" />
<Button
x:Name="BtnNextCameraSelection"
Margin="0,12,0,0"
Click="PopupBoxCameraSelectionNext_Clicked"
Style="{StaticResource BtnLeftRight}">
<materialDesign:PackIcon
Width="{StaticResource LeftRightIconSize}"
Height="{StaticResource LeftRightIconSize}"
Kind="ArrowRight" />
</Button>
</StackPanel>
</StackPanel>
</UserControl>