5 Answers, 1 is accepted
0
ali
Top achievements
Rank 1
answered on 31 Jul 2019, 01:23 PM
https://docs.telerik.com/devtools/winforms/controls/scheduler/appointments-and-dialogs/working-with-appointments
0
Hello, Ali,
The AppointmentBackgroundInfo controls the font style that will be used in the {4}{5} construction - "<span></span>". You can find below a sample code snippet:
If you use another background for the appointment, this font won't be applied to the event.
I hope this information helps. If you need any further assistance please don't hesitate to contact me.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
The AppointmentBackgroundInfo controls the font style that will be used in the {4}{5} construction - "<span></span>". You can find below a sample code snippet:
this
.radScheduler1.AppointmentTitleFormat =
"{0} to {1}, {2} {4} {5}"
;
((AppointmentBackgroundInfo)
this
.radScheduler1.Backgrounds[2]).Font =
new
Font(
"Arial"
, 12f, FontStyle.Bold);
Appointment a =
new
Appointment(DateTime.Now, TimeSpan.FromHours(3),
"Test"
);
a.BackgroundId =
this
.radScheduler1.Backgrounds[2].Id;
this
.radScheduler1.Appointments.Add(a);
If you use another background for the appointment, this font won't be applied to the event.
I hope this information helps. If you need any further assistance please don't hesitate to contact me.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
ali
Top achievements
Rank 1
answered on 04 Aug 2019, 10:43 AM
hi,very thanks for reply ,
do i used this formed ?
i want this style just for {1} , to wit : {4} {1} {5} , this styling no effect for other elements , Is it possible?
0
Hello, Ali,
If you need to style just a part of the text displayed in the appointment, it is appropriate to use the HTML-like text formatting that Telerik Presentation Framework offers. In the AppointmentFormatting event you can set the AppointmentElement.DrawText property to true and specify what information you need to be displayed by setting the AppointmentElement.Text property. However, it is necessary to set the RadScheduler.AppointmentTitleFormat to a number which doesn't store any information, for example "{3}" for empty location:
I hope this information helps.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
If you need to style just a part of the text displayed in the appointment, it is appropriate to use the HTML-like text formatting that Telerik Presentation Framework offers. In the AppointmentFormatting event you can set the AppointmentElement.DrawText property to true and specify what information you need to be displayed by setting the AppointmentElement.Text property. However, it is necessary to set the RadScheduler.AppointmentTitleFormat to a number which doesn't store any information, for example "{3}" for empty location:
{
public
RadForm1()
{
InitializeComponent();
this
.radScheduler1.AppointmentFormatting += radScheduler1_AppointmentFormatting;
this
.radScheduler1.AppointmentTitleFormat =
"{2}"
;
Appointment a =
new
Appointment(DateTime.Now, TimeSpan.FromHours(3),
"Test"
);
this
.radScheduler1.Appointments.Add(a);
}
private
void
radScheduler1_AppointmentFormatting(
object
sender, SchedulerAppointmentEventArgs e)
{
e.AppointmentElement.DisableHTMLRendering =
false
;
e.AppointmentElement.DrawText =
true
;
e.AppointmentElement.Text =
"<html><size=12>"
+ e.Appointment.Summary +
"<size=8>"
+ e.Appointment.Start;
}
I hope this information helps.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
ali
Top achievements
Rank 1
answered on 07 Aug 2019, 03:41 PM
verrrrrrrrrrrrrrrrrry tnxxxx , it's work
good work telerik team , i am very grateful