Click here to Skip to main content
Click here to Skip to main content
Articles » Languages » C# » Windows Forms » Downloads
 
Add your own
alternative version

Unleash PropertyGrid with Dynamic Properties and Globalization

, 29 Jan 2004
The article presents a way to enhance the use of the PropertyGid control with dynamic properties and globalization
<?xml version="1.0" encoding="utf-8"?>
<root>
  <!-- 
    Microsoft ResX Schema 
    
    Version 1.3
    
    The primary goals of this format is to allow a simple XML format 
    that is mostly human readable. The generation and parsing of the 
    various data types are done through the TypeConverter classes 
    associated with the data types.
    
    Example:
    
    ... ado.net/XML headers & schema ...
    <resheader name="resmimetype">text/microsoft-resx</resheader>
    <resheader name="version">1.3</resheader>
    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
    <data name="Name1">this is my long string</data>
    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
        [base64 mime encoded serialized .NET Framework object]
    </data>
    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
        [base64 mime encoded string representing a byte array form of the .NET Framework object]
    </data>
                
    There are any number of "resheader" rows that contain simple 
    name/value pairs.
    
    Each data row contains a name, and value. The row also contains a 
    type or mimetype. Type corresponds to a .NET class that support 
    text/value conversion through the TypeConverter architecture. 
    Classes that don't support this are serialized and stored with the 
    mimetype set.
    
    The mimetype is used forserialized objects, and tells the 
    ResXResourceReader how to depersist the object. This is currently not 
    extensible. For a given mimetype the value must be set accordingly:
    
    Note - application/x-microsoft.net.object.binary.base64 is the format 
    that the ResXResourceWriter will generate, however the reader can 
    read any of the formats listed below.
    
    mimetype: application/x-microsoft.net.object.binary.base64
    value   : The object must be serialized with 
            : System.Serialization.Formatters.Binary.BinaryFormatter
            : and then encoded with base64 encoding.
    
    mimetype: application/x-microsoft.net.object.soap.base64
    value   : The object must be serialized with 
            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
            : and then encoded with base64 encoding.

    mimetype: application/x-microsoft.net.object.bytearray.base64
    value   : The object must be serialized into a byte array 
            : using a System.ComponentModel.TypeConverter
            : and then encoded with base64 encoding.
    -->
  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xsd:element name="root" msdata:IsDataSet="true">
      <xsd:complexType>
        <xsd:choice maxOccurs="unbounded">
          <xsd:element name="data">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="resheader">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" />
            </xsd:complexType>
          </xsd:element>
        </xsd:choice>
      </xsd:complexType>
    </xsd:element>
  </xsd:schema>
  <resheader name="resmimetype">
    <value>text/microsoft-resx</value>
  </resheader>
  <resheader name="version">
    <value>1.3</value>
  </resheader>
  <resheader name="reader">
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <data name="PageFooter" type="System.Drawing.Bitmap, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64">
    <value>
        iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAH1JREFUWEftl8EK
        wCAMQ/30/bmLDGQ3k1pRJIXCDqHG56FZKa5DCVT4WtH0ddvh2SXNlMSkU2nmT/zge6a7vbiBGqzPuA2Y
        gAmYgAmYwDUEkJCw2vjGBs3dhsrhTXufgUAoSXuCzZGMjJxjWTQTjieTCtnA1h8T8lKWzRN4ATVcZfWA
        /+jYAAAAAElFTkSuQmCC
</value>
  </data>
  <data name="PageHeader" type="System.Drawing.Bitmap, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64">
    <value>
        iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAHZJREFUWEftl0EK
        gDAMBPt0f15XBPHWTZpSkQkEPCxxOvSQtkZ91EAX14q2j3v9vLpCM0NhkzQ08xU+9D3TD14eoCfrBq8C
        0KXUNL8FDUCtgcQ9AAADGMAABjDwHwObVzJz5RzHsjvheLKZCANsfZiYhyI2b+AESXpl9Q/FDvIAAAAA
        SUVORK5CYII=
</value>
  </data>
  <data name="ReportHeader" type="System.Drawing.Bitmap, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64">
    <value>
        iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAHZJREFUWEftl0EK
        gDAMBPt0f15XBPHWTZpSkQkEPCxxOvSQtkZ91EAX14q2j3v9vLpCM0NhkzQ08xU+9D3TD14eoCfrBq8C
        0KXUNL8FDUCtgcQ9AAADGMAABjDwHwObVzJz5RzHsjvheLKZCANsfZiYhyI2b+AESXpl9Q/FDvIAAAAA
        SUVORK5CYII=
