vsm

WPF and VSM - List of States?

I'm using VSM (Visual State Manager, from the WPF Toolkit) in WPF and I'm trying to find a list of States. Basically, I understand that there are certain "magic" states - like the MouseOver state is automatically applied when the control is moused over, or the Focused state that is applied when ... focused. Is there a list of these so...

ControlTemplate.Triggers WPF equivalent in Silverlight 3

Hi, I have this controltempalte + trigger stuff in my WPF application. <ControlTemplate TargetType="me:MyControl" x:Key="fade"> <ContentPresenter - other stuff /> <ControlTemplate.Triggers> <Trigger Property="IsTransitioned" Value="True"> <Trigger.EnterActions> <BeginStoryboard> ...

Implementing a volatile VSM state in WPF

I am using a VisualState to "turn a page" in my UI. After the page is turned I want to go back to the state that the window was in before going to the PageTurn state. So the transitions go something like this: StateDisplayContent -> StateTurnPage -> StateDisplayContent The only way I could find to do this was is code: private void...

Blend 3 - States ??

Hi! I've just downloaded Expression Blend 3 from DreamSpark (for free because I'm a student :)) and read about states. I came across this and I was very impressed. And then I tried it on my own, I created a style, created a template, simply selected a button - but I cannot make those default styles like MouseOver, Pressed, etc. appear i...

How Can I Use the Visual State Manager in Blend for WPF Applications?

When creating a control style & template in Blend for a WPF application, I want to take advantage of the Visual State Manager. How do I do this? Whenever I right-click over the button and select Edit Template, Create Empty ... nothing shows up in the States panel. When I do the same for Silverlight application, the typical states show ...

Blend 3 VSM in WPF

I started what I thought would be a simple thing. A blend 3 project (WPF) that utilizes VSM to control the opacity of some images. For a wizard, to show what step you are in. Easy right? I've used this in the WPFToolkit, no problem. Introducing System.Windows.Interactivity - ahh, something new :) When I try and run the following code, ...

WPF - What is the relationship between state animations and transition animations (VSM)

Im having a little trouble understanding the relationships between the animation defined for a state, say state "A", and the animations defined for a state transition from A -> B. At what situation does the transition defined for state A get played? Is it just from the base state to A? ...

Visual State Manager on Custom Control

I have built a custom control that extends content control. Within this I have a parts and states model that is working fine. I then use this as the root of my xaml(placing the code in the templates folder in Blend) Everything works fine, I can open a new 'DaveControl' and get the functionality that I want. However, If I then add make...

Silverlight DataStateBehavior, initial value not used

Hi, I am trying to use the Silverlight DataStateBehavior, it works fine in most cases where I click a button which sets say a 'Selected' Property in the view model to either false or true. The DataStateBehavior then tells the VisualStateManager to go to the relevant state. Like this: <Button...> <i:Interaction.Behaviors> ...

How can i take control of an element inside a template from outer template

Hi folks, Am facing hard time finding solution for this problem. I've a control template in which i've a content presenter and a Custom visual state manager with visual state Selected and UnSelected under SelectionStates group. Inside the content presenter's content template i've an ellipse whose Fill property i want to animate accordin...

GoToState from within ItemTemplate

Anybody figured out how to activate a visual state within the namescope of the ItemsControl from within a DataTemplate applied to said ItemsControl's ItemTemplate? You obviously can't select the target from within Blend. I was wondering if there was some obvious loop hole that I am missing. ...

Silverlight Visual State Manager and DataTemplates

I'm porting a WPF application to Silverlight. DataTemplates in XAML are used to define the visuals for the data objects. In WPF, triggers are defined in the DataTemplates to provide mouse-over effects, etc. This is all done in xaml. I understand that Silverlight does not have triggers, and you are supposed to use the Visual State Manag...

Simple implementation of N-Gram, tf-idf and Cosine similarity in Python

I need to compare documents stored in a DB and come up with a similarity score between 0 and 1. The method I need to use has to be very simple. Implementing a vanilla version of n-grams (where it possible to define how many grams to use), along with a simple implementation of tf-idf and Cosine similarity. Is there any program that can...

UserControl VisualStates do not appear in Blend

The States pane in Blend 4 does not appear to show the VisualStates declared on a UserControl using the TemplateVisualState attribute. Is this to be expected and if so why? Creating the States manually in Blend seems to work correctly. ...

Getting the Vector Space Model (tf-idf) from a query on a lucene index

I need to get the Vector Space Model(with tf-idf weighting) from the results of a lucene query, and cant figure out how to do it. It seems like it should be simple, and at this stage maybe one of you guys can point me in the right direction. I have been trying to figure out how to do this for a good while, and either I haven't copped h...

What is the replacement for DataTrigger in Silverlight

This is my scenario. I have 2 Properties. Type and State. Type is an Enum with 3 values eg, ball, car, arrow. State is an int which would accept 3 state values eg., -1, 0, 1. Also, I have 9 images for each state values. Like, if I select type as ball and value as -1, I want to display a Red color ball. If I select type as arrow and va...

Change Textblock foreground color using VSM

How to change Textblock foreground color using VSM in Silverlight ?? ...

Problem setting Foreground with Visual State Manager

I have a WPF application, and I am attempting to style a TextBox using the .Net v4 Visual State Manager. Specifically, I am attempting to set the colors of the Foreground and Background for the MouseOver state. What is happening is that, while the background and border are changing perfectly, the foreground is not. If the brushes that...