My requirement is to apply multiple styles on a textbox having following situation:
- I have one style(e.g. MyTextStyle) in another file say 'Generic.xaml'
- my textbox is in ABC.xaml
- I want to apply some triggers to this Textbox so I have to use Textbox.Style
- I also want to apply "MyTextStyle"
when I do following it gives me error that I cannot apply DynamicResource to BasedOn:
<TextBox.Style>
<Style BasedOn="{DynamicResource MyTextStyle}" TargetType="{x:Type TextBox}">
<Setter Property="Text" Value="{Binding SelectedCall.Name}" />
<Style.Triggers>
<DataTrigger Binding="{Binding SelectedCall.Name}" Value="N/A">
<Setter Property="Text" Value="" />
</DataTrigger>
</Style.Triggers>
</Style>
</TextBox.Style>
please suggest me some solution so that I can apply this Dynamicresource as well as my datatrigger style