I'm having a problem with the new IsCurrentLineHighlightingEnabled property. I have this property bound to a ribbon button, but what I'm finding is that it doesn't reliably toggle it's state with the button click. I have set the state of the property to True. When the application starts, the the button indicates an "on" state and line highlighting is on. When I click the button, highlighting is turned off and the button goes into an "off" state. Now when I click the button again, the button indicates "on" but line highlighting does not get turned on. From this point on. I can click the button and line hightlighting turns on and off, but is out of sunc with the state of the button. I have other boolean syntax editor properties bound to ribbon buttons exactly the same way, using a common method, and they all work correctly 100% of the time. Not sure why this property is behaving differently.
<ribbon:ButtonGroup >
<ribbon:Button Name="btnLineHighlight" ImageSourceSmall="/WpfApplication1;component/Resources/HighlightHS.png" Label="Highlight" IsChecked="{Binding Path=IsCurrentLineHighlightingEnabled, ElementName=Editor1}" Click="ToggleLineHighlightingButton_Click" ScreenTipHeader="Highlight Line" ScreenTipDescription="Toggle current line highlighting" />
<ribbon:Button ImageSourceSmall="/WpfApplication1;component/Resources/List_NumberedHS.png" Label="Line Numbers" IsChecked="{Binding Path=IsLineNumberMarginVisible, ElementName=Editor1}" Click="ToggleButton_Click" ScreenTipHeader="Line Numbers" ScreenTipDescription="Toggle line numbering" />
</ribbon:ButtonGroup>
Private Sub ToggleButton_Click(ByVal sender As System.Object, ByVal e As ActiproSoftware.Windows.Controls.Ribbon.Controls.ExecuteRoutedEventArgs)
e.Handled = True
DirectCast(sender, ActiproSoftware.Windows.Controls.Ribbon.Controls.Button).IsChecked = Not DirectCast(sender, ActiproSoftware.Windows.Controls.Ribbon.Controls.Button).IsChecked
End Sub