uwp

UWP StreamSocket ConnectAsync exception 0xC00D36FF

家住魔仙堡 提交于 2019-12-12 02:16:31
问题 I'm getting a very strange exception using a UWP StreamSocket, 99.9% of the time this code functions as expected and the communication with the device works properly, however I get the following exception every once in a while. The exception message: The operation failed because an invalid combination of workqueue ID and flags was specified. (Exception from HRESULT: 0xC00D36FF) Sample code for the issue: using (StreamSocket analyzerSocket = new StreamSocket()) { HostName hostName = new

transparent app in windows 10 uwp

☆樱花仙子☆ 提交于 2019-12-12 02:14:45
问题 I am trying to make a transparent app in windows 10 uwp. I searched stackoverflow and I found Windows 10 UWP Transparent app where they say the feature is available starting from release 14332. I have release 14393 but I can't figure out how to do it. I cannot access the git they suggest in the post: it gives me error 404 来源: https://stackoverflow.com/questions/41045367/transparent-app-in-windows-10-uwp

How to do relative binding for button flyout in universal windows store app

廉价感情. 提交于 2019-12-12 02:07:47
问题 I want to bind my button flyout width and height with some other control but it not working <Grid > <Popup IsOpen="True" Name="popup"> <Grid Name="popupBorder" Background="Red" Height="100" Width="100" > </Grid> </Popup> <Button Content="check flyout" Name="btn" Click="Button_Click" > <Button.Flyout> <Flyout> <Border Name="flyoutBorder" Height="{Binding Path=Height, ElementName=popupBorder, UpdateSourceTrigger=PropertyChanged, Mode=OneWay}" Width="{Binding Path=Width, ElementName=popupBorder,

Exception while accessing RfcommDeviceService from a wearable in UWP

泪湿孤枕 提交于 2019-12-12 01:54:45
问题 Here is what I have, A bluetooth wearable (MyoArm band). Windows Mobile 10 with anniversary update. Both of them are paired properly. Now, here is what I am trying to do, I am trying to enumerate the list of all services exposed by the bluetooth device connected to my windows mobile. I would then like to read input streams, if the service provides one. I went though MSDN documentation and here is what I have done so far. P.S. I have added Bluetooth access to the capabilities in the

UWP C# - Problems with Grid in a Listview

旧巷老猫 提交于 2019-12-12 01:48:47
问题 I am writing a little app in C# for windows 10, and I have a listview as below, which is already in a grid. However the grid I am adding to the listview doesn't expand out to fill the space, it is just grows as wide as the length of the data contained in the field bound to it. What am I doing wrong? I don't want to use fixed fields, I'd prefer to use a relative proportion of the page width. Help! <Grid x:Name="RootGrid" Margin="5" > <Grid.RowDefinitions> <RowDefinition Height="Auto"/>

Detecting keys pressed without events in UWP

你。 提交于 2019-12-12 01:46:41
问题 I am writing a simple 2D game engine for UWP. I have a code snippet taken from XNA, checking for if a certain key is pressed (see below), and I'm trying to do something similar. Indeed, in my game engine I'd rather not use the dedicated event handlers (KeyDown etc), but instead simply check for pressed keys in my game loop - if this is possible to do. One reason for this is that I can then control for example how often a bullet fires if the key is continuously pressed (using a timer and mod).

Binding a property defined in code-behind, and another one defined in a class in the same template

£可爱£侵袭症+ 提交于 2019-12-12 01:44:45
问题 I would like to binding a property defined in code-behind, and another one defined in a class in the same template with datatype. Here's an example: My class: public class MyClass { public string name { get; set; } public MyClass(string name) { this.name=name; } } Code behind: public string name2; public MyView() { this.InitializeComponent(); name2 = "Tim"; } <DataTemplate x:Key="MasterListViewItemTemplate" x:DataType="model:MyClass"> <StackPanel> <TextBlock Text="{x:Bind name}"/> <TextBlock

UWP App - InkCanvas and InkToolbar in HTML5/JS

孤者浪人 提交于 2019-12-12 00:55:02
问题 Can the new InkCanvas and InkToolbar (see this link) be used in Windows 10 UWP HTML5/JS apps? I see only C#, C++, and VB tabs in the documentation. This is in the documentation under XAML controls, which to my understanding is not part of the HTML support. Is there an alternative/complementary HTML5/JS tool set for these components? Thanks! 回答1: The types InkCanvas and InkToolbar are currently not supported in UWP HTML5/JS. For HTML5/JS, you can use this official sample as reference. There

Can't activate projected type defined in IDL

浪子不回头ぞ 提交于 2019-12-12 00:52:04
问题 I was trying to define a Windows Runtime type in IDL, and consume its projected type. Going from a default-generated Blank App UWP project (called "Blank App" ), I added "MyControl.idl" : namespace BlankApp { [default_interface] runtimeclass MyControl : Windows.UI.Xaml.Controls.Control { MyControl(); } } Compiled the solution, then copied MyControl.h and MyControl.cpp from Generated Files/sources to the project root directory. I included the header for the projected type and added the

ContentControl won't use DataTemplates

我怕爱的太早我们不能终老 提交于 2019-12-12 00:25:53
问题 I have two models that i want to represent as directories and files. The models both implement an interface which contains a property string Name {get;} . public interface INode { string Name { get; } string Path { get; } } public class Directory : INode { public Directory(string name, string path) { this.Name = name; this.Path = path; } public string Name { get; } public string Path { get; } } public class File : INode { public File(string name, string path) { this.Name = name; this.Path =