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

  • 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.

  • 29105
    Offline posted

    Hello James,

    Do you have 'UseAppStyling' set to false? Does your UltraTextEditor have a visible border or one applied at all to begin with? Are you asking how to set a border using an AppStyle isl? Can you please provide me with more information regarding your application and perhaps attach a screenshot? For instance, which properties do you have set on the texteditor, before attempting to style.

    In the meantime, please take a look at a couple forum posts that I have found and let me know if they help.
    http://ko.infragistics.com/community/forums/t/16006.aspx
    http://ko.infragistics.com/community/forums/t/5471.aspx