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 4260276

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T05:53:53+00:00 2026-05-21T05:53:53+00:00

Here is what I am trying to do. I can’t seem to be able

  • 0

Here is what I am trying to do. I can’t seem to be able to figure out a solution yet:

  • I have 2 string data sources from a webservice and on the front end I want to combine them into a single sentence separated by a comma.
  • The first part I want in normal font, the second part I want in italics
  • I also want the sentence to word wrap
  • I am using MVVM so I want to some how bind these string data sources to a textblock some how…

The cases I want to be able to handle:

Normal:
ex. This is the sentence part 1, this is the sentence part 2

No second part so no comma
ex. This is the sentence part 1 I still want this to be able

to word wrap

The second part word wraps
ex. This is the sentence part 1, this is the sentence
part 2 wrapped to second line

Also

  • Second Part only with word wrapping
  • First part wordwraps followed by the second part

There seems to be no easy solution.
The one that I can think is have a PropertyChangedEventHandler which notifies me when those strings were returned from the webserver, then format the string in codebehind…

  • 0 0 Answers
  • 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-21T05:53:54+00:00Added an answer on May 21, 2026 at 5:53 am

    In order to achieve the effect that you are trying to achieve continuous word wrapping with the italic formatting can only sensibly be achieved by using the <Run> element within a TextBlock. However, you cannot bind the contents of a Run element, so you will need to create this in code.

    Assuming that you get two separate responses from the web service (they don’t come back from a single call), then you cannot rely on which one will come in first, so I would use event aggregation to notify the view from the view model when all the necessary data has been received. The PRISM library for WP7 includes an implementation that you can use to achieve the effect (note that PRISM for WP7 is much lighter than it’s WPF or Silverlight counterparts).

    In response to the event, your view can pull the properties from the view model, create the TextBlock and it’s component Run elements, and then update accordingly. In fact, when you subscribe to an event using PRISM, you can specify that the handler for that event is run on the UI thread, which will no doubt help.

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

Sidebar

Related Questions

I'm trying to figure out what I'm doing wrong here, but I can't seem
I'm trying to hide a layer but can't seem to figure out how to
Here's what I'm trying to do, and failing... I have a File model which
here's what I'm trying to do : On a page, I would have a
Here's what I'm trying to do : I have an entity Task with a
Here's some background on what I'm trying to do: Open a serial port from
I am trying here to basically find users that do have sports & regions
I'm trying and trying and can't make it working. I have a ul class=first
How can I hide a specific <div> from Google? Is there any other solution
My code can be found here c# asp.net FTP Error I am trying to

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.