uwp-xaml

Horizontal swipe gesture on UWP

倾然丶 夕夏残阳落幕 提交于 2019-12-22 17:07:53
问题 is there any way to get swipe gesture same as windows phone 8 with wptoolkit. Because wptoolkit nuget package is not available for uwp, so i am unable to get similar swipe gesture on UWP In windows Phone 8 with the help of WPtoolkit nugetget package i placed this <toolkit:GestureService.GestureListener> <toolkit:GestureListener Flick="OnSwipe"/> </toolkit:GestureService.GestureListener> over text block, so i can swipe left to right or right to left over textbox1 . and swipe gesture help me to

Horizontal swipe gesture on UWP

橙三吉。 提交于 2019-12-22 17:07:24
问题 is there any way to get swipe gesture same as windows phone 8 with wptoolkit. Because wptoolkit nuget package is not available for uwp, so i am unable to get similar swipe gesture on UWP In windows Phone 8 with the help of WPtoolkit nugetget package i placed this <toolkit:GestureService.GestureListener> <toolkit:GestureListener Flick="OnSwipe"/> </toolkit:GestureService.GestureListener> over text block, so i can swipe left to right or right to left over textbox1 . and swipe gesture help me to

Bind UWP ComboBox ItemsSource to Enum

时光怂恿深爱的人放手 提交于 2019-12-22 04:05:06
问题 It's possible to use the ObjectDataProvider in a WPF application to bind an enum's string values to a ComboBox's ItemsSource, as evidenced in this question. However, when using a similar snippet in a UWP application, the ff. error message is displayed: "ObjectDataProvider is not supported in a Windows Universal project." Is there a simple alternative to do this in UWP? 回答1: Below is a working example from one of my prototypes. ENUM public enum GetDetails { test1, test2, test3, test4, test5 }

Why does this ScrollViewer's ScrollBars appear twice?

帅比萌擦擦* 提交于 2019-12-22 01:16:47
问题 I edited a ScrollViewer 's template to wait only 0.5 seconds before hiding the scrollbars, and this succeeds in hiding them at that time, but they reappear for another 0.5 seconds. Why? To reproduce, create a page resource for a ScrollViewer's Style with the default Template (find it here on MSDN) and change the 3 occurances of "3" to "0.5". Then use the following XAML: <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <ScrollViewer Height="500" Width="500" Style="

How to create a square button?

。_饼干妹妹 提交于 2019-12-22 01:03:14
问题 Thanks for @Justin XL and @grek40 help me so much. I must apologize for my poor English that troubles everyone so much. And I think I need to improve this question to help any others in the furture. Here is the newest: I need to make a square button like this: My programme is a fullscreen programme that different device has different window's size. So my square button should be can resizeable also beaucase I want to make a Reactive UI. And now how can I make a square button? Thank you. 回答1:

How to change the button's background when mouseover in UWP?

。_饼干妹妹 提交于 2019-12-21 21:48:26
问题 Now I only want to change the button's background to #f5f5f5 when mouseover it. WPF has a trigger function which can do it easily. Whereas I heard that UWP has no trigger any more,but with other function instead,like this question: Trigger element (XAML) is not supported in a UWP project I did it with DataTriggerBehavior as the tutorial: <ControlTemplate TargetType="Button" x:Key="ButtonControlTemplate"> <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding

UWP: How to catch the click of a listview part from another listview in the viewmodel instead of code-behind?

江枫思渺然 提交于 2019-12-21 21:38:24
问题 I have this listview: <Page x:Class="DataBase.ControlsPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" DataContext="{Binding CustomersViewModel, Source={StaticResource ViewModelLocator}}"> <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <ListView Name="HeaderList" ItemsSource="{Binding Customers}"> <ListView.ItemTemplate> <DataTemplate> <Grid> <Border Background="Bisque"> <TextBlock Text="

Universal Windows (UWP) Range Slider

跟風遠走 提交于 2019-12-21 05:40:53
问题 I want to create range slider in UWP . I didn't find any example. There are only single sliders but I want it like . Does anybody know how can i do it? Please help me. 回答1: To create a range slider in UWP, we can create a custom control or use UserControl. Here I use UserControl for example: Firstly, I add a UserControl named "MyRangeSlider" in my project. In the XAML: <UserControl x:Class="UWP.MyRangeSlider" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http:/

Name does not exist in the namespace

泪湿孤枕 提交于 2019-12-21 05:25:09
问题 I am working on a simple UWP project using data template binding in VS 2015. When ever I try to specify the type for the Datatemplate I get an error. XAML: <Page x:Name="RootPage" x:Class="Adaptive_News_Layout.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:Adaptive_News_Layout" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup

Override theme resource in the scope of a Page

时光毁灭记忆、已成空白 提交于 2019-12-21 02:38:06
问题 I want to override a theme resource, specifically the SystemAccentColor , in the scope of a specific page. I have successfully done it in application wide scope. But I can't do it for a specific page. XAML in App.xaml (this works fine) <Application.Resources> <ResourceDictionary> <ResourceDictionary.ThemeDictionaries> <ResourceDictionary x:Key="Default"> <Color x:Key="SystemAccentColor">#862E2D</Color> <SolidColorBrush x:Key="SystemControlHighlightAccentBrush" Color="Black"/> <