DataDirectoryView.axaml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <UserControl
  2. x:Class="ShakerApp.Views.DataDirectoryView"
  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:suki="https://github.com/kikipoulet/SukiUI"
  8. xmlns:vm="using:ShakerApp.ViewModels"
  9. d:DesignHeight="450"
  10. d:DesignWidth="800"
  11. x:DataType="vm:ShakerSettingViewModel"
  12. Background="Transparent"
  13. DataContext="{Binding Source={x:Static vm:ShakerSettingViewModel.Instance}}">
  14. <StackPanel
  15. Height="{StaticResource ItemHeight}"
  16. Margin="10,10,0,0"
  17. VerticalAlignment="Top"
  18. Orientation="Horizontal">
  19. <TextBlock VerticalAlignment="Center">
  20. <Run Text="{DynamicResource DataDirectory}" />
  21. <Run Text=":" />
  22. </TextBlock>
  23. <Border
  24. Width="420"
  25. Margin="4,0,0,0"
  26. Background="Transparent"
  27. BorderThickness="1"
  28. CornerRadius="6"
  29. Cursor="Hand">
  30. <TextBlock
  31. Margin="10,4,10,4"
  32. VerticalAlignment="Center"
  33. Text="{Binding DataDirectory}" />
  34. <Interaction.Behaviors>
  35. <EventTriggerBehavior EventName="PointerReleased">
  36. <InvokeCommandAction Command="{Binding SelectDirectoryCommand}" CommandParameter="DataDirectory" />
  37. </EventTriggerBehavior>
  38. </Interaction.Behaviors>
  39. <Border.Styles>
  40. <Style Selector="Border">
  41. <Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderHighBrush}" />
  42. </Style>
  43. <Style Selector="Border:pointerover">
  44. <Setter Property="BorderBrush" Value="{DynamicResource ThemeAccentBrush}" />
  45. </Style>
  46. </Border.Styles>
  47. </Border>
  48. <Button
  49. Width="{StaticResource ItemHeight}"
  50. Height="{StaticResource ItemHeight}"
  51. Margin="4,0,0,0"
  52. Padding="0,8,0,8"
  53. Command="{Binding SelectDirectoryCommand}"
  54. CommandParameter="DataDirectory">
  55. <PathIcon Data="{StaticResource DataDirectoryGeometry}" />
  56. </Button>
  57. </StackPanel>
  58. </UserControl>