uwp-xaml

Mix DirectX 12 and XAML controls in UWP

扶醉桌前 提交于 2019-12-12 04:26:00
问题 I would like to create a UWP app (XAML) with C++/CX and DirectX 12 so that I can mix both XAML controls (things like Grid, buttons...) and DirectX, something like a Level Editor, but I'm struggling to find a way how to initialize DirectX to render inside a specific control (like a Grid). The basic template and all the other tutorials only show how to do it within the full area of the application. When creating a device resource we set the window where to draw with SetWindow(CoreWindow:

Cannot convert string to DateTime in uwp

谁都会走 提交于 2019-12-12 03:45:23
问题 private string GetSystem() { StringBuilder results = new StringBuilder(); DateTimeFormatter[] basicFormatters = new[] { // Default date formatters new DateTimeFormatter("shortdate"), // Default time formatters new DateTimeFormatter("longtime"), }; DateTime dateandTime = DateTime.Now; foreach (DateTimeFormatter formatter in basicFormatters) { // Format and display date/time. results.Append(formatter.Format(dateandTime)); results.Append(" "); } return results.ToString(); } dateString =

MapControl get tapped location UWP

最后都变了- 提交于 2019-12-12 03:44:27
问题 I have a MapControl in my app and I want to retrieve the coordinate of the point taped by the user. <Maps:MapControl Grid.Row="0" ColorScheme="Light" Margin="10" x:Name="mainMap" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Tapped="mainMap_Tapped" MapElementClick="mainMap_MapElementClick" /> But I don't know how to get this from the event private void mainMap_Tapped(object sender, TappedRoutedEventArgs e) 回答1: To get the tapped location in MapControl, we can use MapControl

How do we get workgroup name from windows 10 in uwp?

陌路散爱 提交于 2019-12-12 00:38:12
问题 How do we get workgroup name from windows 10 in uwp and all other attribute of user? 回答1: There is a User class available (UWP): https://msdn.microsoft.com/en-us/library/windows/apps/windows.system.user.aspx There you can find the attributes of the user 回答2: You can use NetworkInformation class For example to get computer name use: var hostNames = NetworkInformation.GetHostNames(); var localName = hostNames.FirstOrDefault(name => name.DisplayName.Contains(".local")); var computerName =

What is causing UWP app to intermittently crash and throw Windows.UI.Xaml.dll!CfocusRectManager error

你说的曾经没有我的故事 提交于 2019-12-11 18:18:00
问题 We are developing a UWP application and noticing intermittent crashes when launching the debug process in Visual Studio. Exception Unhandled Unhandled exception at 0x00007fff8f9ac10c (Windows.UI.Xaml.dll) in [ourAppName].exe: 0xC0000005: Access violation reading location 0x0000000000000000 We have also seen a release build of the app crash on launch after sideloading the AppX package onto particular machines but not on others. When a debugger was attached to the process on that machine the

UWP change NavigationViewItem height

余生颓废 提交于 2019-12-11 18:04:57
问题 On the image above, you can see my app (left) and Groove Player (right). I want to make NavigationViewItem height big like Groove Player, but I don't know how. I tried playing with Padding and MinHeight but it doesn't look the same. I want to do the same for the AutoSuggestBox and the Settings button, that are part of NavigationView. <NavigationView x:Name="navView" IsSettingsVisible="True"> <NavigationView.AutoSuggestBox> <AutoSuggestBox QueryIcon="Find" PlaceholderText="Search"><

How to pass objects through multiple pages in UWP

微笑、不失礼 提交于 2019-12-11 17:49:37
问题 I am tasked with creating a multi-page UWP app that needs to pass a student object through multiple pages. The app starts on the main page where there are two buttons, one to add a new student and then and the other to then view the students details. I am currently struggling trying to figure out how to pass the student object from the "new student page" to the "student details" page. I'm not allowed to store the students information in a file or database. When a new student has been added

How to show specific control in fullscreen mode UWP

拥有回忆 提交于 2019-12-11 17:34:55
问题 I write an YouTube client for UWP platform and now I'm stuck on fullscreen mode. I've written own video player based on MediaElement with . And when I go to fullscreen I get this . So in that case I need to show in fullscreen mode the whole video player control. But I don't know how exactly I supposed to do this. I've already tried this: private async void fullscreen_Click(object sender, RoutedEventArgs e) { if (!fullScreen) { ApplicationView.GetForCurrentView().TryEnterFullScreenMode();

Using UWP monitor live audio and detect gun-fire/clap sound

淺唱寂寞╮ 提交于 2019-12-11 17:15:54
问题 I am developing a new UWP app which should monitor sound and fire a event for each sudden sound blow ( something like gun fire or clap ). It needs to enable default Audio Input and monitor live audio. Set audio sensitivity for identifying environment noise and recognizing clap/gun-fire When there is a high frequency sound like a clap/gun-fire sound ( Ideally it should be like configured frequency like +/-40 then it is a gun-fire/clap ) then it should call a event. No need to save Audio I

Is runFullTrust mode in UWP app ,capable of broadFileAccess by default?

元气小坏坏 提交于 2019-12-11 17:05:39
问题 I have a UWP app that requires the restricted capability "broadFileAccess" to access data from a file. I also have to use "runFullTrust" capability for registry access. My understanding was that an app in "runFullTrust" mode had both file and registry access permissions and that "runFullTrust" is a higher level capability. Problem: I tried giving "runFullTrust" capability,but for some reason the file access permissions are denied and also I dont even have an option to enable it under Settings