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. how to write a property at designer by propety window at design time of nested control

how to write a property at designer by propety window at design time of nested control

Scheduled Pinned Locked Moved C#
questionwinformsdesignhelptutorial
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.
  • G Offline
    G Offline
    Guru Call
    wrote on last edited by
    #1

    Hi, I made a user control. it is also a collection ( made by ) various user controls . Eg : ButtonControl is made by various buttons. I want to write the property of one of this control ( like EditButton it has contain ) at designer at design time in my application by using property window. like this ::: this.ButtonControl .EditButton.Text = "Edit me" how can I do ??? Plz help ...

    G 1 Reply Last reply
    0
    • G Guru Call

      Hi, I made a user control. it is also a collection ( made by ) various user controls . Eg : ButtonControl is made by various buttons. I want to write the property of one of this control ( like EditButton it has contain ) at designer at design time in my application by using property window. like this ::: this.ButtonControl .EditButton.Text = "Edit me" how can I do ??? Plz help ...

      G Offline
      G Offline
      gnjunge
      wrote on last edited by
      #2

      In your usercontrol override OnPaint like this:

      protected override void OnPaint(PaintEventArgs e)
      {
      if (this.DesignMode)
      this.EditButton.Text = "I'm in design mode";
      base.OnPaint(e);
      }

      or do the same but for the OnPaint in your window

      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