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
1750
Reference theme resource for ForegroundHoverStyle
posted

Hi community

In a touch application we have Xamdatagrid that visualizes data. The application relies on the Infragistic themes and the user can switch between the themes during the runtime.

In one view we user the xamdatagrid to visualize data that is then sent to a service. The user clicks on the first column of the data row he wants to sent. The data is sent to a service and the background color of the row is set to green. This visualizes that the current data is active. But as the mouse/touch pointer is still over the marked row, the green is not always shown. So i set the color of the hover background and the hover border to transparent.

<igDP:XamDataGrid.Resources>
  <Style TargetType="{x:Type igDP:DataRecordCellArea}" BasedOn="{StaticResource {x:Type igDP:DataRecordCellArea}}" >
     
<Setter Property="BackgroundHover" Value="Transparent" />
   
<Setter Property="BorderHoverBrush" Value="Transparent" />
  </Style>
</igDP:XamDataGrid.Resources>

Now I want to set the text color of the foregroundHoverStyle, but I do not want to set it to a fixed value. It should reference the default foreground/inactive color of the datagrid cells from the current theme.

<Setter Property="ForegroundHoverStyle">
  <Setter.Value>
    <Style>
      <Setter Property="TextBlock.Foreground" Value="{reference to the default foreground Color}"/>
   
</Style>
  </Setter.Value>
</Setter>

How can I achieve this?

Thanks