Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1325
Setting DataRecordCellArea.ForegroundHoverStyle to Null doesn't work.
posted

I would like to get rid of record hover appearance. I created a style for DataRecordCellArea with:

BackgroundHover = Transparent   -  this works

and

ForegroundHoverStyle = {x:Null}   -   this doesn't work. Foreground is still black when when record is hovered.

Here is full xaml:

<idp:XamDataGrid x:Name="HistoryGrid" x:FieldModifier="private" Theme="Office2k7Blue" GroupByAreaLocation="None"
DataSource="{Binding Path=History}">
<idp:XamDataGrid.Resources>
<Style TargetType="idp:DataRecordCellArea">
<Setter Property="Background" Value="{Binding Path=DataItem.BackgroundColor}"/>
<Setter Property="Foreground" Value="{Binding Path=DataItem.ForegroundColor}"/>
<Setter Property="BackgroundHover" Value="Transparent"/>
<Setter Property="ForegroundHoverStyle" Value="{x:Null}"/>
</Style>
<Style TargetType="idp:CellValuePresenter">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=IsSelected, RelativeSource={RelativeSource AncestorType={x:Type idp:DataRecordCellArea}}}" Value="True">
<Setter Property="ForegroundStyle">
<Setter.Value>
<Style>
<Setter Property="TextBlock.Foreground" Value="White"/>
</Style>
</Setter.Value>
</Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</idp:XamDataGrid.Resources>
<idp:XamDataGrid.FieldLayoutSettings>
<idp:FieldLayoutSettings AllowAddNew="False" AllowDelete="False" AllowFieldMoving="WithinLogicalRow" AutoGenerateFields="False"
FilterAction="Hide" RecordSelectorLocation="None" SelectionTypeCell="None"
SelectionTypeField="None" SelectionTypeRecord="Single" DataRecordSizingMode="SizedToContentAndFixed"/>
</idp:XamDataGrid.FieldLayoutSettings>
<idp:XamDataGrid.FieldSettings>
<idp:FieldSettings AllowEdit="False" AllowGroupBy="False" AllowRecordFiltering="False" CellClickAction="SelectRecord"
LabelClickAction="Nothing"/>
</idp:XamDataGrid.FieldSettings>
</idp:XamDataGrid>

  • 27093
    posted

    Hello,

     

    I have been looking into your issue and can rather suggest you retemplate the whole DataRecordCellArea starting with the original template you can get from the DefaultStyles folder. When you have it simply remove all settings and storyboards triggered by the IsMouseOver property and you’ll get rid of the hovering effects. Another thing is this should also slightly improve performance for you.

     

    Please let me know if you require any further assistance on the matter.

     

    Sincerely,

    Petar Monov

    Developer Support Engineer

    Infragistics Bulgaria

    www.infragistics.com/support