</value>
  </data>
  <data name="TableStyle" type="System.Drawing.Bitmap, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64">
    <value>
        iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAJlJREFUWEftl+EK
        wCAIhHt037wZG1s/Bp124/ZDQYgQ+zolrLWynyrQnesLh687DmdbKGcoGCQN5ZyCzdc7fuPlAXrSTnAG
        gDekZ3p8AAF7BcBTQN4DagAz67MPHmSPVgLksDcoGkCyAtcDxngHkgQ0BeQlkAMkK1A9wFOgekDehOKR
        DBw512HZmXCdGYwIA0g/JuClKmxfgQPzW/q+weaiiwAAAABJRU5ErkJggg==
</value>
  </data>
  <data name="ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
    <value>
        AAEAAAD/////AQAAAAAAAAAMAgAAAFpTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0xLjAuNTAw
        MC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZT
        eXN0ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMA
        AAA0DgAAAk1TRnQBSQFMAgEBDQEAAQ4BAAEEAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQC
        AAEoAwABQAMAAUADAAEBAQABCAYAARAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB
        3AHAAQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IB
        AAM5AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8B
        MwMAAWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYC
        AAFmAZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMC
        AAHMAWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQAB
        ZgEAATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8B
        AAEzAWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQAB
        MwGZAWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQAB
        MwLMAQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQAB
        MwEAAWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMB
        mQEAAWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQAB
        ZgGZAWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYB
        zAH/AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMB
        mQEAAZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgAB
        mQFmATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwB
        AAKZAf8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB
        /wEzAQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQAB
        mQEAAcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYC
        AAHMAWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYB
        AAHMApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8C
        AAHMAf8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQAB
        mQEAAcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMB
        AAHMAmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB
        /wGZAcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC
        /wEzAQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC
        /wFmAQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gB
        AAHwAfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD/wcABPs6AAj7NwAL
        +zQAAvsBAAf7AQAB+zMAA/sBAAf7AQAC+zIABPsBAAX7AQAD+zIABvsDAAb7MQAP+zEABfsBAAP7AQAF
        +zEABPsCAAL7AgAF+zEABPsCAAL7AgAE+zMABPsBAAP7AQAE+zMADPs1AAr7OAAH+7UAAvkC/wEABP8B
        AAL/AvkIAAEGDwABBw0ABvsGAAP5Af8BAAT/AQAB/wP5BwACBg4AAgcLAAr7BAAB7AP5AQAE7AEAA/kB
        7AYAAwYNAAMHCgAD+wUAAQMD+wMAAuwD+QTsA/kC7AUABQYLAAUHCQAC+wIABPsBAAEDAvsDAAP/A/kC
        /wP5A/8EAAMGAQACBgoAAwcBAAIHCAAD+wEABvsBAAP7AgAE/wb5BP8DAAMGAgADBggAAwcCAAMHBwAD
        +wEABvsBAAP7AgAE7AEABPkBAATsCQACBg4AAgcHAA77AgAE7AEABPkBAATsCgACBg4AAgcGAAT7AgAC
        +wIABPsCAAT/BvkE/woAAewCBg0AAwcFAAT7AgAC+wIABPsCAAP/A/kC/wP5A/8LAAIGDgACBwUABPsC
        AAL7AgAE+wQAA/kEAAP5DgACBg4AAgcFAAP7AgAC+wIAA/sDAAEFA/kBAAQDAQAD+QEBDQACBg4AAgcE
        AAz7AwAD+QEFAQAEAwEAAQED+Q4AAgYOAAIHBAAK+wQAAvkCBQEABAMBAAIBAvkPAAEGDwABBwYABvtV
        ABD/MAAB/wIGAf8CBgH/AgYB/wIGAf8C+QH/AQAO6wIABP8BAAT/AQAE/xEAAf8CBgH/AgYB/wIGAf8C
        BgH/AvkB/w7tAesCAAT/AQAE/wEABP8DAAX8AgAF/AIAEP8B7QeYA5kCnwHtAesCAATsAQAE7AEABOwC
        AAL8AgAC/AIAAvwCAAL8AQAB/wIGAf8CBgH/AgYB/wIGAf8C+QH/AZIGSQFPAVABeAKfAaAB7QHrAgAE
        7AEABOwBAATsAgAC/AIAAvwCAAL8AgAC/AEAAf8CBgH/AgYB/wIGAf8CBgH/AvkB/wGSCCEBSQGfAaAB
        nwHtAesCAAT/AQAE/wEABP8DAAL8AQAC/AIAAvwCAAL8AQAQ/wH3BiEBAgEnAZcBmAKXAe0B6wIABP8B
        AAT/AQAE/wQABPwCAAL8AgAC/AEAAf8CBgH/AgYB/wIGAf8CBgH/AvkB/wHvAkkEIQFPApcBkAGzAbIB
        7QHrAgAE7AEABOwBAATsAgAC/AIAAvwCAAL8AgAC/AEAAf8CBgH/AgYB/wIGAf8CBgH/AvkB/wHvApcB
        JwEhAScBAgGQArICrAGyAe0B6wIABOwBAATsAQAE7AMABPwDAAX8AgAQ/wHvAlUDAgFrBqwB7QHrAgAE
        /wEABP8BAAT/CgAC/AUAAf8CBgH/AgYB/wIGAf8CBgH/AvkB/wEHAk8BcQG6AZ0B3AHbAbMDxwGsAe0B
        6wIABP8BAAT/AQAE/woAAvwFAAH/AgYB/wIGAf8CBgH/AgYB/wL5Af8BBwjbAdwBCQG0AaYB7QHrGgAC
        /AUAEP8BBwLbAtQD2gHbBBkB7QHrAgAEBQEABAMBAAQBEgAO/AEAAQcCCQLcCAkB7QHrAgAEBQEABAMB
        AAQBEgAO/AEAAbwICQPcAQkB7QHrAgAEBQEABAMBAAQBEgAO/AEABgcG7wH3Ae3/AAsAAfw+AAP8PAAF
        /D0AAfw/AAH8PwAB/D8AAfw9AAX8PAAD/D4AAfwXABD8MAAQ/DAAEPwgAAFCAU0BPgcAAT4DAAEoAwAB
        QAMAAUADAAEBAQABAQYAAQIWAAP/AQAB+AEPBgAB4AEHBgABwAEDBgABgAEBBgABgAcAAYAnAAGABwAB
        gAEBBgABwAEBBgAB4AEDBgAB8AEHBgAB/AE/CAAE/wH4AR8CAAH+Af8B/gH/AeABBwIAAfwB/wH8Af8B
        wAEDAgAB+AH/AfgB/wGEAQECAAHwAX8B8AF/AYgBAQIAAeIBfwHiAX8EAAHGAT8BxgE/BAAB/wE/Af8B
        PwQAAf8BnwH/AZ8EAAH/AY8B/wGPBAAB/wHPAf8BzwQAAf8B5wH/AecBgAEBAgAB/wHzAf8B8wGAAQEC
        AAH/AfkB/wH5AcABAwIAAf8B/QH/Af0B4AEHAgAE/wH4AR8C/wIAAv8CAAL/AgABgAEBAgAC/wMAAQEC
        AAHBAYMDAAEBAgACmQMAAQECAAKZAwABAQIAAckBmQMAAQECAAHhAZkDAAEBAgACmQMAAQECAAHDAYMD
        AAEBAgAB/wGfAwABAQIAAf8BnwMAAQECAAH/AZ8DAAEBAgAC/wGAAQEBAAEBAgAC/wGAAQEBAAEBAgAC
        /wGAAQEBAAEDAgAC/wIABv8BewHeBv8BewHeAv8BgAEBAv8BewHeA/8BfwL/AgAC/wH+AT8C/wF7Ad4C
        /wH8AR8C/wF7Ad4D/wF/Av8BewHeAYABAQH/AX8C/wIAAYABAQH/AX8C/wF7Ad4D/wF/Av8BewHeAv8B
        /AEfAv8BewHeAv8B/gE/Av8CAAP/AX8C/wIAAv8BgAEBAv8CAAb/AgAE/ws=
