uwp-xaml

UWP - Rotating an Image while keeping it aligned to the grid, using XAML only

旧巷老猫 提交于 2019-12-02 04:19:09
问题 Using Windows Template Studio, I created a (mostly auto-generated) sample UWP application, which shows a bunch of Images within a GridView. In order to rotate them, I've used the following xaml - note RenderTransform block which I've added, and the comments within that scope: <Grid x:Name="ContentArea"> <GridView x:Name="ImagesGridView" ItemsSource="{x:Bind Source}" IsItemClickEnabled="True" Padding="{StaticResource MediumLeftRightMargin}" SelectionMode="None"> <GridView.ItemTemplate>

How do you change the Style of the PivotHeaderItem(s) within a Pivot

时间秒杀一切 提交于 2019-12-02 03:23:27
I have looked at Apply PivotItemHeader style to PivotItem in UWP but I haven't been able to apply the suggestions to my code. I'm trying to change the Style of the PivotHeaderItem(s) within a Pivot based on whether or not the device is Desktop or Mobile. I have 2 explicit styles in my Resource Dictionary. <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:Test"> <Style x:Key="PivotHeaderItemStyle1" TargetType="PivotHeaderItem"> <Style x:Key="PivotHeaderItemStyle2" TargetType=

UWP DatagramSocket Multicast

心已入冬 提交于 2019-12-02 03:12:49
问题 I managed to make a simple application that sends and receives data from a multicast group. If I open 2 instance of the application (2 different .sln files with the same code) I can send and receive data. The problem is that after 5 seconds, if I send a message from the Client001 only the Client001 will get the message. But, if I send message from the Client002 (the second instance of the app) within the 5 seconds then both of them get the message. I had an example with UdpClient that was

Access denied while saving image in UWP.Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

巧了我就是萌 提交于 2019-12-02 01:46:56
I am working on universal windows app on Windows 10 SDK to draw rectangle on faces recognized in the image. I am using Win2D to edit the pictures and draw rectangle on it. I am able to read files from the Pictures library but when I try to save the image after editing it gives the following error: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) The following is the method I used to draw rectangle on the image: private async void DrawRect() { CanvasDevice device = CanvasDevice.GetSharedDevice(); CanvasBitmap bitmap = null; CanvasRenderTarget offscreen = null; Windows

Use strings in .resw File directly in XAML

穿精又带淫゛_ 提交于 2019-12-02 00:25:08
I know the usual way to reference localized strings from a .resw file would be like this: XAML: <Button x:Uid="ButtonUid" /> Resources.resw: ButtonUid.Content = "Hello World" But is it also possible to kind of do it like this: XAML (pseudo code): <Button Content = "$buttonLabel" /> Resources.resw: buttonLabel = "Hello World" The reason why I want to do it like in the second exapmle is because this is an app that I'm porting from iOS and Android to WP. I'd like to convert the iOS or Android strings file to .resw syntax but without going over every single string and adding .Content or .Text or

UWP - Rotating an Image while keeping it aligned to the grid, using XAML only

心已入冬 提交于 2019-12-01 23:29:42
Using Windows Template Studio , I created a (mostly auto-generated) sample UWP application, which shows a bunch of Images within a GridView. In order to rotate them, I've used the following xaml - note RenderTransform block which I've added, and the comments within that scope: <Grid x:Name="ContentArea"> <GridView x:Name="ImagesGridView" ItemsSource="{x:Bind Source}" IsItemClickEnabled="True" Padding="{StaticResource MediumLeftRightMargin}" SelectionMode="None"> <GridView.ItemTemplate> <DataTemplate x:DataType="models:SampleImage"> <Image x:Name="galleryImage" Style="{StaticResource

UWP DatagramSocket Multicast

一世执手 提交于 2019-12-01 22:49:00
I managed to make a simple application that sends and receives data from a multicast group. If I open 2 instance of the application (2 different .sln files with the same code) I can send and receive data. The problem is that after 5 seconds, if I send a message from the Client001 only the Client001 will get the message. But, if I send message from the Client002 (the second instance of the app) within the 5 seconds then both of them get the message. I had an example with UdpClient that was working perfectly, but that is no longer available for UWP. So in conclusion, how can I achieve, no matter

Change default time of auto-hide timer of ScrollViewer scrollbars

假如想象 提交于 2019-12-01 06:12:41
When a ScrollViewer has scrollbars showing, and the cursor is not moved for around 3 seconds, the scrollbars auto hide. Is there a way to set that time to more or less than the default time? EDIT Reproduce so: <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <ScrollViewer Height="500" Width="500"> <Grid Background="Blue" Height="1000" Width="1000"> </Grid> </ScrollViewer> </Grid> Move the cursor over the ScrollViewer to show the scrollbar. Leave the cursor motionless for 3 seconds to see the scrollbar disappear. I want to change those 3 seconds to 1. EDIT 2 Follow-up

UWP get live webcam video stream

爷,独闯天下 提交于 2019-12-01 06:08:34
I was looking into the MediaCapture class, however it doesn't seem to expose what I'm looking for. I want the live Stream from the web cam - not to record it or preview it. I'm working on the Microsoft Cognitive Services Emotion API and I want to follow this example , but instead of getting a local video stream from the file system - I want to get a Stream from a web cam. The Microsoft Cognitive Services Video APIs, including Emotion, are REST APIs, not streaming APIs, so your scenario is not supported. What you can do instead is periodically capture a frame and make RESTful calls to one of

Can't use Syncfusion assembly in project

☆樱花仙子☆ 提交于 2019-12-01 06:01:26
I tried to use this code, to include Syncfusion Charts to the project xmlns:charting="clr-namespace:Syncfusion.UI.Xaml.Charts;assembly=Syncfusion.SfChart.UWP" but I get an error: Undefined type "SfChart" in XML namespace "clr-namespace:Syncfusion.UI.Xaml.Charts;assembly=Syncfusion.SfChart.UWP" If I use standard using everything ok, but app package is too big, I don't need all controls from Syncfusion SDK. xmlns:charting="using:Syncfusion.UI.Xaml.Charts" It works fine with the following namespace while using assembly Syncfusion.SfChart.UWP xmlns:charting="using:Syncfusion.UI.Xaml.Charts"