- Home
- Forum
- Xamarin.Forms
- SfSchedule ItemsSource Binding not working when using XAML DataContext Binding
SfSchedule ItemsSource Binding not working when using XAML DataContext Binding
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>
<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();
}
{
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.
SIGN IN To post a reply.
3 Replies
NI
Ninja
Syncfusion Team
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.
Feedback link: https://www.syncfusion.com/feedback/10835/custom-binding-not-working-when-bind-the-itemsource-in-xaml
Regards,
Niranjan Kumar
AH
Amir H
March 28, 2021 09:49 PM UTC
Hi,
Has there been any updates on this?
This issue still persists (I used UWP within Xamarin.Forms)
MS
Muniappan Subramanian
Syncfusion Team
March 29, 2021 10:54 AM UTC
Hi Amir H,
Thank you for contacting Syncfusion support.
We have checked the reported issue “Binding schedule Data source is not working in Forms UWP “and it’s working fine from our end. We have attached the tested sample in the following link,
Additional information:
Tested device: Lenovo windows machine
SfSchedule version: 18.4.0.49
Xamarin Forms: 4.5.0.617
Could you please check our sample and let us know if you still facing the same issue? If not, please modify our sample to reproduce the issue which will be helpful for us to check on it and provide you the solution as soon as possible.
Regards,
Muniappan S
SIGN IN To post a reply.
- 3 Replies
- 4 Participants
-
SA Sandmaann
- Dec 17, 2019 03:43 PM UTC
- Mar 29, 2021 10:54 AM UTC