uwp

UWP xaml: How to display a button with icon and text in it?

巧了我就是萌 提交于 2019-12-06 19:30:04
问题 How can I display an image/icon AND text in a button? <StackPanel Name="stackPanel" Orientation="Horizontal" Tapped="stackPanel_Tapped"> <Button x:Name="button" FontFamily="Segoe MDL2 Assets" Content="" Width="50" Height="50" Background="Transparent" /> <TextBlock Text="Grades" FontSize="18" VerticalAlignment="Center" /> </StackPanel> I can add a taplistener to the stackpanel, but that won't make the stackpanel have visual effect like a real button. I've also tried: <Button FontFamily="Segoe

System.Serializable attribute gone in Windows 10 UWP apps?

。_饼干妹妹 提交于 2019-12-06 19:29:44
问题 While trying to port an open source library (Aforge.net) to UWP, I discovered the System.Serializable attribute does not seem to exist. References for UWP work a little differently and I'm still trying to wrap my head around the changes so I hope I'm just missing something simple. My question is, can someone please confirm whether the System.Serializable attribute works/should work in a UWP app? I've tried looking through MSDN and various other google sources but cannot find any evidence one

How can I detect when scrolling has started in a ListView on Windows 10 UWP?

一个人想着一个人 提交于 2019-12-06 17:09:29
问题 I'd like to subscribe to an event which tells me that scrolling has started in a ListView and get the direction of scrolling. Is there any way to do this in Windows 10 UWP API? Thanks 回答1: You should first obtain the ScrollViewer inside the ListView and then subscribe to its DirectManipulationStarted event. However, to get the direction of the scrolling can be tricky. I'd suggest you to have a look at the new Windows Composition API where there's a way to use ExpressionAnimation to link the

Where has TextBlock Background property gone in UWP?

偶尔善良 提交于 2019-12-06 16:59:08
问题 I need to change the Background of a TextBlock in UWP but the Background property no longer exists. What is the solution for this? This don't work... <TextBlock Text="Exceptions Log" FontSize="10" Background="Red" // This is invalid /> Thanks 回答1: Just put it inside a Grid or a Border or something else... <Border Background="Red"> <TextBlock Text="Exceptions Log" FontSize="10" /> </Border> 来源: https://stackoverflow.com/questions/34131831/where-has-textblock-background-property-gone-in-uwp

Edge: In-Process native extension and Windows.System.Launcher.LaunchFileAsync

≯℡__Kan透↙ 提交于 2019-12-06 16:58:31
问题 I have developed an edge browser extension (native messaging) using the in-process mechanism as described here (through an activation of OnBackgroundActivated ). Within OnBackgroundActivated , or to be more specific in OnAppServiceRequestReceived of the established app service connection, I am attempting to call Windows.System.Launcher.LaunchFileAsync(IStorageFile) . This doesn't appear to happen on the UI-Thread (although it does work in debug mode with a debugger attached). The problem that

Can I sync scrolling between multiple Listview items in UWP?

为君一笑 提交于 2019-12-06 16:57:17
问题 How can I link 2 Listview components, so that their scrolling is in sync (when I scroll one, the other scrolls too at the same time)? So basically I need a way to: 1) Monitor the scrolling event of Listview1 2) Set the same scrolling offset to Listview2 I found some examples here on Stackoverflow but they either refer to WPF, or WinRT and they are not compatible with my app. Thank you! 回答1: What you have described in your question can be done by the following steps: Find the ScrollViewer

UWP ValueConverter with DependencyProperty

三世轮回 提交于 2019-12-06 16:45:15
I have a UWP project, and I am trying to get a binding on my ValueConverter . It is based on this guide . I have created a DependencyProperty on the ValueConverter , but it is always null , instead of an element of type Vehicle . There is my code: MainPage.xaml <Page x:Class="Project.Pages.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" xmlns:conv="using:Project

How can I change the height of the ListView item(UWP) that is clicked? Like Mail App does

人走茶凉 提交于 2019-12-06 16:29:41
问题 Here is what I am trying to do. I have a very simple ListView that has a dataTemplate, which is bound to a ObservableCollection in page code. Fairly simple right? Now I want to change the height of a single Item in listview as soon as it gets clicked. Mail and Wifi-Ui of Windows uses this kind of manipulation. Check the Images to understand Better. Possible Solution:- I have defined two datatemplate in Xaml as a resource and in a click event I am changing the ItemTemplateSelector property of

How to make Windows 10 Store “forget” an app download for testing purposes?

半世苍凉 提交于 2019-12-06 16:18:24
I'm testing my Win32 app converted to UWP, so I'm new to the whole Windows 10 Store concept. So far I was able to get my app certified & published in the store via a private link. Now I would like to download and test it, but there's an issue. The first time someone sees the app it has the following options: but once you get it, all you see is this: and even if you log in under a different Microsoft account (on the same computer), or previously uninstall the app, you get this: and "free trial" simply installs it w/o a trial in that case. So my question is, how do I make Windows Store "forget"

x:Bind ViewModel method to an Event inside DataTemplate

本小妞迷上赌 提交于 2019-12-06 15:56:27
I'm basically asking the same question as this person , but in the context of the newer x:Bind . ViewModels' DataContext is defined like so <Page.DataContext> <vm:ChapterPageViewModel x:Name="ViewModel" /> </Page.DataContext> So whenever I need to bind something I do it explicitely to the ViewModel like so ItemsSource="{x:Bind ViewModel.pageList, Mode=OneWay}" However that doesn't work within templates <FlipView ItemsSource="{x:Bind ViewModel.pageList, Mode=OneWay}"> <FlipView.ItemTemplate> <DataTemplate x:DataType="models:Image"> <ScrollViewer SizeChanged="{x:Bind ViewModel.PageResized}"> <--