I would like to add another behavior to the style without overwriting existing ones
i have following style:
<Style TargetType="TextBox">
<Setter Property="Background" Value="Red" />
<Setter Property="i:Interaction.Behaviors">
<Setter.Value>
<i:BehaviorCollection>
<Behaviors:TextBoxEnterKeyBehavior>
<Core:ChangePropertyAction PropertyName="IsEnabled"Value="False" />
<Core:ChangePropertyAction PropertyName="IsEnabled" Value="True" />
</Behaviors:TextBoxEnterKeyBehavior>
</i:BehaviorCollection>
</Setter.Value>
</Setter>
</Style>
I use this to force removal of the focus from the textbox. However, I must add another behavior on a specific page, but so that the above remain
You could use BasedOn property of Style to link it to default textbox style. So, it will only replace the modified properties in the default template instead of overwriting them.
//Default Style