Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Binding to commands in XAML how? (Read 2707 times)
Dom@Hadley
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 10
Joined: Oct 5th, 2017
Binding to commands in XAML how?
Oct 9th, 2017 at 1:09pm
Print Post  
Hi I'm trying to create my new items (derived of Appointment) in my ViewModel, how do I bind them to the calendar? I can see there are commands (in the help file) but I can't find any examples on how they are used. I cannot find any list in the xaml to bind to. We use xaml commands and viewmodels rather than code behind.

Cheers
Dom
  
Back to top
 
IP Logged
 
Slavcho
God Member
*****
Offline


tech.support

Posts: 3183
Joined: Oct 19th, 2005
Re: Binding to commands in XAML how?
Reply #1 - Oct 9th, 2017 at 2:25pm
Print Post  
Hi,

The calendar shows items from calendar.Schedule.Items collection. Maybe try using same Schedule.Items instance in your ViewModel too? Then when you add new appointments to ViewModel.Items, it will also add to the schedule and show them in calendar. If you can't share the collection, we could think of some way to synchronize or bind through the INotifyCollectionChanged interface implemented by the ItemCollection class.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Dom@Hadley
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 10
Joined: Oct 5th, 2017
Re: Binding to commands in XAML how?
Reply #2 - Oct 11th, 2017 at 8:55am
Print Post  
Thanks, I will go and revisit this
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint