uwp

How can I drag and drop controls using a common method?

倖福魔咒の 提交于 2019-12-08 03:22:18
问题 I have the following XAML code, which creates two stack panels within a big parent Stack Panel. I would like to be able to drag each small stack panel within the parent bigStack panel. XAML <StackPanel BorderThickness="1" BorderBrush="Black" x:Name="bigStack"> <StackPanel x:Name="smallStack1" ManipulationMode="All" ManipulationDelta="objectManipulationDelta" ManipulationStarting="objectManipulationStarting"> <TextBlock Text="John Doe"/> <TextBlock Text="CEO"/> </StackPanel> <StackPanel x:Name

Template 10:Get the splash screen like the course in MVA

此生再无相见时 提交于 2019-12-08 03:18:36
问题 I just completed the course on template 10 in mva. Now I am working on this app and would like it to have the splash screen like this(of course the logo can be changed). Where should I get started to code(any tutorial)? Or if there's a sample code available. Screenshots: 回答1: I think it uses an extended splash screen. The extended splash screen in UWP is the same as it in a Windows 8.1 app. You can start with How to extend the splash screen (XAML), there is a 8.1 sample in this document, and

UWP ValueConverter with DependencyProperty

家住魔仙堡 提交于 2019-12-08 03:14:58
问题 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:

Drop shadow is above the text

白昼怎懂夜的黑 提交于 2019-12-08 02:56:26
问题 I'm adding a drop shadow to a Xamarin.UWP project (but the question is not really Xamarin-specific but UWP in general): bool IsShadowSupported => ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 3); // SDK >= 14393 if (IsShadowSupported) { var compositor = ElementCompositionPreview.GetElementVisual(Control).Compositor; dropShadow = compositor.CreateDropShadow(); if (Control is Windows.UI.Xaml.Controls.TextBlock textBlock) dropShadow.Mask = textBlock.GetAlphaMask(

How to set the window's size in a Universal app?

不问归期 提交于 2019-12-08 02:45:24
问题 I use C# and XAML, and my main page begins like this : <Page x:Class="MyApp.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:MyApp" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Height="754" Width="1018" MaxHeight="754" MaxWidth="1018" MinHeight="754" MinWidth="1018" mc:Ignorable="d"> <Grid> (...) </Grid> But

Can I set the uwp app store display name to be different from the installed app display name?

风格不统一 提交于 2019-12-08 02:43:16
问题 I would like to have a more descriptive name (for discoverability) in the Microsoft app store, but use a shorter name for the app when it is installed. I have reserved both names. I am thinking I set the App Manifest to have the short name in the Application -> Display name, and the more descriptive, store name in Packaging -> Package display name, but I don't understand the way these two names are used so I'm just guessing. Before I try this with an actual submission, I'm wondering if

Win10 UWP Custom Video Effect, IBasicVideoEffect

浪子不回头ぞ 提交于 2019-12-08 02:32:16
问题 I am trying to write my own implementation of IBasicVideoEffect to analyze video frames in a Windows 10 UWP application, the end goal is using the Zxing.NET library to scan qr codes. I cannot add the video effect to the instance of MediaCapture in my code. The line var effect = await _mediaCapture.AddVideoEffectAsync(new VideoEffectDefinition(typeof(MyVideoEffect).FullName), MediaStreamType.VideoPreview); in Win10QR.MainPage.cs throws an exception stating "Class not registered (Exception from

uwp commandbar always show label

倾然丶 夕夏残阳落幕 提交于 2019-12-08 02:14:52
问题 Answer: Thanks to Justin XL I was able to fix my problem. I implemented the style he provided below in his answer and added, as he said, this in the App.xaml: ( I changed the height to 66 - fits better for me) <Application.Resources> <x:Double x:Key="AppBarThemeCompactHeight">66</x:Double> </Application.Resources> and then this in my CommandBar Height="{StaticResource AppBarThemeCompactHeight}" Question: I want my Command Bar to always show its Labels, in standard mode. I have Secondary

ListView is not scrolling with grouping

回眸只為那壹抹淺笑 提交于 2019-12-08 02:03:51
问题 I simply changed my ListView to use grouping, but now I can't use ScrollTo anymore. I have create a simple app, so you can see the problem. The XAML-page looks like (I am not using XAML in my app at the moment, but I will in an upcoming version). <?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:ScrollListExample" x:Class="ScrollListExample.ProjectPage"> <Grid>

Button VisualState Focused not working

纵然是瞬间 提交于 2019-12-08 01:18:12
问题 I'm trying to change the font color of a button when the button is clicked. I have tried many different things but none have worked. This is the latest thing I tried and what I believe should be the answer but its not working. Can someone help? PointerOver isworking fine, but Focused is not doing anything when the button is clicked. <Style x:Key="ButtonStyle" TargetType="Button"> <Setter Property="Background" Value="Transparent" /> <Setter Property="Foreground" Value="Black" /> <Setter