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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.