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. C#
  4. Properties and GUI changes

Properties and GUI changes

Scheduled Pinned Locked Moved C#
questionannouncement
3 Posts 3 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.
  • S Offline
    S Offline
    Sam Pearson
    wrote on last edited by
    #1

    Is it better to have an AIP and subscribe to a changed event to update the GUI when the property changes, or to specify a backing field and add the GUI update code to the set method? Thanks, Sam

    H P 2 Replies Last reply
    0
    • S Sam Pearson

      Is it better to have an AIP and subscribe to a changed event to update the GUI when the property changes, or to specify a backing field and add the GUI update code to the set method? Thanks, Sam

      H Offline
      H Offline
      half life
      wrote on last edited by
      #2

      I Hope i understood u :) it is always better to Subscibre to an event when a Property is Changed if it's your Property Like public int MyPropery { Get {return myPropery;} Set {myPropery = value;//Do Something according to the Cahnge//} } Hope i could Help :)

      Have Fun Never forget it

      1 Reply Last reply
      0
      • S Sam Pearson

        Is it better to have an AIP and subscribe to a changed event to update the GUI when the property changes, or to specify a backing field and add the GUI update code to the set method? Thanks, Sam

        P Offline
        P Offline
        papadimitriou
        wrote on last edited by
        #3

        there exist is a big conversation about this . has to do with mvc architecture .if you want standard .net framework look at microsoft databinding . every control has a data binding list .you can unify the way bi directional notification is made use code like this textBox.DataBindings.Add("Text",object,object.property); wich means syncronize the textbox .text with the object.property it is a dificult subject but worth it . or use the code the friend just gave you. http://www.codeproject.com/KB/database/databindingconcepts.aspx[^] http://msdn2.microsoft.com/en-us/library/ms752347.aspx[^]

        f(yf) = yf

        modified on Thursday, March 27, 2008 4:33 PM

        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