Set an Image as the background for RadForm

5 posts, 0 answers
  1. Роберт
    Роберт avatar
    61 posts
    Member since:
    Feb 2010

    Posted 19 Dec 2018 Link to this post

    Hi,

    Please, read the header.

    Q: How?

    Thanks

  2. Dimitar
    Admin
    Dimitar avatar
    2677 posts

    Posted 20 Dec 2018 Link to this post

    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.
  3. Роберт
    Роберт avatar
    61 posts
    Member since:
    Feb 2010

    Posted 21 Dec 2018 in reply to Dimitar Link to this post

    Hello, Dimitar,

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

  4. Роберт
    Роберт avatar
    61 posts
    Member since:
    Feb 2010

    Posted 21 Dec 2018 in reply to Dimitar Link to this post

    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.

     

  5. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3195 posts

    Posted 25 Dec 2018 Link to this post

    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: