How can a DataTrigger change the visibility of stackpanel, based on a binded string? I have the following Xaml
<StackPanel HorizontalAlignment="Right"
Orientation="Horizontal"
Grid.Column="1"
Background="#FF7a7a7a">
<StackPanel.Style>
<Style TargetType="{x:Type StackPanel}">
<Style.Triggers>
<DataTrigger Binding="{Binding SearchText}" Value="">
<Setter Property="Visibility" Value="Hidden"/>
</DataTrigger>
</Style.Triggers>
</Style>
</StackPanel.Style>
Content....
</StackPanel>
I Know that SearchText gets updates and binds properly outside the StackPanel
Could somebody point me in the right direction?
TextBoxText property it works. Do you know what your property is returning?SearchTextproperty is aStringtypenull