Hi,
I'm trying to hide the "editDropDownButton" in the inherited class of DateTimePicker.
The following is the code snippet.
public class DateTimeControl : DateTimePicker {
public DateTimeControl {
this.Value = DateTime.Now;
this.IsEditable = true;
this.IsReadOnly = true;
}
public override void OnApplyTemplate()
{
base.OnApplyTemplate();
var element = (FrameworkElement)this.Template.FindName("editableDropDownButton", this);
if (element != null) {
element.Visibility = Visibility.Hidden;
}
}
}
On Windows7 environment, it works.
But on WindowsXPSP3(Japanese) environment, it does not work because
"this.Template.FindName(...)" returns null.
Could you please give me a clue for solving this problem?
Best Regards,
-- Tomonori Manome (and Shintaro "Roger" Iwamura)