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
1650
Presenter styles and themed grids
posted

 Hi there

I have themed grids that also use CellValuePresenters. My problem is now that the theme applies formatting properties to its regular cells, while my customized cells provide a slightly other appearance. If you look at the screenshot below, there are 2 differences:

- the Foreground is not equal. The theme applies a greyish fore color.
-  the theme indents cell text while my format even starts outside of the header's left border position.


What I would like to know is how is the cleanest way to adjust my styles to the theme. Is there a cleaner way than just debug the application with snoop, read out the raw values and apply them to my style?

Thanks for your advice,

Philipp 

Parents
No Data
Reply
  • 1215
    Verified Answer
    posted

    You can find the default XAML for the DataPresenter controls in the following location:

    C:\Program Files\Infragistics\NetAdvantage for WPF 2007 Volume 1\DefaultStyles\DataPresenter

    The Styles/Brushes are broken into three ResourceDictionaries: DataPresenterGeneric_Express.xaml, DataPresenterGeneric.xaml and DataPresenterGeneric_Brushes.xml. Most of the Styles you need (including the CellValuePresenter) will be found in DataPresenterGeneric_Express.xaml (DataPresenterGeneric.xaml (non-express) just adds Styles not included in the Express versions of the assemblies).

    It may be helpful for you to start with the default style, changing only what you need to change, to ensure consistency between layouts. That being said, Snoop is sometimes the best way to work through detail issues like this, so you better keep it handy. Hope this helps!

Children
No Data