wabbajack/Wabbajack/Views/FilePicker.xaml
2019-11-02 15:51:34 -05:00

46 lines
2.0 KiB
XML

<local:UserControlRx
x:Class="Wabbajack.FilePicker"
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:icon="http://metro.mahapps.com/winfx/xaml/iconpacks"
xmlns:local="clr-namespace:Wabbajack"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DesignHeight="35"
d:DesignWidth="400"
BorderBrush="{StaticResource DarkBackgroundBrush}"
mc:Ignorable="d">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBox
Grid.Column="0"
Margin="0,0,-4,0"
VerticalContentAlignment="Center"
Background="{StaticResource DarkBackgroundBrush}"
Text="{Binding TargetPath, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Visibility="{Binding ShowTextBoxInput, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
<icon:PackIconMaterial
Margin="0,4,4,4"
Padding="0,3"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Foreground="{StaticResource WarningBrush}"
Kind="Circle"
ToolTip="Path does not exist"
Visibility="{Binding Exists, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Converter={StaticResource bool2VisibilityConverter}, ConverterParameter=False}" />
<Button
Grid.Column="1"
Command="{Binding SetTargetPathCommand, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
ToolTip="Set target path">
<icon:PackIconMaterial
Width="16"
Height="12"
Margin="4"
Kind="DotsHorizontal" />
</Button>
</Grid>
</local:UserControlRx>