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

where is S in <span>

5 Answers 96 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
ali
Top achievements
Rank 1
ali asked on 31 Jul 2019, 01:03 PM
in this attach picture , how to find or set S property in <span S>  ??

5 Answers, 1 is accepted

Sort by
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
Dess | Tech Support Engineer, Principal
Telerik team
answered on 02 Aug 2019, 12:47 PM
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:

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
Dess | Tech Support Engineer, Principal
Telerik team
answered on 07 Aug 2019, 02:22 PM
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:



{
    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

 

Tags
Scheduler and Reminder
Asked by
ali
Top achievements
Rank 1
Answers by
ali
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or