I have an OK button that accepts data input, but the user can change some data and press it again. Each press saving a particular configuration.
I want the selection on the OK button to go away, so that the user knows it's been accepted.
Ideally, I would like a pure WPF solution.
Update: some code
<ControlTemplate x:Key="MapCutIconsTemplate">
<DockPanel DockPanel.Dock="Right">
<controls:ImageButton Style="{DynamicResource ButtonStyle}"
Content="OK"
DockPanel.Dock="Top"
Command="{Binding AcceptPositionCommand}"
Source="{DynamicResource OkIcon}"
Background="{DynamicResource BackgroundColour}"/>
<controls:ImageButton Style="{DynamicResource ButtonStyle}"
Content="Back"
DockPanel.Dock="Top"
Command="{Binding BackCommand}"
Source="{DynamicResource BackIcon}"
Background="{DynamicResource BackgroundColour}"/>
</DockPanel>
</ControlTemplate>
I would like to move selection from OK button to Back button, once OK button is clicked.
Update2: getting closer
CommandParameter="{Binding RelativeSource={x:Static RelativeSource.Self}}"
this gets me the button that has been pressed, passed in as a parameter to the Command function. What I really need is the other button object.
Solution:
CommandParameter="{Binding ElementName=CutBack}"
proposed by @VS1.