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
1230
XamdataGrid scrollbars all of a sudden black for theme Office2K7Black after installing SR11.2.20112.2076
posted

XamdataGrid scrollbars are all of a sudden black for theme Office2K7Black after installing SR11.2.20112.2076

How come? changes like these should be done with high sensitivity especially since we've got clients that has gotten used to the look and feel of our system over the last 2 years now.

How do I keep the theme, but have the scrollbars appear normal WPF-like?

Please - this is quite urgent. 

  • 30945
    Offline posted

    Hello,

     

    I have been looking into the appearance that you have described and this is the design behavior for the XamDataGrid. When setting the Theme property of the XamDataGrid, also styles are applied to its ScrollBars. There was an issue that was preventing the styles for the ScrollBars to get applied when the Theme property is being set, which was fixed in the latest service release (11.2.20111.2076) and this is the reason for the new appearance of the ScrollBars when you set the Office2K7Black theme. If you wish to keep the previous appearance of the ScrollBars of the XamDataGrid when a Theme is applied, I can suggest adding the following code into the event handler for the Loaded event of the XamDataGrid:

     

    private void XamDataGrid_Loaded(object sender, RoutedEventArgs e)
    {
        (Utilities.GetDescendantFromName(sender as DependencyObject, "PART_HorizontalScrollBar") as ScrollBar).Style = new Style(typeof(ScrollBar));
        (Utilities.GetDescendantFromName(sender as DependencyObject, "PART_VerticalScrollBar") as ScrollBar).Style = new Style(typeof(ScrollBar));
    
        (Utilities.GetDescendantFromName(sender as DependencyObject, "Corner") as Rectangle).Fill = Brushes.LightGray;
        (Utilities.GetDescendantFromName(sender as DependencyObject, "Corner") as Rectangle).Stroke = Brushes.LightGray;
    }
    

     

    If you have any further questions please do not hesitate to ask.

     

    Sincerely,

    Krasimir

    Developer Support Engineer

    Infragistics

    www.infragistics.com/support

  • 30945
    Offline posted

    Hello,

     

    I am very glad that my suggestion was helpful for you. Please let me know if you need any further assistance on the matter.

     

    Sincerely,

    Krasimir

    Developer Support Engineer

    Infragistics

    www.infragistics.com/support

  • 1230
    Offline posted in reply to [Infragistics] Krasimir
  • 30945
    Verified Answer
    Offline posted

    Hello,

     

    I have created a sample application for you in order to set the default style to all scrollbars in the XamDataGrid. In order to do that I have created a style for the ScrollViewer with an EventSetter for its Loaded event. In the event handler I am getting all ScrollBars in the ScrollViewer and set the default style to them.

     

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

     

    Sincerely,

    Krasimir

    Developer Support Engineer

    Infragistics

    www.infragistics.com/support

     

    OfficeBlak2k7Issue_1.zip