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 8350429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T08:19:02+00:00 2026-06-09T08:19:02+00:00

I need to alternate text displayed by a single based on two model properties

  • 0

I need to alternate text displayed by a single based on two model properties for about 4 seconds. Specifically, my model as a Price, Bid, and Ask property. i have the following text block bound to Price.

<ControlTemplate x:Key="QuotePrice" >
    <TextBlock Style="{StaticResource PriceCellStyle}" Text="{Binding Price}">
</ControlTemplate>

If the model’s Ask property changes, i want to toggle between displaying Price and Ask in the same texblock.

The option i think would work would be to create two textblock, one bound to Price and one bound to Ask and using perhaps a storyboard, alternate the visibility of the two texblocks. However, i would like to avoid using two textblock if possible. Any suggestions on how this can be done?

  • 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-06-09T08:19:04+00:00Added an answer on June 9, 2026 at 8:19 am

    However, i would like to avoid using two textblock if possible. Any suggestions on how this can be done?

    Using two TextBlock instances will be the simplest, and likely the most elegant solution.

    However, you could update the binding at runtime, if you’d prefer to stick to a single TextBlock. Alternatively, you could also bind to a new property (ie: PriceOrAsk), and change it’s value as needed within your DataContext.

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

Sidebar

Related Questions

I need to alternate a date and a phrase within a <table> cell without
I need to create a table that has both alternate and rounded TR corners,
I am working on MVC 4.0. I need to access my dropdown box Text
I am using jQuery. test.html contains images and text. Now I need to load
I am newbie to Perl. I need to parse a tab separated text file.
I'm building a web system and various clients will have alternate text for default
I need an alternative to the std library's matrix functions, preferably one that is
Just for the pleasure of learning, I don´t need an alternative solution (I know
Since ASP.NET response filtering and post-cache substitution are not compatible, I need an alternative
I need a cPanel alternative, but with easy deployable Ruby-Rack applications support, not only

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.