win-universal-app

how to fix Exception thrown: 'System.Runtime.InteropServices.COMException' in mscorlib.ni.dll?

安稳与你 提交于 2019-12-25 18:23:36
问题 can help me fix this error? when I build my syntax no error, tp when I execute the error appeared, I have been using all means start to run VS 2015 deng run as administrator until exeption setting but nothing changes. any idea? This is the XAML: <Page x:Class="berhasil.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:berhasil" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns

bind images in buttons in a FlipView windows app store

筅森魡賤 提交于 2019-12-25 12:46:16
问题 I am new in universal app developpment,I have a flipview with 4 buttons in each page,each button has an image(8 images in total),I have created a model class that contains the list of images and their URls: public class SampleItem { public string Image1 { get; set; } public string Image2 { get; set; } public string Image3 { get; set; } public string Image4 { get; set; } public string Image5 { get; set; } public string Image6 { get; set; } public string Image7 { get; set; } public string

Styling for ListBox, ListView and GridView Items

こ雲淡風輕ζ 提交于 2019-12-25 12:45:17
问题 The default colors for these controls seems to be similar to the Windows theme colors. How do you change the hover, selected, selected hover and pressed colors (code or XAML)? The following isn't working for the ListView: <ListView> <ListViewItemPresenter PointerOverBackground="#99CEEA" SelectedPressedBackground="#72BFE9" SelectedBackground="#72BFE9" SelectedPointerOverBackground="#99CEEA" /> 回答1: In your VS/Blend Designer, right click on your ListView and select Edit Additional Templates >

Get List of installed windows apps

落花浮王杯 提交于 2019-12-25 09:16:36
问题 I want to get the list of installed uwp application in the desktop.I want to make it within uwp application.Is there any way to achieve this? 回答1: We can use PackageManager.FindPackagesForUser(String) method to find all packages installed for for the current user in UWP apps like following: PackageManager packageManager = new PackageManager(); IEnumerable<Windows.ApplicationModel.Package> packages = packageManager.FindPackagesForUser(""); This method returns an enumerable collection of

The “Microsoft Azure Configuration Manager” library is not available for UWP apps. Suggestions?

断了今生、忘了曾经 提交于 2019-12-25 08:48:51
问题 The "Microsoft Azure Configuration Manager" library is not compatible with UAP apps and it seems that I need it to access the CloudConfigurationManager class for connecting to Azure Storage. It is used to parse the connection string: // Parse the connection string and return a reference to the storage account. CloudStorageAccount storageAccount = CloudStorageAccount.Parse( CloudConfigurationManager.GetSetting("StorageConnectionString")); Am I missing something here or is there maybe an

Creating a file/folder in UWP

谁都会走 提交于 2019-12-25 08:47:52
问题 first of all I really hope I'm not asking already answered question, I did my research on stack overflow and beyond and so far didn't find answer to my question. I finally accomplished that my Universal windows (10) app makes a project folder for user, inside LocalState folder, but its fine as long as it stays there. Now, I'm trying to generate some simple text file and save in "Project" folder, example path: LocalState\Project1\example.txt. I tried with following code: StorageFolder mapa

how to get group info(like guest,admin..etc) of current login user in uwp (windows 10)?

纵然是瞬间 提交于 2019-12-25 07:46:46
问题 I want to get the Group name that belongs to current user in UWP(windows 10)? i follow the links below: https://msdn.microsoft.com/en-us/library/windows/apps/windows.system.knownuserproperties.aspx Get UserName in a Windows 10 C# UWP Universal Windows app But it does not help me find group name. if it is possible in c# plz give suggestion or links.. 回答1: You can get user information from User class I am afraid that you can't get roles of user. UWP applications are sandboxed and system

How do I get cell row and column indexes of UWP Grid control?

做~自己de王妃 提交于 2019-12-25 07:40:19
问题 I've been trying to get the row index and the column index when specific cell of grid control is tapped. So far nothing... I achieved to take the absolute value of X and Y when I tap somewhere on the grid control. private void gridGameBoard_Tapped(object sender, TappedRoutedEventArgs e) { Grid grd = sender as Grid; Point pos = e.GetPosition(grd); } I've tried this: int row = Grid.GetColumn(grd); int col = Grid.GetRow(grd); Both gives me only zeros no matter where I tap. I didn't find another

Custom CommandBar to PickerFlyout

断了今生、忘了曾经 提交于 2019-12-25 07:03:12
问题 By default PickerFlyout has commandbar that has done and cancel buttons. Is it possible to disable done button programmatically? If not is there any way to add custom command bar and replace default one? With the help of the answer given i tried to write custom picker from PickerFlyoutBase. But now i'm not able to add content to flyout in xaml. Giving me error saying custompicker doesnt support direct content <Button> <Button.Flyout> <local:custompicker> <TextBlock Margin="20" FontSize="30"

Clock program employing ThreadPoolTimer C# uwp

雨燕双飞 提交于 2019-12-25 06:59:36
问题 this is modelled on a answer to a previous question How to display a clock with the current time in a Windows Core IoT app?, I get an exception: "The application called an interface that was marshalled for a different thread." If I change the property with an click event, the binding works. public class RunClock: INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged = delegate { }; ThreadPoolTimer _clockTimer = null; private string clock=""; public string Clock {