visualstates

How to change VisualState via ViewModel [duplicate]

本小妞迷上赌 提交于 2019-12-18 03:46:21
问题 This question already has answers here : Binding [VisualStateManager] view state to a MVVM viewmodel? (4 answers) Closed 4 years ago . I know this Question is similar to many. Anyway, I don't understand. I have a several VisualStates (more than 2, thats why DataStateBehavior is not my solution). And I have ViewModel, which have enum property CurrentState . Every enum value represents to one state, also may be several enum values represents to one states, doesn't metter. I want VisualState

DataTrigger with VisualStates in Windows phone 8.1

夙愿已清 提交于 2019-12-14 01:55:01
问题 I'm trying to convert old Window phone 7.5 Silverlight Application to new WinRT Universal application and I have problems with this pice of code: <Style TargetType="Button"> <Setter Property="Visibility" Value="Collapsed"/> <Style.Triggers> <DataTrigger Binding="{Binding Active}" Value="True"> <Setter Property="Visibility" Value="Visible"/> </DataTrigger> </Style.Triggers> </Style> I used DataTrigger to set visibility of control based on binding value. In Windows Phone 8.1 winrt app this

SketchFlow / Using (Selected) TabItem in TabControl to Trigger State

风流意气都作罢 提交于 2019-12-13 21:15:47
问题 Context: A new Sketchflow / Silverlight project. Expression Blend 4 (Ultimate) I have the below code. I have a TabControl with 2 TabItem's. I also have 2 "callout" (big bubble things) as quick visual on the state change. I created a VisualStateGroup and added to States under it. When I manually invoke these from the NAVIGATE window (after I run the project), the states work as expected. callout1 and callout2 flip flop their opacities (between 100% and 10%). So I have a basic understanding of

VisualState commonState doesn´t work xaml

不打扰是莪最后的温柔 提交于 2019-12-13 05:59:05
问题 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 .. :( <view:NavigationStoredPage.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="/Styles/ResponsiveStyles.xaml"/> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </view:NavigationStoredPage

What is the proper way to implement VisualStates for multiple VisualStateGroups?

偶尔善良 提交于 2019-12-13 04:51:26
问题 This question is a follow-up to my previous question as well as this related question about how VisualStates work in WPF. Currently, my understanding is that animating the same property within different VisualStateGroups can cause problems (see the linked questions). To resolve these problems, it requires loop-holes to be taken advantage of. (Perhaps loop-hole isn't the correct term, but it appears that the solution isn't what the WPF designers intended.) I'm wondering what is the correct way

VisualState in abstract control

≡放荡痞女 提交于 2019-12-10 10:19:44
问题 I have an abstract BaseControl that contains dependency properties as well as default style and VisualState. I would like to use these VisualState in inherited Controls. I understand that setting the Template of the inherited control does not enable the VisualState to access the UIElement that it needs to update. How should I proceed to properly use these VisualStates? (copy paste the VisualState in the XAML of each inherited control is not an option for me). Is it possible to access the

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

Why is the ColorAnimation for Checked state not persisting color after the MouseOver state is triggered?

浪尽此生 提交于 2019-12-07 04:50:20
问题 I encountered an issue with a ControlTemplate for ToggleButton I created. When the button is Checked , a ColorAnimation is triggered and the control's background changes color. However, if the user enters the MouseOver state, another animation is triggered that affects the button's background as well. When the mouse is no longer in the MouseOver state, the control does not return to the color it should be while it is in the Checked state. I'm not sure why this does not persist when the

Button VisualState Focused not working

眉间皱痕 提交于 2019-12-06 07:34:56
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 Property="FontWeight" Value="Normal" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate