
We have many WPF views using DateTimeEditBox, Int32EditBox, etc. part controls. When the user tabs through the controls on the view we want the tab that currenly has focus to show a Green (or some other color) border so the user can clearly identify the control with focus. We have this working for text box, combo box, etc.; but for the "Part Editors" controls it doesn't work. We are doing this by defining a style like:
<Style TargetType="{x:Type local:ABSTextBox}" BasedOn="{StaticResource {x:Type ribbon:TextBox}}">
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Style.Triggers>
<Trigger Property="IsFocused" Value="true">
<Setter Property="BorderBrush" Value="#FF0DCD6D" />
<Setter Property="BorderThickness" Value="3" />
</Trigger>
</Style.Triggers>
</Style>
As I said, this approach is working fine for TextBox and ComboBox; but for the DateTimeEditBox, Int32EditBox, etc. control it doesn't work. I am guessing the problem is that the foucs is actually on some control contained within the DateTimeEditBox; but I don't know what that is or how I can define a trigger to get our desired behavior.
Any suggestions??
- Brad