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
620
LabelPresenter styling issues
posted

I am styling the LabelPresenter for the WPF XamDataGrid (v 2013.2).  I am using the default theme, and have created this style:

    <Style TargetType="igdp:LabelPresenter">
        <Setter Property="Background" Value="DarkBlue" />
        <Setter Property="Foreground" Value="White" />
        <Setter Property="LabelHighlight" Value="Black" />
    </Style>

See screen capture below for the results of this style.  I have ran into 2 roadblocks:

1) The filter, sort indicator, and pinned icons are too dark.  How can I get l lighter versions of these icons to display?  I know that the Onyx theme uses lighter versions of these icons.  Can I control the icon colors w/out changing the theme?

2) I need to change the background color for columns that are sorted, since it now shows white text on top of a light blue background.  How can I change the background color of sorted columns?  Not applying any special style when the column is sorted would be fine as well.

I looked through the LabelPresenter style in \Program Files (x86)\Infragistics\2013.2\WPF\DefaultStyles\DataPresenter, but was not able to fiture out how to fix either of these problems.

Any help would be greatly appreciated.  Tory.

Parents
No Data
Reply
  • 16495
    Offline posted

    Hello Tory,

     

    Thank you for your post.

     

    I have been looking into your requirements. About your first requirement, that I can suggest is to create style for LabelPresenter. In it you can handle the Loaded event of LabelPresenter by using EventSetter. In the event handler you can use our Utilities class to get the Sort Indicator and change its Background.

     

    About your second requirement, that I can suggest is to create style for CellValuePresenter and LabelPresenter. In these styles, you can use Triggers and check the value of  SortStatus property. You can set the Background and Foreground properties  to the colors that you wish for each status.

    Also if you want to be able to get the default style for LabelPresenter,  you should search for it in the following directory on your computer:

     

    C:\Program Files (x86)\Infragistics\2014.1\WPF\DefaultStyles\DataPresenter

     

    You should search the style in file DataPresenterGeneric_Express.xaml. I created short sample application based on your scenario to show you how you can implement the functionalities that you are looking for. Please let me know if I am missing something about your scenario.

     

    Please let me know if you need an further assistance on the matter.

    LabelPresenterStyling.zip
Children