RadButtonElement Covers ContentImage

3 posts, 1 answers
  1. Ryan
    Ryan avatar
    35 posts
    Member since:
    Jul 2015

    Posted 04 Jan 2016 Link to this post


    When I add a RadButtonElement to my alert, it causes the ContentImage to be cut off at the top of the button element, despite the button being on the other side of the alert. See the attached images as an example.

    Is there a BringToFront event (or something along those lines) for ContentImage?

  2. Answer
    Dess | Tech Support Engineer, Sr.
    Dess | Tech Support Engineer, Sr.  avatar
    3706 posts

    Posted 06 Jan 2016 Link to this post

    Hello Ryan,

    Thank you for writing.

    It seems that the RadButtonElement is stretched horizontally. That is why it covers the content image. You should set the StretchHorizontally property to false and specify the MaxSize of the button. Additionally, you can set the PositionOffset property to place the RadButtonElement at the desired location:
    RadButtonElement button = new RadButtonElement();
    RadDesktopAlert radDesktopAlert1 = new RadDesktopAlert();
    public Form1()
        button.MinSize = button.MaxSize = new Size(130, 20);
        button.Text = "Open System Monitor";
        button.StretchHorizontally = false;
        button.PositionOffset = new SizeF(150, 20);
        button.ButtonFillElement.BackColor = Color.Aqua;
        button.ButtonFillElement.GradientStyle = Telerik.WinControls.GradientStyles.Solid;
    private void radButton1_Click(object sender, EventArgs e)
        radDesktopAlert1.ContentImage = Properties.Resources.about_paint;       
        radDesktopAlert1.CaptionText = "New E-mail Notification";
        radDesktopAlert1.ContentText = DateTime.Now.ToLongDateString();

    I hope this information helps. Should you have further questions I would be glad to help.
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Ryan
    Ryan avatar
    35 posts
    Member since:
    Jul 2015

    Posted 06 Jan 2016 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    Thanks Dess! I would have never figured that out.

    The real reason for this happening was due to me using:


    Rather than (the code you provided):


    And as you mentioned, I also had to set the MaxSize property after changing my code to this.

Back to Top