Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6975403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:21:49+00:00 2026-05-27T17:21:49+00:00

I have pretty simple scenario (MVVM) DataTemplate visuals should change based on data I

  • 0

I have pretty simple scenario (MVVM)

DataTemplate visuals should change based on data I bind to. Let’s say based on some data I want background to be Red or Green

On one side it seems like 2 different Visual states “Valid” and “Invalid”. However, I can’t figure out how to bind to VisualState properly. I find examples online how to do this with code but I’m not sure if it is defeating the purpose.

Another way it to write Value Converter and bind color directly to value in my object which seems to be straightforward way. And no Visual Templates needed.

What do you think? Where I should use Visual States and where I should use binding with converters?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T17:21:50+00:00Added an answer on May 27, 2026 at 5:21 pm

    As the name VisualStateManger implies, the VSM is used to display a visual state. To use the VSM is just a way to keep something easier. In the case of just replaced a color, a Converter is sufficient whereas the VSM can also be used. In certain scenarios, the VSM provides more capabilities. Have a look here http://windowsclient.net/wpf/wpf35/wpf-35sp1-toolkit-visual-state-manager-overview.aspx. So, it depends on the requirements. Could you give us more information about your problem and what exactly you want to do?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a pretty simple scenario using manual data operations with rad list view.
I have a following fairly simple scenario: Some data needs to be written into
Pretty simple scenario. I have a web service that receives a byte array that
i have pretty simple simple question (i hope so). How do i change the
I have a pretty simple UIScrollView defined inside Interface Builder. I've pasted in some
Use scenario is pretty simple: I have a desktop only application that could be
I have a pretty simple scenario. I have the following HTML: <h1>Hello</h1> <input type="button"
My issue is pretty simple. I have an application that should be executed automatically
I have the following seemingly simple scenario, however I'm still pretty new to NHibernate.
I have a pretty simple scenario and I'm sure I'm just missing something obvious.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.