Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <Window
- x:Class="SnapBoxProject.Controls.FolderPathWindow"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:SnapBoxProject.Controls"
- xmlns:helper="clr-namespace:SnapBoxProject.Helper"
- xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- Title="ChooseNewPath"
- Width="800"
- Height="450"
- ResizeMode="NoResize"
- WindowStartupLocation="CenterOwner"
- WindowStyle="None"
- Loaded="Window_Loaded"
- mc:Ignorable="d">
- <Window.Resources>
- <helper:TypeToIconColor x:Key="typeToIconColor"/>
- <helper:TypeToIcon x:Key="typeToIconType"/>
- <Storyboard x:Key="OpenWindow">
- <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)">
- <EasingDoubleKeyFrame KeyTime="0" Value="0" />
- <EasingDoubleKeyFrame KeyTime="0:0:0.25" Value="1" />
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- </Window.Resources>
- <Border
- x:Name="mainBorderWindow"
- Background="GhostWhite"
- BorderBrush="Silver"
- BorderThickness="1"
- CornerRadius="4,4,4,4">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="60" />
- <RowDefinition Height="35" />
- <RowDefinition Height="*" />
- <RowDefinition Height="30" />
- <RowDefinition Height="60" />
- </Grid.RowDefinitions>
- <Label
- x:Name="lblField"
- Margin="10,10,0,0"
- HorizontalAlignment="Left"
- Content="Please choose the path"
- DockPanel.Dock="Top"
- FontSize="20" />
- <Grid Grid.Row="1" Margin="12,0,0,0">
- <Button
- Name="HomeButton"
- Grid.RowSpan="2"
- Width="75"
- Padding="0"
- Foreground="White"
- HorizontalAlignment="Left"
- Click="HomeButton_Click"
- FontSize="18">
- <StackPanel Orientation="Horizontal">
- <materialDesign:PackIcon
- Width="20"
- Height="20"
- VerticalAlignment="Center"
- Kind="Home" />
- <TextBlock Text="Home" />
- </StackPanel>
- </Button>
- </Grid>
- <Grid Grid.Row="3" Margin="12,0,10,0">
- <TextBox
- x:Name="PathChoosed"
- HorizontalAlignment="Left"
- IsReadOnly="True"
- Text="" />
- </Grid>
- <Grid Grid.Row="4">
- <Button
- Width="75"
- Margin="0,0,10,10"
- HorizontalAlignment="Right"
- VerticalAlignment="Bottom"
- Background="#FFFF3535"
- BorderBrush="Transparent"
- Click="Cancel_Click"
- Content="Cancel" />
- <Button
- Width="90"
- Margin="0,0,110,10"
- HorizontalAlignment="Right"
- VerticalAlignment="Bottom"
- Background="{StaticResource DefaultColor}"
- BorderBrush="{StaticResource DefaultColor}"
- Click="Save_Click"
- Content="Choose" />
- </Grid>
- <Grid Grid.Row="2" Margin="12">
- <DataGrid
- Name="DataGridFolders"
- Margin="0,0,0,0"
- materialDesign:DataGridAssist.CellPadding="13 8 8 8"
- materialDesign:DataGridAssist.ColumnHeaderPadding="8"
- AutoGenerateColumns="False"
- Background="Transparent"
- CanUserAddRows="False"
- CanUserSortColumns="True"
- HeadersVisibility="None"
- ItemsSource="{Binding files}"
- MouseDoubleClick="DataGridFolders_MouseDoubleClick"
- SelectionChanged="DataGridFolders_SelectionChanged"
- >
- <!--<DataGrid.CellStyle>
- <Style TargetType="DataGridCell">
- <Style.Triggers>
- <Trigger Property="IsSelected" Value="True">
- <Setter Property="BorderThickness" Value="0" />
- </Trigger>
- </Style.Triggers>
- </Style>
- </DataGrid.CellStyle>-->
- <DataGrid.Columns>
- <DataGridTemplateColumn Width="SizeToCells" IsReadOnly="True">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <materialDesign:PackIcon Foreground="{Binding Type,Converter={StaticResource typeToIconColor}}" Kind="{Binding Type,Converter={StaticResource typeToIconType}}" />
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTextColumn
- Width="*"
- Binding="{Binding Name}"
- EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnEditingStyle}"
- IsReadOnly="True" />
- </DataGrid.Columns>
- </DataGrid>
- </Grid>
- </Grid>
- </Border>
- </Window>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement