How to add a RadPanel to LiveTile

9 posts, 0 answers
  1. Raj
    Raj avatar
    4 posts
    Member since:
    Dec 2012

    Posted 15 Dec 2012 Link to this post

    Hi

    I want to add a RadPanel to a tile. How can I do that?

    Thanks, 
  2. Raj
    Raj avatar
    4 posts
    Member since:
    Dec 2012

    Posted 17 Dec 2012 Link to this post

    Could someone please redirect me to revevant link/ thread? I am trying to add a panel in a live/ regular tile in Panarama control. 

    Thanks, 
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Ivan Todorov
    Admin
    Ivan Todorov avatar
    688 posts

    Posted 19 Dec 2012 Link to this post

    Hello Raj,

    Thank you for your question.

    Putting RadPanel inside the panorama tiles is possible via RadHostItem:
    RadHostItem host = new RadHostItem(radPanel1);
    radTileElement1.Children.Add(host);

    However, this is not recommended because RadPanel is a control and putting it in an animated and draggable tile will result in visual glitches and slow performance. I would rather suggest adding the elements that correspond to a control (for example RadButtonElement) directly to the tile's Children collection.

    Let me know if you have any additional questions.

    Kind regards,
    Ivan Todorov
    the Telerik team
    Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
  5. Raj
    Raj avatar
    4 posts
    Member since:
    Dec 2012

    Posted 22 Dec 2012 Link to this post

    Thanks for your response.

    If this is not recommended, how can I do the following:
    - Add multiple Labels to single Tile
    - Add Grid to to the Tile at runtime 

    Thanks

  6. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 25 Dec 2012 Link to this post

    Hi Raj,

    Thank you for writing.

    Labels can be easily added by adding RadLabelElements to the Children collection of the tile:
    RadLabelElement label = new RadLabelElement();
    label.Text = "I am a label";
    tile.Children.Add(label);

    As to the grid, it cannot be used as element, only as control and you can host it by using RadHostItem, as demonstrated in the previous post. However, as already mentioned, hosting controls will hit the performance and will produce visual glitches when scrolling.

    I hope this helps.
     
    Greetings,
    Stefan
    the Telerik team
    Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
  7. KEVIN
    KEVIN avatar
    1 posts
    Member since:
    Dec 2013

    Posted 08 May 2015 in reply to Stefan Link to this post

    HI,

     I see this thread and I have similar question.

     

    How could I add the Panel like Text at the bottom of tiles ( like Telerik's DevCraft demo, green one)

    and with opacity 70% 

     

    kevin

  8. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 11 May 2015 Link to this post

    Hello Kevin,

    You can just add a new LightVisualElement to the tile element itself to achieve this:
    public class ModernLiveTileElement : RadLiveTileElement
    {
        public LightVisualElement lowerElement;
     
        protected override void CreateChildElements()
        {
            base.CreateChildElements();
     
            lowerElement = new LightVisualElement();
            lowerElement.StretchVertically = false;
            lowerElement.Alignment = System.Drawing.ContentAlignment.BottomCenter;
             
            lowerElement.DrawFill = true;
            lowerElement.GradientStyle = Telerik.WinControls.GradientStyles.Solid;
            lowerElement.BackColor = Color.FromArgb(180, 74, 200, 111);
            lowerElement.ShouldHandleMouseInput = false;
            this.Children.Add(lowerElement);
        }
    }

    I hope that you find this information useful. Should you have any other questions, do not hesitate to contact us.

    Regards,
    Stefan
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  9. Muhammad
    Muhammad avatar
    4 posts
    Member since:
    Mar 2014

    Posted 01 Feb in reply to Ivan Todorov Link to this post

     Hello:Ivan Todorov

    Problem :How can Drag and Drop radLiveTileElement1 in RadPanorama1

    We have a radgrid and lablels in radPanel1. radPanel1 is host in radLiveTileElement1. But we are  not able to drag and droprad LiveTileElement1.

    code :
    radLiveTileElement1.AllowDrag = true;
    radLiveTileElement1.AllowDrop = true;                
    RadHostItem host = new RadHostItem(radPanel1);
    radLiveTileElement1.Children.Add(host);

    Guid me please
  10. Dess
    Admin
    Dess avatar
    1601 posts

    Posted 02 Feb Link to this post

    Hello Muhammad,

    Thank you for writing.

    I would recommend you to use custom tiles approach instead of hosting controls. The following help article is quite useful on this topic: http://docs.telerik.com/devtools/winforms/panorama/custom-tiles
    Note that in order to start the drag and drop operation when clicking some of the inner elements, the respective element should notify its parent for the mouse input (set the NotifyParentOnMouseInput property to true).

    If you are still experiencing any further difficulties, feel free to open a support ticket and provide a sample project replicating the undesired behavior. Thus, we would be able to investigate the precise case and assist you further. Thank you in advance.

    I hope this information helps. Should you have further questions I would be glad to help.
     
    Regards,
    Dess
    Telerik
    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
Back to Top
UI for WinForms is Visual Studio 2017 Ready