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. Designer - Components - Properties only visible in derived classes

Designer - Components - Properties only visible in derived classes

Scheduled Pinned Locked Moved C#
question
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.
  • S Offline
    S Offline
    STW
    wrote on last edited by
    #1

    I've made an Interface IDataFactory with a property ISqlDbComponent{get;set;} a component with the interface IDataFactory: public class DataFactory : System.ComponentModel.Component, IDataFactory The property should be visible with [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)] but isn't. When I derive a component from DataFactory, the property ISqlDbComponent IS visible. I don't understand why and which Designer Attribute I have to add to the property to make it visible in the first implementation and not only in derived classes. The property is implemented in the component "DataFactory" so why it isn't visible in the designer? Thanks a lot Stefan

    L 1 Reply Last reply
    0
    • S STW

      I've made an Interface IDataFactory with a property ISqlDbComponent{get;set;} a component with the interface IDataFactory: public class DataFactory : System.ComponentModel.Component, IDataFactory The property should be visible with [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)] but isn't. When I derive a component from DataFactory, the property ISqlDbComponent IS visible. I don't understand why and which Designer Attribute I have to add to the property to make it visible in the first implementation and not only in derived classes. The property is implemented in the component "DataFactory" so why it isn't visible in the designer? Thanks a lot Stefan

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

      STW wrote: The property should be visible with [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)] but isn't. Thats not true. That controls what the designer 'saves', and that attribute means it will be saved. Look at BrowsableAttribute, but public Properties are visible by default. top secret xacc-ide 0.0.1

      S 1 Reply Last reply
      0
      • L leppie

        STW wrote: The property should be visible with [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)] but isn't. Thats not true. That controls what the designer 'saves', and that attribute means it will be saved. Look at BrowsableAttribute, but public Properties are visible by default. top secret xacc-ide 0.0.1

        S Offline
        S Offline
        STW
        wrote on last edited by
        #3

        Thanks for reply. Yes, right. I forgot to mention that I set [Browsable(true)] for the property. Is there anything else? Stefan

        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