uwp file open picker
C#
// Create the picker object and set options
var openPicker = new Windows.Storage.Pickers.FileOpenPicker();
openPicker.viewMode = Windows.Storage.Pickers.PickerViewMode.thumbnail;
openPicker.suggestedStartLocation = Windows.Storage.Pickers.PickerLocationId.picturesLibrary;
// Users expect to have a filtered view of their folders depending on the scenario.
// For example, when choosing a documents folder, restrict the filetypes to documents for your application.
openPicker.fileTypeFilter.replaceAll([".png", ".jpg", ".jpeg"]);
// Open the picker for the user to pick a file
openPicker.pickSingleFileAsync().then(function (file) {
if (file) {
// Application now has read/write access to the picked file
WinJS.log && WinJS.log("Picked photo: " + file.name, "sample", "status");
} else {
// The picker was dismissed with no selected file
WinJS.log && WinJS.log("Operation cancelled.", "sample", "status");
}
});FileOpenPicker openPicker = new FileOpenPicker();
openPicker.ViewMode = PickerViewMode.Thumbnail;
openPicker.SuggestedStartLocation = PickerLocationId.PicturesLibrary;
openPicker.FileTypeFilter.Add(".jpg");
openPicker.FileTypeFilter.Add(".jpeg");
openPicker.FileTypeFilter.Add(".png");
StorageFile file = await openPicker.PickSingleFileAsync();
if (file != null)
{
// Application now has read/write access to the picked file
OutputTextBlock.Text = "Picked photo: " + file.Name;
}
else
{
OutputTextBlock.Text = "Operation cancelled.";
}
Also in C#:
- Title
- c sharp int to string
- Category
- C#
- Title
- c# create dynamic object
- Category
- C#
- Title
- c sharp list indexer
- Category
- C#
- Title
- .net core download image from url binary file
- Category
- C#
- Title
- how to do a messagebox in c#
- Category
- C#
- Title
- chase object unity
- Category
- C#
- Title
- create line in unity
- Category
- C#
- Title
- debug.log
- Category
- C#
- Title
- unity how to change rotation
- Category
- C#
- Title
- c# check if string is all numbers
- Category
- C#
- Title
- winforms timer c#
- Category
- C#
- Title
- find gameobject with tag
- Category
- C#
- Title
- how to make % posibility to spawn an object C# in unity
- Category
- C#
- Title
- set object to random color unity
- Category
- C#
- Title
- block wapalyzer from detecting codeigniter
- Category
- C#
- Title
- unity main texture not working
- Category
- C#
- Title
- how do I attach a player with a navMeshAgent
- Category
- C#
- Title
- unity connect to firebase
- Category
- C#
- Title
- ihttpactionresult to object c#
- Category
- C#
- Title
- convert string to boolean c#
- Category
- C#
- Title
- html hidden text
- Category
- C#
- Title
- decimal to string whole number c#
- Category
- C#
- Title
- json serialize object capitalization config
- Category
- C#
- Title
- unity array of child objects
- Category
- C#
- Title
- how to get length of okobjectresult c#
- Category
- C#
- Title
- vb.net tostring numeric format string
- Category
- C#
- Title
- C# function return datareader
- Category
- C#
- Title
- unity timer with miliseconds
- Category
- C#
- Title
- unity key detection
- Category
- C#
- Title
- linq foreach c#
- Category
- C#
- Title
- c# join array
- Category
- C#
- Title
- unity up arrow input
- Category
- C#
- Title
- check distance to gameobject
- Category
- C#
- Title
- how to compare datetime in c#
- Category
- C#
- Title
- Unity3d GPS code
- Category
- C#
- Title
- replace double backslash with single backslash c#
- Category
- C#
- Title
- c# groupby date
- Category
- C#
- Title
- c# expression func automatically select return type
- Category
- C#
- Title
- make a list c#
- Category
- C#
- Title
- c# loop string array
- Category
- C#
- Title
- set int to null c#
- Category
- C#
- Title
- c# dictionaries
- Category
- C#
- Title
- how to get array of children transform
- Category
- C#
- Title
- c# stop loop in method
- Category
- C#
- Title
- how to declare a string c#
- Category
- C#
- Title
- instantiate object in circle
- Category
- C#
- Title
- c# loop through list
- Category
- C#
- Title
- unix time c#
- Category
- C#
- Title
- c# print expression tree
- Category
- C#
- Title
- c# listview
- Category
- C#
- Title
- How to execute script in C#
- Category
- C#
- Title
- how to deactivate objects through scripts in unity
- Category
- C#
- Title
- how to insert <input> datatype <td> in asp.net core table
- Category
- C#
- Title
- c# query string builder
- Category
- C#
- Title
- sort c#
- Category
- C#
- Title
- Request.ServerVariables["HTTP_X_FORWARDED_FOR"] get only one ipaddress
- Category
- C#
- Title
- response redirect new tab
- Category
- C#
- Title
- asp net identity include phone number when registering
- Category
- C#
- Title
- unity docs player input
- Category
- C#
- Title
- interpolate rotation unity3d
- Category
- C#
- Title
- c# type of generic is string
- Category
- C#
- Title
- unity how to get y value
- Category
- C#
- Title
- bash if null or empty
- Category
- C#
- Title
- c# making a folder
- Category
- C#
- Title
- How to make a function in C#
- Category
- C#
- Title
- c# public static string
- Category
- C#
- Title
- bold caption latex
- Category
- C#
- Title
- mongodb c# batch find
- Category
- C#
- Title
- how to trigger event when a com device is connected in c#
- Category
- C#
- Title
- unity cycle children
- Category
- C#
- Title
- how to locate a specific element in a list c#
- Category
- C#
- Title
- how to populate listbox using list<t> c#
- Category
- C#
- Title
- c# empty IEnumerable
- Category
- C#
- Title
- webclient c# example post
- Category
- C#
- Title
- c# shorten an definition
- Category
- C#
- Title
- c# double value with 2 decimal places
- Category
- C#
- Title
- c# get date without time
- Category
- C#
- Title
- external font family uwp c#
- Category
- C#
- Title
- httpcontext in .net standard
- Category
- C#
- Title
- check if two timespans intersect c#
- Category
- C#
- Title
- HashSet C# append
- Category
- C#
- Title
- unity movetowards 2d
- Category
- C#
- Title
- roulette algorithm genetic algorithm
- Category
- C#
- Title
- unity custom update
- Category
- C#
- Title
- query associative table ef6
- Category
- C#
- Title
- trello
- Category
- C#
- Title
- c# long to int
- Category
- C#
- Title
- c# contextswitchdeadlock
- Category
- C#
- Title
- c# how to open file explorer
- Category
- C#
- Title
- Unity C# instantiate prefab
- Category
- C#
- Title
- how to parse a string to an integer c#
- Category
- C#
- Title
- how to disable a gameObject unity c#
- Category
- C#
- Title
- no entity framework provider found for the ado.net provider with invariant name
- Category
- C#
- Title
- unity get decimal part of float
- Category
- C#
- Title
- create object in c#
- Category
- C#
- Title
- console.writeline
- Category
- C#
- Title
- unity fps counter
- Category
- C#
- Title
- unity set list of strings
- Category
- C#
- Title
- c# enum.getvalues
- Category
- C#
- Title
- create expression func c# for use in where clause
- Category
- C#