Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Themes and Visual Style Builder > Theme Picker

Not answered Theme Picker

Feed from this thread
  • daivdhog avatar

    Posted on May 10, 2008 (permalink)

        I was trying to figure out how you did the theme picker in the "RadControls for WinForms Examples". I can't even figure out how you did the splash screen and the main form. When I look up the "Theme" sample for a control like grid view the dropdown button isn't pressent on the form. I tried searching the solution for just about everything I could think of to find the code for this.
    Could you point me in the right direction?

    Reply

  • Jack Jack admin's avatar

    Posted on May 12, 2008 (permalink)

    Hello daivdhog,

    Thank you for contacting us.

    The splash screen in the QSF uses the SplashForm component. The following code snippet describes a typical usage of this component:

    Telerik.WinControls.UI.SplashForm splashForm = new Telerik.WinControls.UI.SplashForm(); 
    splashForm.BackgroundImage = Resources.splash; 
    splashForm.Show();  
    // ... 
    splashForm.Hide(); 

    The main form in the QSF inherits the ShapedForm class and uses a themed RadTitleBar component. The form's shape is set to a RoundRectShape through the Shape property of the ShapedForm.

    The Q1 2008 released introduced a new RadForm control. Take a look at the examples for RadForm in the QSF.

    The theme picker is a drop down button, filled with the available theme names for a specific control. You can get this list by using the GetAvailableThemes method of the ThemeResolutionService. Consider the following code snippet:

    ThemeList themes = ThemeResolutionService.GetAvailableThemes(radControl); 
    foreach (Theme theme in themes) 
        RadMenuItem item = new RadMenuItem(theme.ThemeName); 
        radDropDownButton1.Items.Add(item); 

    I hope this helps. Let me know, if you have other questions.

    Regards,
    Jack
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center

    Reply

  • Say Hello to Telerik's PivotGrid for ASP.NET AJAX, Silverlight, WPF and WinForms. Now packed with OLAP support.
  • Juanps avatar

    Posted on May 28, 2008 (permalink)

    Hello Jack, thanks for your help.
    What i'm trying to create is and SplashScreen that depending of the status will change the message on the lables, if he succesfully stablish the connection, or can connect to the DB, the the Label on the SplashScreen will change.

    Do you have some example, source code,  or  documents that might help?

    Thanks a lot



    Reply

  • Jack Jack admin's avatar

    Posted on May 29, 2008 (permalink)

    Hi Juanps,

    Thank you for getting back to me.

    The SplashForm is a layered window. This allows the SplashForm to be semi-transparent, and because of this, it cannot contain labels or any other controls, unless you paint them manually.

    To display text in the SplashForm use the following method:

    void SetSplashText(SplashForm splashForm, Bitmap image, string message) 
        using (Graphics g = Graphics.FromImage(image)) 
        { 
            g.DrawString(message, SystemFonts.DialogFont, Brushes.Red, 10, 10); 
        } 
     
        splashForm.BackgroundImage = image; 
        MethodInfo method = typeof(SplashForm).GetMethod("UpdateLayeredWindow", BindingFlags.NonPublic | BindingFlags.Instance); 
        method.Invoke(splashForm, new object[] { (byte)255 }); 
     
    SplashForm splashForm = new SplashForm(); 
    splashForm.BackgroundImage = Resources.splashScreenImage; 
    splashForm.Show(); 
             
    // ... 
     
    SetSplashText(splashForm, Resources.splashScreenImage, "Hello world!"); 
     

    In future releases, we plan to implement the SplashForm as a RadControl. This will enable placing any RadElement inside the form.

    I hope this helps. Do not hesitate to contact me again, if you need further assistance.

    Best wishes,
    Jack
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center

    Reply

  • Majid avatar

    Posted on Apr 21, 2012 (permalink)

    Hi,
    I am using Telerik WinForms Q1 2012. I want to use .gif file as background Image for SplashForm. 
    Is it possible?! how?

    Thanks

    Reply

  • Jack Jack admin's avatar

    Posted on Apr 23, 2012 (permalink)

    Hi Majid,

    We recommend using Png files for the background of ShapedForm. This way you will be able to set transparency. However, you can set a Gif image by adding it in your resources. Access the file the same way as demonstrated in my previous post:
    SplashForm splashForm = new SplashForm();
    splashForm.BackgroundImage = Resources.splashScreenImage;
    splashForm.Show();

    I hope this helps. If you have further questions, do not hesitate to write back.

    Regards,
    Jack
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>

    Reply

  • Majid avatar

    Posted on Apr 23, 2012 (permalink)

    Hi Jack,
    Thanks for reply

    I followed you solution, and added my .gif file in resources.
    but unfortunately, It doesn't work. I just have a white box instead of my image. 



    Reply

  • Jack Jack admin's avatar

    Posted on Apr 24, 2012 (permalink)

    Hi Majid,

    In this case I will need to test and debug your application in order to locate the issue. Could you please open a support ticket and send me the code?

    I am looking forward to your reply.
     
    Greetings,
    Jack
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>

    Reply

  • Say Hello to Telerik's PivotGrid for ASP.NET AJAX, Silverlight, WPF and WinForms. Now packed with OLAP support.

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Themes and Visual Style Builder > Theme Picker