How can you get a XAML TextBlock to collapse when it contains no data?

Either Try #2 or Try #3 should be fine - the problem is in the line where you are referencing the style - you need to use either 'Style="{StaticResource KeyName}"' or 'Style="{DynamicResource KeyName}.

Either Try #2 or Try #3 should be fine - the problem is in the line where you are referencing the style - you need to use either 'Style="{StaticResource KeyName}"' or 'Style="{DynamicResource KeyName}"'. Try this (in Try #2): In Try 1 you reveal a limitation of current WPF versions: Triggers are not supported directly on elements.

1 "Triggers are not supported directly on elements. " - Then the compiler should tell you this, not another unrelated error. – Martin Konicek Jul 27 '10 at 17:02.

I think the simplest way to do this would be to define a Converter which converts string to visibility. ... return string. IsNullOrEmpty(s)?Visibility.

Collapsed : Visibility. Visible; } Then just.

Either Try #2 or Try #3 should be fine - the problem is in the line where you are referencing the style - you need to use either 'Style="{StaticResource KeyName}"' or 'Style="{DynamicResource KeyName}"'.

I think the simplest way to do this would be to define a Converter which converts string to visibility.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions