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. Data binding validation

Data binding validation

Scheduled Pinned Locked Moved WPF
wpfhelpwcfquestion
3 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.
  • C Offline
    C Offline
    columbos14927
    wrote on last edited by
    #1

    Hello, I have a tab control with two tabs in it,in each tab i have text boxes, the data of the text boxes is being validated using the IDataErrorInfo interface. If there is an invalid data i am rendering a red ellipsis and a tool tip box using this XAML code:

    Text box XAML:

    The problem is when i go to another tab and then come back again the red Ellipses are disappear. Help any one? Thanks

    N 1 Reply Last reply
    0
    • C columbos14927

      Hello, I have a tab control with two tabs in it,in each tab i have text boxes, the data of the text boxes is being validated using the IDataErrorInfo interface. If there is an invalid data i am rendering a red ellipsis and a tool tip box using this XAML code:

      Text box XAML:

      The problem is when i go to another tab and then come back again the red Ellipses are disappear. Help any one? Thanks

      N Offline
      N Offline
      Nupur S Tiwari
      wrote on last edited by
      #2

      On Tab selection change event, give the datacontext to the textboxes. Say for example for first tab, you have 3 textboxes in a grid and you provide the class object to be bound as datacontext of the grid; when you select that tab, again give the same object as datacontext to the grid. grid.Datacontext = myClassObject; Please see if this works for you.

      C 1 Reply Last reply
      0
      • N Nupur S Tiwari

        On Tab selection change event, give the datacontext to the textboxes. Say for example for first tab, you have 3 textboxes in a grid and you provide the class object to be bound as datacontext of the grid; when you select that tab, again give the same object as datacontext to the grid. grid.Datacontext = myClassObject; Please see if this works for you.

        C Offline
        C Offline
        columbos14927
        wrote on last edited by
        #3

        Hey, No it doesn't work. The problem is when i switch to another tab and the come back the red Ellipsis disappear. Thanks.

        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