How can I set the System.Windows.Controls.DatePicker
control as used within a Silverlight project to ReadOnly ?
There doesn't seem to be any properties that I can set within the Xaml or code behind.
How can I set the System.Windows.Controls.DatePicker
control as used within a Silverlight project to ReadOnly ?
There doesn't seem to be any properties that I can set within the Xaml or code behind.
Why would you want to?
DatePicker is a glorified combobox that drops down a calendar rather than a list. If it's to become read only then it would effectively be a read only text box?
< edit > If it's purely for a looks thing then, then a workaround is make a copy of the controls template and edit it so that it's Disabled state looks the same as it's Active state and then set it to disabled when you need read-only behaviour.
What about just handling the date change event and suppressing it and reverting it back to today's date (or some other set date)?