win-universal-app

How can I design responsive UI in universal windows app

我怕爱的太早我们不能终老 提交于 2019-12-24 02:24:04
问题 I have just started to develop in universal app. I have developed app in Windows 8 store apps and also developing Windows Phone 8 and Windows Phone 8.1 (SilverLight) Apps. Question is related to universal app in Windows and Single UI which is created in App. Share folder. 1 For web there is word like responsive UI . to create there is media query to write css . I know css is same as we can create resource with for xaml . I can get resolution form c# and I can create different UI for different

How to use nuget runtimes to target different CPU architectures in the same package?

▼魔方 西西 提交于 2019-12-24 02:18:35
问题 I'm trying to create a nuget package for UWP targeting separate CPU architecture builds (arm, x64, x86). I'm using nuget 3.3.0. Reading latest nuget documentation, I understood that this can be achieved using "runtimes" folders. This is package structure: Installing the package to a UWP project adds the dependencies but it doesn't add references for assemblies from lib folders as a result I can't use the content. There are no errors packing or installing the package. Searching on internet I

GridView LostFocus and GotFocus events

自古美人都是妖i 提交于 2019-12-24 01:49:20
问题 The GridView GotFocus and LostFocus seem to fire each time focus is shifted from one GridViewItem to another. Is there any way to know when a GridView as a whole received and lost focus? MyGridView.GotFocus += MyGridView_GotFocus; MyGridView.LostFocus += MyGridView_LostFocus; The above events MyGridView_GotFocus & MyGridView_LostFocus fires each time focus is moved from one GridViewItem to another in MyGridView 回答1: Is there any way to know when a GridView as a whole received and lost focus?

RenderTargetBitmap RenderAsync Value does not fall within the expected range

我怕爱的太早我们不能终老 提交于 2019-12-24 01:47:09
问题 Using this guide: http://social.technet.microsoft.com/wiki/contents/articles/20648.using-the-rendertargetbitmap-in-windows-store-apps-with-xaml-and-c.aspx I thought this would be a walk in the park until I got the error on this section: await renderTargetBitmap.RenderAsync(grid_editor); Here is my XAML <Grid Name="grid_editor" Width="500" Height="500"> <Image x:Name="image_snap_preview" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Source="Assets/login/images/image (1).JPG"/>

Unique Device ID UWP

巧了我就是萌 提交于 2019-12-24 00:40:08
问题 Since few days I am trying to get MAC Adress from my Windows Phone device withouse success. I am trying to get UNIQUE ID for my Phone, Tablet etc. I`ve found HardwareToken class and the code below HardwareToken token = HardwareIdentification.GetPackageSpecificToken(null); IBuffer hardwareId = token.Id; HashAlgorithmProvider hasher = HashAlgorithmProvider.OpenAlgorithm("MD5"); IBuffer hashed = hasher.HashData(hardwareId); string hashedString = CryptographicBuffer.EncodeToHexString(hashed);

Accelerometer Shaken event in windows universal app doesn't work

痴心易碎 提交于 2019-12-23 23:56:28
问题 I try to detect a shake on my phone with the Shaken event from Accelerometer object. The accelerometer object is not null but when I shake the phone, it never go in the _accelerometer_Shaken event. public int shakeCount = 0; Accelerometer _accelerometer = Accelerometer.GetDefault(); public MainPage() { this.InitializeComponent(); if (_accelerometer != null) { _accelerometer.Shaken += _accelerometer_Shaken; } } async private void _accelerometer_Shaken(Accelerometer sender,

Handling back button Windows 8.1 Universal app

时光毁灭记忆、已成空白 提交于 2019-12-23 21:51:09
问题 I'm updating my app from Windows Phone 8 Silverlight to Windows 8.1 RT (I think is called that). I've just created my second page and when i go to and press the back button it goes out of my app instead of going back to first page. I don't know why is this happening, default behaviour is going to last page right? I can't find how to override back button event to make a Frame.GoBack() call. Is this a dev preview bug or am I missing something? 回答1: put into the constructor of the second page:

AppBarButton.Icon doesn't change on runtime

a 夏天 提交于 2019-12-23 18:34:03
问题 I have a problem updating AppBarButton Icon on runtime depending on some conditions. <AppBarButton x:Name="WeekButton" Click="OnClick" Label="SomeText" </AppBarButton> I'm trying to update Icon property in some code behind with this code WeekButton.Icon = new FontIcon() { Glyph = Runtime_Value_Here}; But nothing happens. The button doesn't change. But in any random time when the code works, It MAY change the button. I always see, that the Icon is new in code, but not on screen. None of the

Capture speaker output

若如初见. 提交于 2019-12-23 16:40:19
问题 I've seen that I can capture the microphone and sound-files with elements in the Windows.Media.Audio namespace. I'm looking to capture the speaker output , though. For example, I click on something and the system sounds the alert sound - I want to be able to capture that. Is there any way of doing that using elements in Windows.Media.Audio (instead of going more low level into Win32 calls)? 回答1: Well, even with "low level Win32 calls", you can't do any loopback recording in UWP. This is

Pivot Header style

核能气质少年 提交于 2019-12-23 16:19:05
问题 C# UWP Windows 10 project I need to set Pivot header style to something like this I has tried to use this example from stackoverflow, but not sucessful. Can you say how I can set rectangle (like on image) behind header text and change background color for selected unselected items? 回答1: As the answer you've mentioned, we can use PivotHeaderItem styles and templates to implement this. Firstly, we can copy the style from MSDN and put in into Page.Resources . Then add a Border in the Grid and