tags:

views:

105

answers:

1

In WPF, how would I do the following:

  1. Every x milliseconds, underline 3 words at a time. After x milliseconds, underline the next 3 words.

  2. Every x milliseconds, have 3 words appear and disappear from the window?

If I were to use Windows Forms, is there still a way of doing (1) and (2) above?

Thank you

A: 

You will create a thread which will do (1) and (2). Take into account that actual interaction with UI should be done by means of Dispatcher i.e. window.Dispatcher.Invoke(...).

To host words you can use ItemsControl with custom ItemsPanelTemplate = WrapPanel.

To host text I suggest you to use TextBlock.

Underlining is done by means of TextBlock.TextDecorations property.

archimed7592
How would I do (1). I am not sure which part of your answer addresses that. Thanks
If you will give here some details on the difficulties you bumped into or if you will elaborate your original problem, then you will have much clear responses. My response was as abstract as was your question.
archimed7592