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
400
Styling custom control based on .isl at runtime
posted

Hi there!

I've created a custom control to visualise some data. I want my control to take on the appearance of the Infragistics controls in my app.

These controls are styled at runtime using an .isl file.

How can I determine for example what the border of an UltraTextEditor control is at runtime, as its Appearance doesn't seem to contain this info!

Cheers,

James

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi James,

    The appearance resolution process is actually quite complicated. The UltraTextEditor considers many factors: the Application style library, it's own appearances, and it's current state (edit mode, hottracking, etc.).

    So getting the colors for every possible state really isn't practical.

    If you just want to get the basic color, then what I would do is place an UltraTextEditor on the form (or use one that is already on the form, if you already have one). Then you can use the ResolveAppearance method to get the resolved appearance for the control in the normal state:


                AppearanceData appearanceData = new AppearanceData();
                AppearancePropFlags appearancePropFlags = AppearancePropFlags.AllRender;
                this.ultraTextEditor1.ResolveAppearance(ref appearanceData, ref appearancePropFlags);

    There's no way to get the state-specific appearances, though. So you won't be able to get the HotTracking appearance, for example, unless you call the ResolveAppearance method while the control is currently HotTracked, which would be very difficult, if not impossible.

Children