</value>
  </data>
  <data name="ReportFooter" type="System.Drawing.Bitmap, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64">
    <value>
        iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAHVJREFUWEftl0EK
        QCEIRDt6Nzcj+LRrdPpUMILQYtLp1cJKUVxKwNzXHwkftzffHaGaITHoNFRzEldfM/nZyxuwZAzjMiAC
        IiACIiACIrCBwOF5AJx31rLcQOK7jEl6IGGa973vG1hfLawIv4GjHxP4WBKyBBq9nVz72OfrKAAAAABJ
        RU5ErkJggg==
</value>
  </data>
  <data name="RedScissors" type="System.Drawing.Bitmap, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" mimetype="application/x-microsoft.net.object.bytearray.base64">
    <value>
        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAExJREFUOE9jYBg+
        4D8Dw38YJtlXII3ImtD5BA0k1gBkV2JYgi6J7B2ivPcfG0AKF2RpnF7C5gqQYuJcQERAEgwDimKCaKcS
        jNORpwAAUolzjXhUe4EAAAAASUVORK5CYII=
</value>
  </data>
</root>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Daniel Zaharia
Web Developer
Romania Romania
No Biography provided

| Advertise | Privacy | Mobile
Web03 | 2.8.140721.1 | Last Updated 30 Jan 2004
Article Copyright 2004 by Daniel Zaharia
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid