uwp

UWP and FullTrustProcessLauncher missing in namaspeace

北城以北 提交于 2019-12-13 02:45:17
问题 I am trying to launch powershell (some lightweight commands that all user can do) command from UWP application using FullTrustProcessLauncher . Problem is I am getting that this name does not exists in current context. My manifest is largly default so it looks like : <?xml version="1.0" encoding="utf-8"?> <Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx

UWP fullscreen: How to hide taskbar on hover?

此生再无相见时 提交于 2019-12-13 02:37:39
问题 When you are in "fullscreen-mode" on UWP the taskbar / window header always shows up, when you are touching the bottom / top of the display with your mouse cursor. In the UWP version of Rise of the Tomb Raider a small blue rectangle appears instead, that you have to click to show the taskbar / window header. How can I achieve a similar behaviour in my C#/XAML UWP game? Thanks! 回答1: In the UWP version of Rise of the Tomb Raider a small blue rectangle appears instead, that you have to click to

How to I detect when an animation is stopped and properties updated?

对着背影说爱祢 提交于 2019-12-13 02:36:18
问题 If I create and start an animation in the visual layer, I could use StopAnimation to stop the animation. But when I do that it seems that it takes a while before the animation is stopped and the properties are updated with the latest values. Is there some way around that? In the code below, I wait 10 milliseconds but that only works sometimes. public sealed partial class MainPage : Page { SpriteVisual MyVisual; public MainPage() { this.InitializeComponent(); PointerReleased += MainPage

How to use font-face in xamarin UWP

感情迁移 提交于 2019-12-13 02:28:07
问题 I am working on cross platform app. In webview I want to use @font-face. It is working fine on Android but not working on UWP. My font file is in Assets/Fonts folder and in style sheet I am using the below code: @font-face { font-family: 'defont'; src: url('Assets/Fonts/mher.ttf'); } In Android I was using this: src: url('file:///android_asset/mher.ttf'); But when same approach I try in UWP, it is not working. Please anyone has any idea? UPDATE: Below is my C# code of using normal WebView. I

Get RightTapped GridViewItem

岁酱吖の 提交于 2019-12-13 02:27:26
问题 I have a GridView where I'm storing the songs the user adds to a collection: <GridView x:Name="MusicGridView" Margin="10" IsItemClickEnabled="True" ItemClick="Play_Song" Grid.Row="0" ItemsSource="{Binding Songs, ElementName=thisPage, Mode=OneWay}" SelectionMode="None"> <GridView.ItemTemplate> <DataTemplate> <Grid Height="100" Width="100" RightTapped="Song_RightTapped"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Rectangle Grid.Row=

How can I transfer parameter from one page to another?

蹲街弑〆低调 提交于 2019-12-13 02:26:00
问题 I have an UWP using Template10. I want to have a grid with items and on the OnClick event of an item I want to open another page. The usual var item = (Invitation)e.ClickedItem; this.Frame.Navigate(typeof(MainPage), item.Id); does not seems to work. How can I do this? 回答1: I made a simple sample to demonstrate you how you can pass parameteres from one page to other. I will not use MVVM architecture because it will be a simple demonstration. Here is my MainPage: <Page x:Class="App1.MainPage"

Unable to access file from C++ library through C# UWP

狂风中的少年 提交于 2019-12-13 02:25:16
问题 I have an application for which GUI is written in C# UWP and accessing the file logic is written in C++ DLL. The DLL should open a file to read data from it. I am trying to access the file from its location. When I call inFile.open("D:\\File\\readFile.txt", ios::in) the value returned is NULL . To check if there is any problem with the file path, I have created a console application to access the file using the same way and it worked . What could be the problem? fstream inFile; inFile.open

Use SHIFT + ENTER for multiline textbox in UWP

天涯浪子 提交于 2019-12-13 01:46:58
问题 I would like to adjust the behavior of a TextBox , so that SHIFT + ENTER on the keyboard inserts a new line, while just ENTER executes a different command (such as changing focus or pressing "send" like in messaging apps). By default, the AcceptsReturn property of the TextBox being set to true inserts a new line when ENTER is pressed. Changing AcceptsReturn to false seems to prevent the new line from working at all, even if I manually add the new line: private void ContentTextBox_KeyUp(object

How to have the click event of a ListView item turn on and off the checkbox in the item template for the listview

纵然是瞬间 提交于 2019-12-13 01:45:47
问题 I have UWP app with a XAML listview in a user control as seen below. <ListView x:Name="lvDevices" Margin="12,8,0,0" Grid.Row="4" HorizontalContentAlignment="Stretch" ItemTemplate="{StaticResource DeviceTemplate}" Width="Auto" ItemsSource="{Binding Devices}" IsItemClickEnabled="True" ItemClick="lvDevices_ItemClick" d:DataContext="{d:DesignData /SampleData/DevicesVMSampleData.xaml}" > <ListView.ItemContainerStyle> <Style TargetType="ListViewItem"> <Setter Property="HorizontalAlignment" Value=

XamlParseException when using UserControl from class library dll

我们两清 提交于 2019-12-13 01:04:01
问题 I have created a library which has a Popup UserControl similar to the one here. When I create a fresh Universal Windows App and create the same UserControl inside an app and open the popup, it opens. But if I create a Class Library and create the same UserControl inside it and try to use it (by opening the popup) inside an app, I get a XamlParseException. It is as follows - Windows.UI.Xaml.Markup.XamlParseException occurred HResult=-2144665590 Message=XAML parsing failed. Source=Windows