1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <UserControl
- x:Class="ShakerApp.Views.LoadConfigView"
- 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:vm="using:ShakerApp.ViewModels"
- Width="{Binding Width}"
- Height="{Binding Height}"
- d:DesignHeight="450"
- d:DesignWidth="800"
- x:DataType="vm:LoadConfigViewModel"
- DataContext="{Binding Source={x:Static vm:LoadConfigViewModel.Instance}}"
- mc:Ignorable="d">
- <StackPanel
- Height="{StaticResource ItemHeight}"
- HorizontalAlignment="Center"
- Orientation="Horizontal">
- <TextBlock VerticalAlignment="Center" Text="{DynamicResource MenuFile}" />
- <Border
- Width="420"
- Margin="4,0,0,0"
- Background="Transparent"
- BorderThickness="1"
- CornerRadius="6"
- Cursor="Hand">
- <TextBlock
- Margin="10,4,10,4"
- VerticalAlignment="Center"
- Text="{Binding SelectedFile}" />
- <Interaction.Behaviors>
- <EventTriggerBehavior EventName="PointerReleased">
- <InvokeCommandAction Command="{Binding SelectFileCommand}" CommandParameter="MenuFile" />
- </EventTriggerBehavior>
- </Interaction.Behaviors>
- <Border.Styles>
- <Style Selector="Border">
- <Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderHighBrush}" />
- </Style>
- <Style Selector="Border:pointerover">
- <Setter Property="BorderBrush" Value="{DynamicResource ThemeAccentBrush}" />
- </Style>
- </Border.Styles>
- </Border>
- <Button
- Width="{StaticResource ItemHeight}"
- Height="{StaticResource ItemHeight}"
- Margin="4,0,0,0"
- Padding="0,8,0,8"
- Command="{Binding SelectFileCommand}"
- CommandParameter="MenuFile">
- <PathIcon Data="{StaticResource SelectFileGeometry}" />
- </Button>
- </StackPanel>
- </UserControl>
|