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?
Could you point me in the right direction?
7 Answers, 1 is accepted
0
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:
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:
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
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
0
Juanps
Top achievements
Rank 2
answered on 28 May 2008, 05:19 PM
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
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
0
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:
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
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
0
Majid
Top achievements
Rank 1
answered on 21 Apr 2012, 02:23 PM
Hi,
I am using Telerik WinForms Q1 2012. I want to use .gif file as background Image for SplashForm.
Is it possible?! how?
Thanks
I am using Telerik WinForms Q1 2012. I want to use .gif file as background Image for SplashForm.
Is it possible?! how?
Thanks
0
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:
I hope this helps. If you have further questions, do not hesitate to write back.
Regards,
Jack
the Telerik team
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 >>
0
Majid
Top achievements
Rank 1
answered on 23 Apr 2012, 06:35 PM
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.
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.
0
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
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 >>