1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2024-11-22 13:50:14 +00:00
msfs-popout-panel-manager/WpfApp/AddProfileDialog.xaml
2022-02-06 13:24:59 -05:00

46 lines
2.5 KiB
XML

<mah:MetroWindow x:Class="MSFSPopoutPanelManager.WpfApp.AddProfileDialog"
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:mah="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase"
xmlns:local="clr-namespace:MSFSPopoutPanelManager.WpfApp"
mc:Ignorable="d"
Title="Add Profile"
Height="220"
Width="600"
ResizeMode="NoResize"
ContentRendered="Window_ContentRendered"
KeyDown="Window_KeyDown"
Background="Transparent">
<Window.Resources>
<CollectionViewSource x:Key="UserProfilesViewSource" Source="{Binding Path=UserProfiles, Mode=OneWay}">
<CollectionViewSource.SortDescriptions>
<scm:SortDescription PropertyName="ProfileName" />
</CollectionViewSource.SortDescriptions>
</CollectionViewSource>
</Window.Resources>
<Grid>
<DockPanel>
<WrapPanel DockPanel.Dock="Top" HorizontalAlignment="Center" Margin="0,30,0,0">
<Label Content="Copy Profile" HorizontalAlignment="Right" Width="120"/>
<ComboBox HorizontalAlignment="Left"
VerticalAlignment="Top"
Width="420"
ItemsSource="{Binding Source={StaticResource UserProfilesViewSource}}"
SelectedValue="{Binding Path=SelectedCopyProfileId, Mode=TwoWay}"
DisplayMemberPath="ProfileName"
SelectedValuePath="ProfileId"/>
</WrapPanel>
<WrapPanel DockPanel.Dock="Top" HorizontalAlignment="Center" Margin="0,20,0,0">
<Label Content="Profile Name" HorizontalAlignment="Right" Width="120"/>
<TextBox Name="txtProfileName" HorizontalAlignment="Left" TextWrapping="Wrap" Width="420" TextChanged="txtProfileName_TextChanged"/>
</WrapPanel>
<WrapPanel DockPanel.Dock="Bottom" HorizontalAlignment="Right" Margin="0,20,30,0">
<Button IsDefault="True" Name="btnDialogOk" Click="btnDialogOk_Click" Width="80" Margin="0,0,20,0">_Ok</Button>
<Button IsCancel="True" Width="80">_Cancel</Button>
</WrapPanel>
</DockPanel>
</Grid>
</mah:MetroWindow>