- Welcome, Guest. Please Login or Register
MindFusion  
  We have released initial version of MindFusion.Scheduling library for HTML5 & JavaScript.  
  HomeHelpSearchLoginRegister   
     
     
   
 
Page Index Toggle Pages: 1 Send Topic Print  
TimetableSettings Bindings
Read 87 times

Nika   Offline
YaBB Newbies
*
Posts: 4
I Love MindFusion!


   
     
 
TimetableSettings Bindings
Oct 11th, 2018 at 10:42am
 
Hello Meppy,

I'd like to bind the Dates Property to a DateCollection, which is in another class.

This is my XAML Code so far:
<planner:Calendar Theme="{Binding Path=Theme}">
   <planner:Calendar.TimetableSettings>
      <planner:TimetableSettings Dates="{Binding
          Path=DateCollection}"> ...

Now you see that I already did that with the Theme Property of the Calendar and it works perfectly. But it won't work with Dates, although I did the Binding exactly like the Theme Binding.
I tried to debug it and it doesn't even go inside get{...}.

I saw some answers how to deal with that problem in the code-behind, but I have to work strictly with the MVVM pattern.

Thanks in advance  Smiley
 
 
 
IP Logged    
 
     

Slavcho   Online
God Member
*****
Posts: 1529
Gender: male
tech.support


   
     
 
Re: TimetableSettings Bindings
Reply #1 - Oct 11th, 2018 at 5:44pm
 
Hi,

Binding worked in my test project -
https://mindfusion.eu/_samples/DatesBinding.zip

Check if your DateCollection is a public property and of same MindFusion.Scheduling.Wpf.DateCollection type as TimetableSettings' one.

Regards,
Slavcho
Mindfusion
 
 
 
IP Logged    
 
     

Nika   Offline
YaBB Newbies
*
Posts: 4
I Love MindFusion!


   
     
 
Re: TimetableSettings Bindings
Reply #2 - Oct 15th, 2018 at 8:35am
 
Thanks for your response, but sadly it didn't help. As I already said, I did everyting just like with the Theme and there everyting worked perfectly.

I tried to debug the DataBinding with the System.Diagnostics class and this is what I get:

System.Windows.Data Warning: 56 : Created BindingExpression (hash=53954942) for Binding (hash=11903911)
System.Windows.Data Warning: 58 :   Path: 'DateCollection'
System.Windows.Data Warning: 60 : BindingExpression (hash=53954942): Default mode resolved to OneWay
System.Windows.Data Warning: 61 : BindingExpression (hash=53954942): Default update trigger resolved to PropertyChanged
System.Windows.Data Warning: 62 : BindingExpression (hash=53954942): Attach to MindFusion.Scheduling.Wpf.TimetableSettings.Dates (hash=52136226)
System.Windows.Data Warning: 67 : BindingExpression (hash=53954942): Resolving source
System.Windows.Data Warning: 70 : BindingExpression (hash=53954942): Found data context element: TimetableSettings (hash=52136226) (OK)
System.Windows.Data Warning: 71 : BindingExpression (hash=53954942): DataContext is null
System.Windows.Data Warning: 65 : BindingExpression (hash=53954942): Resolve source deferred
System.Windows.Data Warning: 67 : BindingExpression (hash=53954942): Resolving source
System.Windows.Data Warning: 70 : BindingExpression (hash=53954942): Found data context element: TimetableSettings (hash=52136226) (OK)
System.Windows.Data Warning: 71 : BindingExpression (hash=53954942): DataContext is null

With the working Binding it looks like this:

System.Windows.Data Warning: 56 : Created BindingExpression (hash=3957675) for Binding (hash=29135240)
System.Windows.Data Warning: 58 :   Path: 'Theme'
System.Windows.Data Warning: 60 : BindingExpression (hash=3957675): Default mode resolved to OneWay
System.Windows.Data Warning: 61 : BindingExpression (hash=3957675): Default update trigger resolved to PropertyChanged
System.Windows.Data Warning: 62 : BindingExpression (hash=3957675): Attach to MindFusion.Scheduling.Wpf.Calendar.Theme (hash=12674872)
System.Windows.Data Warning: 67 : BindingExpression (hash=3957675): Resolving source
System.Windows.Data Warning: 70 : BindingExpression (hash=3957675): Found data context element: Calendar (hash=12674872) (OK)
System.Windows.Data Warning: 71 : BindingExpression (hash=3957675): DataContext is null
System.Windows.Data Warning: 65 : BindingExpression (hash=3957675): Resolve source deferred
System.Windows.Data Warning: 67 : BindingExpression (hash=3957675): Resolving source
System.Windows.Data Warning: 70 : BindingExpression (hash=3957675): Found data context element: Calendar (hash=12674872) (OK)
System.Windows.Data Warning: 78 : BindingExpression (hash=3957675): Activate with root item MainWindowVM (hash=31874772)
System.Windows.Data Warning: 108 : BindingExpression (hash=3957675):   At level 0 - for MainWindowVM.Theme found accessor RuntimePropertyInfo(Theme)
System.Windows.Data Warning: 104 : BindingExpression (hash=3957675): Replace item at level 0 with MainWindowVM (hash=31874772), using accessor RuntimePropertyInfo(Theme)
System.Windows.Data Warning: 101 : BindingExpression (hash=3957675): GetValue at level 0 from MainWindowVM (hash=31874772) using RuntimePropertyInfo(Theme): 'Windows2003'
System.Windows.Data Warning: 80 : BindingExpression (hash=3957675): TransferValue - got raw value 'Windows2003'
System.Windows.Data Warning: 89 : BindingExpression (hash=3957675): TransferValue - using final value 'Windows2003'

I can't find any solution online  Sad
 
 
 
IP Logged    
 
     

Slavcho   Online
God Member
*****
Posts: 1529
Gender: male
tech.support


   
     
 
Re: TimetableSettings Bindings
Reply #3 - Oct 15th, 2018 at 9:15am
 
Please attach a test project reproducing that - e.g. modify mine above to show your setup, and our developer will investigate.
 
 
 
IP Logged    
 
     

Nika   Offline
YaBB Newbies
*
Posts: 4
I Love MindFusion!


   
     
 
Re: TimetableSettings Bindings
Reply #4 - Oct 15th, 2018 at 10:35am
 
Here's the small version of the solution.
Thanks for your help. Smiley
 
 
 
IP Logged    
 
     

Slavcho   Online
God Member
*****
Posts: 1529
Gender: male
tech.support


   
     
 
Re: TimetableSettings Bindings
Reply #5 - Oct 16th, 2018 at 9:12am
 
Below is wham I'm getting, is it the expected result? If yours is different, maybe you have older version of the control than one I'm testing with. Try replacing your assemblies with the one from my test project above.

...

Regards,
Slavcho
 
 
 
IP Logged    
 
     

Nika   Offline
YaBB Newbies
*
Posts: 4
I Love MindFusion!


   
     
 
Re: TimetableSettings Bindings
Reply #6 - Oct 16th, 2018 at 9:44am
 
It works now with your assemblies. Thank you very much!  Smiley Grin
 
 
 
IP Logged    
 
     
Page Index Toggle Pages: 1 Send Topic Print