This is a migrated thread and some comments may be shown as answers.

I want to custom draw day element

4 Answers 75 Views
Calendar, DateTimePicker, TimePicker and Clock
This is a migrated thread and some comments may be shown as answers.
wang
Top achievements
Rank 1
wang asked on 11 Nov 2016, 03:28 AM

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 

 

4 Answers, 1 is accepted

Sort by
0
wang
Top achievements
Rank 1
answered on 11 Nov 2016, 03:31 AM

 

like this ,the effect  I use backgroudimage to finish.

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

 

 

 

0
Dimitar
Telerik team
answered on 11 Nov 2016, 10:32 AM
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.
0
wang
Top achievements
Rank 1
answered on 14 Nov 2016, 02:51 AM

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.

 

0
Dimitar
Telerik team
answered on 14 Nov 2016, 11:48 AM
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.
Tags
Calendar, DateTimePicker, TimePicker and Clock
Asked by
wang
Top achievements
Rank 1
Answers by
wang
Top achievements
Rank 1
Dimitar
Telerik team
Share this question
or