Results 1 to 8 of 8

Thread: [RESOLVED] The storage format of PropertyGrid

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2020
    Posts
    1,844

    Resolved [RESOLVED] The storage format of PropertyGrid

    I'm working on a PropertyGrid that I want to store in the same format as VB.NET PropertyGrid. I wonder what is the storage format of VB.NET PropertyGrid? Is it XML? Thanks.
    Attached Images Attached Images  

  2. #2
    PowerPoster PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Pontypool, Wales
    Posts
    2,958

    Re: The storage format of PropertyGrid

    Quote Originally Posted by SearchingDataOnly View Post
    I'm working on a PropertyGrid that I want to store in the same format as VB.NET PropertyGrid. I wonder what is the storage format of VB.NET PropertyGrid? Is it XML? Thanks.
    Do you mean it's internal format? When using VS the code itself is where the PropertyGrid gets the information from...

  3. #3
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: The storage format of PropertyGrid

    IT comes from the .designer.vb file...


    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2020
    Posts
    1,844

    Re: The storage format of PropertyGrid

    Quote Originally Posted by PlausiblyDamp View Post
    Do you mean it's internal format? When using VS the code itself is where the PropertyGrid gets the information from...
    Yes, I mean the storage format from the source code, just as the VB6-Form format is stored in FRM/FRX. The PropertyGrid of VB6-FormDesigner reads the corresponding information from FRM/FRX.

    Quote Originally Posted by techgnome View Post
    IT comes from the .designer.vb file...


    -tg
    I looked at .designer.cs, which contains executable code. Are you sure that that WinForm ProperGrid extracts the control-properties information from these executable shource codes? I thought ProperGrid was reading information from XML.
    Last edited by SearchingDataOnly; Jun 30th, 2023 at 09:10 AM.

  5. #5
    PowerPoster PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Pontypool, Wales
    Posts
    2,958

    Re: The storage format of PropertyGrid

    Quote Originally Posted by SearchingDataOnly View Post
    Yes, I mean the storage format from the source code, just as the VB6-Form format is stored in FRM/FRX. The PropertyGrid of VB6-FormDesigner reads the corresponding information from FRM/FRX.



    I looked at .designer.cs, which contains executable code. Are you sure that that WinForm ProperGrid extracts the control-properties information from these executable shource codes? I thought ProperGrid was reading information from XML.
    Under .net there isn't any designer specific format, the code itself is the design. The property grid simply reads / modifies the code in the .designer.vb file. If you make a change to the code, you should see the change reflected in the designer / property grid.

  6. #6
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: The storage format of PropertyGrid

    The properties themselves are read from the type of the control and how they are configured is determined in some respects by attributes on those properties, e.g. the Category attribute determines the section the property is displayed in. The property values come from the object, either the default value or the specific value in the designer code, as specified above. That's it, that's all.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  7. #7

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2020
    Posts
    1,844

    Re: The storage format of PropertyGrid

    Quote Originally Posted by PlausiblyDamp View Post
    Under .net there isn't any designer specific format, the code itself is the design. The property grid simply reads / modifies the code in the .designer.vb file. If you make a change to the code, you should see the change reflected in the designer / property grid.
    "The code itself is the design" is a great idea. Thank you, PlausiblyDamp.

  8. #8

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2020
    Posts
    1,844

    Re: The storage format of PropertyGrid

    Quote Originally Posted by jmcilhinney View Post
    The properties themselves are read from the type of the control and how they are configured is determined in some respects by attributes on those properties, e.g. the Category attribute determines the section the property is displayed in. The property values come from the object, either the default value or the specific value in the designer code, as specified above. That's it, that's all.
    Got it, thank you, jmcilhinney.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width