uwp

Access is denied despite using broadFileSystemAccess

别来无恙 提交于 2021-01-22 05:18:45
问题 UWP is killing me..... I had to reinstall VisualStudio2017 after a computer crash. And now, my app that was working perfectly well before the crash refuses to work. I've been using the broadFileSystemAccess capability in the Package Manifest, as per the instructions in the MS documentation: xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" IgnorableNamespaces="rescap uap mp desktop4 iot2"> and <Capabilities> <rescap:Capability Name=

UWP . Copy file from FileOpenPicker to localstorage

那年仲夏 提交于 2021-01-21 09:53:15
问题 FileOpenPicker picker = new FileOpenPicker(); picker.ViewMode = PickerViewMode.Thumbnail; picker.SuggestedStartLocation = PickerLocationId.ComputerFolder; picker.FileTypeFilter.Add(".txt"); A user chooses a file to open. How can I store/copy/save that file to localstorage for future use, so every time the app opens, it picks automatically that file? 回答1: After the user opens the file using the FileOpenPicker you can "cache" access to it using StorageApplicationPermissions API. Once you have

UWP . Copy file from FileOpenPicker to localstorage

心不动则不痛 提交于 2021-01-21 09:51:10
问题 FileOpenPicker picker = new FileOpenPicker(); picker.ViewMode = PickerViewMode.Thumbnail; picker.SuggestedStartLocation = PickerLocationId.ComputerFolder; picker.FileTypeFilter.Add(".txt"); A user chooses a file to open. How can I store/copy/save that file to localstorage for future use, so every time the app opens, it picks automatically that file? 回答1: After the user opens the file using the FileOpenPicker you can "cache" access to it using StorageApplicationPermissions API. Once you have

UWP: how to get the RightTapped GridView Item

邮差的信 提交于 2021-01-08 02:47:53
问题 I have a GridView like below <GridView SelectionMode="None" IsItemClickEnabled="True" IsRightTapEnabled="True" ItemsSource="{x:Bind SymbolItems}" ItemClick="SymbolGridView_ItemClick" RightTapped="SymbolGridView_RightTapped"> <GridView.ItemTemplate> <DataTemplate x:DataType="data:SoundSymbolItem"> <local:SymbolControl/> </DataTemplate> </GridView.ItemTemplate> </GridView> I have a ItemClick handler and I can get the clicked symbolItem successfully private void SymbolGridView_ItemClick(object

UWP: how to get the RightTapped GridView Item

旧城冷巷雨未停 提交于 2021-01-08 02:44:40
问题 I have a GridView like below <GridView SelectionMode="None" IsItemClickEnabled="True" IsRightTapEnabled="True" ItemsSource="{x:Bind SymbolItems}" ItemClick="SymbolGridView_ItemClick" RightTapped="SymbolGridView_RightTapped"> <GridView.ItemTemplate> <DataTemplate x:DataType="data:SoundSymbolItem"> <local:SymbolControl/> </DataTemplate> </GridView.ItemTemplate> </GridView> I have a ItemClick handler and I can get the clicked symbolItem successfully private void SymbolGridView_ItemClick(object

UWP: how to get the RightTapped GridView Item

随声附和 提交于 2021-01-08 02:44:06
问题 I have a GridView like below <GridView SelectionMode="None" IsItemClickEnabled="True" IsRightTapEnabled="True" ItemsSource="{x:Bind SymbolItems}" ItemClick="SymbolGridView_ItemClick" RightTapped="SymbolGridView_RightTapped"> <GridView.ItemTemplate> <DataTemplate x:DataType="data:SoundSymbolItem"> <local:SymbolControl/> </DataTemplate> </GridView.ItemTemplate> </GridView> I have a ItemClick handler and I can get the clicked symbolItem successfully private void SymbolGridView_ItemClick(object

How can I prevent one async method from monopolizing another?

依然范特西╮ 提交于 2021-01-07 06:31:33
问题 In my UWP app, I've got an async method (event handler) that calls another async method, which attempts to insert a record into a database. I'm getting an exception in the insertion attempt, and am trying to sherlock why it's happening. So I put a breakpoint in the InsertMapRecord() method, on the first "using" line: using (SqliteConnection conn = new SqliteConnection(connStr)) When I reach that breakpoint, I hit F10, but instead of taking me to the next line in the Insert method, it takes me

Why is my SQLite database considered readonly?

邮差的信 提交于 2021-01-07 04:10:00
问题 I'm getting the following err msg: ...when I try to write to my SQLite database like so: private async Task InsertMapRecord(string mapName, string mapNotes) { path = folder.Path; connStr = string.Format(connStrBase, path); try { SqliteConnection conn = new SqliteConnection(connStr); String query = "INSERT INTO CartographerMain " + "(MapName, MapNotes) " + "VALUES (@MapName, @MapNotes)"; using (SqliteCommand cmd = new SqliteCommand(query, conn)) { cmd.Parameters.AddWithValue("@MapName",

Why is my SQLite database considered readonly?

家住魔仙堡 提交于 2021-01-07 04:09:33
问题 I'm getting the following err msg: ...when I try to write to my SQLite database like so: private async Task InsertMapRecord(string mapName, string mapNotes) { path = folder.Path; connStr = string.Format(connStrBase, path); try { SqliteConnection conn = new SqliteConnection(connStr); String query = "INSERT INTO CartographerMain " + "(MapName, MapNotes) " + "VALUES (@MapName, @MapNotes)"; using (SqliteCommand cmd = new SqliteCommand(query, conn)) { cmd.Parameters.AddWithValue("@MapName",

how to change the background color of flyout in uwp?

半世苍凉 提交于 2021-01-07 03:24:16
问题 I want to set menu flyout background either in c# or xaml. I want like this <FlyoutBase.AttachedFlyout> <MenuFlyout x:Name="Flyout"> <MenuFlyout.Items > <MenuFlyoutItem Text="Add Expense" Click="AddExpense_Click"/> <MenuFlyoutItem Text="Add Friends" Click="AddFriends_Click"/> </MenuFlyout.Items> </MenuFlyout> </FlyoutBase.AttachedFlyout> ... And this is my xaml code for menu fly-out 回答1: For your requirement, you could custom MenuFlyoutPresenterStyle like the following <MenuFlyout x:Name=