visualstatemanager

Xamarin: Visual State Manager and custom properties

人走茶凉 提交于 2020-06-29 07:02:17
问题 I am trying to set a custom property on a custom control using the Visual State Manager but I'm not having any luck so far. My custom control is just a label with an additional bindable property on it. public class SelectableLabel : Label { public static readonly BindableProperty IsSelectedProperty = BindableProperty.Create("IsSelected", typeof(bool), typeof(SelectableLabel), false); public bool IsSelected { get { return (bool)GetValue(IsSelectedProperty); } set { Console.WriteLine($"MDO:

StrokeDashArray not working with VisualStateManager (UWP)

流过昼夜 提交于 2020-05-17 06:12:14
问题 I want to have a dotted margin for Textbox if it is in Disabled state, My code looks like this <Page.Resources> <SolidColorBrush x:Key="TextBoxBackgroundThemeBrush" Color="#FFFFFFFF" /> <SolidColorBrush x:Key="TextBoxBorderThemeBrush" Color="#FFFFFFFF" /> <SolidColorBrush x:Key="TextBoxForegroundThemeBrush" Color="#FF000000" /> <SolidColorBrush x:Key="TextBoxForegroundHeaderThemeBrush" Color="#FFFFFFFF" /> <SolidColorBrush x:Key="TextBoxPlaceholderTextThemeBrush" Color="#AB000000" />

StrokeDashArray not working with VisualStateManager (UWP)

拈花ヽ惹草 提交于 2020-05-17 06:12:05
问题 I want to have a dotted margin for Textbox if it is in Disabled state, My code looks like this <Page.Resources> <SolidColorBrush x:Key="TextBoxBackgroundThemeBrush" Color="#FFFFFFFF" /> <SolidColorBrush x:Key="TextBoxBorderThemeBrush" Color="#FFFFFFFF" /> <SolidColorBrush x:Key="TextBoxForegroundThemeBrush" Color="#FF000000" /> <SolidColorBrush x:Key="TextBoxForegroundHeaderThemeBrush" Color="#FFFFFFFF" /> <SolidColorBrush x:Key="TextBoxPlaceholderTextThemeBrush" Color="#AB000000" />

UWP re-use visual state manager

折月煮酒 提交于 2020-01-23 17:22:48
问题 Why don't we have such easy responsive helpers for UWP? I have these styles in a separate .xaml file: <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:Project.App.WindowsApp.Styles"> <Style x:Key="TextTitleH1" TargetType="TextBlock" > <Setter Property="FontFamily" Value="Quicksand"/> <Setter Property="FontWeight" Value="Light"/> <Setter Property="FontSize" Value="30" /> </Style>

VisualStateManager and generated transitions

老子叫甜甜 提交于 2020-01-22 18:31:24
问题 Just when I think I understand the VisualStateManager , something proves me wrong. I'm using WPF 4 and am trying to simply enlarge an item on mouse over, and shrink it back on mouse leave. I figured I'd just define each state in a VisualStateGroup and then specify a VisualTransition with a GeneratedDuration : <Border x:Name="PART_Root" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" RenderTransformOrigin

VisualStateManager.GoToState returns false and Visual State is not changed

倖福魔咒の 提交于 2020-01-16 04:35:08
问题 I have this XAML code: <Button x:Name="btnStartRecord" Visibility="Collapsed"> <Button.BorderBrush> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="Black" Offset="0"/> <GradientStop Color="#FFF3883E" Offset="1"/> </LinearGradientBrush> </Button.BorderBrush> </Button> <Button x:Name="btnStopRecord" Visibility="Collapsed"> <Button.BorderBrush> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="Black" Offset="0"/> <GradientStop Color="

Can't find the GoToStateAction Behaviour in Blend 2017

ぐ巨炮叔叔 提交于 2020-01-05 08:52:18
问题 I am trying to use Blend 2017 to do a simple collapse/expand animation for a search panel. I created two states Collapsed and Expanded visual states and recorded the required movement. The problem now is that i can not find the GoStateAction behaviour to control the different visual states. I searched the internet but no clue. Thank you 回答1: As of today, none of the many NuGet packages do work, instead, here's the proper way: Install Blend for Visual Studio SDK for .NET using Visual Studio

Can't find the GoToStateAction Behaviour in Blend 2017

爱⌒轻易说出口 提交于 2020-01-05 08:52:13
问题 I am trying to use Blend 2017 to do a simple collapse/expand animation for a search panel. I created two states Collapsed and Expanded visual states and recorded the required movement. The problem now is that i can not find the GoStateAction behaviour to control the different visual states. I searched the internet but no clue. Thank you 回答1: As of today, none of the many NuGet packages do work, instead, here's the proper way: Install Blend for Visual Studio SDK for .NET using Visual Studio

Can't find the GoToStateAction Behaviour in Blend 2017

安稳与你 提交于 2020-01-05 08:52:13
问题 I am trying to use Blend 2017 to do a simple collapse/expand animation for a search panel. I created two states Collapsed and Expanded visual states and recorded the required movement. The problem now is that i can not find the GoStateAction behaviour to control the different visual states. I searched the internet but no clue. Thank you 回答1: As of today, none of the many NuGet packages do work, instead, here's the proper way: Install Blend for Visual Studio SDK for .NET using Visual Studio

Error using StaticResource as Storyboard for a VisualTransition

随声附和 提交于 2020-01-05 03:31:15
问题 I have a VisualTransition inside of a VisualStateGroup for a Button control. The Storyboard property is bound to a StaticResource Storyboard: <VisualTransition From="MyLock" To="Unlocked" GeneratedDuration="0:0:2.0" Storyboard="{StaticResource Storyboard_Locked_ToUnlocked}"/> When I go to the "Unlocked" state using the VisualStateManager, I get the following exception: "System.InvalidOperationException: Specified value of type 'System.Windows.Media.Animation.Storyboard' must have IsFrozen set