Commit 6ad28bc 1 parent 9ceaebb commit 6ad28bc Copy full SHA for 6ad28bc
File tree 2 files changed +64
-0
lines changed
2 files changed +64
-0
lines changed Original file line number Diff line number Diff line change @@ -91,3 +91,35 @@ The appId is the package name of the app in Android
91
91
``` csharp
92
92
AppStoreLauncher .TryOpenAsync (appId );
93
93
```
94
+
95
+ ## MediaFilePicker(Media file picker)
96
+ ` MediaFilePicker ` Allow you to select one or multiple media files
97
+ Note that it can only be used on Android and iOS.
98
+
99
+ #### Using
100
+
101
+ ``` csharp
102
+ using MauiBlazorToolkit .Essentials
103
+
104
+ #if Android || iOS
105
+ FileResult ? photoFileResult = await MediaFilePicker .Default .PickPhotoAsync ();
106
+ FileResult ? videoFileResult = await MediaFilePicker .Default .PickVideoAsync ();
107
+ IEnumerable < FileResult > ? photoFileResults = await MediaFilePicker .Default .PickMultiplePhotoAsync ();
108
+ IEnumerable < FileResult > ? videoFileResults = await MediaFilePicker .Default .PickMultipleVideoAsync ();
109
+ #endif
110
+ ```
111
+
112
+ ## AndroidFilePicker(Android file picker)
113
+ ` AndroidFilePicker ` Improvement of FilePicker in MAUI Essentials with more options for selection
114
+ Note that it can only be used in Android and may be deleted in the future
115
+
116
+ #### Using
117
+
118
+ ``` csharp
119
+ using MauiBlazorToolkit .Essentials
120
+
121
+ #if Android
122
+ FileResult ? fileResult = await AndroidFilePicker .Default .PickAsync ();
123
+ IEnumerable < FileResult > ? fileResults = await AndroidFilePicker .Default .PickMultipleAsync ();
124
+ #endif
125
+ ```
Original file line number Diff line number Diff line change 91
91
``` csharp
92
92
AppStoreLauncher .TryOpenAsync (appId );
93
93
```
94
+
95
+ ## MediaFilePicker(媒体文件选择器)
96
+ ` MediaFilePicker ` 允许你单选或多选媒体文件
97
+ 注意,只能在Android和iOS中使用。
98
+
99
+ #### 使用
100
+
101
+ ``` csharp
102
+ using MauiBlazorToolkit .Essentials
103
+
104
+ #if Android || iOS
105
+ FileResult ? photoFileResult = await MediaFilePicker .Default .PickPhotoAsync ();
106
+ FileResult ? videoFileResult = await MediaFilePicker .Default .PickVideoAsync ();
107
+ IEnumerable < FileResult > ? photoFileResults = await MediaFilePicker .Default .PickMultiplePhotoAsync ();
108
+ IEnumerable < FileResult > ? videoFileResults = await MediaFilePicker .Default .PickMultipleVideoAsync ();
109
+ #endif
110
+ ```
111
+
112
+ ## AndroidFilePicker(安卓文件选择器)
113
+ ` AndroidFilePicker ` MAUI Essentials中的FilePicker的改进,选择时有更多的选项
114
+ 注意,只能在Android中使用,并且未来可能删除
115
+
116
+ #### 使用
117
+
118
+ ``` csharp
119
+ using MauiBlazorToolkit .Essentials
120
+
121
+ #if Android
122
+ FileResult ? fileResult = await AndroidFilePicker .Default .PickAsync ();
123
+ IEnumerable < FileResult > ? fileResults = await AndroidFilePicker .Default .PickMultipleAsync ();
124
+ #endif
125
+ ```
You can’t perform that action at this time.
0 commit comments