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. C# Controls - 3 questions

C# Controls - 3 questions

Scheduled Pinned Locked Moved C#
questioncsharpdesignjsonhelp
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.
  • M Offline
    M Offline
    Maciej Pirog
    wrote on last edited by
    #1

    Hi there! I've got 3 questions about programming C# controls: 1. How can I bind my own property to one of the categories that are displayed in the Properties window (like 'Behaviour' ora 'Apperance')? Can I make my own cathegory?:confused: 2. I would like the control to know, if it's in a Design mode or in a running app. User has to add all data to my control dynamicly and I want control to display some example while being in Design mode (sth. like TreeView in Win32 API in Resource Editor). How can I implement thing like that?:confused: 3. How can I change the control's icon that is displayed in the Toolbox?:confused: Please! Help me! MP Maciej Pirog

    R 1 Reply Last reply
    0
    • M Maciej Pirog

      Hi there! I've got 3 questions about programming C# controls: 1. How can I bind my own property to one of the categories that are displayed in the Properties window (like 'Behaviour' ora 'Apperance')? Can I make my own cathegory?:confused: 2. I would like the control to know, if it's in a Design mode or in a running app. User has to add all data to my control dynamicly and I want control to display some example while being in Design mode (sth. like TreeView in Win32 API in Resource Editor). How can I implement thing like that?:confused: 3. How can I change the control's icon that is displayed in the Toolbox?:confused: Please! Help me! MP Maciej Pirog

      R Offline
      R Offline
      Russell Morris
      wrote on last edited by
      #2

      Maciej Pirog wrote: 1. How can I bind my own property to one of the categories that are displayed in the Properties window (like 'Behaviour' ora 'Apperance')? Can I make my own cathegory? Use the 'CategoryAttribute' on one of your control's properties Maciej Pirog wrote: 2. I would like the control to know, if it's in a Design mode Take a look at the Control.DesignMode property Maciej Pirog wrote: How can I change the control's icon that is displayed in the Toolbox? Embed a bitmap in your assembly named the same as your control's fully qualified typename (plus .bmp). So if your control's full name is MyNamespace.MyControl, 'embed as resources' a 16x16 bitmap in your project named 'MyNamespace.MyControl.bmp'. Recompile, and studio should use that bitmap on the toolbox. Check out the code for PropertyTree for an example of embedding Toolbox bitmaps in a control assembly. -- Russell Morris "WOW! Chocolate - half price!" - Homer Simpson, while in the land of chocolate.

      M 1 Reply Last reply
      0
      • R Russell Morris

        Maciej Pirog wrote: 1. How can I bind my own property to one of the categories that are displayed in the Properties window (like 'Behaviour' ora 'Apperance')? Can I make my own cathegory? Use the 'CategoryAttribute' on one of your control's properties Maciej Pirog wrote: 2. I would like the control to know, if it's in a Design mode Take a look at the Control.DesignMode property Maciej Pirog wrote: How can I change the control's icon that is displayed in the Toolbox? Embed a bitmap in your assembly named the same as your control's fully qualified typename (plus .bmp). So if your control's full name is MyNamespace.MyControl, 'embed as resources' a 16x16 bitmap in your project named 'MyNamespace.MyControl.bmp'. Recompile, and studio should use that bitmap on the toolbox. Check out the code for PropertyTree for an example of embedding Toolbox bitmaps in a control assembly. -- Russell Morris "WOW! Chocolate - half price!" - Homer Simpson, while in the land of chocolate.

        M Offline
        M Offline
        Maciej Pirog
        wrote on last edited by
        #3

        Thanks! Tht's what I needed! :) MP Maciej Pirog

        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