wabbajack/Wabbajack.App/Controls/FileSelectionBox.axaml
2021-09-27 06:42:46 -06:00

42 lines
2.1 KiB
XML

<UserControl xmlns="https://github.com/avaloniaui"
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:i="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Wabbajack.App.Controls.FileSelectionBox">
<UserControl.Styles>
<Style Selector="Button:not(:pointerover) /template/ ContentPresenter">
<Setter Property="Background" Value="Transparent"></Setter>
<Setter Property="BorderBrush" Value="LightGray"></Setter>
<Setter Property="CornerRadius" Value="0, 5, 5, 0"></Setter>
</Style>
<Style Selector="Button:pointerover /template/ ContentPresenter">
<Setter Property="Background" Value="Transparent"></Setter>
<Setter Property="BorderBrush" Value="LightGray"></Setter>
<Setter Property="CornerRadius" Value="0, 5, 5, 0"></Setter>
</Style>
<Style Selector="TextBox:not(:focus) /template/ ContentPresenter">
<Setter Property="Background" Value="Transparent"></Setter>
<Setter Property="BorderBrush" Value="LightGray"></Setter>
<Setter Property="CornerRadius" Value="5, 0, 0, 5"></Setter>
</Style>
<Style Selector="TextBox:focus /template/ ContentPresenter">
<Setter Property="Background" Value="Transparent"></Setter>
<Setter Property="BorderBrush" Value="LightGray"></Setter>
<Setter Property="CornerRadius" Value="5, 0, 0, 5"></Setter>
</Style>
</UserControl.Styles>
<Grid ColumnDefinitions="*, 30" Height="30">
<TextBox Grid.Column="0" Name="Path" Height="30" x:Name="TextBox" IsEnabled="False"></TextBox>
<Button Grid.Column="1" Name="SelectButton" Height="30">
<i:MaterialIcon Kind="Search"></i:MaterialIcon>
</Button>
</Grid>
</UserControl>