I have a combobox bound to a ViewModel property called "Property".
"Property" is a TypeDescriptor.
When user changes value in combobox the "Property" is updated.
On the UI i would like to either hide or make visible different controls: textbox, combobox, date picker etc.
Problem is datatrigger is not working as expected.
<Style x:Key="textboxStyle"
TargetType="{x:Type TextBox}">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=Property.PropertyType}"
Value="{x:Type Type={x:Type sys:String}}">
<Setter Property="Visibility"
Value="Visible" />
</DataTrigger>
</Style.Triggers>
</Style>