Hi!
The TextBox in the recordfiltering is getting an abnormal style of the customized usual TextBox on focus. It just looks like a CheckBox on focus with the same style.
Here is the code:
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:igDP="http://infragistics.com/DataPresenter" x:Class="MainWindow" x:Name="Window" Title="MainWindow" Width="640" Height="480"> <StackPanel> <igDP:XamDataGrid BindToSampleData="True"> <igDP:XamDataGrid.FieldSettings> <igDP:FieldSettings AllowRecordFiltering="True" FilterOperandUIType="TextBox"/> </igDP:XamDataGrid.FieldSettings> </igDP:XamDataGrid> <TextBox Margin="8,8,0,0" HorizontalAlignment="Left" Text="TextBox"/> <CheckBox Margin="8,8,0,0" Content="CheckBox"/> </StackPanel></Window>
And the ResourceDictionary:
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Style TargetType="{x:Type TextBox}"> <Style.Triggers> <Trigger Property="IsFocused" Value="true"> <Setter Property="BitmapEffect"> <Setter.Value> <OuterGlowBitmapEffect GlowColor="Orange" GlowSize="3" /> </Setter.Value> </Setter> </Trigger> </Style.Triggers> </Style> <Style TargetType="{x:Type CheckBox}"> <Style.Triggers> <Trigger Property="IsFocused" Value="true"> <Setter Property="BitmapEffect"> <Setter.Value> <OuterGlowBitmapEffect GlowColor="Orange" GlowSize="3" /> </Setter.Value> </Setter> </Trigger> </Style.Triggers> </Style></ResourceDictionary>
I don't want to name the style and use it for every single TextBox. I want to use for each TextBox. But I don't want to let the recordfiltering glow in this way.
Hello,
I apologize that this post was not answered sooner. We are making the effort to ensure all posts are addressed by an Infragistics expert.
The TextBox in the FilterCell will also pick up that style, as it has no key and will be applied to all instances by default. One way to override this behavior is to make the filter cell not use the glowing TextBox style. You can create a style for the FilterCellValuePresenter and put an empty style for TextBox type inside its Resources dictionary. This way, this style would be picked up before it finds the glowing one.
Thank you!