(ReadOnly) DateTime Picker in WPF

Posted by Syedshakeer under WCF on 10/19/2010 | Points: 10 | Views : 3286 | Status : [Member] | Replies : 1
Hi,
In My Window Form i added DateTime  Picker.Calendar has TextBox   which it will disaply the selected date.But user can also enter in that calendar TextBox.
My problem is the user cannot enter any text in that Calendar TextBox.User can only enter his date through selecting the Calendar Only.
How to set the calendar TextBox as 'IsReadOnly ' property.

When i try to set as IsReadOnly the following error Message is showing
The property 'IsReadOnly' does not exist in XML namespace 'http://schemas.microsoft.com/wpf/2008/toolkit'.


Syed Shakeer Hussain


Responses

Posted by: Lalji_mer on: 10/19/2010 [Member] Bronze | Points: 25

Up
0
Down
The IsReadOnly property of the TextBox sets the text box read only. By default, it is false.

IsReadOnly="True"

<TextBox Name="TextBox2" Margin="10,10,50,0" 

Width="300" Height="150"
HorizontalScrollBarVisibility="Visible"
VerticalScrollBarVisibility="Visible"
TextWrapping="Wrap"
TextAlignment="Right"
MaxLength="500"
IsReadOnly="False"
AcceptsReturn="True" >
</TextBox>


Reference link
http://www.vbdotnetheaven.com/UploadFile/dbeniwal321/849/

LP MER

Syedshakeer, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response