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
555
Getting active ISL colors/appearance from code
posted

Hi,

I have been trying to find a way of getting the colours/ appearance of the ISL style loaded in my application, like for example getting the read only color of a UltraTextBox. There is any way to get that information programmatically?

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi,

    Getting the color from the Isl file is possiblem but it's a bit complicated and it won't necessarily do you any good. The appearance resolution process is pretty complex, so if you want to know the actual on-screen color of the control, your best bet is to get the resolve appearance from the control itself.

    To do that, you use the ResolveAppearance method on the control.

                AppearanceData appearanceData = new AppearanceData();
                AppearancePropFlags appearancePropFlags = AppearancePropFlags.BackColor | AppearancePropFlags.ForeColor;
                this.ultraTextEditor1.ResolveAppearance(ref appearanceData, ref appearancePropFlags);

                Debug.WriteLine(appearanceData.BackColor, "BackColor");
                Debug.WriteLine(appearanceData.ForeColor, "ForeColor");

     

Children
No Data