Questions tagged [visualstates]

107 questions
0
votes
1 answer

UWP VisualState - Modifying entire class (Button for example)

in UWP, we can easily change the properties of a button for example based on the window size, using the visualstate.setters
Franck E
  • 629
  • 8
  • 26
0
votes
1 answer

Trigger a VisualState when the value of a bool property changes to true (and ignore when changes to false)

I'm working on a text editor whose UI will have two states: narrow and wide. Narrow is primarily intended to be used for window sizes below < 720px, and wide when above. However, in addition, if there is only one file open, I want the narrow UI…
Barrrdi
  • 902
  • 13
  • 33
0
votes
1 answer

VisualStateManager does not revert to original state

The following definition is used as ItemContainer style for a GridView, SelectionMode "Single". When an element is selected, a particular glyph becomes visible to indicate selection. It works right with Windows 8.1, but with UWP, it accepts changed…
cyanide
  • 3,885
  • 3
  • 25
  • 33
0
votes
1 answer

How to set ScrollViewer Width bound to a page element ActualWidth in AdaptiveTrigger UWP

I have a ScrollViewer which Width property binds to another page element. I want to apply this only on certain AdaptiveTrigger MinWindowWidth
PutraKg
  • 2,226
  • 3
  • 31
  • 60
0
votes
1 answer

Create a slide down animation/storyboard for an element?

I'd like to create a slide-down animation for an Grid element in my WPF (.net 4.0) application. I assumed that I could do the following: create a visual state (closed, renderTranslate.y=-ActualHeight, solved via Binding with converter) create a…
Marcel Jackwerth
  • 53,948
  • 9
  • 74
  • 88
0
votes
1 answer

How to refresh style effects of 'Focused' VisualState of VisualStateManager?

I have the ListBoxItem's style as follows and a problem with loosing 'Focused' visual effects when the listBoxItem remains in mentioned VisualState. How to force appropriate visual effects to appear on ‘Focused’ ListBoxItem? The scenario to achieve…
spazi
  • 53
  • 1
  • 6
0
votes
1 answer

How to change visual state from scroll viewer in wpf xaml

I'm pulling my hair out trying to get this to work. Im trying to learn to do transitions and struggling a bit. Basically im making a combo box, made up of a grid containing 2 rows. top row is a button, when clicked the bottom row opens up showing a…
0
votes
1 answer

VisualState commonState doesn´t work xaml

I have this XAML view. The VisualStateGroups for the visual triggers works fine, but the VisualStateGroup for the common states doesn't. I try assign to a rectangle in the beginning and then neither work. In other views this works fine ..…
Santiago
  • 88
  • 1
  • 1
  • 7
0
votes
0 answers

Custom template for radio button and using Visual State

This is a custom style that i am using for a radio button.The concept is to flip the foreground and background color between checked and unchecked state. Everything works fine until i move mouse over a checked button and move it out. The foreground…
AGCodes
  • 622
  • 1
  • 8
  • 22
0
votes
1 answer

Detect when a ListBoxItem is in the SelectedUnfocused state

Problem I want my Listbox to UnselectAll() whenever the user clicks anywhere outside of it. What I've done so far The following code works fine for all clicks inside the application: private void ListBox_LostFocus(object sender, RoutedEventArgs…
pfw
  • 237
  • 3
  • 9
0
votes
1 answer

WPF: VisualStateManager not working

I'm trying to figure out how the VisualStateManager works but I cannot do it. I want to do this: I have some TextBoxes where the user can enter his name, adress, ... and I'm doing a validation and I didn't want to do that with a…
sofri
  • 285
  • 1
  • 3
  • 10
0
votes
1 answer

How to hide XAML TextBlock with VisualStateManager?

I would like to hide a TextBlock based on the pages Visual State. I use the VisualStateManager to change states wich works fine. But my code for hiding the TextBlock somehow does not. Additional question: if two states share the same instructions…
0
votes
5 answers

The only image for all button states for Android?

I have an image for my button. In order to make use of it I have to have 1 additional image for each state: 1. disabled 2. selected 3. pressed etc.. in iOS all those additional states are handled automatically and deferred from original image…
Mando
  • 11,414
  • 17
  • 86
  • 167
0
votes
1 answer

Silverlight 4.0 VisualStateManager

Can anyone please help me or is there anything I miss out? the visualstate is not triggered xmlns:swi="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" …
xscape
  • 3,318
  • 9
  • 45
  • 86
0
votes
1 answer

Checked VisualState is not triggered after RadioButton is re-enabled

I'm working with a custom RadioButton control that is allows the user to give a rating between 1 and 5 depending on the selected RadioButton. However, there are times in my application that the 5 RadioButtons are disabled, and then re-enabled. When…
Nicholas Miller
  • 4,205
  • 2
  • 39
  • 62