I have a control in my XAML bound to a property with a style.
<TextBox x:Name="txtCapAmount" Text="{Binding Path=CapAmount}" Style="{DynamicResource AmountTextBoxStyle}" />
In the style I'd like to use the Binding from the control but am not sure how to set it
<Style x:Key="AmountTextBoxStyle" TargetType="{x:Type TextBox}">
<EventSetter Event="TextBox.PreviewTextInput" Handler="PreviewTextInput_IsTheNewValueAnAcceptableAmount" />
<EventSetter Event="CommandManager.PreviewExecuted" Handler="CommandPaste_IsTheNewValueAnAcceptableAmount" />
<Setter Property="MinWidth" Value="100" />
<Setter Property="Text" Value="{Binding Path=?????, TargetNullValue={x:Static System:String.Empty}, StringFormat={}{0:C0}}" />
</Style>
I want to reuse this style for multiple textboxes throughout the application but need to bind each individual textbox to a different property. In the style, is it possible alter the 'Text' property while retaining the Path set on the control?