I know this is not an elegant solution but it is a workaround if you really would like to change the appearance of your button. While the buttons' Command help determine if its state will be enabled, it does not detect when it is active. The Editor will know which command is active but it this is not made public. The EditCompleted event will help you decide which active button to turn off once it's complete.Using that specific example, you can do the following.Listen to EditCompleted. This will be useful for removing highlight on the active button.
<esri:Editor x:Key="MyEditor"
Map="{Binding ElementName=MyMap}"
LayerIDs="CensusDemographics"
SelectionMode="Rectangle"
ContinuousMode="True"
EditCompleted="Editor_EditCompleted"/>
and for each button, listen to Button_Click. This will be useful for adding highlight to the active button and removing highlight to the other buttons if Editor is ContinuousMode. Do this for each of the buttons.
<Button x:Name="SelectButton"
Margin="2"
Content="New"
Command="{Binding Select}"
CommandParameter="New"
Click="SelectButton_Click"
></Button>
In the code-behind, you can do something like this.
private void Editor_EditCompleted(object sender, Editor.EditEventArgs e)
{
Editor editor = sender as Editor;
if (editor.ContinuousMode) return; // for this case, remove highlight when other button is clicked.
foreach (var edits in e.Edits)
{
if (e.Action == Editor.EditAction.Select)
{
SelectButton.Background = new SolidColorBrush(Colors.LightGray);
}
}
}
private void SelectButton_Click(object sender, RoutedEventArgs e)
{
//if Editor is Continuous, remove highlight on other buttons before this code
Button b = sender as Button;
b.Background = new SolidColorBrush(Colors.Yellow);
}
I hope this helps.Jennifer