Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. What I should do to not Validate form First time?

What I should do to not Validate form First time?

Scheduled Pinned Locked Moved WPF
wpfwcfhelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    wasimsharp
    wrote on last edited by
    #1

    I have ViewModel that has implement IDataErrorInfo interface. Binding is working fine but Now I have a requirement that error Template should not be shown until user lost focus through the Text Box. Currently when form Loaded all the fields are validated and showing red border.

    WANTED wasim khan(Killed 50 Innocent Buggs, Distroyed 200 Exception, make 5 Project Hostage) any Compnay Hire him will pay 30,000. Best place where u can get him is Sorcim Technologies Murre Road RWP

    A 1 Reply Last reply
    0
    • W wasimsharp

      I have ViewModel that has implement IDataErrorInfo interface. Binding is working fine but Now I have a requirement that error Template should not be shown until user lost focus through the Text Box. Currently when form Loaded all the fields are validated and showing red border.

      WANTED wasim khan(Killed 50 Innocent Buggs, Distroyed 200 Exception, make 5 Project Hostage) any Compnay Hire him will pay 30,000. Best place where u can get him is Sorcim Technologies Murre Road RWP

      A Offline
      A Offline
      Abhinav S
      wrote on last edited by
      #2

      You could toggle a boolean variable that is set when you are loading data and reset once this is done. Only allow the validation code to run when the state of the bool is false. E.g.

      If (!load)
      {
      //IDataErrorInfo Validation code
      }

      Build your own survey - http://www.factile.net

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups