windows-runtime

Using Dispatcher correctly in event to update UI

大憨熊 提交于 2019-12-11 13:59:04
问题 I'm using dispatchers to update a bound collection from an event. I just ran into a nasty issue where I had two different dispatchers in the same event and it wasn't working. Using the debugger it was completely skipping over the code in the first dispatcher. Putting the entire event in a single dispatcher fixed it. I assume it's because of how the compiler handles it, can anyone confirm this - only one dispatcher per event, at least when dealing with the same elements? Here is the code, when

Is there any way for a WinRT app to measure its own CPU usage?

允我心安 提交于 2019-12-11 13:39:52
问题 I'm experimenting with different ways to do game graphics in WinRT, and it'd be nice if my test app could measure and display its own CPU usage, so I could compare different approaches (ItemsControl vs. manually moving Images around vs. DirectX). In full-fledged .NET, I can read Process.TotalProcessorTime at two known points in time, and then take the delta processor time divided by the delta time (adjusted for number of processors if necessary). If the app is running in full-trust, I can

What is the event that toggles appbar in javascript Windows 8 Metro Style App?

守給你的承諾、 提交于 2019-12-11 13:35:34
问题 I am looking for the event that toggles the appbar in javascript. So it's basically the "edge-swipe" gesture event on the top/bottom edge of the screen. For example, I want to show a text "edge swiped" on the page when the user swipe the upper or butto edge of the screen, without declaring a app bar in the page. How will I be able to do that? I tried crossslide event and it doesn't seem to be right. 回答1: Cross-slide won't work for you because it's a gesture that can start anywhere. There's no

SQLite.Net, C# equivalent for SQLite bit datatype

时间秒杀一切 提交于 2019-12-11 13:08:43
问题 I declare following class in c# [Table("Employee")] public class Employee { [PrimaryKey,AutoIncrement] public int EmployeeId { get; set; } public DateTime DateOfJoining { get; set; } public string Address{ get; set; } } and i invoke this method to create equivalent table in my SQLite database public async Task CreateTable() { SQLiteAsyncConnection conn = new SQLiteAsyncConnection(path); await conn.CreateTableAsync<Employee>(); } So it creates a table in SQLite as follows [EmployeeId] int,

In WinRT XAML - tapping and clicking on a button is not the same?

时光怂恿深爱的人放手 提交于 2019-12-11 12:58:00
问题 When hooking the Tapped event on a page (so I can get all events that are not caught by children), I am also getting the event fired when a user taps a button on the page. I would have expected the button to "swallow" the tap, but that does not seem to be the case. The workaround is simple, if annoying - hook the Tap event on each button present and set Handled to true. I get how to do the workaround. My question is whether or not I am understanding this correctly. If hooking the Tap event on

Barcode scanner for metro apps [closed]

孤人 提交于 2019-12-11 12:54:18
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I want to develop a metro app for scanning bar-codes. Is there existing default library for bar-code scanning? Please provide me the guidelines and sample apps 回答1: Check out ZXing.Net on CodePlex and NuGet. The CodePlex source code has sample of WinRT app. MainPage.xaml <Grid Background="{StaticResource

mismatch detected for 'vccorlib_lib_should_be_specified_before_msvcrt_lib_to_linker': value '1' doesn't match value '0' in msvcrtd.lib

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 12:37:15
问题 I have a C library project for UWP. There are some C files which are calling C++ WINRT functions defined in CPP file.It is compiling successfully and generating a library file(LIB). I am compiling in Visual Studio 2015 with update 1 and target platform is 10.0.10240.0 But, I want to generate DLL instead of LIB file. Here's the changes I did to change the project so that it generates DLL instead of LIB. Try1: So, In the startup project, In Configuration Properties => General I change

Call Native C# from WinJS that's loaded in a WebView

核能气质少年 提交于 2019-12-11 12:14:32
问题 I know it's possible to call native C# from WinJS by creating a Windows Runtime Component and then adding it as a reference to the WinJS app -- but is it possible to do the same thing from the WinJS app when it's loaded inside a WebView ? I've tried it, but it seems the WinJS app inside the WebView is operating in a completely different context or something and isn't finding the symbols, so it crashes and offers to launch a new instance of VS2013 to try and debug. 回答1: You're correct in that

Possible to get network MAC address in .NET Metro app?

感情迁移 提交于 2019-12-11 11:45:18
问题 I have the requirement to get get the MAC address of the network interface in my Metro UI app. As far as I can tell, this is simply not supported in the .NET 4.5 for Metro application API. Am I wrong? 回答1: You are restricted from accessing low-level networking information from a Metro Style application, therefore this is not possible with the stock SDK. This is by design. 回答2: You can't retrieve the MAC Address per say, but you do can retrieve hardware specific information to identify a

Windows Phone 8.1 - Write text over WriteableBitmap

丶灬走出姿态 提交于 2019-12-11 11:42:59
问题 In an app that I'm making I need to write text over a WriteableBitmap. In Windows Phone Silverlight I know how to do it: I only need to call writeableBitmap.Render() method, that's all! The problema is that my app needs to be built with Windows Runtime, and that method doesn't exist. My first approach was to write a method that performs drawing of numbers (I only need to draw numbers) over the WriteableBitmap, but, with this method, numbers appear a Little "robotic", they are all square and