Custom Appointment in SFSCHEDULER

Hi,

I try to build a custom appointment with my own datas.

When I try to edit it with the box(end time for example), the appointment not resizing with new endTime.

Here is my code :

 public partial class MainWindow : Window
 {
     private ObservableCollection<CustomAppointment> appointments;
     public ObservableCollection<CustomAppointment> Appointments
     {
         get { return appointments; }
         set { appointments = value; }
     }
     public MainWindow()
     {
         InitializeComponent();
         Appointments = new ObservableCollection<CustomAppointment>();
         CustomAppointment app=new CustomAppointment();
         app.Subject = "Test";
         app.AppointmentBackground=Brushes.Green;
         app.StartTime=DateTime.Now.AddHours(2);
         app.EndTime=DateTime.Now.AddHours(5);
         app.Ligne = "1234";
         Appointments.Add(app);

         this.DataContext = this;
     }
 }


 public class CustomAppointment : ScheduleAppointment, INotifyPropertyChanged
 {
     private String _ligne;
     public String Ligne
     {
         get { return _ligne; }
         set { _ligne = value; }
     }
}

 }


<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfApp2"
        xmlns:syncfusion="http://schemas.syncfusion.com/wpf" x:Class="WpfApp2.MainWindow"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800">
    <Grid>


        <syncfusion:SfScheduler HorizontalAlignment="Left" Margin="81,0,0,0"
                                VerticalAlignment="Center" ViewType="Week" Height="217"
Width="560" ItemsSource="{Binding Appointments}" />

    </Grid>
</Window>


Please, help me !


Thanks




2 Replies

TG Tamilarasan Gunasekaran Syncfusion Team January 23, 2025 01:06 PM UTC

Hi Jim,

Regarding issue Scheduler appointment fails to resize when using custom appointment inherited from ScheduleAppointment class.


We have checked, and we can replicate the reported issue from our end. We have logged an issue report for the same; we will fix this issue and include the issue fix in our weekly NuGet release update which is expected to be available by February 11, 2025. We appreciate your patience until then.

You can track the status of this report through the following feedback link:  https://www.syncfusion.com/feedback/64858

Note: The provided feedback link is private, and you need to log in to view this feedback.

Disclaimer: Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization

Regards,

Tamilarasan G.



TG Tamilarasan Gunasekaran Syncfusion Team February 11, 2025 01:57 PM UTC

Hi Jim,


Regarding issue Appointment fails to resize when using custom appointment inherited from ScheduleAppointment.

We have fixed the reported issue and included the issue fix in our latest weekly NuGet release update version 28.2.5, which is available for download at nuget.org

Root cause: The issue occurred because the custom appointment, inherited from ScheduleAppointment, is being treated as a custom appointment rather than as a ScheduleAppointment.

We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you require any further assistance.


Regards,
Tamilarasan G.


Loader.
Up arrow icon