FillType not working correctly

4 posts, 0 answers
  1. Tim Johnson
    Tim Johnson avatar
    11 posts
    Member since:
    Dec 2009

    Posted 31 Jan 2011 Link to this post

    I have a very simple radChart and I am attempting to set the Fill Type to Gradient and use two KnownColors as the Main and Secondary Color.  I have tried to do this progamatically and through the property panel.  When setting the property in the property panel from Solid to Gradient it immediately goes back to gradient, however I am able to set it to hatched.  Here is the code I am using.  The is still solid white.  Any help would be greatly appreciated.

    KnownColor clrTopBackgroundColor = KnownColor.White;
    KnownColor clrBottomBackgroundColor = KnownColor.LightBlue;
     
    radChart1.PlotArea.Appearance.FillStyle.FillType = FillType.Gradient;
     
    radChart1.PlotArea.Appearance.FillStyle.MainColor = Color.FromKnownColor(clrTopBackgroundColor);
    radChart1.PlotArea.Appearance.FillStyle.SecondColor = Color.FromKnownColor(clrBottomBackgroundColor);
     
    radChart1.Update();
    radChart1.UpdateGraphics();


    Thank you,
    Will 
  2. Evgenia
    Admin
    Evgenia avatar
    1407 posts

    Posted 03 Feb 2011 Link to this post

    Hi William,

    We are unable to reproduce the issue you are facing on our local tests. You can see from the image attached that the background is set without problems. I've managed to change the colors both programmatically and through Properties in Design mode. Here is how the colors were set programmatically:
    radChart1.PlotArea.Appearance.FillStyle.MainColor = Color.White;
    radChart1.PlotArea.Appearance.FillStyle.SecondColor = Color.LightBlue;
    Have in mind that the FillStyle.FillType is set to Gradient by default.

    Do you use by any reason another Skin than the Default one? If this is your case turn off SkinsOverrideStyles property of the RadChart so that the Color changes will take effect.

    All the best,
    Evgenia
    the Telerik team
    Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Tim Johnson
    Tim Johnson avatar
    11 posts
    Member since:
    Dec 2009

    Posted 04 Feb 2011 Link to this post

    Evgenia,

    I have SkinsOverrideStyles set to False.  I am still unable to change the fill style to Gradient.  If I try to change it to Gradient in the property window it automatically switches back to Solid when I click outside of the property box.  Additionally I modified my code to match your code, and changing the color progamatically does not work either.  I am using Windows Server 2008 R2 and VS2010.  I would be happy to provide the project for demonstration purposes, but I cannot attach it to this forum.  Please let me know the best option to provide the program.

    Thank you,
    Will
  5. Evgenia
    Admin
    Evgenia avatar
    1407 posts

    Posted 09 Feb 2011 Link to this post

    Hello William,

    Please open a new formal Support thread where you will be able to send us a sample project attached with the issue you are facing. With the source code provided it will be easier for us to help you.

    Looking forward to hearing from you!

    Greetings,
    Evgenia
    the Telerik team
    Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
Back to Top