Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Bindings (Read 8548 times)
zodraz
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 29
Joined: Jan 14th, 2011
Bindings
Feb 28th, 2011 at 2:09pm
Print Post  
Hi,
        When I try to make a bind such as:

<planner:Calendar Name="calendar" CurrentView="MonthRange" Theme="Windows2003" Grid.RowSpan="2" Grid.Row="1" AllowAutoScroll="True"  FirstWeekendDay="Monday"    Date="{Binding StartDate}">

when silverlight tries to do the render gives a AG_E_PARSER_BAD_PROPERTY_VALUE.

And my binding is perfectly correct loaded from my ViewModel...

Thanks,

Zodraz Sad
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Bindings
Reply #1 - Feb 28th, 2011 at 3:14pm
Print Post  
Unfortunately the Calendar.Date is not a dependency property and cannot be bound. This is an oversight on our part and we are in the process of fixing it. Until then, you have to manually set this property through code.

I will post here when there is a newer version of the control.

Regards,
Meppy
  
Back to top
 
IP Logged
 
zodraz
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 29
Joined: Jan 14th, 2011
Re: Bindings
Reply #2 - Mar 1st, 2011 at 8:24am
Print Post  
Thanks,

         Binding is a hight rated featured for this amazing component....Unfortunatelly I need to have it as soon as possible, so I'll do an old way code-behind...

Zodraz

  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Bindings
Reply #3 - Mar 1st, 2011 at 1:10pm
Print Post  
A new version of the control can be downloaded from the following link:

https://mindfusion.eu/_pln_trial/MindFusion.Scheduling.Silverlight.trial.zip

The build is for .NET4, if you need build for 3.5, let me know.

The new version implements Calendar.Date (along with several other properties) as dependency property. It should now be possible to bind those properties in XAML.

Let me know if this helps.

Regards,
Meppy
  
Back to top
 
IP Logged
 
zodraz
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 29
Joined: Jan 14th, 2011
Re: Bindings
Reply #4 - Mar 1st, 2011 at 2:07pm
Print Post  
Cool!!
         I was messing around code-behind...And communicating through my ViewModel not in a gently way...Fantastic.

By the way I am using Silverlight 3....I'd be appreciated for that build.

Just one more few test and the product is bought!

Thanks!
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Bindings
Reply #5 - Mar 1st, 2011 at 2:35pm
Print Post  
Here is a 3.5 build:

https://mindfusion.eu/_pln_trial/MindFusion.Scheduling.Silverlight.trial.net3.5....

Let me know if there are any problems.

Regards,
Meppy
  
Back to top
 
IP Logged
 
zodraz
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 29
Joined: Jan 14th, 2011
Re: Bindings
Reply #6 - Mar 3rd, 2011 at 4:36pm
Print Post  
Hi,

       Seems to not working...Since I need the following properties (Date/EnDate and Schedule)

<planner:Calendar Name="calendar" CurrentView="MonthRange" Theme="Windows2003" Grid.Row="1" AllowAutoScroll="True"  FirstWeekendDay="Monday" Margin="0,12,0,0" Grid.ColumnSpan="5" MinHeight="630" MinWidth="800" BorderThickness="0"
Date="{Binding StartDate}" EndDate="{Binding EndDate}" Schedule="{Binding DatesCalendari}">

And playing more around with the control...When I try to cheat dependency properties crashes my application...

It would be nice to have at least the Schedule property binded...However I come across other problems like setting the color for the current items...

calendar.SetItemStyle(item,new CalendarStyle()
                          {
                             
                              Background = new SolidColorBrush(bkgColor),

I suppouse there's no easy way to accomplish this with dependency properties...Or it would?

Thanks,

Zodraz


  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Bindings
Reply #7 - Mar 4th, 2011 at 8:32am
Print Post  
You cannot specify the item's style in XAML because it requires an item reference (the item to set the style to) in order to do it. That is why it is done through a method.

Quote:
And playing more around with the control...When I try to cheat dependency properties crashes my application...


Can you provide more information about the crash? Is it related to the fact that you are trying to bind the Schedule property? The Calendar.Schedule is one of the few remaining properties that are not dependency properties. I will check if we can rework this too.

Regards,
Meppy
  
Back to top
 
IP Logged
 
zodraz
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 29
Joined: Jan 14th, 2011
Re: Bindings
Reply #8 - Mar 4th, 2011 at 8:33am
Print Post  
Hi Meppy,

             The crash is the related one I posted on the Update layout topic....

Thanks,

Zodraz
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Bindings
Reply #9 - Mar 4th, 2011 at 11:23am
Print Post  
Can you provide me with a small sample application reproducing the crash so that I can test what might be wrong here?

Regards,
Meppy
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint