3 Answers, 1 is accepted
0
Hello Gaurav,
The RadWindow control is an ASP.NET control and it cannot be used in Windows forms applications. If you are looking for a RadWindow counterpart in our Winforms suite, then you have a couple of options, depending on your exact requirements:
Kind regards,
Jack
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
The RadWindow control is an ASP.NET control and it cannot be used in Windows forms applications. If you are looking for a RadWindow counterpart in our Winforms suite, then you have a couple of options, depending on your exact requirements:
- If you want something like a pop-up menu, you can use RadDropDownMenu or RadPopupControl
- If you want to show a window, use our ShapedForm or Form
- If you want some kind of docking functionality, you should use RadDock for WinForms.
Kind regards,
Jack
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Steve Attwell
Top achievements
Rank 1
answered on 25 Mar 2008, 07:48 PM
Hi Jack,
Going forward with your suggestion for using RadPopupControl :
Do you have any working examples on it?
As i was trying to look into website and coudn't find any.
Thanks you help.
Going forward with your suggestion for using RadPopupControl :
Do you have any working examples on it?
As i was trying to look into website and coudn't find any.
Thanks you help.
0
Hi Gaurav,
Thank you for writing.
Here is an example of using RadPopupControl - feel free to use it as a reference:
I hope this was helpful. If you have additional questions, do not hesitate to contact me again.
Greetings,
Martin Vasilev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Thank you for writing.
Here is an example of using RadPopupControl - feel free to use it as a reference:
public partial class Form1 : ShapedForm |
{ |
MyPopup radPopupControl1; |
public Form1() |
{ |
InitializeComponent(); |
radPopupControl1 = new MyPopup(); |
} |
private void radButton1_Click(object sender, EventArgs e) |
{ |
if (radPopupControl1.IsVisible) |
{ |
radPopupControl1.Hide(); |
} |
else |
{ |
Point point = PointToScreen(this.radButton1.Location); |
point = new Point(point.X, point.Y + this.radButton1.Height); |
SetUpPopup(point); |
radPopupControl1.Show(); |
} |
} |
private void SetUpPopup(Point location) |
{ |
this.radPopupControl1.Size = new Size(100, 100); |
this.radPopupControl1.BackColor = SystemColors.AppWorkspace; |
this.radPopupControl1.Location = location; |
this.radPopupControl1.PopupText = "Hello world"; |
} |
} |
public class MyPopup : RadPopupControl |
{ |
LightVisualElement element; |
public MyPopup() |
{ |
this.UseNewLayoutSystem = true; |
} |
public string PopupText |
{ |
get |
{ |
EnsureChildItems(); |
return this.element.Text; |
} |
set |
{ |
EnsureChildItems(); |
this.element.Text = value; |
} |
} |
protected override void CreateChildItems(RadElement parent) |
{ |
this.element = new LightVisualElement(); |
this.element.DrawFill = true; |
this.element.DrawBorder = true; |
this.element.BackColor = Color.Red; |
this.element.ForeColor = Color.Yellow; |
this.element.GradientStyle = GradientStyles.Solid; |
parent.Children.Add(this.element); |
} |
} |
I hope this was helpful. If you have additional questions, do not hesitate to contact me again.
Greetings,
Martin Vasilev
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center