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
615
how can I set ForegroundHoverStyleProperty is nothing
posted

how can I set ForegroundHoverStyleProperty is nothing when mouse over the cell

 

the code doesn't work:

     Dim foregroundHoverStyle As New Style(GetType(ContentPresenter))
        foregroundHoverStyle.Setters.Add(New Setter(DataRecordCellArea.ForegroundHoverStyleProperty, Nothing))

        Dim cellStyle As New Style(GetType(DataRecordCellArea))
        cellStyle.Setters.Add(New Setter(DataRecordCellArea.ForegroundHoverStyleProperty, foregroundHoverStyle))

 

 

thanks!!!

Parents
  • 9694
    posted

    Hi There,

    I apologize that no one has yet answered this post. We were inundated with more posts than we had resources to cover. Since that time we have been adding people to the task of making sure every post gets a reply from an Infragistics employee.

    As far as I can tell there is no way to remove the hover affect. However you can set the Foreground brush to the same color as the non-active Foreground brush in the XAML in a CellValuePresenter style. This style can be applied to individual CellValuePresenter styles for each Field or you can assign it implicitly to all Fields, as demonstrated in the following XAML example.

    <Style TargetType="{x:Type igDP:CellValuePresenter}">
     
    <!--To assign the foreground brush when the
        mouse enters the field.-->
      <
    Setter Property="ForegroundHoverStyle">
       
    <Setter.Value>
         
    <Style>
           
    <Setter Property="TextBlock.Foreground"
            
    Value="{DynamicResource
                  CellValueForegroundStyle
    }"/>
         
    </Style>
       
    </Setter.Value>
     
    </Setter>
    </
    Style>

    One thing to note is that the default Foreground brush applied to each cell is the CellValueForegroundStyle brush. This is defined in the Defaults.xaml (look in the DataPresenterHulk_Brushes.xaml file).

    Let me know if you need further assistance with this.

    Thanks!

Reply Children