Advertisement
Guest User

Untitled

a guest
Dec 7th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.03 KB | None | 0 0
  1. <Window
  2. x:Class="SnapBoxProject.Controls.FolderPathWindow"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:SnapBoxProject.Controls"
  7. xmlns:helper="clr-namespace:SnapBoxProject.Helper"
  8. xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
  9. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  10. Title="ChooseNewPath"
  11. Width="800"
  12. Height="450"
  13. ResizeMode="NoResize"
  14. WindowStartupLocation="CenterOwner"
  15. WindowStyle="None"
  16. Loaded="Window_Loaded"
  17. mc:Ignorable="d">
  18. <Window.Resources>
  19. <helper:TypeToIconColor x:Key="typeToIconColor"/>
  20. <helper:TypeToIcon x:Key="typeToIconType"/>
  21. <Storyboard x:Key="OpenWindow">
  22. <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)">
  23. <EasingDoubleKeyFrame KeyTime="0" Value="0" />
  24. <EasingDoubleKeyFrame KeyTime="0:0:0.25" Value="1" />
  25. </DoubleAnimationUsingKeyFrames>
  26. </Storyboard>
  27. </Window.Resources>
  28. <Border
  29. x:Name="mainBorderWindow"
  30. Background="GhostWhite"
  31. BorderBrush="Silver"
  32. BorderThickness="1"
  33. CornerRadius="4,4,4,4">
  34. <Grid>
  35. <Grid.RowDefinitions>
  36. <RowDefinition Height="60" />
  37. <RowDefinition Height="35" />
  38. <RowDefinition Height="*" />
  39. <RowDefinition Height="30" />
  40. <RowDefinition Height="60" />
  41. </Grid.RowDefinitions>
  42. <Label
  43. x:Name="lblField"
  44. Margin="10,10,0,0"
  45. HorizontalAlignment="Left"
  46. Content="Please choose the path"
  47. DockPanel.Dock="Top"
  48. FontSize="20" />
  49. <Grid Grid.Row="1" Margin="12,0,0,0">
  50. <Button
  51. Name="HomeButton"
  52. Grid.RowSpan="2"
  53. Width="75"
  54. Padding="0"
  55. Foreground="White"
  56. HorizontalAlignment="Left"
  57. Click="HomeButton_Click"
  58. FontSize="18">
  59. <StackPanel Orientation="Horizontal">
  60. <materialDesign:PackIcon
  61. Width="20"
  62. Height="20"
  63. VerticalAlignment="Center"
  64. Kind="Home" />
  65. <TextBlock Text="Home" />
  66. </StackPanel>
  67.  
  68. </Button>
  69. </Grid>
  70. <Grid Grid.Row="3" Margin="12,0,10,0">
  71. <TextBox
  72. x:Name="PathChoosed"
  73. HorizontalAlignment="Left"
  74. IsReadOnly="True"
  75. Text="" />
  76. </Grid>
  77. <Grid Grid.Row="4">
  78. <Button
  79. Width="75"
  80. Margin="0,0,10,10"
  81. HorizontalAlignment="Right"
  82. VerticalAlignment="Bottom"
  83. Background="#FFFF3535"
  84. BorderBrush="Transparent"
  85. Click="Cancel_Click"
  86. Content="Cancel" />
  87. <Button
  88. Width="90"
  89. Margin="0,0,110,10"
  90. HorizontalAlignment="Right"
  91. VerticalAlignment="Bottom"
  92. Background="{StaticResource DefaultColor}"
  93. BorderBrush="{StaticResource DefaultColor}"
  94. Click="Save_Click"
  95. Content="Choose" />
  96. </Grid>
  97. <Grid Grid.Row="2" Margin="12">
  98. <DataGrid
  99. Name="DataGridFolders"
  100. Margin="0,0,0,0"
  101. materialDesign:DataGridAssist.CellPadding="13 8 8 8"
  102. materialDesign:DataGridAssist.ColumnHeaderPadding="8"
  103. AutoGenerateColumns="False"
  104. Background="Transparent"
  105. CanUserAddRows="False"
  106. CanUserSortColumns="True"
  107. HeadersVisibility="None"
  108. ItemsSource="{Binding files}"
  109. MouseDoubleClick="DataGridFolders_MouseDoubleClick"
  110. SelectionChanged="DataGridFolders_SelectionChanged"
  111. >
  112. <!--<DataGrid.CellStyle>
  113. <Style TargetType="DataGridCell">
  114. <Style.Triggers>
  115. <Trigger Property="IsSelected" Value="True">
  116. <Setter Property="BorderThickness" Value="0" />
  117. </Trigger>
  118. </Style.Triggers>
  119. </Style>
  120. </DataGrid.CellStyle>-->
  121. <DataGrid.Columns>
  122. <DataGridTemplateColumn Width="SizeToCells" IsReadOnly="True">
  123. <DataGridTemplateColumn.CellTemplate>
  124. <DataTemplate>
  125. <materialDesign:PackIcon Foreground="{Binding Type,Converter={StaticResource typeToIconColor}}" Kind="{Binding Type,Converter={StaticResource typeToIconType}}" />
  126. </DataTemplate>
  127. </DataGridTemplateColumn.CellTemplate>
  128. </DataGridTemplateColumn>
  129. <DataGridTextColumn
  130. Width="*"
  131. Binding="{Binding Name}"
  132. EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnEditingStyle}"
  133. IsReadOnly="True" />
  134. </DataGrid.Columns>
  135. </DataGrid>
  136. </Grid>
  137. </Grid>
  138. </Border>
  139. </Window>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement