Skip to content

Commit d0f604e

Browse files
committed
feat: WIP on FilePicker, DirectoryPicker, LabelFilePicker, LabelDirectoryPicker
1 parent 4d92b2c commit d0f604e

22 files changed

+578
-3
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<UserControl
2+
x:Class="Atc.Wpf.Sample.SamplesWpfControls.BaseControls.DirectoryPickerView"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:atc="https://github.com/atc-net/atc-wpf/tree/main/schemas"
6+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
7+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
8+
d:DesignHeight="450"
9+
d:DesignWidth="800"
10+
mc:Ignorable="d">
11+
12+
<atc:AutoGrid Columns="*" Rows="Auto,*">
13+
14+
<GroupBox
15+
Margin="0,0,0,10"
16+
Padding="10"
17+
Header="Features" />
18+
19+
<GroupBox Header="Usage">
20+
<ScrollViewer>
21+
<atc:GridEx Columns="*,*" ShowGridLines="True">
22+
<StackPanel Grid.Column="0" Margin="10">
23+
24+
<atc:DirectoryPicker />
25+
26+
</StackPanel>
27+
<StackPanel Grid.Column="1" Margin="10">
28+
29+
<atc:DirectoryPicker />
30+
31+
</StackPanel>
32+
</atc:GridEx>
33+
</ScrollViewer>
34+
</GroupBox>
35+
</atc:AutoGrid>
36+
37+
</UserControl>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
namespace Atc.Wpf.Sample.SamplesWpfControls.BaseControls;
2+
3+
/// <summary>
4+
/// Interaction logic for DirectoryPickerView.
5+
/// </summary>
6+
public partial class DirectoryPickerView
7+
{
8+
public DirectoryPickerView()
9+
{
10+
InitializeComponent();
11+
}
12+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<UserControl
2+
x:Class="Atc.Wpf.Sample.SamplesWpfControls.BaseControls.FilePickerView"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:atc="https://github.com/atc-net/atc-wpf/tree/main/schemas"
6+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
7+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
8+
d:DesignHeight="450"
9+
d:DesignWidth="800"
10+
mc:Ignorable="d">
11+
12+
<atc:AutoGrid Columns="*" Rows="Auto,*">
13+
14+
<GroupBox
15+
Margin="0,0,0,10"
16+
Padding="10"
17+
Header="Features" />
18+
19+
<GroupBox Header="Usage">
20+
<ScrollViewer>
21+
<atc:GridEx Columns="*,*" ShowGridLines="True">
22+
<StackPanel Grid.Column="0" Margin="10">
23+
24+
<atc:FilePicker />
25+
26+
</StackPanel>
27+
<StackPanel Grid.Column="1" Margin="10">
28+
29+
<atc:FilePicker />
30+
31+
</StackPanel>
32+
</atc:GridEx>
33+
</ScrollViewer>
34+
</GroupBox>
35+
</atc:AutoGrid>
36+
37+
</UserControl>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
namespace Atc.Wpf.Sample.SamplesWpfControls.BaseControls;
2+
3+
/// <summary>
4+
/// Interaction logic for FilePickerView.
5+
/// </summary>
6+
public partial class FilePickerView
7+
{
8+
public FilePickerView()
9+
{
10+
InitializeComponent();
11+
}
12+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<UserControl
2+
x:Class="Atc.Wpf.Sample.SamplesWpfControls.LabelControls.LabelDirectoryPickerView"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:atc="https://github.com/atc-net/atc-wpf/tree/main/schemas"
6+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
7+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
8+
d:DesignHeight="450"
9+
d:DesignWidth="800"
10+
mc:Ignorable="d">
11+
12+
<atc:AutoGrid Columns="*" Rows="Auto,*">
13+
14+
<GroupBox
15+
Margin="0,0,0,10"
16+
Padding="10"
17+
Header="Features" />
18+
19+
<GroupBox Header="Usage">
20+
<ScrollViewer>
21+
<atc:GridEx Columns="*,*" ShowGridLines="True">
22+
<StackPanel Grid.Column="0" Margin="10">
23+
24+
<atc:LabelDirectoryPicker LabelText="MyLabel1" Orientation="Horizontal" />
25+
26+
</StackPanel>
27+
<StackPanel Grid.Column="1" Margin="10">
28+
29+
<atc:LabelDirectoryPicker LabelText="MyLabel3" Orientation="Vertical" />
30+
31+
</StackPanel>
32+
</atc:GridEx>
33+
</ScrollViewer>
34+
</GroupBox>
35+
</atc:AutoGrid>
36+
37+
</UserControl>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
namespace Atc.Wpf.Sample.SamplesWpfControls.LabelControls;
2+
3+
/// <summary>
4+
/// Interaction logic for LabelDirectoryPickerView.
5+
/// </summary>
6+
public partial class LabelDirectoryPickerView
7+
{
8+
public LabelDirectoryPickerView()
9+
{
10+
InitializeComponent();
11+
}
12+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<UserControl
2+
x:Class="Atc.Wpf.Sample.SamplesWpfControls.LabelControls.LabelFilePickerView"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:atc="https://github.com/atc-net/atc-wpf/tree/main/schemas"
6+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
7+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
8+
d:DesignHeight="450"
9+
d:DesignWidth="800"
10+
mc:Ignorable="d">
11+
12+
<atc:AutoGrid Columns="*" Rows="Auto,*">
13+
14+
<GroupBox
15+
Margin="0,0,0,10"
16+
Padding="10"
17+
Header="Features" />
18+
19+
<GroupBox Header="Usage">
20+
<ScrollViewer>
21+
<atc:GridEx Columns="*,*" ShowGridLines="True">
22+
<StackPanel Grid.Column="0" Margin="10">
23+
24+
<atc:LabelFilePicker LabelText="MyLabel1" Orientation="Horizontal" />
25+
26+
</StackPanel>
27+
<StackPanel Grid.Column="1" Margin="10">
28+
29+
<atc:LabelFilePicker LabelText="MyLabel3" Orientation="Vertical" />
30+
31+
</StackPanel>
32+
</atc:GridEx>
33+
</ScrollViewer>
34+
</GroupBox>
35+
</atc:AutoGrid>
36+
37+
</UserControl>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
namespace Atc.Wpf.Sample.SamplesWpfControls.LabelControls;
2+
3+
/// <summary>
4+
/// Interaction logic for LabelFilePickerView.
5+
/// </summary>
6+
public partial class LabelFilePickerView
7+
{
8+
public LabelFilePickerView()
9+
{
10+
InitializeComponent();
11+
}
12+
}

sample/Atc.Wpf.Sample/SamplesWpfControlsTreeView.xaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@
4848
Header="ToggleSwitch"
4949
IsExpanded="True"
5050
SamplePath="BaseControls.ToggleSwitchView" />
51+
<atc:SampleTreeViewItem
52+
Header="DirectoryPicker"
53+
IsExpanded="True"
54+
SamplePath="BaseControls.DirectoryPickerView" />
55+
<atc:SampleTreeViewItem
56+
Header="FilePicker"
57+
IsExpanded="True"
58+
SamplePath="BaseControls.FilePickerView" />
5159
</TreeViewItem>
5260

5361
<TreeViewItem Header="Label Controls" IsExpanded="True">
@@ -90,6 +98,14 @@
9098
Header="LabelTimePicker"
9199
IsExpanded="True"
92100
SamplePath="LabelControls.LabelTimePickerView" />
101+
<atc:SampleTreeViewItem
102+
Header="LabelDirectoryPicker"
103+
IsExpanded="True"
104+
SamplePath="LabelControls.LabelDirectoryPickerView" />
105+
<atc:SampleTreeViewItem
106+
Header="LabelFilePicker"
107+
IsExpanded="True"
108+
SamplePath="LabelControls.LabelFilePickerView" />
93109
</TreeViewItem>
94110
<atc:SampleTreeViewItem
95111
Header="LabelCheckBox"

src/Atc.Wpf.Controls/Atc.Wpf.Controls.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
<ItemGroup>
1313
<None Remove="Resources\collapse.svg" />
1414
<None Remove="Resources\expand.svg" />
15+
<None Remove="Resources\Icons\file.svg" />
16+
<None Remove="Resources\Icons\folder.svg" />
1517
<None Remove="Resources\information.svg" />
1618
<None Remove="Resources\LogCategoryIcons\error.svg" />
1719
<None Remove="Resources\LogCategoryIcons\warning.svg" />
@@ -31,6 +33,8 @@
3133
<ItemGroup>
3234
<Resource Include="Resources\Icons\collapse.svg" />
3335
<Resource Include="Resources\Icons\expand.svg" />
36+
<Resource Include="Resources\Icons\file.svg" />
37+
<Resource Include="Resources\Icons\folder.svg" />
3438
<Resource Include="Resources\LogCategoryIcons\information.svg" />
3539
<Resource Include="Resources\Icons\info_help.svg" />
3640
<Resource Include="Resources\Icons\question-mark.svg" />
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<UserControl
2+
x:Class="Atc.Wpf.Controls.BaseControls.DirectoryPicker"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:atc="https://github.com/atc-net/atc-wpf/tree/main/schemas"
6+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
7+
xmlns:local="clr-namespace:Atc.Wpf.Controls.BaseControls"
8+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
9+
d:DataContext="{d:DesignInstance Type=local:DirectoryPicker}"
10+
mc:Ignorable="d">
11+
12+
<atc:GridEx Columns="*,10,Auto">
13+
<TextBox
14+
Grid.Column="0"
15+
atc:TextBoxHelper.ClearTextButton="True"
16+
Text="{Binding Path=DisplayValue}" />
17+
<Button
18+
Grid.Column="2"
19+
Padding="4,6,4,2"
20+
Click="OnClick">
21+
<atc:SvgImage
22+
Width="16"
23+
Height="16"
24+
ControlSizeType="ContentToSizeNoStretch"
25+
Source="/Atc.Wpf.Controls;component/Resources/Icons/folder.svg" />
26+
</Button>
27+
</atc:GridEx>
28+
29+
</UserControl>

0 commit comments

Comments
 (0)