This is a migrated thread and some comments may be shown as answers.

Slider Ticks Binding doesn't work

1 Answer 69 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Nick
Top achievements
Rank 2
Nick asked on 27 Aug 2010, 01:27 AM

Scenario:

List of DateTimes, using IValueConverter in order to get doubles for the tick values, and a different IValueConverter for the TickTemplate.

For some reason, I cannot get it to work...

There is also a problem that when I set the DataContext after InitializeComponent(), I get a stackoverflowexception.

Even when not using the binding and setting the Ticks myself, the Ticks are not updated:

Dictionary<double, DateTime> DateRange = DateTime.Today.GetDatesRange(DateTime.Today.AddYears(2)).CreateOADateDictionary();
SliderSelectPeriod.Ticks = new Helpers.DateRangeToDoubleCollectionConverter().Convert(DateRange, null, null, null) as DoubleCollection;


[Edit]
Found the problem; the DateRange, Min and Max ticks property in the INotifyChanged Model wasn't marked as Public, causing the ticks and texts not to show up :-/ Guess you should go to bed early in stead of continuing to progg past 3 AM :P
[/Edit]

 

1 Answer, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 27 Aug 2010, 08:40 AM
Hi Nick,

Yes indeed in Silverlight you cannot data bind non-public properties whilst in WPF you can if your application is working in full trust.

Kind regards,
Tina Stancheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Slider
Asked by
Nick
Top achievements
Rank 2
Answers by
Tina Stancheva
Telerik team
Share this question
or