This is a migrated thread and some comments may be shown as answers.

Set an Image as the background for RadForm

4 Answers 142 Views
Form
This is a migrated thread and some comments may be shown as answers.
Роберт
Top achievements
Rank 1
Роберт asked on 19 Dec 2018, 07:08 PM

Hi,

Please, read the header.

Q: How?

Thanks

4 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 20 Dec 2018, 09:25 AM
Hi Robert,

You should set the BackgroundImage. For example:
public RadForm1()
{
    InitializeComponent();
    this.BackgroundImage = Image.FromFile(@"C:\img\delete.png");
}

I hope this will be useful. Let me know if you have additional questions.

Regards,
Dimitar
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Роберт
Top achievements
Rank 1
answered on 21 Dec 2018, 06:13 PM

Hello, Dimitar,

I tried this before asking the question, but it didn't work..
Will try to investigate and report later why.

0
Роберт
Top achievements
Rank 1
answered on 21 Dec 2018, 06:43 PM

Hello again,

Yes, I've got the reason why..

Please, try this code:

RadForm rf = new RadForm();
rf.BackgroundImage = Image..from..
rf.BackgroundImageLayout = ImageLayout.Tile;
RadSplitContainer rp = new RadSplitContainer();
//RadPanel rp = new RadPanel();
rp.Dock = DockStyle.Fill;
rp.BackColor = System.Drawing.Color.Transparent;
rf.Controls.Add(rp);
rf.Size = new System.Drawing.Size(500, 500);
rf.StartPosition = FormStartPosition.CenterScreen;
rf.Show();

Just try to un-comment the line and you'll see that in case with SplitContainer it doesn't work.

 

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 25 Dec 2018, 06:29 AM
Hello, Robert,     

Following the provided code snippet, I have tested both controls, RadSplitContainer and RadPanel. The obtained result is identical. Please refer to the following screenshots: