Question

I'm trying devexpress component, so I want to know if is possible to write code for define standard option for TextEdit and XtraGrid. For Form's theme I write this code in Program.cs:

UserLookAndFeel.Default.SetSkinStyle("Office 2007 Blue");

So every form have this skin... Is possible to do something for XtraGrid and TextEdit Options?

Sorry for very bad english..

Example:

        dataGrid.OptionsPrint.UsePrintStyles = true;
        dataGrid.OptionsPrint.EnableAppearanceEvenRow = true;
        dataGrid.OptionsPrint.EnableAppearanceOddRow = true;
Was it helpful?

Solution

There is no option for what you're asking(AFAIK). but you could extend the Gridview and implement it easily.

public class MyGridView : GridView
{
    public MyGridView()
    {
        this.OptionsPrint.UsePrintStyles = true;
        this.OptionsPrint.EnableAppearanceEvenRow = true;
        this.OptionsPrint.EnableAppearanceOddRow = true;
    }
}

Then use this class all over your project

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top