views:

1129

answers:

3

I am trying to hide the TextBlock and Label which are placed inside a grid like so:

<TextBlock Grid.Column="3" Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Hidden">Text inside TextBlock</TextBlock>
<Label Grid.Column="4" Grid.Row="2" HorizontalAlignment="Center" Visibility="Hidden">Text inside Label</Label>

But the text does not disappear. Any ideas why that is?

A: 

Try Visibility.Collapsed

<TextBlock Visibility="Collapsed">
bendewey
A: 

You could also set with and height == 0

Muad'Dib
+1  A: 

Never mind, it does work when you run it, it was just the designer that does not display it correctly.

Hermann
Maybe delete the question then?
Kent Boogaart
I tried, but won't let me because someone has voted up.
Hermann
Shouldn't delete this stuff. This is knowledge to be shared!
Peter Lillevold