uwp

Keep elements displayed in fullscreen UWP application

↘锁芯ラ 提交于 2020-01-23 05:48:06
问题 Below is my design containing media element, play, pause, full window and seeker. <MediaElement x:Name="VideosMediaElement" VerticalAlignment="Top" Height="250" Width="355" Margin="0,20,0,0" BufferingProgressChanged="VideosMediaElement_BufferingProgressChanged" RealTimePlayback="True" /> <Grid x:Name="mediaGrid"> <Border VerticalAlignment="Bottom" Height="60" Background="Black" Opacity="0.1"> </Border> <Image x:Name="PlayIcon" Source="Assets/Play-icon.png" Height="35" HorizontalAlignment=

ApplicationData using in Console with UWP parameters

左心房为你撑大大i 提交于 2020-01-23 03:46:06
问题 I'm trying to follow UWP with Desktop Extension – Part 2 of UWP and WinForms desktop-bridge calling the processes and passing parameters. This example Console Program.cs code includes parameters string: string parameters = ApplicationData.Current.LocalSettings.Values["parameters"] as string; But the name ApplicationData does not exists in the current context, I'm trying to find out, if I've missed some reference or it is different version of C# I'm not sure even if it is what it requires, but

How can I reference UWP classes in PowerShell

半世苍凉 提交于 2020-01-22 14:02:25
问题 I want to use a data type from a Universal Windows Platform library, how can I reference the containing namespace or assembly in PowerShell? For example, I want to use the Windows.Data.Json.JsonObject class to parse me some json. Had this been a regular .NET class, I would have done something like Add-Type -AssemblyName Windows.Data.Json $jsonObject = [Windows.Data.Json.JsonObject]::Parse('{data:["powershell","rocks"]}') But this strategy fails me with: Add-Type : Cannot add type. The

Why this UWP ComboBox can be blank after initialization but works fine for selection?

一笑奈何 提交于 2020-01-21 09:02:05
问题 I have a ComboBox like this <ComboBox Grid.Column="1" Padding="5,0,0,0" DisplayMemberPath="Description" SelectedItem="{Binding MaxXXAge, Mode=TwoWay, Converter={StaticResource MaxXXAgeToMaxXXAgeMemberConverter}}" ItemsSource="{Binding ElementName=SettingsXXScrollViewer, Path=DataContext.MaxXXAgeMemberGroup, Mode=OneWay}" /> However, after initialization, the combobox is blank. It actually works fine after this. I can select and show the selected item as expected. It's just the first glance

UWP添加数字证书导出安装包本地安装

亡梦爱人 提交于 2020-01-21 04:44:23
先生成一个简单的HelloWorld应用程序 <Page x:Class="HelloWorld.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:HelloWorld" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <Grid> <TextBlock Text="HelloWorld!" TextWrapping="Wrap" VerticalAlignment="Top" FontSize="72"/> </Grid> </Page> using Windows.UI.Xaml.Controls; // https://go.microsoft.com

How to connect to Unity game server socket from UWP app via sockets?

风格不统一 提交于 2020-01-21 03:47:04
问题 I would like to send some heart rate values I receive from a Microsoft Band from a UWP app to Unity. I have currently a working Tcp Server in Unity but I could not seem to use System.Net.Sockets in UWP. Anyone knows how to make a tcp client on the UWP app and send the data to Unity? My server code is as follows: using UnityEngine; using System.Collections; using System.Net.Sockets; using System.IO; using System.Net; using System.Threading; public class Server { public static TcpListener

Do all UWP apps leak memory when navigating pages?

喜欢而已 提交于 2020-01-21 03:01:04
问题 So I've been getting my teeth into UWP and developing a simple app in C# using VS2017 v15.6.4, on the latest release of Windows 10. When running the app I notice its memory usage continues to increase over time. After a lot of pairing back of the code, I've come to the conclusion that this is being caused by page navigation calls, such as: Frame.Navigate(typeof SomePage); Frame.GoBack(); Frame.GoForward(); It is very easy to create and observe this process... 1) In VS2017, create a new Blank

【UWP】使用 LiteDB 存储数据

廉价感情. 提交于 2020-01-20 18:34:05
序言: 在 UWP 中,常见的存储数据方式基本上就两种。第一种方案是 UWP 框架提供的 ApplicationData Settings 这一系列的方法,适用于存放比较轻量的数据,例如存个 Boolean 类型的设置项这种是最适合不过的了。另一种方案是用 Sqlite 这种 数据库 ,适合存放数据量大或者结构复杂,又或者需要根据条件查询的场合,例如开发个宝可梦数据查询,或者 Jav 图书馆(咳咳)。 场景分析: 在某些场合,我们很可能是要持久化一个复杂的对象的,例如通过 OAuth 授权成功获取到的用户信息,有可能就类似下面的结构: { "id": 1 , "name": "Justin Liu" , "gender": 2 , "location" : { "name": "Melbourne" , "name_cn": "墨尔本" } } 又或者做一个 RSS 阅读器,弄个后台服务提前先把数据拉下来,那肯定也要存放起来吧。这相当于要把一个以时间排序为依据的列表进行持久化。 ApplicationData Settings 方案 在以上两种场合,用 ApplicationData Settings 解决起来可能是比较快速的。以第一种情况来说,又可以细分两种存储方案。 A 方案,分字段存放: ApplicationData.Current.LocalSettings.Values

Memory Leak on UWP MediaPlayer (Windows.Media.Playback.MediaPlayer)

随声附和 提交于 2020-01-17 15:04:49
问题 I am maintenancing a WPF application. I added a UWP nedia player on my project. But, memory usage is too high. I realized that UWP media player did it, so I created a reproducible code. while (true) { var mp = new MediaPlayer() { Source = MediaSource.CreateFromUri(new Uri("Test.mp4")) }; Thread.Sleep(1000); mp.Play(); Thread.Sleep(1000); mp.Dispose(); } This code occurs a memory leak. I created MediaPlayer and Disposed it! But, its memory usage grows up infinitely. How can I catch memory leak

Problems Setting FlipView Items source using Data Virtualization

江枫思渺然 提交于 2020-01-17 14:19:08
问题 This is a follow up from my previous question (UWP Problems Setting GridView Items source using x:Bind). In that case I was using the random access file data source from Mirosoft's Data virtualization sample and the grid was never being populated. The problem there was that I was not raising the property changed event. The grid now works well. My problem now is that instead of a grid view I am trying to use the data source in a flip view control. The data source does get initialized, the