You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/articles/features/ui-controls-filepicker.md
+88Lines changed: 88 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,3 +5,91 @@ title: Using the FilePicker control | MADE.NET
5
5
6
6
# Using the FilePicker control
7
7
8
+
The `MADE.UI.Controls.FilePicker` element is a custom-built UI element that works with [Uno's supported platforms](https://platform.uno/) that provides a file selection user experience.
9
+
10
+
The control works in a similar way to the `<input type="file" />` element in web applications.
11
+
12
+
Shown below is the visuals for the control in its default state, in a multiple selection mode.
13
+
14
+
<imgsrc="../../images/FilePicker.png"alt="FilePicker with chosen files" />
The control exposes the selected files through the `Files` list property.
47
+
48
+
The type of objects contained in this collection will be `FilePickerItem` which contains the details for the file including:
49
+
50
+
- The file as a `StorageFile`
51
+
- The thumbnail as a `BitmapImage`
52
+
- The file name including the extension
53
+
- The display name
54
+
- The file type
55
+
- The file path
56
+
57
+
## Customizing the FilePicker
58
+
59
+
The control has many customization properties that are exposed to tailor the experience for your application.
60
+
61
+
### HeaderTemplate
62
+
63
+
The `Header` can be customized to include custom UI elements as well as a string resource.
64
+
65
+
The `HeaderTemplate` is also available to provide a `DataTemplate` for you to define the rendered UI for the `Header`.
66
+
67
+
### ChooseFileButtonContent and ChooseFileButtonContentTemplate
68
+
69
+
The `ChooseFileButtonContent` can be used to set the UI elements or string resource displayed on the button.
70
+
71
+
The rendered UI elements for the button content in the control can also be customized with the `ChooseFileButtonContentTemplate`.
72
+
73
+
### SelectionMode
74
+
75
+
The `FilePicker` has two selection modes, `Single` and `Multiple`.
76
+
77
+
By default, the control works in a `Single` selection mode.
78
+
79
+
### FileTypes
80
+
81
+
When the user selects the button to choose files, you can customize what files can be selected using a list of file extensions with the `FileTypes` property.
82
+
83
+
By default, the control will allow any file to be selected using the `*` selector.
84
+
85
+
### AppendFiles
86
+
87
+
If multiple selection is enabled, the `AppendFiles` boolean flag will allow your user to append additional files to the existing selections if they choose to add more files.
88
+
89
+
By default, this is `false` which will overwrite the files chosen on subsequent additions.
90
+
91
+
### ItemsViewStyle
92
+
93
+
The `ItemsViewStyle` controls the styling applied to the view which displays the selected items.
94
+
95
+
The default user experience styling is shown at the top of this article.
0 commit comments