Posted 15 years ago
by justin stofle
I have a style that is being set on actipro editor controls and it is supposed to make the outer edge of the control glow purple when they have keyboard focus. This works fine for standard microsoft controls like a textbox, however this property never seems to be getting set on the editors controls. below is a sample program that will illustrate what i am talking about.
<Window x:Class="ActiproBug.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:editors="http://schemas.actiprosoftware.com/winfx/xaml/editors"
Title="Window1" Height="300" Width="300">
<Window.Resources>
<Style TargetType="{x:Type editors:DoubleEditBox}" BasedOn="{StaticResource {x:Type editors:DoubleEditBox}}">
<Style.Triggers>
<Trigger Property="IsKeyboardFocused" Value="true">
<Setter Property="BitmapEffect">
<Setter.Value>
<OuterGlowBitmapEffect GlowColor="Purple" GlowSize="10" Opacity="1" />
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="{x:Type editors:MaskedTextBox}" BasedOn="{StaticResource {x:Type editors:MaskedTextBox}}">
<Style.Triggers>
<Trigger Property="IsKeyboardFocused" Value="true">
<Setter Property="BitmapEffect">
<Setter.Value>
<OuterGlowBitmapEffect GlowColor="Purple" GlowSize="10" Opacity="1" />
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="{x:Type editors:DateTimeEditBox}" BasedOn="{StaticResource {x:Type editors:DateTimeEditBox}}">
<Style.Triggers>
<Trigger Property="IsKeyboardFocused" Value="true">
<Setter Property="BitmapEffect">
<Setter.Value>
<OuterGlowBitmapEffect GlowColor="Purple" GlowSize="10" Opacity="1" />
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Type TextBox}}">
<Style.Triggers>
<Trigger Property="IsKeyboardFocused" Value="true">
<Setter Property="BitmapEffect">
<Setter.Value>
<OuterGlowBitmapEffect GlowColor="Purple" GlowSize="10" Opacity="1" />
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
</Window.Resources>
<Grid>
<StackPanel Orientation="Vertical">
<TextBlock Text="The acti pro controls below will not glow purple when they have keyboard focus"></TextBlock>
<editors:DoubleEditBox></editors:DoubleEditBox>
<editors:MaskedTextBox></editors:MaskedTextBox>
<editors:DateTimeEditBox></editors:DateTimeEditBox>
<TextBlock Text="The windows textbox control will glow purple when it has keyboard focus"></TextBlock>
<TextBox></TextBox>
</StackPanel>
</Grid>
</Window>