Proper way to add text to waitbar with radlabel.

2 posts, 1 answers
  1. Jose Mejia
    Jose  Mejia avatar
    107 posts
    Member since:
    May 2009

    Posted 21 Jul 2010 Link to this post


    I know that there is no (for now) possibility to add text to waitingbar so I did some workaround for this:

    var label = new RadLabel();
    label.Text = "some test";
    label.TextAlignment = ContentAlignment.MiddleRight;
    waitingBar.EnableTheming = true;
    waitingBar.RootElement.ElementTree.ThemeName = "Breeze";
    waitingBar.WaitingBarElement.Value = 0;

    But it looks ugly and also waitingbarelement is mostly hidden by the text.
    Maybe I'm doing something wrong? Maybe there is better workaround.

  2. Answer
    Martin Vasilev
    Martin Vasilev avatar
    1061 posts

    Posted 26 Jul 2010 Link to this post

    Hi Jose Mejia,

    Thank you for writing.

    Actually, it would be better if you add a TextPrimitive element instead RadLabel control. Please consider the following code:
    TextPrimitive textElement = new TextPrimitive();
    textElement.Text = this.radWaitingBar1.Name;
    textElement.Alignment = ContentAlignment.MiddleCenter;
    textElement.ZIndex = 100;

    I hope this helps. Let me know if you have any additional questions.

    Best wishes,
    Martin Vasilev
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
Back to Top