You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
4.0 KiB
56 lines
4.0 KiB
<UserControl x:Class="rabi_splitter_WPF.VariableExportTab"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="clr-namespace:rabi_splitter_WPF"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="500" d:DesignWidth="540">
|
|
<UserControl.Resources>
|
|
<local:InvertableBooleanToVisibilityConverter x:Key="InvertableBooleanToVisibilityConverter"/>
|
|
</UserControl.Resources>
|
|
<DockPanel>
|
|
<StackPanel>
|
|
<Button Content="Add" Width="40" Height="40" DockPanel.Dock="Right" Click="AddButton_Click"/>
|
|
</StackPanel>
|
|
<ListBox Name="VariableExportListBox" Width="500" ItemsSource="{Binding VariableExportSettings}">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<Grid Name="MainPanel" Height="80" Width="480" DockPanel.Dock="Top" Margin="5,0,5,0">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="4*" />
|
|
<ColumnDefinition Width="6*" />
|
|
<ColumnDefinition Width="2*" />
|
|
</Grid.ColumnDefinitions>
|
|
<StackPanel Grid.Column="0">
|
|
<TextBlock Text="Variable"/>
|
|
<ComboBox ItemsSource="{Binding Path=VariableCaptions}" DisplayMemberPath="Value" SelectedValuePath="Key" SelectedValue="{Binding Path=SelectedVariable, Mode=TwoWay}"/>
|
|
<TextBlock Text="Output File" Margin="0,2,0,0"/>
|
|
<TextBox Text="{Binding Path=OutputFileName, Mode=TwoWay}"/>
|
|
</StackPanel>
|
|
<DockPanel Grid.Column="1" Margin="15,0,15,0">
|
|
<DockPanel>
|
|
<Grid DockPanel.Dock="Top">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="6*" />
|
|
<ColumnDefinition Width="5*" />
|
|
<ColumnDefinition Width="3*" />
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Grid.Column="0" HorizontalAlignment="Left" Text="Format"/>
|
|
<ToggleButton Grid.Column="1" Margin="0,0,5,0" Content="Preview" IsChecked="{Binding Path=IsPreviewingFormat}"/>
|
|
<Button Grid.Column="2" Content="Default" Click="DefaultButton_Click"/>
|
|
</Grid>
|
|
<TextBox Height="50" DockPanel.Dock="Top" Margin="0,5,0,5" Text="{Binding Path=OutputFormat, Mode=TwoWay}" AcceptsReturn="True" Visibility="{Binding Path=IsPreviewingFormat, Converter={StaticResource InvertableBooleanToVisibilityConverter}, ConverterParameter=VisibleWhenFalse, FallbackValue=Visible}"/>
|
|
<TextBlock Height="50" DockPanel.Dock="Top" Margin="0,5,0,5" Text="{Binding Path=FormatPreview}" Visibility="{Binding Path=IsPreviewingFormat, Converter={StaticResource InvertableBooleanToVisibilityConverter}, ConverterParameter=VisibleWhenTrue, FallbackValue=Collapsed}"/>
|
|
</DockPanel>
|
|
</DockPanel>
|
|
<DockPanel Grid.Column="2">
|
|
<Button Content="X" DockPanel.Dock="Top" Width="20" HorizontalAlignment="Right" Click="CloseButton_Click"/>
|
|
<ToggleButton Margin="5,5,5,5" Content="Export" DockPanel.Dock="Bottom" IsChecked="{Binding Path=IsExporting, Mode=TwoWay}"/>
|
|
</DockPanel>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
</DockPanel>
|
|
</UserControl>
|
|
|