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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. C# Best Practice for Seperating Windows Form

C# Best Practice for Seperating Windows Form

Scheduled Pinned Locked Moved C#
csharptutorialquestiondiscussion
3 Posts 3 Posters 1 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.
  • N Offline
    N Offline
    neffc
    wrote on last edited by
    #1

    Can anyone point me to an example that seperates your Windows Form and it's events away from the class that actually carries out your Application logic?

    L C 2 Replies Last reply
    0
    • N neffc

      Can anyone point me to an example that seperates your Windows Form and it's events away from the class that actually carries out your Application logic?

      L Offline
      L Offline
      leppie
      wrote on last edited by
      #2

      CN78 wrote: Can anyone point me to an example that seperates your Windows Form and it's events away from the class that actually carries out your Application logic? Yes, create a new C# file, without any controls in it :) top secret xacc-ide 0.0.1

      1 Reply Last reply
      0
      • N neffc

        Can anyone point me to an example that seperates your Windows Form and it's events away from the class that actually carries out your Application logic?

        C Offline
        C Offline
        Colin Angus Mackay
        wrote on last edited by
        #3

        Model-View-Controller Pattern[^] This article describes the MVC pattern in relation to web pages, but many of the ideas also apply to Windows Forms. From the above link: The Model-View-Controller (MVC) pattern separates the modeling of the domain, the presentation, and the actions based on user input into three separate classes [Burbeck92]: Model. The model manages the behavior and data of the application domain, responds to requests for information about its state (usually from the view), and responds to instructions to change state (usually from the controller). View. The view manages the display of information. Controller. The controller interprets the mouse and keyboard inputs from the user, informing the model and/or the view to change as appropriate. Does this help?


        "You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar The Second EuroCPian Event will be in Brussels on the 4th of September Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!

        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