Questions tagged [visualstatemanager]

Manages visual states and the logic for transitions between visual states for controls. Also provides the attached property support for VisualStateManager.VisualStateGroups, which is how you define visual states in XAML for a control template.

Manages visual states and the logic for transitions between visual states for controls. Also provides the attached property support for VisualStateManager.VisualStateGroups, which is how you define visual states in XAML for a control template.

More detailed overview at MSDN

382 questions
3
votes
1 answer

How to create Resource Style in XAML of VisualStateManager?

Hi I have created an ImagenButton as below: And this is the code for animation:
Wilmilcard
  • 281
  • 4
  • 13
3
votes
1 answer

How to know when the Silverlight VisualStateManager.GoToState transition has completed?

I am using the Silverlight VisualStateManager.GoToState method to transition my control from one state to another. This all works fine and the transition animations works great. But I want to know when the transition has completed so I can then…
Phil Wright
  • 22,580
  • 14
  • 83
  • 137
3
votes
1 answer

How can I share a VisualStateManager between two (or more) XAML files?

We're writing a Prism based Silverlight application and we've got a whole bunch of pages in separate modules. The transition between the pages is handled via navigation events and each module has the following methods implemented to show the page…
ChrisF
  • 134,786
  • 31
  • 255
  • 325
3
votes
1 answer

TemplateBinding in Storyboard | ObjectAnimationUsingKeyFrames not working

I have the following setup. the problem is, that if I switch to the VisualState "Alarm", the AlarmBrush is not set. I have tried different "Bindings" (see below), but I only get errors like System.Windows.Data Error: 2 : Cannot find governing…
Dominic Jonas
  • 4,717
  • 1
  • 34
  • 77
3
votes
1 answer

VisualStateManager does not hide control in UWP when width gets small

I have used the VisualStateManager to hide (collapse) an image control in a UWP app before, so I know it works. But in this one example (below), it does not. I cannot figure out why the big image (called imgCarDetail) does not disappear and reappear…
ThePeter
  • 883
  • 1
  • 7
  • 15
3
votes
3 answers

How to make a specific GoToStateAction-with-DataTrigger run when element is loaded

I have a DataTemplate. It has two visual states - Expanded, Collapsed. I added 2 GoToStateAction-s. The first one goes to the Expanded state when a data context property becomes True, and the second one goes to the Collapsed state when that same…
arconaut
  • 3,227
  • 2
  • 27
  • 36
3
votes
1 answer

Skip normal button state in VSM between mouseover and pressed state

When a button is pressed the state transitions are as follows: Normal -> MouseOver -> Normal -> Pressed -> Normal -> MouseOver The problem I have is that the MouseOver and the Pressed state have a lot in common visually and the transition to normal…
Wouter
  • 2,170
  • 1
  • 28
  • 58
3
votes
1 answer

Set Dimensions of RelativePanel's Children proportional to that of parent view

I am new to Windows Runtime programming and decided to get stuck in ahead of the release of Windows 10. I am trying to design an adaptive page UI that looks something like as follows, There is header "stuff" at the top and beneath it I want two…
rcbevans
  • 7,101
  • 4
  • 30
  • 46
3
votes
2 answers

Animate ScaleTransform of a Button using VisualStateManager

I created a control template for a button which contains a grid and a content control. What I want to do is the following: when the button is pressed, the scale of the button should animate to 0.5 and when the button leaves the pressed state, the…
3
votes
1 answer

One out of two buttons using same ControlTemplate does not animate

I have a ListView that uses a DataTemplate to render out each item, with each item having an Edit and Remove button. The two buttons are templated so that they use a Path to display an icon, and animate with a storyboard when the mouse over…
Johnathon Sullinger
  • 7,097
  • 5
  • 37
  • 102
3
votes
1 answer

VisualStateManager GoToState does not work

When the screen's orientation changes I call this: string CurrentViewState = ApplicationView.GetForCurrentView().Orientation.ToString(); // Trigger the Visual State Manager bool success = VisualStateManager.GoToState(this,…
SPQR3
  • 647
  • 7
  • 20
3
votes
1 answer

VisualStateManager VisualGroup precedence

I am trying to use the VisualStateManager inside my ControlTemplate for a ToggleButton. I want the ToggleButton to look one way when checked and another when unchecked. I also want the ToggleButton to look different when it's disabled. The issue…
Matt Becker
  • 2,338
  • 1
  • 28
  • 36
3
votes
2 answers

Windows Phone - Disabled Button Background

here I'm once more with another question about Windows Phone. I just created some custom buttons and use they as background on my buttons. I also created a grayed button to show as disabled button. But if I disable using the button1.isEnabled =…
3
votes
4 answers

Visual State Manager in WPF not working for me

In a wpf project I have this XAML code
Román
  • 1,943
  • 2
  • 18
  • 28
3
votes
0 answers

VisualStateManager does not work inside Panorama control

I am trying to use VisualStateManager inside a Panorama control but it is not working. XAML