Hello,
I have to display a big list of properties/values. My issue is that there aren't values for all these properties, so I would like NOT to display these in that case.
It will be easier to understand my problem with some code:
<StackPanel DataContext=...>
<TextBlock>Info1:<TextBlock Text={Binding Path=Info1} /></TextBlock>
<TextBlock>Info2:<TextBlock Text={Binding Path=Info2} /></TextBlock>
<TextBlock>Info3:<TextBlock Text={Binding Path=Info3} /></TextBlock>
</StackPanel>
Basically, depending on the content of the child TextBlock, I would like to collapse the parent TextBlock. My idea was to use a style that applies to all the TextBlock and to check for content, and if there isn't any, to collapse the parent... unfortunately, I can't manage to access to the parent from the DataTrigger. Probably you'll have a solution more neat than that :)
Thanks a lot for your help!