Update control from customized template.

Apr 14, 2009 at 10:19 AM
I have a Calendar control with a customized template for coloring some days based on a runtime value. It works fine except for one little detail. The template is not applied initially. It doesn't seem to take effect until after I changed the SelectedDate of the control. I've tried doing it programmatically but that doesn't work. I've also tried calling ApplyTemplate and OnApplyTemplate on the control to no avail either.

How do I make sure the template is applied when the control is displayed initially and before a selection is actually made?

Apr 14, 2009 at 8:45 PM
Hi Søren -

How are you applying the template? Are you using Converters that depend on SelectedDate? Can you provide a simple repro to illustrate the issue?


Eric, MSFT