uwp

vs2015 Error when right clicking project in solution explorer

别等时光非礼了梦想. 提交于 2019-12-13 18:34:11
问题 I am having issues with creating UWP apps. If i right click my project in solution's explorer I get the following error pop up in VS2015 An exception has been occurred while getting the visual studio framework version of the project. Pressing ok brings the error window back again. This happens about 5 times and then the menu that is expected appears. Any ideas why? Things I have tried. Recreate the project. Repair VS 2015 installation Move the project on to my laptop. Laptop is running VS2017

Google OAuth 403 when refreshing access token

早过忘川 提交于 2019-12-13 18:20:42
问题 In a UWP app, I first get a refresh token and an access token using the following endpoint : string tokenRequestBody = string.Format("code={0}&redirect_uri={1}&client_id={2}&scope=&grant_type=authorization_code", code, System.Uri.EscapeDataString(redirectURI), clientID ); StringContent content = new StringContent(tokenRequestBody, Encoding.UTF8, "application/x-www-form-urlencoded"); HttpResponseMessage response = new HttpClient().PostAsync("https://www.googleapis.com/oauth2/v4/token", content

XAML designer “Could not load file or assembly Autofac 4.1” in App.xaml of UWP application using MVVMLight

只谈情不闲聊 提交于 2019-12-13 17:31:17
问题 Starting with a blank Universal Windows Application I added Autofac 4.1, Autofac.Extras.CommonServiceLocator 4.0 and MvvmLightLibs 5.3. I then created the following ViewModelLocator class. using Autofac; using Autofac.Extras.CommonServiceLocator; using GalaSoft.MvvmLight.Views; using Microsoft.Practices.ServiceLocation; namespace UwpTest { public class ViewModelLocator { public static IContainer Container { get; private set; } public static bool IsBuilt { get; set; } public ViewModelLocator()

Reorder bindable listview by drag and drop using UWP

梦想与她 提交于 2019-12-13 17:30:59
问题 I'm trying to reorder ListView by drag and drop,it work with me while am using static items, but when I bind the data using itemsSorce the drag work fine but i can't drop the item this is my code C#: lstSrvMenu.ItemsSource = Menue.MainItems.Where(m => int.Parse(m.GroupID) > 0); XAML: <ListView Name="lstSrvMenu" Margin="0,40,0,0" AllowDrop="True" CanDragItems="True" CanReorderItems="True" IsSwipeEnabled="true"> <ListView.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding GroupTDesc}"

Reading and Writing to Excel sheet in C# UWP Windows 10 App

折月煮酒 提交于 2019-12-13 17:22:22
问题 I am working on a project for Windows 10 UWP App. I have below two problems 1. I have to upload excel sheet containing the data, and store that data into Sq-lite Database. 2. Also I have to read data from database table, and write to excel sheet in rows and column format. I have searched a lot but could not find any library or helping blog . I would be thankful for any complete guide or sample code. Thanks!! 回答1: I would suggest you use Syncfusion Essential XlsIO. It does the work for your

Query multiple tables SQLite Windows 10 UWP

坚强是说给别人听的谎言 提交于 2019-12-13 16:38:32
问题 I am developing a Windows 10 UWP app with a SQLite database. I need to retrieve data from multiple tables. I already have the following code to get data from a single table, but a custom object with the exact same amount and names of the columns of the table in question is needed. public ObservableCollection<Employee> GetEmployees() { using (var dbConn = new SQLiteConnection(new SQLite.Net.Platform.WinRT.SQLitePlatformWinRT(), App.DB_PATH)) { List<Employee> myCollection = dbConn.Table

How to do String.Copy in .net core?

时光毁灭记忆、已成空白 提交于 2019-12-13 14:01:24
问题 In porting a .net framework app to .net core app, there are some uses of String.Copy to copy strings. But it looks this method is removed from .net core, so how would you copy a string in .net core app, and as a result, it is not present in uwp too. Does assignment string b = a; in .net core means something different as in .netframework? The copy is used in this code: public DataDictionary(DataDictionary src) :this() { this.Messages = src.Messages; this.FieldsByName = src.FieldsByName; this

UWP Recursive File Search in C# is awfully slow

自作多情 提交于 2019-12-13 12:45:25
问题 I am using the following code to search recursively the images in a selected folder. I have over 120000 images in that folder (Yes, I'm a photographer!) and it is incredibly slow, for e.g. I have to stop it after 10 minutes and it's not done yet. In comparison, my Python code (interpreted!) does the same in less than 2 minutes. Is there any way to make this code more efficient? It works fine, that's ok, but only very slowly... public List<StorageFile> _allFiles; public List<StorageFile>

Images are Getting cached in UWP application

流过昼夜 提交于 2019-12-13 12:22:01
问题 In my UWP application I am binding the images from azure. It is getting cached when it get the response. When I change the image in the azure it's not reflecting in my UI, Instead it display the image from cache. Is there any way to clear the cache of my UWP application or to restrict the application to cache images?. 回答1: Have you tried CreateOptions="IgnoreImageCache" ? <Image> <Image.Source> <BitmapImage UriSource="{Binding Url}" CreateOptions="IgnoreImageCache" DecodePixelWidth="120"

UWP - setting IsEnabled on NavigationViewItems

非 Y 不嫁゛ 提交于 2019-12-13 11:47:32
问题 I have a UWP app with a NavigationView control. The navigation items are created by setting MenuItemsSource in the XAML to a collection of objects of type NavigationViewElement . <NavigationView Style="{StaticResource MainPageNavControlStyle}" HeaderTemplate="{StaticResource MainPageNavHeaderTemplate}" MenuItemsSource="{Binding NavigationViewElements}" MenuItemContainerStyleSelector="{StaticResource NavStyleSelector}" MenuItemTemplateSelector="{StaticResource NavItemTemplateSelector}" x:Name=