Checkbox: where is Wrap ?

CheckBox doesn’t have Wrap Property for Content Property…
because Content is an object type (did it remember you anything similar?)
😦

What if Content has short text ?
Here is an example, some controls in a grid.

  <CheckBox Content="check"
            Grid.Row="1" Grid.Column="0"
            />

And what is Content has a longer text ? ;(

  <CheckBox Content="check this bla bla bla bla"
            Grid.Row="1" Grid.Column="0"
            />

The solution: custom Content, of course!

Here is a very simple example. 🙂

  <CheckBox Grid.Row="1" Grid.Column="0">
            <TextBox Text="check this bla bla bla bla" 
					TextWrapping="Wrap" 
					BorderThickness="0"
					/>
  </CheckBox>

source: How to make the text of a CheckBox wrap across multiple lines

Technorati Tags: ,,,.
Advertisements

Tags: , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: