Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

New Post: Disable manual textbox entry in DateTimePicker

$
0
0
Hi,

You will have to modify the default DateTimePicker's template (or define your own). You can modify it in file :
-Xceed.Wpf.Toolkit/DateTimePicker/Themes/Aero2.NormalColors.xaml (for Windows 8 and up)
-Xceed.Wpf.Toolkit/DateTimePicker/Themes/Generic.xaml (for other Windows)
In the style targeting "local:DateTimePicker",
for "PART_Spinner": set
AllowSpin="False"
ShowButtonSpinner="False"
for "PART_TextBox", set
IsEnabled="False"
With this, you won't be able to enter text in the WatermarkTextBox and the ButtonSpinners will be removed. You will only have the DropDown Button to modify the date.

――――
Get more controls, features, updates and technical support with Xceed Toolkit Plus for WPF

Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>