LoadConfigView.axaml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <UserControl
  2. x:Class="ShakerApp.Views.LoadConfigView"
  3. xmlns="https://github.com/avaloniaui"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. xmlns:vm="using:ShakerApp.ViewModels"
  8. Width="{Binding Width}"
  9. Height="{Binding Height}"
  10. d:DesignHeight="450"
  11. d:DesignWidth="800"
  12. x:DataType="vm:LoadConfigViewModel"
  13. DataContext="{Binding Source={x:Static vm:LoadConfigViewModel.Instance}}"
  14. mc:Ignorable="d">
  15. <StackPanel
  16. Height="{StaticResource ItemHeight}"
  17. HorizontalAlignment="Center"
  18. Orientation="Horizontal">
  19. <TextBlock VerticalAlignment="Center" Text="{DynamicResource MenuFile}" />
  20. <Border
  21. Width="420"
  22. Margin="4,0,0,0"
  23. Background="Transparent"
  24. BorderThickness="1"
  25. CornerRadius="6"
  26. Cursor="Hand">
  27. <TextBlock
  28. Margin="10,4,10,4"
  29. VerticalAlignment="Center"
  30. Text="{Binding SelectedFile}" />
  31. <Interaction.Behaviors>
  32. <EventTriggerBehavior EventName="PointerReleased">
  33. <InvokeCommandAction Command="{Binding SelectFileCommand}" CommandParameter="MenuFile" />
  34. </EventTriggerBehavior>
  35. </Interaction.Behaviors>
  36. <Border.Styles>
  37. <Style Selector="Border">
  38. <Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderHighBrush}" />
  39. </Style>
  40. <Style Selector="Border:pointerover">
  41. <Setter Property="BorderBrush" Value="{DynamicResource ThemeAccentBrush}" />
  42. </Style>
  43. </Border.Styles>
  44. </Border>
  45. <Button
  46. Width="{StaticResource ItemHeight}"
  47. Height="{StaticResource ItemHeight}"
  48. Margin="4,0,0,0"
  49. Padding="0,8,0,8"
  50. Command="{Binding SelectFileCommand}"
  51. CommandParameter="MenuFile">
  52. <PathIcon Data="{StaticResource SelectFileGeometry}" />
  53. </Button>
  54. </StackPanel>
  55. </UserControl>