Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1770
Issue suppressing validation in control
posted

I"m having trouble suppressing the red border around the control and the tool tip. The validation kicks in when I erase all values. This happens only when binding to the DateValue property. If I set say the default value in the code behind the validation does not kick in when all values i the control are erased. Another thing is that if I pick a correct date using the date picker the red border remains. I've included a sample project.

How do I suppress the validation in this control? Why does the validation kick in only when binding to the DateTime property of the xamDateTimeInput control?

DateTimeInputTest.zip
  • 34510
    Verified Answer
    Offline posted

    Hi Kris,

    That is a bug that has already been resolved in newer versions.  Unfortunately it was resolved some time after the last 14.1 SR was released so assuming that you are using 14.1 (based on your sample) you will need to upgrade to at least 14.2 in order to see this resolved.  Maintenance on 14.1 ended back in March of this year.

    A workaround can be applied which will hide the border and tool tip but I definitely recommend upgrading to get an official fix.  Here's a workaround you can use though:

    private void OnLoaded(object sender, RoutedEventArgs e)
    {
        var panel = Infragistics.Windows.Utilities.GetDescendantFromName(sender as DependencyObject, "ErrorPanel");
        panel.Height = 0;
        (panel.ToolTip as ToolTip).Height = 0;
    }

    Sender is the XamDateTimeInput control.