We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SfSchedule ItemsSource Binding not working when using XAML DataContext Binding

Thread ID:

Created:

Updated:

Platform:

Replies:

150007 Dec 17,2019 03:43 PM UTC Dec 18,2019 12:09 PM UTC WPF 1
loading
Tags: SfSchedule
Sandmaann
Asked On December 17, 2019 03:43 PM UTC

Hi,
I encountered a problem when I tried to bind a collection of custom objects to your SfSchedule control.
When using the folling type of DataContext binding:

    <Window.DataContext>
        <local:ScheduleViewModel />
    </Window.DataContext>

The Items did not get loaded/displayed in the SfSchedule control but the ItemsSource collection was accessible and correctly setup (I looked at it in debug). The Appointment collection of SfSchedule was empty and not filled.

This did only occur when using the above method of DataContext binding.
By using the method of setting the DataContext in the Constructor like this
        public MainWindow()
        {
            InitializeComponent();
            this.DataContext = new ScheduleViewModel();
        }
SfSchedul displays everything as expected.

I tried it with your provided Sample from

and the version of SfSchedule I'm currently using 17.3460.0.27.

I just wanted to report this minor issue.

Niranjan Kumar Gopalan [Syncfusion]
Replied On December 18, 2019 12:09 PM UTC

Hi Sandmaann, 
 
Thanks for your contacting Syncfusion support. 
 
We have analyzed your query “DataContext binding does not work in XAML”. This query has already been logged as defect and the fix for this issue will be included in Volume 4 SP1 release which rolls out by the end of January 2020. Please refer the below feedback portal. 
 
 
Regards, 
Niranjan Kumar 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon