I want to custom draw day element

5 posts, 0 answers
  1. wang
    wang avatar
    4 posts
    Member since:
    Nov 2016

    Posted 10 Nov 2016 Link to this post

    I'm working in appointment function ,use calerdar to display scheduling.

    Each day display a percent bar to display left appoint no  in day. like below pic.

     

    I want to custom draw day element,when day 

     

  2. wang
    wang avatar
    4 posts
    Member since:
    Nov 2016

    Posted 10 Nov 2016 in reply to wang Link to this post

     

    like this ,the effect  I use backgroudimage to finish.

    I think ,if has graphic to paint the day cell element,  is the best thing!

     

     

     

  3. Dimitar
    Admin
    Dimitar avatar
    2984 posts

    Posted 11 Nov 2016 Link to this post

    Hi Wang,

    Thank you for writing.

    You can use the ElementRender event to set the image and indicate the progress:
    private void RadCalendar1_ElementRender(object sender, Telerik.WinControls.UI.RenderElementEventArgs e)
    {
        e.Element.Image = Image.FromFile(@"C:\img\delete.png");
        e.Element.TextImageRelation = TextImageRelation.TextAboveImage;
        e.Element.ImageLayout = ImageLayout.Stretch;
    }

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

    Regards,
    Dimitar
    Telerik by Progress
    Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
  4. wang
    wang avatar
    4 posts
    Member since:
    Nov 2016

    Posted 13 Nov 2016 in reply to Dimitar Link to this post

    Thanks sugguestion,

    actually, I really use backgroundimage to do this.  But image not enought   flexiable.

    I hope Telerik next version has GDI+'s Graphic Object. Thank you again.  I english so bad. haha.

     

  5. Dimitar
    Admin
    Dimitar avatar
    2984 posts

    Posted 14 Nov 2016 Link to this post

    Hello Wang,

    I am not sure what is the exact functionality that you are seeking. If you want further assistance from us please elaborate?

    Regards,
    Dimitar
    Telerik by Progress
    Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
Back to Top