<?xml version="1.0" encoding="utf-16"?>
<rss
  version="2.0">
  <channel>
    <title>VisualHint blog</title>
    <link>https://visualhint.com/feed/mainblog</link>
    <description />
    <lastBuildDate>Thu, 11 Jan 2024 18:46:00 Z</lastBuildDate>
    <item>
      <guid
        isPermaLink="false">Smart PropertyGrid and Smart FieldPackEditor for .Net 8</guid>
      <link>https://visualhint.com/blog/entries%2F353/Smart%20PropertyGrid%20and%20Smart%20FieldPackEditor%20for%20.Net%208</link>
      <title>Smart PropertyGrid and Smart FieldPackEditor for .Net 8</title>
      <description>&lt;p&gt;.Net 8 assemblies have just been added to the nuget packages.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;SPG for .Net 6+ is now version 4.2&lt;/li&gt;
&lt;li&gt;SFPE for .Net 6+ is now version 2.2.1&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;On this occasion, I had to update SPG to fix a .Net 8 regression in the &lt;a href="https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.keysconverter?view=windowsdesktop-8.0"&gt;KeysConverter class&lt;/a&gt;. I've &lt;a href="https://github.com/dotnet/winforms/issues/10610"&gt;raised this issue&lt;/a&gt; with the Microsoft development team and they should fix it for .Net 8 and .Net 9 preview.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Smart PropertyGrid and Smart FieldPackEditor for .Net 7</guid>
      <link>https://visualhint.com/blog/entries%2F321/Smart%20PropertyGrid%20and%20Smart%20FieldPackEditor%20for%20.Net%207</link>
      <title>Smart PropertyGrid and Smart FieldPackEditor for .Net 7</title>
      <description>&lt;p&gt;Since .Net 7 has been released last week, I have added .Net 7 assemblies to the nuget packages.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;SPG for .Net 6+ is now version 4.1&lt;/li&gt;
&lt;li&gt;SFPE for .Net 6+ is now version 2.1&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note that both products are newly labelled &amp;quot;for .Net 6+&amp;quot; to include current and upcoming .Net versions starting from 6.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Fluent API updated</guid>
      <link>https://visualhint.com/blog/entries%2F289/Fluent%20API%20updated</link>
      <title>Fluent API updated</title>
      <description>&lt;p&gt;So far, you were able to configure a category with a specific call, and configure child properties this way:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-cs"&gt;.ForCategory(&amp;quot;Credentials&amp;quot;, category =&amp;gt; category.Comment = &amp;quot;my comment&amp;quot;)
.ForProperty(x =&amp;gt; x.Username, config =&amp;gt; config
    .Category(&amp;quot;Credentials&amp;quot;, 1)
    .Id(1000)
)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As you can see the calls are at the same level. The property definition had to mention the parent category in order for, let's say, set a sorting index. This kind of mimics the way attributes work. You can attach a CategoryAttribute to a property to set a category sorting index. Obviously this is not very intuitive when using a fluent API. Therefore, I added a new way to define categories and properties and this now displays as a 2-levels hierarchical tree:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-cs"&gt;.ForCategory(&amp;quot;Credentials&amp;quot;, config =&amp;gt; config
    .Sorted(1)
    .Comment(&amp;quot;my comment&amp;quot;)

    .ForProperty(x =&amp;gt; x.Username, config =&amp;gt; config
        .Id(1000)
    )

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Note that these methods are also available inside ForCategory to configure a category:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Sorted&lt;/strong&gt; to set a sorting index.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Comment&lt;/strong&gt; to add a description.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ImageIndex&lt;/strong&gt; to add an icon on the left of the category label.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ValueText&lt;/strong&gt; to set a secondary text on the right side of the category label.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That way, this is clear that you define some settings for a category and then for its child properties.&lt;br /&gt;
This is in version 4.0.2 and ready for you to enjoy.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">VisualHint runs now on Asp.Net Core 6</guid>
      <link>https://visualhint.com/blog/entries%2F257/VisualHint%20runs%20now%20on%20Asp.Net%20Core%206</link>
      <title>VisualHint runs now on Asp.Net Core 6</title>
      <description>&lt;p&gt;The VisualHint web server had been running .Net Framework and Asp.Net Mvc 5 for a long time and I had never developed with Asp.Net Core before. I thought it would make an interesting project to migrate it to Core and the result is now live in front of your eyes. It took me weeks to build it because so many things have changed. Here is a non-exhaustive list of all the impacted areas:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Dependency injection (many of my internals migrated to injected services)&lt;/li&gt;
&lt;li&gt;MVC pipeline&lt;/li&gt;
&lt;li&gt;Routing&lt;/li&gt;
&lt;li&gt;Bundling and minifying&lt;/li&gt;
&lt;li&gt;Session storage&lt;/li&gt;
&lt;li&gt;Authentication and authorization&lt;/li&gt;
&lt;li&gt;Background jobs (commands and maintenance tasks) - Now using Quartz&lt;/li&gt;
&lt;li&gt;RavenDb&lt;/li&gt;
&lt;li&gt;AutoMapper&lt;/li&gt;
&lt;li&gt;Logging (was using RavenDb store, now in memory waiting for a better solution)&lt;/li&gt;
&lt;li&gt;Emailing&lt;/li&gt;
&lt;li&gt;Async everywhere&lt;/li&gt;
&lt;li&gt;and a ton of small other things in my code&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;It was huge, really, but I'm pretty happy with the result. Things to note:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The mailing list is broken. I was using a homemade library and it's an enormous job to port it. Don't know when I can fix that.&lt;/li&gt;
&lt;li&gt;Since the authentication system had to change, your password is not usable anymore. You will have to reset it by going to the lost password route.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The server is still hosted by Azure. Ultimately, I would like to move it to a cheaper linux box.&lt;/p&gt;
&lt;p&gt;With so many changes, bugs may happen. Please contact me if you encounter any issues. You can also do so if you are in such a migration and need some help. Who knows if I can give some advice based on this recent experience.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Smart FieldPackEditor Final for .Net 6, version 2.0.0, is released</guid>
      <link>https://visualhint.com/blog/entries%2F225/Smart%20FieldPackEditor%20Final%20for%20.Net%206,%20version%202.0.0,%20is%20released</link>
      <title>Smart FieldPackEditor Final for .Net 6, version 2.0.0, is released</title>
      <description>&lt;p&gt;After releasing Smart PropertyGrid for .Net 6, customers pressed me with questions about whether Smart FieldPackEditor would also be available for the latest version of .Net. The porting was already done but I hadn't updated everything about the build, licensing and publishing as a NuGet package. It is now done. You will find:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A trial package on &lt;a href="https://www.nuget.org/packages/VisualHint.SmartFieldPackEditor-net6.Trial"&gt;nuget.org&lt;/a&gt;. The adapter for SPG is also on &lt;a href="https://www.nuget.org/packages/VisualHint.SpgSfpeAdapter-net6.Trial"&gt;nuget.org&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;The licensed product on a private NuGet server.&lt;/li&gt;
&lt;li&gt;Usual samples on &lt;a href="https://github.com/visualhint/smartfieldpackeditor-net6-samples"&gt;Github&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I took the opportunity to also release SFPE for .Net Framework as a &lt;a href="https://www.nuget.org/packages/VisualHint.SmartFieldPackEditor.Trial"&gt;NuGet package&lt;/a&gt;, and your purchased copy is on a private NuGet server too.&lt;/p&gt;
&lt;p&gt;AS a reminder, SFPE for .Net 6 is considered a new product. If you already own licenses for .Net Framework, there is no upgrade path and you need to purchase new licenses.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Smart PropertyGrid Final for .Net 6, version 4.0.1, is released</guid>
      <link>https://visualhint.com/blog/entries%2F193/Smart%20PropertyGrid%20Final%20for%20.Net%206,%20version%204.0.1,%20is%20released</link>
      <title>Smart PropertyGrid Final for .Net 6, version 4.0.1, is released</title>
      <description>&lt;p&gt;A short time after the final release of SPG for .Net 6, here is an updated version with many new methods added to the Fluent API (+ a crash fix). With it comes a completely new sample that you can find on &lt;a href="https://github.com/visualhint/smartpropertygrid-net6-samples"&gt;Github&lt;/a&gt;, showing all possibilities of the API. Frankly, it's quite cool, and I'm sure you will give me your ideas to enhance it even more.&lt;/p&gt;
&lt;p&gt;For the pleasure:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-cs"&gt;// FontColor property is not created because it is later added manually as a child of a Font property
.ForProperty(x =&amp;gt; x.FontColor, config =&amp;gt; config.FilterOut(PropertyPreFilterOutEventArgs.FilterModes.FilterOut))

.ForProperty(x =&amp;gt; x.MyFont, config =&amp;gt; config
    .Sorted(propertySortedIndex++)
    .Category(ReflectionCategory, 5)
    .DisplayName(&amp;quot;Font&amp;quot;)
    .Comment(&amp;quot;This property content is discovered by reflection but I customized it to hide certain subproperties, add a Color property, set the booleans as checkboxes with various texts and assigned up/down buttons to Size.&amp;quot;)
    .ChildLook&amp;lt;PropertyCheckboxLook&amp;gt;(&amp;quot;Italic&amp;quot;)
    .ChildLook&amp;lt;PropertyCheckboxLook&amp;gt;(&amp;quot;Strikeout&amp;quot;)
    .ChildLook&amp;lt;PropertyCheckboxLook&amp;gt;(&amp;quot;Underline&amp;quot;)
    .ChildLook&amp;lt;PropertyCheckboxLook&amp;gt;(&amp;quot;Bold&amp;quot;)
    .ChildFeel(&amp;quot;Strikeout&amp;quot;, FeelCheckbox)
    .ChildFeel(&amp;quot;Italic&amp;quot;, FeelCheckbox)
    .ChildFeel(&amp;quot;Underline&amp;quot;, FeelCheckbox)
    .ChildFeel(&amp;quot;Bold&amp;quot;, FeelCheckbox)
    .ChildFeel(&amp;quot;Size&amp;quot;, FeelEditUpDown)
    .ChildDisplayedValues(&amp;quot;Bold&amp;quot;, new string[] { &amp;quot;&amp;quot;, &amp;quot;&amp;quot; })
    .ChildDisplayedValues(&amp;quot;Italic&amp;quot;, new string[] { &amp;quot;Yes&amp;quot;, &amp;quot;No&amp;quot; })
    .HideChildProperties(&amp;quot;GdiCharSet&amp;quot;, &amp;quot;GdiVerticalFont&amp;quot;, &amp;quot;Unit&amp;quot;)
    .PropertyCreated((args, grid) =&amp;gt;
    {
        args.PropertyEnum.Property.Value.Validator = new PropertyValidatorFontSize(5.0f, 15.0f);

        // In case LazyLoading==true, the children have not been created yet, so expand the property to be sure...
        grid.ExpandProperty(args.PropertyEnum, true);

        var childEnum = args.PropertyEnum.Children;
        if (childEnum.Count &amp;gt; 0)
        {
            childEnum.MoveFirst();
            childEnum.Property.Comment = &amp;quot;Uses a UITypeEditor. By the way, you can set comments to auto-discovered subproperties...&amp;quot;;
            childEnum.MoveNext();
            childEnum.Property.Comment = &amp;quot;A custom feel has been applied to this property. It is done by setting an attribute to its parent. Also a validator constrains the value between 5 and 15.&amp;quot;;
            childEnum.Property.Value.Validator = new PropertyValidatorMinMax((Single)5.0, (Single)15.0);
            childEnum.MoveNext();

            var propEnum = grid.InsertProperty(childEnum, 150, &amp;quot;Color&amp;quot;, grid.SelectedObject, &amp;quot;FontColor&amp;quot;, &amp;quot;&amp;quot;);
            propEnum.Property.Feel = grid.GetRegisteredFeel(FeelList);
            propEnum.Property.Look = new PropertyAlphaColorLook();
            propEnum.Property.Comment = &amp;quot;This color has been added to the children of the font. It uses an alpha color editor.&amp;quot;;

            propEnum.MoveNext();
            propEnum.Property.Comment = &amp;quot;The text of a checkbox can be removed.&amp;quot;;
            propEnum.MoveNext();
            propEnum.Property.Comment = &amp;quot;The text of a checkbox can be customized.&amp;quot;;

            grid.ExpandProperty(args.PropertyEnum, false);
        }
    })
)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here you can see some nice built-in methods like &lt;em&gt;Sorted&lt;/em&gt; or &lt;em&gt;ChildLook&lt;/em&gt;. And when you need complex customizations, you always have an handy event to go deep inside the SPG api.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Smart PropertyGrid Final for .Net 6, version 4.0, is released + new Fluent API</guid>
      <link>https://visualhint.com/blog/entries%2F161/Smart%20PropertyGrid%20Final%20for%20.Net%206,%20version%204.0,%20is%20released%20%2B%20new%20Fluent%20API</link>
      <title>Smart PropertyGrid Final for .Net 6, version 4.0, is released + new Fluent API</title>
      <description>&lt;p&gt;Today is a great day for VisualHint with 2 important news.&lt;/p&gt;
&lt;p&gt;I'm pleased to announce the officiel release of Smart PropertyGrid for .Net 6 today. It is available as a NuGet package on &lt;a href="https://www.nuget.org/packages/VisualHint.SmartPropertyGrid-net6.Trial"&gt;nuget.org&lt;/a&gt; for the trial version and on your private NuGet feed for the purchased version.&lt;/p&gt;
&lt;p&gt;I have also added a completely new feature allowing you to fill the grid traditionally with SelectedObject and to customize each property with a Fluent API. It means that you can have on one side your business objects without any PropertyGrid attributes, the PropertyGrid itself, and some custom separate classes (profiles) to customize how your business objects appear in the grid. Right now the API is minimal and an in-progress work based on your requests. You will find the online documentation &lt;a href="https://docs.visualhint.com/spg/fluent.html"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Next step: I'm cloning the &lt;a href="https://github.com/visualhint/smartpropertygrid-net6-samples"&gt;PropertyGridShowRoom sample&lt;/a&gt; to use SelectedObject and this fluent API. This will drive new additions to the API.&lt;/p&gt;
&lt;p&gt;Don't hesitate to let me know what you think!&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Initial expanded state of properties and PropertyGrid state saving/restoring</guid>
      <link>https://visualhint.com/blog/entries%2F131/Initial%20expanded%20state%20of%20properties%20and%20PropertyGrid%20state%20saving%2Frestoring</link>
      <title>Initial expanded state of properties and PropertyGrid state saving/restoring</title>
      <description>&lt;p&gt;Once more, the idea of this article comes from a question I found on &lt;a href="https://stackoverflow.com/questions/64501360/automatically-expand-some-properties-in-propertygrid"&gt;StackOverflow&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I would like to automatically expand some nodes in a PropertyGrid loaded with an instance of my SettingsStructure class by using attributes on the properties of that class. Also, I am attempting to have the instance 'remember' whether each property was expanded or not if the user loads that instance again on the PropertyGrid.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I was curious to see how easy/difficult it is to get this done in Smart PropertyGrid when using SelectedObject.&lt;/p&gt;
&lt;p&gt;Here is a class to populate the grid:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-cs"&gt;public class TargetClass
{
    [PropertyExpanded]
    public Size Size { get; set; } = new Size(10, 20);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Initial expanded state for a property&lt;/h2&gt;
&lt;p&gt;This was really easy to set up an attribute to do that thanks to the new addition discussed &lt;a href="https://visualhint.com/blog/130/smart-propertygrid-makes-it-super-easy-to-select-an-item-in-a-collection-property"&gt;in the previous blog post&lt;/a&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-cs"&gt;public class PropertyExpandedAttribute : PropertyCreatedHandlerAttribute
{
    public override void OnPropertyCreated(PropertyEnumerator propEnum)
    {
        propEnum.Property.ParentGrid.ExpandProperty(propEnum, true);
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And voilà, Size is expanded when &lt;em&gt;SelectedObject&lt;/em&gt; is given an instance of &lt;em&gt;TargetClass&lt;/em&gt;.&lt;/p&gt;
&lt;h2&gt;Save and restore the PropertyGrid state&lt;/h2&gt;
&lt;p&gt;Answering this question was instantaneous. Smart PropertyGrid already offers this feature. Here is an example taken from the &lt;a href="https://docs.visualhint.com/spg/content.html#full-reflection-mode"&gt;online documentation&lt;/a&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-cs"&gt;var states = myGrid.SavePropertiesStates(PropertyStateFlags.None);
myGrid.SelectedObject = newTargetInstance;

// Then later
myGrid.BeginUpdate();
myGrid.SelectedObject = originalTargetInstance;
myGrid.RestorePropertiesStates(states);
myGrid.EndUpdate();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Note that &lt;em&gt;SavePropertiesStates&lt;/em&gt; saves some states by default. The expanded state is one of them. First displayed and selected properties are some others. Passing &lt;em&gt;PropertyStateFlags.None&lt;/em&gt; to this method does not mean that it must not save states at all. It means that it should not save more states (like colors and fonts) than the default ones.&lt;/p&gt;
&lt;p&gt;The sample for this article has been added on &lt;a href="https://github.com/visualhint/smartpropertygrid-net6-samples"&gt;github&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Smart PropertyGrid makes it super easy to select an item in a collection property</guid>
      <link>https://visualhint.com/blog/entries%2F130/Smart%20PropertyGrid%20makes%20it%20super%20easy%20to%20select%20an%20item%20in%20a%20collection%20property</link>
      <title>Smart PropertyGrid makes it super easy to select an item in a collection property</title>
      <description>&lt;p&gt;On internet, I have often seen the following question:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I have a collection (a list or a dictionary) and I would like to show a property in the PropertyGrid that allows me to select an item from the collection.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This kind of question can be seen in these 2 examples:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://stackoverflow.com/questions/52877799/propertygrid-select-object-from-listobject"&gt;PropertyGrid --&amp;gt; Select object from List of object&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://stackoverflow.com/questions/71076469/devexpress-propertygrid-use-a-combobox-lookup-edit-attribute-level"&gt;PropertyGrid use a ComboBox / LookUp Edit (Attribute Level)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I then wondered if it was possible to provide a solution without having to modify SPG. This was quickly found by using the &lt;em&gt;PropertyCreated&lt;/em&gt; event and calling &lt;em&gt;PropertyValue.ResetDisplayedValues&lt;/em&gt; with the correct values to place in the list.&lt;br /&gt;
As the question is recurrent on the net, I decided to integrate my solution inside SPG. In the client application, you just have to apply the &lt;em&gt;CollectionPropertySelector&lt;/em&gt; attribute to a property that will act as a selected index in a list or as a selected key in a dictionary. Only one parameter is required: the name of the collection in the class. Here is an example in a &lt;em&gt;TestClass&lt;/em&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-cs"&gt;public TestClass()
{
    PlanetList = new List&amp;lt;Planet&amp;gt; {
        new Planet(&amp;quot;Mercury&amp;quot;),
        new Planet(&amp;quot;Venus&amp;quot;),
        new Planet(&amp;quot;Earth&amp;quot;),
        new Planet(&amp;quot;Mars&amp;quot;),
        new Planet(&amp;quot;Jupiter&amp;quot;),
        new Planet(&amp;quot;Saturn&amp;quot;)};
    MyPlanet1 = 2;

    PlanetDictionary = new Dictionary&amp;lt;string, Planet&amp;gt; {
        { &amp;quot;Mercury&amp;quot;, new Planet(1) },
        { &amp;quot;Venus&amp;quot;, new Planet(2) },
        { &amp;quot;Earth&amp;quot;, new Planet(3) },
        { &amp;quot;Mars&amp;quot;, new Planet(4) },
        { &amp;quot;Jupiter&amp;quot;, new Planet(5) },
        { &amp;quot;Saturn&amp;quot;, new Planet(6) },
    };
    MyPlanet2 = &amp;quot;Earth&amp;quot;;
}

[Browsable(false)]
public List&amp;lt;Planet&amp;gt; PlanetList { get; set; }

[DisplayName(&amp;quot;Home planet&amp;quot;)]
[CollectionPropertySelector(nameof(PlanetList))]
public int MyPlanet1 { get; set; }

[Browsable(false)]
public Dictionary&amp;lt;string, Planet&amp;gt; PlanetDictionary { get; set; }

[DisplayName(&amp;quot;Secondary planet&amp;quot;)]
[CollectionPropertySelector(nameof(PlanetDictionary))]
public string MyPlanet2 { get; set; }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As you can see, we apply Browsable(false) to the collection to not include it in the grid, then we apply the &lt;em&gt;CollectionPropertySelector&lt;/em&gt; attribute to a property of type int for the list and to a property of type string for the dictionary (because the key is of type int). For this to work, a little extra tooling is required. The class that is in the list (&lt;em&gt;Planet&lt;/em&gt;) must have a &lt;em&gt;ToString()&lt;/em&gt; method that returns a representation of the instance. It is also possible to use a &lt;em&gt;TypeConverter&lt;/em&gt; for the same purpose. In the dictionary case, this is not necessary because the &lt;em&gt;Planet&lt;/em&gt; class is used as the Value and not as the Key.&lt;/p&gt;
&lt;p&gt;In order for the &lt;em&gt;CollectionPropertySelector&lt;/em&gt; attribute to act when the attached property is created, I had to add a new Hook to SPG and create a parent class to this attribute that will react on the &lt;em&gt;PropertyCreated&lt;/em&gt; event. Just before the event is triggered, I look for any attributes of this type and call their &lt;em&gt;OnPropertyCreated&lt;/em&gt; method. You can use the &lt;em&gt;PropertyCreatedHandlerAttribute&lt;/em&gt; base class with your own attributes to react to this event. Later on, I will add the same mechanism for other types of events, allowing you to build a set of attributes that can act at the right time.&lt;/p&gt;
&lt;p&gt;You can right now find this feature in SPG for .Net 6 version 4.0.0-rc.5 (available on &lt;a href="https://www.nuget.org/packages/VisualHint.SmartPropertyGrid-net6.Trial/"&gt;nuget.org&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Do you have some small challenges like this to submit to me? Let me know if you have some needs and you are not sure if SPG can help you right away or thanks to a new feature I could add for you.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Smart PropertyGrid is available as NuGet packages</guid>
      <link>https://visualhint.com/blog/entries%2F129/Smart%20PropertyGrid%20is%20available%20as%20NuGet%20packages</link>
      <title>Smart PropertyGrid is available as NuGet packages</title>
      <description>&lt;p&gt;Starting now, future customers can download the trial versions from nuget.org directly inside Visual Studio.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;SPG for .Net 2 to 4 has ID &lt;a href="https://www.nuget.org/packages/VisualHint.SmartPropertyGrid.Trial"&gt;VisualHint.SmartPropertyGrid.Trial&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;SPG for .Net 6 has ID &lt;a href="https://www.nuget.org/packages/VisualHint.SmartPropertyGrid-net6.Trial"&gt;VisualHint.SmartPropertyGrid-net6.Trial&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Customers who have purchased SPG will find a key in their &lt;a href="https://visualhint.com/account/orders"&gt;customer area&lt;/a&gt; to access a private NuGet server where they can download the final version of the product. The documentation has been updated to reflect this new reality.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Smart PropertyGrid for .Net 6 RC is available</guid>
      <link>https://visualhint.com/blog/entries%2F98/Smart%20PropertyGrid%20for%20.Net%206%20RC%20is%20available</link>
      <title>Smart PropertyGrid for .Net 6 RC is available</title>
      <description>&lt;p&gt;Many of my customers are currently migrating their applications to .Net 6 and it was important to port SPG to this new .Net version. So, I am happy to announce today the availability of SPG for WinForms / .Net 6, for now in a Release Candidate 2 version. Here is what you need to know if you want to use it:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;SPG is now available through a private NuGet feed. Its URL is viewable in &lt;a href="https://visualhint.com/account/downloads"&gt;your customer dashboard&lt;/a&gt;. The trial will soon be available on nuget.org too. For those who buy the product with the source code, an installation package is still available in the customer portal.&lt;/li&gt;
&lt;li&gt;The API remains the same so you should have no problems with your existing code.&lt;/li&gt;
&lt;li&gt;Licensing has changed because the company that developed the 3rd-party tools I was using is no longer around (web site is alive but no answer from vendor). So they don't have a new version to manage licensing and obfuscation under .Net 6 and Visual Studio 2022. You will find in the documentation the small changes to make to your projects.&lt;/li&gt;
&lt;li&gt;The documentation is no longer delivered in PDF format. You will find it &lt;a href="https://docs.visualhint.com/spg"&gt;online&lt;/a&gt;. I now write it in Markdown format and statically generate the web pages as soon as I make a change on the pages that are stored on Github. So, changes will be faster and search engines will be able to index it, which is also a good thing to make VisualHint known.&lt;/li&gt;
&lt;li&gt;Like the documentation, the samples are now off-site, on &lt;a href="https://github.com/visualhint/smartpropertygrid-net6-samples"&gt;Github&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;The migration work was a long task and I decided, as a solo developer and for survival reasons, to treat SPG for .Net 6 as a new product. So you will have to buy new licenses (the purchase page now asks you which version you want to buy). Since SPG for .Net Framework is a very mature product, I'm going to leave it as is and only make bug fixes. The good news is that the version for .Net 6 will continue to evolve. Therefore I want to listen to all your feature requests. In the near future I will propose a new one.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For your new projects under Winforms / .Net 6, you can be sure that the PropertyGrid you have always loved will continue to follow you. Don't hesitate to write me for any question.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;PS: btw, I looked at the copyright message at the bottom of the site and noticed that I completely missed the 20 years anniversary of VisualHint last year. And I'm still here in business hoping that it will last a long time!&lt;/strong&gt;&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">The blog is back to life</guid>
      <link>https://visualhint.com/blog/entries%2F97/The%20blog%20is%20back%20to%20life</link>
      <title>The blog is back to life</title>
      <description>&lt;p&gt;It's been almost 10 years since a post was made on this blog. To properly announce the upcoming news, I'm reopening it today. Although this website is now showing its age, I have modernized the display of the articles a bit. As my messages are created in Markdown format, I updated the libraries that process them and use &lt;a href="https://github.com/xoofx/markdig"&gt;MarkDig&lt;/a&gt; on the server side and &lt;a href="https://github.com/markedjs/marked"&gt;Marked&lt;/a&gt; on the client side in my admin interface. The code blocks are colored with the &lt;a href="https://prismjs.com/index.html"&gt;Prism.js&lt;/a&gt; library. As for the &lt;a href="https://feeds.feedburner.com/visualhint"&gt;RSS feed&lt;/a&gt;, it is still valid and you can follow the news of VisualHint in your favorite reader.&lt;/p&gt;
&lt;p&gt;See you soon for exciting news about your favorite PropertyGrid.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">New critical updates</guid>
      <link>https://visualhint.com/blog/entries%2F78/New%20critical%20updates</link>
      <title>New critical updates</title>
      <description>&lt;p&gt;The products you love from VisualHint continue to be refined. Starting with version 3.3.0, SPG is compatible with .Net 4.5. Prior to this &amp;quot;fix&amp;quot; SPG would crash because of the new way the IComparer interface works. SFPE has also been touched. While very stable, a recent feedback showed that it could crash when opening the month calendar if the min and max range allowed for the DateTimePicker did not contain the Today date.&lt;/p&gt;
&lt;p&gt;It is strongly recommended to download and use these versions containing major fixes.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Important updates</guid>
      <link>https://visualhint.com/blog/entries%2F77/Important%20updates</link>
      <title>Important updates</title>
      <description>&lt;p&gt;This has been a long time since I last posted here. I'm sorry, I had no time to blog anymore. But last week, there was an important update to both SPG.Net and SFPE.Net so I feel I have to mention it here. My products use 3rd party licensing engine and obfuscation tools from the same company and there was two issues with them:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;It was not possible to use my .Net 2 assembly on a machine where only .Net 4 is installed.&lt;/li&gt;
&lt;li&gt;There was a crash in the VS2010 SP1 designer when opening a form containing my components.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;They have now fixed these problems and I have uploaded new builds with these fixes.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Fix to VisualTips from Skybound</guid>
      <link>https://visualhint.com/blog/entries%2F76/Fix%20to%20VisualTips%20from%20Skybound</link>
      <title>Fix to VisualTips from Skybound</title>
      <description>&lt;p&gt;Smart PropertyGrid.Net does not use the VisualTips product directly, but the demo sample does. Lately, it was reported an issue (random crashes) with VisualTips if the client application targets .Net 4.0. The solution has now been found and Skybound has published a fix. You will find it &lt;a href="http://dev.skybound.ca/Products/VisualTips/"&gt;here&lt;/a&gt;. I remind you that this is an excellent product and it's free.&lt;/p&gt;
&lt;p&gt;And since we are talking about tooltips, I would like to outline that the latest SPG build contains refactored code for default tooltips. They now position and size perfectly in various conditions and will also now display well under Windows 7 themes.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Discounts, crisis, euro and vacations</guid>
      <link>https://visualhint.com/blog/entries%2F73/Discounts,%20crisis,%20euro%20and%20vacations</link>
      <title>Discounts, crisis, euro and vacations</title>
      <description>&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: the discount is now closed.&lt;/p&gt;
&lt;p&gt;Starting today, a 30% discount will be applied to all products and renewals (except full site and
worldwide licenses). The reason is twofold:&lt;/p&gt;
&lt;p&gt;The crisis is difficult for everyone and now especially for eurozone customers who suffer from a
depreciation of their currency. Lowering my prices is a kind of participation to the recovery
effort. This is a medium term decision and I have no firm expiration date.&lt;/p&gt;
&lt;p&gt;For the shorter term, I will be in vacations from June 23 to July 7 (almost no kind of support can
be provided) and from July 12 to July 20 (minimal support can be provided). So I thought this was
also a reason for lowering the prices during the summer. But anyway if you place a purchase during
this period, your subscription to support and updates will be extended with one additional month.&lt;/p&gt;
&lt;p&gt;These discounts won't last forever so grab them while you can, even if your subscription is still
active.&lt;/p&gt;
&lt;p&gt;Have a good summer!&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">VisualHint changes its hosting provider ... and more</guid>
      <link>https://visualhint.com/blog/entries%2F72/VisualHint%20changes%20its%20hosting%20provider%20...%20and%20more</link>
      <title>VisualHint changes its hosting provider ... and more</title>
      <description>&lt;p&gt;Starting on this Friday, Jan 29, I have triggered the DNS changes that will make visualhint.com point to its new home.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why this move?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;So far visualhint.com was a site written in php and hosted at a linux host. I was using the &lt;a href="http://www.expressionengine.com"&gt;ExpressionEngine&lt;/a&gt; CMS to handle the html pages, the dynamic parts like the blog and announcements, the protected downloads and the sales through paypal. I had also a helpdesk system. This was rather flexible but it has 2 drawbacks for me: it is written in php (which is not something I master) and it is too generic. I need more flexibility to handle my customers, licenses and downloads. Being a .net guy, and also because I fell in love with &lt;a href="http://www.asp.net/mvc/"&gt;asp.net MVC&lt;/a&gt;, I decided to rewrite my web site completely for my exact needs and I'm proud, excited (and a bit frightened) to unveil it now with a first version. It is not fully functional but its core is stable enough to make the jump.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What does it mean for you?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;So far, as a customer, you had just the strict minimum: a link to download your product and your serial number. Starting with the new site you will be able to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;See your orders&lt;/li&gt;
&lt;li&gt;See your subscriptions, expiration dates and status&lt;/li&gt;
&lt;li&gt;See your downloads and serial numbers&lt;/li&gt;
&lt;li&gt;Receive automatic reminders (in time... can you imagine this was manual so far?)&lt;/li&gt;
&lt;li&gt;Purchase in CAD$ if you are canadian (it had to be a manual process outside the site so far)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I will ask you to login next week to the VisualHint web site and check your profile, subscriptions and access to downloads/serials. Please let me know if you see something wrong which does not correspond to your actual purchases. Also bear with me if you see some bugs, like receiving a reminder email several times. Here again, please inform me. At last, because all the backend is under my control, you can send feature requests about the web site. Thanks in advance.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;About prices, something new?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Yes, the policy about renewals changes in your favor. So far, after your subscription to support and updates expires, you had a one month grace period to renew at a discounted price. After this period, the full price had to be paid again to renew for a year. Starting now, the grace period remains, but a simple late fee will be added (30% for the first year not renewed, 60% the second year and so on). Here is an example: for SPG.Net with sources, after the grace period, you had to pay 308 US$. Now, if you want to renew 3 months after the expiration, you will have to pay 114 US$ (the normal renewal price) + 30%, so 148 US$ instead of 308. 14 months later, it would be 114 US$ + 60%, so 182 US$. Nicer, no?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What are the next steps?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Some things will cease working: the forums (the current ones were underused anyway), the helpdesk and the MFC product pages. So at first, on the support page, you will just see an email address. Use it to contact me. I postpone the development of the forums and helpdesk because I want first to focus on my admin panel which is a central part of my new site and it must work flawlessly. I will add some new features to it bit by bit (like a dashboard, stats, and so on) which are many things invisible to you. Then I will get back to the helpdesk.&lt;/p&gt;
&lt;p&gt;If you have any question about these changes, feel free to contact me. Also thank you in advance to put up with the small inconveniences attached to this change which is something important for the future of VisualHint.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">A single checkbox for any property…</guid>
      <link>https://visualhint.com/blog/entries%2F16/A%20single%20checkbox%20for%20any%20property%E2%80%A6</link>
      <title>A single checkbox for any property…</title>
      <description>&lt;p&gt;... or at least for properties that care publishing two standard values.&lt;/p&gt;
&lt;p&gt;In the real life, you won’t always have a boolean to represent 2-states variables. Sometimes, you may have an arbitrary type, for example a simple class with two static members (something like Breaker.Opened / Breaker.Closed) or the couple null / anything. Welcome the retouched checkbox inplace control to show this property as a single checkbox. The rule is this: if your property is not a boolean, not an enumeration and not a collection, then the PropertyGrid will check if there is only two standard values (published by a TypeConverter or manually assigned by you). If this is the case, the single checkbox will be used to let the user switch between these values.&lt;/p&gt;
&lt;p&gt;In case you are not sure how to do it with your type, there is an example in the updated sample.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">The calendar is now kryptonized</guid>
      <link>https://visualhint.com/blog/entries%2F17/The%20calendar%20is%20now%20kryptonized</link>
      <title>The calendar is now kryptonized</title>
      <description>&lt;p&gt;A few hours after announcing the &lt;a href="/blog/30/a-new-monthcalendar-for-the-datetimepicker-and-the-propertygrid"&gt;addition of a totally new MonthCalendar&lt;/a&gt; to the DateTimePicker supplied in Smart FieldPackEditor, here is an addon class that will paint the calendar with the Krypton palettes.&lt;/p&gt;
&lt;p&gt;&lt;img src="/files/images/krypton_date.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;The effect with the various built-in palettes is very professional and I must congratulate Phil of ComponentFactory for the excellent job he does with the Krypton Toolkit. His product is not only a suite of very polished controls, it is also a library that 3rd party developers can use to paint their own controls. And this is a joy to use.&lt;/p&gt;
&lt;p&gt;The supplied drawing manager for krypton painting is an example with my own tastes. You are free to modify it or derive your own class from it. If you hit some limitations related to the drawing, your feature requests are welcome (this is true for the features of the calendar too, of course).&lt;/p&gt;
&lt;p&gt;The free &lt;a href="/blog/30/a-new-monthcalendar-for-the-datetimepicker-and-the-propertygrid"&gt;MonthCalendar&lt;/a&gt;, as well as the Krypton drawing manager and a sample are all zipped in this &lt;a href="/download/8"&gt;archive&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">A new MonthCalendar for the DateTimePicker and the PropertyGrid</guid>
      <link>https://visualhint.com/blog/entries%2F6/A%20new%20MonthCalendar%20for%20the%20DateTimePicker%20and%20the%20PropertyGrid</link>
      <title>A new MonthCalendar for the DateTimePicker and the PropertyGrid</title>
      <description>&lt;p&gt;There was a miss in the DateTimePicker. The editor was able to take any CultureInfo to localize the displayed strings but the popup calendar was not, simply because SFPE was still using the Microsoft MonthCalendar which accepts only the culture of the thread. It had to be fixed so I decided to write my own calendar.&lt;/p&gt;
&lt;img src="/files/images/calendar.png" alt="" /&gt;
&lt;p&gt;This choice was also motivated by a second category of customers who use the free &lt;a href="http://www.componentfactory.com/products_toolkit.php"&gt;Krypton Toolkit&lt;/a&gt; API. This framework has no DateTime components (yet). For them I had just to ensure that my calendar is skinnable. But more on this in another post.&lt;/p&gt;
&lt;p&gt;Not to make a big change, my calendar by default looks like the MS one (+ a mouse hover effect) and has the following features:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;It is completely free&lt;/b&gt; (see at the bottom). Why? Simply because this is not my business and the community needs a good one that is also supported in a commercial package&lt;/li&gt;
&lt;li&gt;It can be used standalone or inside the SFPE DateTimePicker&lt;/li&gt;
&lt;li&gt;It has a CultureInfo property&lt;/li&gt;
&lt;li&gt;It is not limited by the fateful 1753 year but by what the DateTime type can accept&lt;/li&gt;
&lt;li&gt;It can display an optional and localizable &amp;quot;Today&amp;quot; button&lt;/li&gt;
&lt;li&gt;It is nullable, so it can display an optional and localizable &amp;quot;Clear&amp;quot; button too&lt;/li&gt;
&lt;li&gt;There is a true continuous acceleration when keeping the month and year buttons pressed&lt;/li&gt;
&lt;li&gt;An overridable drawing manager allows you to customize its look&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There are some limitations for this first release, simply because I needed a simple calendar for the DateTimePicker:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It displays only one month (no rows and columns of months)&lt;/li&gt;
&lt;li&gt;It doesn't handle range selections&lt;/li&gt;
&lt;li&gt;There is no bolded dates&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That said, you have nothing to loose trying it. It's free and I think this is not just another calendar component. Personaly I tried the various ones proposed by some famous component vendors and I was not so impressed. They put the accent on the nice themes, but each time I was able to find a visual glitch or an annoying limitation.&lt;/p&gt;
&lt;p&gt;Even if you are not a VisualHint customer, you can send me feature requests and I will enhance this calendar bit by bit (here in the comments or at &lt;a href="http://visualhint.uservoice.com"&gt;UserVoice&lt;/a&gt;). Let me know if you like it too...&lt;/p&gt;
&lt;p&gt;&lt;a href="/download/8"&gt;Get the month calendar here&lt;/a&gt; (the supplied sample references the free Krypton toolkit, so if you don't want that, simply remove the reference and the corresponding code in the form class).&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">An interactive calendar on your windows desktop</guid>
      <link>https://visualhint.com/blog/entries%2F18/An%20interactive%20calendar%20on%20your%20windows%20desktop</link>
      <title>An interactive calendar on your windows desktop</title>
      <description>&lt;p&gt;In 2002, when VisualHint was not born yet, I was proposing some components written in C++/MFC under the name &lt;a href="http://web.archive.org/web/20020607182519/aircom.org/dskcalendar.htm"&gt;aircom.org&lt;/a&gt;. The MFC PropertyGrid appeared there, as well as a DateTimePicker and color components.&lt;/p&gt;
&lt;p&gt;Today I retrieved a nice little program, called DeskDate that I was selling for a modest 9.95 US$, and reinstalled it on my machine. &lt;a href="/download/9"&gt;Take it! It's now free&lt;/a&gt; (I'm not responsible if it destroys your computer, bla bla bla). DeskDate displays a permanent calendar on your desktop (you choose the number of rows and columns, and the color), behind all windows (you can bring it on the foreground with a hotkey). Right-click to access the preferences. Here is a screenshot:&lt;/p&gt;
&lt;p&gt;&lt;img src="/files/images/deskdate.png" alt="alt text" /&gt;&lt;/p&gt;
&lt;p&gt;Now, does it give you a clue about my new task for &lt;a href="/fieldpackeditor"&gt;SFPE&lt;/a&gt;?&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">A suffix for the day of the month in the DateTimePicker</guid>
      <link>https://visualhint.com/blog/entries%2F19/A%20suffix%20for%20the%20day%20of%20the%20month%20in%20the%20DateTimePicker</link>
      <title>A suffix for the day of the month in the DateTimePicker</title>
      <description>&lt;p&gt;The TimeSpanEditor was able to do it but not the DateTimePicker due to the way DateTime.Parse works. I have changed that and the DateTimePicker is now able to show a different suffix depending on the day of the month. Here is an animated screenshot:&lt;/p&gt;
&lt;p&gt;&lt;img src="/files/images/dtp_suffix.gif" alt="English suffix for the DateTimePicker" /&gt;&lt;/p&gt;
&lt;p&gt;To work, you need to handle the ValueChanged event, like this:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-cs"&gt;private void dateTimePicker1_ValueChanged(object sender, EventArgs e)
{
    FieldPack fieldPack = (sender as FieldPack);
    Field field = fieldPack.GetField(3);
    if (field != fieldPack.EmptyField)
        SetDayLabel(fieldPack.OwnerEditor as DateTimePicker, field);
}
    
private void SetDayLabel(DateTimePicker dtp, Field field)
{
    if (dtp.Value != null)
    {
        DateTime value = (DateTime)dtp.Value;
        string suffix = &amp;quot;th, &amp;quot;;
        if (value.Day == 1)
            suffix = &amp;quot;st, &amp;quot;;
        else if (value.Day == 2)
            suffix = &amp;quot;nd, &amp;quot;;
        else if (value.Day == 3)
            suffix = &amp;quot;rd, &amp;quot;;

        if (!field.Value.Equals(suffix))
        {
            field.Value = suffix;
            field.OwnerFieldPack.OwnerEditor.RecalcLayout();
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Depending on your language, you can of course change the prefix. Note that there is no particular requirement for the format string.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">DateTimePicker and TimeSpanEditor now support frames per second</guid>
      <link>https://visualhint.com/blog/entries%2F20/DateTimePicker%20and%20TimeSpanEditor%20now%20support%20frames%20per%20second</link>
      <title>DateTimePicker and TimeSpanEditor now support frames per second</title>
      <description>&lt;p&gt;These 2 editors in SFPE.Net can now display a new field for frames per second. The maximum number of frames per second can be chosen in the format string. Here is a screenshot to show you an example:&lt;/p&gt;
&lt;p&gt;&lt;img src="/files/images/frames.png" alt="alt text" /&gt;&lt;/p&gt;
&lt;p&gt;As you can see, it takes the &amp;quot;v&amp;quot; character followed by the max frames count. Even a floating number can be used, like 29.97 for NTSC.&lt;/p&gt;
&lt;p&gt;Note that this comes from a feature request received on July 16. I found it so useful (being a video editing fan myself) that I decided to work on it. The SFPE framework is so nice to use that I published the final result on July 23. Knowing that I had to work on other stuff as well, this surprised my customer who then sent one of the testimonials you can see on this &lt;a href="/about/testimonials"&gt;page&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Screencast of the new TimeSpan editor for .Net</guid>
      <link>https://visualhint.com/blog/entries%2F5/Screencast%20of%20the%20new%20TimeSpan%20editor%20for%20.Net</link>
      <title>Screencast of the new TimeSpan editor for .Net</title>
      <description>&lt;p&gt;As promised &lt;a href="/blog/31/a-timespan-editor-for-net"&gt;last week&lt;/a&gt;, here is a screencast showcasing the features of the new TimeSpan editor, a new creation based on the Smart FieldPackEditor.Net:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: SFPE 1.2 has been &lt;a href="/fieldpackeditor"&gt;released&lt;/a&gt;.&lt;/p&gt;
&lt;iframe width="529" height="463" src="https://www.youtube.com/embed/e1fyx2GWVIo" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;
&lt;p&gt;It is not demonstrated in this video, but I remind you that this editor can be used in the DataGridView and in Smart PropertyGrid.Net too, and with the exact same features.&lt;/p&gt;
&lt;p&gt;If you have any question about this editor, just drop me a note here, in the forums or through the helpdesk. You will be able to play with it very soon when &lt;a href="/fieldpackeditor"&gt;SFPE&lt;/a&gt; version 1.2 is out.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">A TimeSpan editor for .Net</guid>
      <link>https://visualhint.com/blog/entries%2F7/A%20TimeSpan%20editor%20for%20.Net</link>
      <title>A TimeSpan editor for .Net</title>
      <description>&lt;p&gt;It seems there is no TimeSpan editor for .Net. Can you believe it? So when a customer asked me if it was possible to make one with Smart FieldPackEditor.Net, I realized I could fill a gap with a full featured duration editor, based on the flexibility of SFPE. And this is what is coming in version 1.2.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update: a &lt;a href="/blog/29/screencast-of-the-new-timespan-editor-for-net"&gt;screencast&lt;/a&gt; has been published.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;First here is a nice screenshot taken from the updated supplied sample:&lt;/p&gt;
&lt;img style="margin-left:20px;" src="/files/images/timespaneditor.png" alt="" /&gt;
&lt;p&gt;You can see the editor in action and a subset of its properties in a PropertyGrid. And here are its features:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It can be used standalone, in Smart PropertyGrid or in the DataGridView. In the last case, the column of the grid can have the timespan type, long type for ticks and double type for seconds).&lt;/li&gt;
&lt;li&gt;Flexible format string:&lt;br/&gt;
  • D for days without leading zeros&lt;br/&gt;
  • d for days with leading zeros&lt;br/&gt;
  • H for hours without leading zeros&lt;br/&gt;
  • h for hours with leading zeros&lt;br/&gt;
  • M for minutes without leading zeros&lt;br/&gt;
  • m for minutes with leading zeros&lt;br/&gt;
  • S for seconds without leading zeros&lt;br/&gt;
  • s for seconds with leading zeros&lt;br/&gt;
  • F (up to 7 times) for ticks as fraction without trailing zeros&lt;br/&gt;
  • f (up to 7 times) for ticks as fraction with trailing zeros&lt;br/&gt;
  • T (up to 7 times) for standalone ticks without trailing zeros&lt;br/&gt;
  • t (up to 7 times) for standalone ticks with trailing zeros&lt;br/&gt;
  • &amp;quot;:&amp;quot; for the time separtor&lt;br/&gt;
  • Static fields can be added, something like d 'days' H 'hours'&lt;/li&gt;
&lt;li&gt;Min and Max values can be set.&lt;/li&gt;
&lt;li&gt;The most significant field has no max value (except as specified by the global max value set), so you can have a value of 24 hours and more if needed.&lt;/li&gt;
&lt;li&gt;Updown button can be displayed.&lt;/li&gt;
&lt;li&gt;Nullable (with delete key or checkbox).&lt;/li&gt;
&lt;li&gt;Auto-incrementation can be switched on (for ex, seconds passing from 59 to 0 will increment minutes, and so on).&lt;/li&gt;
&lt;li&gt;A new FieldAdded event allows you to modify a field on the fly, for example to change the “day” static string to the plural “days” depending on the current value.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This new editor is a free addition to Smart FieldPackEditor.Net and is planned for release in a few days. A screencast will also be published next week.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">The PropertyGrid gets Office 2007 and other themes</guid>
      <link>https://visualhint.com/blog/entries%2F21/The%20PropertyGrid%20gets%20Office%202007%20and%20other%20themes</link>
      <title>The PropertyGrid gets Office 2007 and other themes</title>
      <description>&lt;p&gt;If you skin your application with famous themes like Office 2007 (blue, black, silver), Office 2003 or Vista, you will be happy to know that SPG.Net now offers these themes too. Here is a (resized) screenshot:&lt;/p&gt;
&lt;p&gt;&lt;img src="/files/images/krypton_themes.png" alt="alt text" /&gt;&lt;/p&gt;
&lt;p&gt;This is feasible thanks to the Krypton Toolkit API (which is a free framework available &lt;a href="http://www.componentfactory.com/product?id=3"&gt;here&lt;/a&gt;). Instead of reinventing the wheel, I contacted Phil Wright to learn more about his toolkit and I learnt that his assembly could be used only to skin custom controls. So I have just created a custom SPG drawing manager: &lt;a href="/download/10"&gt;KryptonDrawingManager.cs&lt;/a&gt;. It uses all the known themes of the toolkit and you can even design your own palettes.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Screencast: How to visually synchronize two PropertyGrids?</guid>
      <link>https://visualhint.com/blog/entries%2F22/Screencast%3A%20How%20to%20visually%20synchronize%20two%20PropertyGrids%3F</link>
      <title>Screencast: How to visually synchronize two PropertyGrids?</title>
      <description>&lt;p&gt;A visitor who wanted to evaluate SPG asked me this question the other day: &amp;quot;I want to build a view to compare two objects visually. I want to display two property grids, one for each object. But these grids must be visually sync'ed. If user expands or collapses one property or category, other grid must do the same. If user scrolls, other must scroll too. It is possible with your component?&amp;quot;. The answer is yes with SPG 3.0.1 and I have made a screencast to show you the result:&lt;/p&gt;
&lt;iframe width="500" height="420" src="https://www.youtube.com/embed/l-xfRprDU-M" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;
&lt;p&gt;The synchronizer class can be downloaded &lt;a href="/download/11"&gt;here&lt;/a&gt; (please, let me know if you find any issue with this class, I will be happy to fix it).&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">PropertyGrid and property value icons screencast</guid>
      <link>https://visualhint.com/blog/entries%2F23/PropertyGrid%20and%20property%20value%20icons%20screencast</link>
      <title>PropertyGrid and property value icons screencast</title>
      <description>&lt;p&gt;As promised, here is a screencast demonstrating the various ways to attach and show an icon with a property value.&lt;/p&gt;
&lt;iframe width="500" height="420" src="https://www.youtube.com/embed/aInalR2Ua-Q" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">A screencast for the new features of Smart FieldPackEditor.Net 1.1</guid>
      <link>https://visualhint.com/blog/entries%2F24/A%20screencast%20for%20the%20new%20features%20of%20Smart%20FieldPackEditor.Net%201.1</link>
      <title>A screencast for the new features of Smart FieldPackEditor.Net 1.1</title>
      <description>&lt;p&gt;Now that SFPE 1.1 has been released, better than a thousand words, here is a short screencast to showcase its new features:&lt;/p&gt;
&lt;div style="margin: 1.5em 0px;"&gt;
&lt;iframe width="500" height="420" src="https://www.youtube.com/embed/rs-gjdaBXPc" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;p&gt;Also here is the changelog:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Version 1.1:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;New features:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A convenient latitude/longitude editor has been added to wrap LatLongFieldPacks. What makes it exceptional is that it accepts values as float, double, decimal and corresponding nullable types and it can even be given your own latitude/longitude type as long as it is IConvertible to decimal or an attached TypeConverter can make the conversion.&lt;/li&gt;
&lt;li&gt;The latitude/longitude editor has a new inplace control for Smart PropertyGrid.&lt;/li&gt;
&lt;li&gt;The latitude/longitude editor can display its value as deg.fraction, deg min.fraction or deg min sec.fraction, with the fraction being optional.&lt;/li&gt;
&lt;li&gt;The IpAddress editor has a new inplace control for Smart PropertyGrid. It can be attached to a string or uint property type.&lt;/li&gt;
&lt;li&gt;Field.Readonly is now handled (behaviour and ForeColor). A ReadOnly field can still be selected. If you don't want so, just set Field.Selectable to false.&lt;/li&gt;
&lt;li&gt;FieldPackEditor.ReadonlyForeColor has been added.&lt;/li&gt;
&lt;li&gt;DateTimeCustomFormatConverter has been set to the DateTimePicker.CustomFormat property so that it lists all standard format strings.&lt;/li&gt;
&lt;li&gt;There is now a simple way to set any field pack to accept the delete key or not, to nullify its content. Call the AcceptsDeleteKey property on the supplied editors or more specifically on individual field packs. The SpgSfpeAdapter also provides an attribute (FieldPackAcceptsDeleteKeyAttribute).&lt;/li&gt;
&lt;li&gt;The visibility of the checkbox, updown and dropdown buttons can now be set through the look class in Smart PropertyGrid.&lt;/li&gt;
&lt;li&gt;A month name field can now be edited with a numeric value (typing 2 will give february).&lt;/li&gt;
&lt;li&gt;Jumping to the next field can now be done with the blank key or the first letter/sign of the adjacent static field.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Bug fixes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;When an editor was inside Smart PropertyGrid, its value was not commited if the user was in the middle of typing in a field.&lt;/li&gt;
&lt;li&gt;The up/down buttons were not effective when the user was in the middle of typing in a field.&lt;/li&gt;
&lt;li&gt;Better detection of a separator in the datetime format string. There was a problem when the user was typing a separator char prefixed by another static field.&lt;/li&gt;
&lt;li&gt;In an editor showing the time in 12h format with an AP/PM designator, changing the hour field could incorrectly change the AM/PM designator.&lt;/li&gt;
&lt;li&gt;Then management of the temporary buffer used while typing in a field has been enhanced.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Version 1.0:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Initial public version.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Screencast: lazy loading and default values in SPG 3.0</guid>
      <link>https://visualhint.com/blog/entries%2F25/Screencast%3A%20lazy%20loading%20and%20default%20values%20in%20SPG%203.0</link>
      <title>Screencast: lazy loading and default values in SPG 3.0</title>
      <description>&lt;p&gt;Here is a new screencast showcasing these two new features. Now, SPG has nothing to envy to the Microsoft PropertyGrid anymore.&lt;/p&gt;
&lt;iframe width="529" height="397" src="https://www.youtube.com/embed/TqkGf2lJZS4" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Introducing Smart PropertyGrid.Net 3.0 beta</guid>
      <link>https://visualhint.com/blog/entries%2F26/Introducing%20Smart%20PropertyGrid.Net%203.0%20beta</link>
      <title>Introducing Smart PropertyGrid.Net 3.0 beta</title>
      <description>&lt;p&gt;I am proud to unveil today the first beta release of Smart PropertyGrid.Net 3.0. This release is impressive by the number of improvements and changes and I will give you here the main details:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;There was a real demand for it so I implemented it, making SPG the only PropertyGrid supporting this feature! As already advertised in this blog before, SPG now supports &lt;b&gt;right to left languages&lt;/b&gt;. And not in a minimal way: each component of the grid, from the main display to each inplace control, is properly mirrored. Here is a screenshot with hebrew strings displayed:
&lt;img src="/files/images/hebrewspg.png" alt="alt text" /&gt;&lt;/li&gt;
&lt;li&gt;It is good to be lazy sometimes so I decided to add some lazyness to SPG. So far, simply to keep it simple, the grid was recursively loading all properties of a target instance. It has been reported that it could be costly for large contents or even worse it could lead to a crash if there was a cyclic property path. The Microsoft PropertyGrid was able to handle these situations so there was no reason to let SPG behind. That's why I added a &lt;b&gt;LazyLoading&lt;/b&gt; mode where child properties will be loaded only when a parent is expanded.&lt;/li&gt;
&lt;li&gt;Icons in front of property values are now consistently managed, which lets you add any descriptive or status information with a value. You have many options to choose your image: it can come from a global image list, a property specific image list (usually when the property publishes standard values) or directly from an image reference.&lt;/li&gt;
&lt;li&gt;The next feature comes from a single customer request but I found it so smart that I was sure everyone would love it too. This is &lt;b&gt;incremental search&lt;/b&gt; (aka auto-complete) which enables you to quickly set a new value to a property when it publishes a set of standard values. The original idea here is that you get this feature in textboxes, in dropdown lists and even in existing UITypeEditors (like the ColorEditor) when listboxes are detected. This is a terrific usability feature for your customers!&lt;/li&gt;
&lt;li&gt;I never was interested by this feature but many of you were asking for it and now that it is implemented I am not unhappy to see it in action. SPG, like the Microsoft PropertyGrid before, now displays non default values with a bold font. A value is &amp;quot;non default&amp;quot; when it's different from the one that is registered with a DefaultValueAttribute or when a &lt;a href="http://msdn2.microsoft.com/en-us/library/53b8022e(VS.71).aspx"&gt;ShouldSerialize&lt;/a&gt; method exists and returns true.&lt;/li&gt;
&lt;li&gt;You found that the alpha color picker was a nice addition to SPG but you were concerned by its &amp;quot;private&amp;quot; nature. Well, you can now derive from it and override many virtual methods. Choosing to show the alpha component or not is also a built-in feature.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All these major features are showcased in the modified supplied sample. To see the full list of enhancements and fixes, simply consult the &lt;a href="/propertygrid/changelog"&gt;changelog&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Coming back on the scene</guid>
      <link>https://visualhint.com/blog/entries%2F27/Coming%20back%20on%20the%20scene</link>
      <title>Coming back on the scene</title>
      <description>&lt;p&gt;I know, VisualHint’s blog has been quiet for some time now, simply because internal activity has increased and the next version of SPG and SFPE are in the starting blocks. In the next days/weeks, you will see again that a lot is actually happening under the hood. Here are the next events at VisualHint:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;SPG 3.0, which is already available as a preview for customers, will be published as a public beta as soon as I have updated the documentation. Here is a (resized) screenshot of the revamped supplied sample:
&lt;img src="/files/images/spg3preview.png" alt="" /&gt;&lt;/li&gt;
&lt;li&gt;SFPE 1.1, which is already in beta, will be officially released.&lt;/li&gt;
&lt;li&gt;I will often post here to explain what's new in both products. Expect some screencasts inside.&lt;/li&gt;
&lt;li&gt;At one point, a FAQ/tips section will be opened.&lt;/li&gt;
&lt;/ol&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Another SPG tour de force</guid>
      <link>https://visualhint.com/blog/entries%2F28/Another%20SPG%20tour%20de%20force</link>
      <title>Another SPG tour de force</title>
      <description>&lt;p&gt;Did you know that the Microsoft PropertyGrid is not able to let the user set a common value for collections coming from multiple target instances? Take a list or an array, this is the same story. The CollectionEditor will popup, you will alter the displayed collection and when you hit OK, nothing happens. Well, up to last week, this was the same in SPG. But with the new build, you can now edit collections when you target multiple instances with SelectedObjects. Here is a screencast to see it live:&lt;/p&gt;
&lt;iframe width="512" height="476" src="https://www.youtube.com/embed/1JhVsz2VAgs" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Smart PropertyGrid.Net 2.5 RC1 is available</guid>
      <link>https://visualhint.com/blog/entries%2F29/Smart%20PropertyGrid.Net%202.5%20RC1%20is%20available</link>
      <title>Smart PropertyGrid.Net 2.5 RC1 is available</title>
      <description>&lt;p&gt;When I decided to fix the behavior of the grid regarding multiple target instances, I though it would be difficult and that after a lot of efforts it would produce a release perceived as minor (something that should be version 2.2.6) because this feature should have worked from the beginning or at least from version 2.0. So I gathered my courage and began investigating. I still learned a lot during the process and I realized that I could do better than what the Microsoft PropertyGrid does when it targets several instances.&lt;/p&gt;
&lt;p&gt;The Microsoft grid is lost as soon as you target two instances that have common properties but whose values differ. From my point of view, this is not logical so I did my best to fix this behavior and I succeeded (there are some &lt;a href="/blog/56/two-screencasts-to-showcase-the-great-support-of-selectedobjects"&gt;screencasts&lt;/a&gt; about this subject). The result is a release that you can consider major, and therefore labelled 2.5. Moreover I took the chance to add some very demanded features. Here are the more important points of the changelog:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;SelectedObjects has been reworked and SPG now behaves correctly regarding multiple instances. It even allows comparisons of immutable properties (the one whose TypeConverter's CreateInstanceSupported returns true) having different values.&lt;/li&gt;
&lt;li&gt;Displayed values (set by PropertyValue.ResetDisplayedValues or by the PropertyValueDisplayedAsAttribute) are more flexible. Before you could only set them as strings. You can now supply objects or pairs &amp;lt;object, string&amp;gt;.&lt;/li&gt;
&lt;li&gt;Trackbars now accept to target integer, float, double and decimal property types.&lt;/li&gt;
&lt;li&gt;Ctrl+Enter in a multiline textbox inserts a new line.&lt;/li&gt;
&lt;li&gt;By default, a listbox uses the same visuals (font, fore and back colors) than the property value. It is now possible to break this synchronization and let the listbox use the normal colors used by the grid. This is done by using the DropDownListboxVisuals attribute.&lt;/li&gt;
&lt;li&gt;The List feel can use a cache for properties showing a costly content that should not be recreated each time the listbox is displayed. To configure a property in such a way, mark it with UseFeelCacheAttribute. The cache can be emptied by setting PropertyValue.FeelCache to null.&lt;/li&gt;
&lt;li&gt;The Unit inplace control now takes into consideration a unit with a single value (a collection with a unique possible value or a simple string). In this case, no dropdown is shown and the value is just displayed as a static information.&lt;/li&gt;
&lt;li&gt;For list feels, the resize box can be removed by setting the PropInPlaceList.PreventResizable to true (from the InPlaceCtrlVisible event handler).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I hope you will like this this verson as much as I worked on it. If you have any question, if you are not sure what SPG can do for you or if it does a particular thing, don't hesitate: contact me.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Trackbars for any numerical value in Smart PropertyGrid</guid>
      <link>https://visualhint.com/blog/entries%2F30/Trackbars%20for%20any%20numerical%20value%20in%20Smart%20PropertyGrid</link>
      <title>Trackbars for any numerical value in Smart PropertyGrid</title>
      <description>&lt;p&gt;This was a long time requested feature: being able to attach a trackbar feel to any type of numerical value. As a last minute surprise in SPG 2.5 (which is in beta), I implemented it for integers, floats, doubles and decimals (it’s ready for more but let’s see what you actually need in the future). The feel still needs a PropertyValidator attached to it so that it can have the minimum and maximum values. There is also a new attribute (TrackBarSettings) to set the Resolution (new notion for floating point numbers) the SmallChange and LargeChange properties.&lt;/p&gt;
&lt;p&gt;Since at the same time, a customer had troubles with a property of type PointF and its associated TypeConverter, I updated the sample with such a property showing the new trackbar for the X and Y child properties. Here is a screenshot of this nice arrangement:&lt;/p&gt;
&lt;p&gt;&lt;img src="/files/images/gentrackbars.jpg" alt="alt text" /&gt;&lt;/p&gt;
&lt;p&gt;If you need the &lt;a href="/download/12"&gt;PointF TypeConverter&lt;/a&gt;, feel free to download it. It is simply based on its counterpart for the Point structure.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">How to filter out base classes properties from the PropertyGrid</guid>
      <link>https://visualhint.com/blog/entries%2F31/How%20to%20filter%20out%20base%20classes%20properties%20from%20the%20PropertyGrid</link>
      <title>How to filter out base classes properties from the PropertyGrid</title>
      <description>&lt;p&gt;I like to post some howtos or tips when the initial concern comes from a customer or visitor. One of them in the forums asked if it was possible to filter out properties while using SelectedObject and even if all properties from ancestor classes could be removed automatically. Well, yes, it’s feasible in Smart PropertyGrid. This is very quick. Here is how:&lt;/p&gt;
&lt;p&gt;Let's say you have a class MyControl derived from the Control class.&lt;/p&gt;
&lt;p&gt;You must first add a handler for the PropertyPreFilterOut event or simply override OnPropertyPreFilterOut in a PropertyGrid derived class:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-cs"&gt;protected override void OnPropertyPreFilterOut(PropertyPreFilterOutEventArgs e)
{
    // Write some code here
    base.OnPropertyPreFilterOut(e);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now to remove all the properties coming from ancestor classes, we must pay attention to their PropertyDescriptor and target instance so that we keep all properties published by our MyControl derived class and all their descendants:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-cs"&gt;PropertyDescriptor pd = e.PropertyDescriptor;
if ((pd.ComponentType == typeof(MyControl)) || (e.TargetInstance.GetType() != typeof(MyControl)))
    e.FilterOut = PropertyPreFilterOutEventArgs.FilterModes.FilterDefault;
else
    e.FilterOut = PropertyPreFilterOutEventArgs.FilterModes.FilterOut;
&lt;/code&gt;&lt;/pre&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Two screencasts to showcase the great support of SelectedObjects</guid>
      <link>https://visualhint.com/blog/entries%2F32/Two%20screencasts%20to%20showcase%20the%20great%20support%20of%20SelectedObjects</link>
      <title>Two screencasts to showcase the great support of SelectedObjects</title>
      <description>&lt;p&gt;The support for SelectedObjects in version 2.5 of Smart PropertyGrid.Net has been totally reworked. Previously it was rather limited, so I wanted to bring it equal to the Microsoft PropertyGrid and finally it appears it is now far better. It is now possible to select several target instances and to see and edit any common properties even for immutable properties, the ones whose TypeConverter returns true for CreateInstanceSupported(). Add the existing power of SPG, like the numerous editors, and you have a very powerful and flexible way to edit for e.g. the objects you have selected in your CAD/CAM client application.&lt;/p&gt;
&lt;p&gt;A demonstration is better than a long explanation so I have created two screencasts (please, bear with me, this is the first time I'm doing it in english). The first one is based on &lt;a href="http://www.codeproject.com/cs/miscctrl/bending_property.asp"&gt;a famous article at CodeProject&lt;/a&gt; and the second one uses the great &lt;a href="http://www.fpoint.com/netproducts/spreadwin/spreadwin.aspx"&gt;Spread for Windows Forms&lt;/a&gt; from FarPoint.&lt;/p&gt;
&lt;iframe width="529" height="213" src="https://www.youtube.com/embed/i6G7hZL98DM" frameborder="0" allowfullscreen style="margin-bottom:1em;"&gt;&lt;/iframe&gt;
&lt;iframe width="529" height="225" src="https://www.youtube.com/embed/0hZG6gJAtkc" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">The best way to attach a unit to a numerical value in the PropertyGrid</guid>
      <link>https://visualhint.com/blog/entries%2F33/The%20best%20way%20to%20attach%20a%20unit%20to%20a%20numerical%20value%20in%20the%20PropertyGrid</link>
      <title>The best way to attach a unit to a numerical value in the PropertyGrid</title>
      <description>&lt;p&gt;When you expect your end-user to enter a numerical value in a given unit, you usually want to make this information available near the editor. Entering a value in millimeter or centimeter makes a difference and it is mandatory to clear the ambiguity. In the Microsoft PropertyGrid or in SPG, it could be done like this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Write this information in the comments area at the bottom of the grid. But what if you don't want to display this area?&lt;/li&gt;
&lt;li&gt;Put it in the property label: &amp;quot;Frequency (in Hz)&amp;quot;. Not very friendly since usually you like to read the unit after the value.&lt;/li&gt;
&lt;li&gt;Use a derived TypeConverter so that you can have the value and its unit in the textbox. But in this case you are obliged to write the converter and you make the user think he can edit the unit.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The next release of SPG simplifies all this by extending the FeelEditUnit inplace control. You just pass the unit to the second value of the property (yes, SPG handles multiple value types per property). It can be passed as a string or as a collection containing only a single element).&lt;/p&gt;
&lt;p&gt;When the property is not selected, you see this:&lt;/p&gt;
&lt;p&gt;&lt;img src="/files/images/singleunit1.gif" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;When it is selected and edited, you see a nice readonly unit, still in the value column:&lt;/p&gt;
&lt;p&gt;&lt;img src="/files/images/singleunit2.gif" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;As usual, the unit can be targetted in an instance or added on the fly with a call to AddManagedValue.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Two values in a single DateTimePicker</guid>
      <link>https://visualhint.com/blog/entries%2F34/Two%20values%20in%20a%20single%20DateTimePicker</link>
      <title>Two values in a single DateTimePicker</title>
      <description>&lt;p&gt;To set two different dates in an application, e.g. a starting time and an ending time, you need two labels and two editors (as far as times are concerned) as showcased in this Outlook screenshot:&lt;/p&gt;
&lt;p&gt;&lt;img src="/files/images/twovalues_dtp1.png" alt="DateTimePicker in outlook" /&gt;&lt;/p&gt;
&lt;p&gt;SFPE can reduce the space used inside a single editor and the result would look something like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="/files/images/twovalues_dtp2.png" alt="More values in a single DateTimePicker" /&gt;&lt;/p&gt;
&lt;p&gt;Here is how it's done:&lt;/p&gt;
&lt;p&gt;SFPE defines a new DateTimePicker class. But we won't use this one here. It is a convenient class that mimics the API of the Microsoft DateTimePicker so that you get all the benefits of SFPE in a class that won't require you to learn something new. As such, it allows and creates only one FieldPack and this is the FieldPack that holds the value. So we will rely on its base class, called FieldPackEditor. But still the job will be easy:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-cs"&gt;fieldPackEditor1.JumpToNextFieldOnEdition = true;
    
DateTimeFieldPack pack = new DateTimeFieldPack(&amp;quot;'From 'HH:mm&amp;quot;);
fieldPackEditor1.AddFieldPack(pack);
pack.SeparatorWidth = 6;
pack.Value = new DateTime(2007, 9, 12, 13, 30, 0);
    
pack = new DateTimeFieldPack(&amp;quot;'to 'HH:mm&amp;quot;);
fieldPackEditor1.AddFieldPack(pack);
pack.Value = new DateTime(2007, 9, 12, 15, 0, 0);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I first configure the editor so that the editing is minimal. &amp;quot;JumpToNextFieldOnEdition&amp;quot; moves the focus cue to the next editable field when the user is done with the current field. Then I create a first DateTimeFieldPack instance that will hold our first time. The pack is added to the editor and a nice margin is set. At last I create the second pack that will hold the second time value. This is all it takes to get what you see in the screenshot.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Smart  FieldPackEditor.Net prices explained</guid>
      <link>https://visualhint.com/blog/entries%2F35/Smart%20%20FieldPackEditor.Net%20prices%20explained</link>
      <title>Smart  FieldPackEditor.Net prices explained</title>
      <description>&lt;p&gt;SFPE.Net is due out very soon, so I'm just giving the final touches like preparing the web site, building installation packages and creating license files. I have also finalized the price plan and I wanted to share with you why it looks like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="/files/images/sfpepriceplan.jpg" alt="FieldPackEditor prices" /&gt;&lt;/p&gt;
&lt;p&gt;I want to emphasize several important points:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Some of you will want to replace the old MS DateTimePicker and that's it. The option starting at 49$ is for you. It is very affordable and not too low (some people think that too low means &amp;quot;no value&amp;quot;). At this price, replacing all your DateTime pickers should be seen as a bargain since you get what you needed (at last you get rid of the MS DTP) + a complete framework the day you want to go a step further.&lt;/li&gt;
&lt;li&gt;Let's take now the most popular option &amp;quot;source code with a one year subscription&amp;quot; which costs 99$ for one developer. I chose this price carefully. It is typical of this kind of full featured component and won't scare your company to buy one or more. If you already know the quality of the support I give you, then you realize how much value is packed in this product.&lt;/li&gt;
&lt;li&gt;The discounts applied for the volume purchases is also far more aggressive than for SPG.Net. The site license is calculated on a 70% discount basis! My wish here is to make this option so affordable that medium to big companies won't wonder very long if they should purchase the library for their department A but not for department B. By getting the site license at this price you win the peace of mind by being sure that any of your developers can include the component in any of your applications.&lt;/li&gt;
&lt;/ol&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Performance hit under Vista ... solved!</guid>
      <link>https://visualhint.com/blog/entries%2F36/Performance%20hit%20under%20Vista%20...%20solved!</link>
      <title>Performance hit under Vista ... solved!</title>
      <description>&lt;p&gt;Some customers reported the following problem under Windows Vista: when positionning the mouse over the PropertyGrid, the cpu was raising at 100% and as a consequence the grid was experiencing redrawing problems when expanding nodes, checking radiobuttons, etc. I worked this week on this issue and discovered the culprit: VisualTips.&lt;/p&gt;
&lt;p&gt;This wonderful component from Skybound was indirectly sending a ton of MouseMove events to the grid (and to any control on the form). The cause of this behaviour has not been found precisely but the people there fixed the bug related to another 100% cpu symptom. If you are using VisualTips and your product also targets Windows Vista, you have to get their &lt;a href="http://dev.skybound.ca/Products/VisualTips/"&gt;update&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">VisualHint’s web site has been reviewed by Bob Walsh from 47hats.com</guid>
      <link>https://visualhint.com/blog/entries%2F37/VisualHint%E2%80%99s%20web%20site%20has%20been%20reviewed%20by%20Bob%20Walsh%20from%2047hats.com</link>
      <title>VisualHint’s web site has been reviewed by Bob Walsh from 47hats.com</title>
      <description>&lt;p&gt;As a customer or visitor of this web site, this is maybe not the post you wish to read. It won’t talk about PropertyGrids, DateTimePickers or other editors but about the design and the life of this web site. As a micro independant software vendor (aka &lt;a href="http://en.wikipedia.org/wiki/Misv"&gt;mISV&lt;/a&gt;) and specialist of software development it is sometimes difficult to create a good website, attract customers with perfect descriptions and screenshots of products as well as interesting and relevant informations. On the other hand it’s very easy to loose the focus on all of these while writing C# code to enhance or create products. That’s why some time ago I asked Bob at 47hats to include VisualHint in his weekly review of mISVs web sites.&lt;/p&gt;
&lt;p&gt;Bob owns a &amp;quot;mISV type&amp;quot; company and he even wrote a book about it. He is now considered an authority in this domain and launches a consulting firm to help independant workers like me. Last week, he informed me that the review for VisualHint was in the work and here is the result: &lt;a href="http://www.47hats.com/2007/08/weekly-site-review-visualhint/"&gt;review at 47hats.com&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;From this review, I keep the following criticisms:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;SPG.Net is not correctly introduced.&lt;/li&gt;
&lt;li&gt;Its important features, your benefits, are listed too deeply in verbose text.&lt;/li&gt;
&lt;li&gt;My english may be suitable to talk to you in a blog must not for the business part of the web site.&lt;/li&gt;
&lt;li&gt;Where is the testimonials page?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Of course I also read positive elements which confirm the qualities of VisualHint:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The web site is very pleasant to read.&lt;/li&gt;
&lt;li&gt;My second product, Smart FieldPackEditor.Net has been introduced correctly, especially with the help of screencasts.&lt;/li&gt;
&lt;li&gt;The support given to customers, as it appears on the site, is excellent (it is also excellent when I actually give support).&lt;/li&gt;
&lt;li&gt;This is honest to introduce VisualHint on the about page the way it is really: driven by a passionate developer.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;From there, I have to plan the changes that I will bring to the site (the &lt;a href="/about/testimonials"&gt;testimonials&lt;/a&gt; page has already been added). This will mainly concern the spg.net product and the level of written english. If you have your own view on what is missing or badly shown, don't hesitate to add it in the comments.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">A true IP address control for windows forms</guid>
      <link>https://visualhint.com/blog/entries%2F38/A%20true%20IP%20address%20control%20for%20windows%20forms</link>
      <title>A true IP address control for windows forms</title>
      <description>&lt;p&gt;Some days ago, I was asked by a visitor if it is possible to edit an IP address in Smart PropertyGrid with a specialized editor. The short answer was no. But then I realized that the FieldPackEditor would make a wonderful IP address editor. So I derived a new editor from the base class, created special IpAddrSegmentFieldPack and IpAddrSegmentField classes and voila!&lt;/p&gt;
&lt;p&gt;&lt;img src="/files/images/ipaddr.png" alt="ip address component" /&gt;&lt;/p&gt;
&lt;p&gt;Like with other field pack editors, you can show updown buttons, handle a null value, have fixed-width fields or not, set the Text and Value properties and use all the usual keys to edit the address. I think this is the first time we have a so complete IP address editor for windows forms (let me know if there is some competition). You can now play with it in the &lt;a href="/fieldpackeditor/download"&gt;updated sample&lt;/a&gt; and you will see it soon in the PropertyGrid too.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">A new year begins for VisualHint</guid>
      <link>https://visualhint.com/blog/entries%2F39/A%20new%20year%20begins%20for%20VisualHint</link>
      <title>A new year begins for VisualHint</title>
      <description>&lt;p&gt;Yes, this is like a new year beginning here. I was in vacations in France during three weeks for a break from VisualHint, with family in Normandy by the sea not far from the american cemetery for those who know this place. This was very relaxing and the kids had a lot of fun with the beach activities (when one lives in Montreal at four years old, the sea is something new). Now that I'm back, this is time to take stock of the VisualHint's future. So how is it going here you will ask. Here is the short answer:&lt;/p&gt;
&lt;p&gt;&lt;img src="/files/images/stat062007.png" alt="VisualHint sales performance" /&gt;&lt;/p&gt;
&lt;p&gt;I highlighted May 2006 because at that time I posted a message titled &lt;a href="/blog/80/incredible-month-of-may"&gt;Incredible month of May&lt;/a&gt;. You can now see the comparison with my last recorded month. This has almost doubled, so yes, I’m very happy about the evolution of Smart PropertyGrid.Net and its sales. Notice the two spikes, one downward from the mean curve and one upward. The first one is August 2006: activity was very low and I also took some vacations. The second one is November 2006: I can’t really explain it but it seems like a lot of companies wanted to do their shopping before the month of December and Christmas.&lt;/p&gt;
&lt;p&gt;So now what? It took me up to today to almost clear all the cutomer requests received during my absence. Still a few ones and I will be done. All the fixes generated will be available very soon in a maintenance release, I guess sometime next week. Then I will come back on the new FieldPackEditor product to finalize it and take it out of beta. Once done, it will be time to define the major new features of SPG v.3. I think the summer break with its low activity will be a very good time to do that. For those who take their vacations, I wish a lot of fun and rest.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">More about null values in a DateTimePicker</guid>
      <link>https://visualhint.com/blog/entries%2F40/More%20about%20null%20values%20in%20a%20DateTimePicker</link>
      <title>More about null values in a DateTimePicker</title>
      <description>&lt;p&gt;Before releasing version 1.0 of Smart FieldPackEditor.Net I must ensure that the support for null values is really complete. So what does this feature really involves?&lt;/p&gt;
&lt;p&gt;First let’s remind in what contexts a DateTimePicker can operate:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;It can be a standalone control and completely encapsulate a DateTime value.&lt;/li&gt;
&lt;li&gt;You can manually bind one of your properties to the component’s Value property.&lt;/li&gt;
&lt;li&gt;You can embed the component in a container like the DataGridView. In this case, the component will be automatically bound to a particular column of a database table via a DataSource.&lt;/li&gt;
&lt;li&gt;You can embed the component in a container like the PropertyGrid. This will bind the component to a DateTime property somewhere in your code.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In the first case, the support for null values is straightforward. The component stores the DateTime value as an object so it can use anything for the object representing a null value.&lt;/p&gt;
&lt;p&gt;We have to think a bit more for the other cases. What can be the type of your property in a target instance? Obviously this can be an object (not very common to store a date but still feasible), a nullable DateTime (aka “DateTime?”) or a DateTime. In the first case, there is again no difficulty: we can assign anything we want to represent a null value. In the second case we have less choices: it can be null or a particular DateTime value that is out of the bounds specified by the MinDate and MaxDate properties of the DateTimePicker (anything &lt;a href="http://en.wikipedia.org/wiki/Gregorian_calendar"&gt;before 1753&lt;/a&gt; will be fine). In the last case, with a DateTime type, there are no choices: you can only use a specific DateTime value like 01/01/0001 for example.&lt;/p&gt;
&lt;p&gt;Now let’s relate the context of use with the data type you have in your client application:&lt;/p&gt;
&lt;p&gt;In case 2, you can target any of the three data types we just saw. The value representing null will be chosen in accordance with the restrisctions seen above and setup in the editor.
In case 3, the value representing null will usually be DBNull.Value. But for historical reasons you may have a specific DateTime value in your database that represents the null value. In both cases, again, the editor must be setup for that.
In case 4, well, it’s like case 2.&lt;/p&gt;
&lt;p&gt;Everything that has been mentioned so far implies that we need a set of properties to properly setup the DateTimePicker:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;NullValue: instructs the editor about what will represent a null value. It will typically be null, DBNull.Value or a specific DateTime value. But it could also be a string like “nothing”.&lt;/li&gt;
&lt;li&gt;NullText: the string displayed in the editor when Value == NullValue.&lt;/li&gt;
&lt;li&gt;HasValue: convenient property to test for nullity.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you use the DateTimePicker in other very specific contexts and you need support for null value, please let me know.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Right To Left languages support in Smart DateTimePicker acclaimed!</guid>
      <link>https://visualhint.com/blog/entries%2F41/Right%20To%20Left%20languages%20support%20in%20Smart%20DateTimePicker%20acclaimed!</link>
      <title>Right To Left languages support in Smart DateTimePicker acclaimed!</title>
      <description>&lt;p&gt;Even so Smart FieldPackEditor.Net is still in early beta, I received this week-end a message from a developer working at a big israelian company about the support for Hebrew. Here is an excerpt:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I examined the control and let me tell
you it is very professionally designed
and implemented; way to go! Also the
RTL and Hebrew are working great, a
feat not easily performed by many
professional companies.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Supporting RTL is something new for me and when I designed the component I even hadn't the RTL languages installed on my machine, so this message is a real reward for me. Now I know that the code I produced was not just a shy attempt to see if RTL languages could be handled. They can! And needless to say that I am armed to prepare the RTL support in &lt;a href="/propertygrid"&gt;Smart PropertyGrid&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This developer also sent me some great feedback about the sample application. That's why I fixed some issues over the week-end and republished a new build of the beta package.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">PropertyGrid, SelectedObjects and the property cloning syndrome</guid>
      <link>https://visualhint.com/blog/entries%2F42/PropertyGrid,%20SelectedObjects%20and%20the%20property%20cloning%20syndrome</link>
      <title>PropertyGrid, SelectedObjects and the property cloning syndrome</title>
      <description>&lt;p&gt;Time permitting, I sometimes haunt the newsgroups and developer forums to help when the PropertyGrid is involved. Last week, &lt;a href="http://social.msdn.microsoft.com/forums/en-US/winforms/thread/8ebc413c-88e8-4b84-b3f3-966f06982ba1"&gt;a poster noticed a very subtle issue concerning .Net 1.1 and .Net 2.0&lt;/a&gt; and I decided to know more about it. It appears that the MS PropertyGrid behaves differently in these two versions of .Net. Here is an excerpt of the original request for help:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;... When there are multiple objects
selected, and an object property value
is changed in the grid, it is
assigning the same object instance to
each of the selected objects in .Net
1.0, but in .Net 2.0 it is assigning different instances...&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The poster also noticed that the culprit was the method &lt;a href="code://System.Windows.Forms:2.0.0.0:b77a5c561934e089/System.Windows.Forms.PropertyGridInternal.MergePropertyDescriptor/SetValue(Object,Object)"&gt;SetValue&lt;/a&gt; in the MergePropertyDescriptor class. In .Net 1.x it was simply calling PropertyDescriptor.SetValue() with the same new instance for the target properties but in .Net 2.0 it tries first to make a copy (except if we have a value type) by trying different techniques in a method called CopyValue:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Clones the value if its type implements ICloneable.&lt;/li&gt;
&lt;li&gt;Creates a new copy of the value by calling the constructor of its type if the attached TypeConverter can convert to InstanceDescriptor.&lt;/li&gt;
&lt;li&gt;Creates a new copy of the value by first converting it to a string and then back to an instance of the value type.&lt;/li&gt;
&lt;li&gt;Creates a new copy of the value by serializing it into memory and deserializing it to an instance of the value type if, of course, the type implements ISerializable.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If all tries fail, then the original value is returned.&lt;/p&gt;
&lt;p&gt;My thoughts about this issue is that the behavior should be chosen by the developer. In some cases we will want to assign to the target properties distinct instances of the same value and in other cases it makes more sense to assign the same value as if it was a kind of singleton. I tend to prefer what .Net 2.0 does but hey, having the choice is better. I will check if I can offer this choice in SPG, which so far behaves like .Net 1.x.&lt;/p&gt;
&lt;p&gt;With the MS PropertyGrid however, I first thought that there was no solution since CopyValue can't be bypassed. But there is one. Implementing this solution for every property would be tedious but for just some of them, when you want to avoid a multiplicity of instances for cost reasons, this can be useful.
Attach a TypeConverter to the type of your property (this won't work if it is attached to the property itself) and override the ConvertTo method so that it will convert to an InstanceDescriptor class. In the class corresponding to your property type, add a static method that will be responsible for supplying a unique instance per possible string representation (it could be done elsewhere like in the TypeConverter itself). In the converter, the InstanceDescriptor will point to this class method.&lt;/p&gt;
&lt;p&gt;An example is better than a long explanation so here is a short &lt;a href="/download/13"&gt;sample&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: this solution won't solve the problem of the original poster unfortunately because for him this happens at designtime and the TypeConverter, quite complex, can't be modified. However, at runtime, it can help in a variety of cases.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Screencast 4: a FieldPackEditor is not just for dates and times</guid>
      <link>https://visualhint.com/blog/entries%2F4/Screencast%204%3A%20a%20FieldPackEditor%20is%20not%20just%20for%20dates%20and%20times</link>
      <title>Screencast 4: a FieldPackEditor is not just for dates and times</title>
      <description>&lt;p&gt;To conclude this series of videos, I'll show what can be done with the editor base class. Everything is inside to handle a set of packs and fields which can edit any predetermined data. And since a field is pretty abstract (after all, this is just a rectangle in which we can draw), I'm sure that some nice scenarios will appear after the product is released. Anyway, here is the show:&lt;/p&gt;
&lt;iframe width="372" height="232" src="https://www.youtube.com/embed/Test1J38oFs" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;
&lt;p&gt;If there is no last minute drama, the beta will be available next week. If you want to be informed, simply monitor the &lt;a href="http://feeds2.feedburner.com/visualhint" title=""&gt;rss feed&lt;/a&gt; or subscribe to the mailing list on the homepage. And of course, feel free to leave some comments here.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Screencast 3: Databinding and the DataGridView</guid>
      <link>https://visualhint.com/blog/entries%2F3/Screencast%203%3A%20Databinding%20and%20the%20DataGridView</link>
      <title>Screencast 3: Databinding and the DataGridView</title>
      <description>&lt;p&gt;In this third video, I show several features of the FieldPackEditor: how flexible it is to bind a DatTimePicker to a data source, how independant field packs in the same editor can be bound to different sources and how the editor can be used in the DataGridView as a perfectly well integrated inplace control. Keep in mind that this editor will also be compatible with Smart PropertyGrid.Net and integrated in place in its value column.&lt;/p&gt;
&lt;iframe width="560" height="251" src="https://www.youtube.com/embed/4S4u1e_td-U" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Screencast 2: three different ways to nullify a DateTimePicker</guid>
      <link>https://visualhint.com/blog/entries%2F2/Screencast%202%3A%20three%20different%20ways%20to%20nullify%20a%20DateTimePicker</link>
      <title>Screencast 2: three different ways to nullify a DateTimePicker</title>
      <description>&lt;p&gt;Just before the beta is released I will publish each day of this week a screencast to showcase the main features of Smart FieldPackEditor.Net.&lt;/p&gt;
&lt;p&gt;Here is the schedule for this week:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Tuesday&lt;/strong&gt;, overview of the FieldpackEditor.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Wednesday&lt;/strong&gt;, how to handle the null value.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Thursday&lt;/strong&gt;, SFPE, data binding and the DataGridView.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Friday&lt;/strong&gt;, multi packs and other editors.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here is the second screencast of the week. It will show you how SFPE can nullify the underlying value and how it can restore a valid datetime value. Click on the screenshot to launch the movie.&lt;/p&gt;
&lt;iframe width="508" height="200" src="https://www.youtube.com/embed/GoKPUJUJzlo" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Screencast 1: a full featured DateTimePicker</guid>
      <link>https://visualhint.com/blog/entries%2F1/Screencast%201%3A%20a%20full%20featured%20DateTimePicker</link>
      <title>Screencast 1: a full featured DateTimePicker</title>
      <description>&lt;p&gt;Just before the beta is released I will publish each day of this week a screencast to showcase the main features of Smart FieldPackEditor.Net.&lt;/p&gt;
&lt;p&gt;Here is the schedule for this week:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Tuesday&lt;/strong&gt;, overview of the FieldpackEditor.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Wednesday&lt;/strong&gt;, how to handle the null value.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Thursday&lt;/strong&gt;, SFPE, data binding and the DataGridView.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Friday&lt;/strong&gt;, multi packs and other editors.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here is the first screencast of the week. It will show you various general features of the FieldPackEditor derived as a DateTimePicker. Click on the screenshot to launch the movie.&lt;/p&gt;
&lt;iframe width="529" height="224" src="https://www.youtube.com/embed/MSHXKBh8M0E" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Solving all the issues of the DateTimePicker inside the DataGridView</guid>
      <link>https://visualhint.com/blog/entries%2F43/Solving%20all%20the%20issues%20of%20the%20DateTimePicker%20inside%20the%20DataGridView</link>
      <title>Solving all the issues of the DateTimePicker inside the DataGridView</title>
      <description>&lt;p&gt;Some days ago I came across a &lt;a href="http://annlewkowicz.blogspot.com/2006/09/datagridview-datetimepicker-and.html"&gt;blog&lt;/a&gt; showing the trials and tribulations of a developer trying to display and use the standard DateTimePicker in the DataGridView. This story is really typical of all the considerable efforts one have to make in order to get a semi-viable solution. So far I was not even considering touching the DataGridView. It was an unknown component to me and I was not aware of its extensibility to enable custom editors to be used in a cell. After readind this article I jumped on the challenge and decided to integrate Smart FieldPackEditor.Net to the grid.&lt;/p&gt;
&lt;p&gt;While SFPE is not even in beta yet, it took me one day to get almost everything running smoothly. By everything I mean:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Nice insertion of the editor inside a cell. No text shift. Back and Fore colors of the cell used by the editor.&lt;/li&gt;
&lt;li&gt;Correct formatting of the datetime value.&lt;/li&gt;
&lt;li&gt;Null values without a hitch.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/tb9t9a2t.aspx"&gt;Default keyboard&lt;/a&gt; handling.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Some nice features can be added to this list, making the use of this DateTimePicker as smooth as desired:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Correct field selection when clicking in the editor.&lt;/li&gt;
&lt;li&gt;End of edition forced when closing the dropdown month calendar.&lt;/li&gt;
&lt;li&gt;No fixed width fields, so that the text displayed by the grid is the same than the text displayed by the editor.&lt;/li&gt;
&lt;li&gt;Choice of updown and/or dropdown buttons&lt;/li&gt;
&lt;li&gt;And all the other benefits of the Smart FieldPackEditor…&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As early as Tuesday 22, I will publish each day a series of four short screencasts. Here is the schedule:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Tuesday&lt;/strong&gt;, overview of the FieldpackEditor.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Wednesday&lt;/strong&gt;, how to handle the null value.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Thursday&lt;/strong&gt;, SFPE, data binding and the DataGridView.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Friday&lt;/strong&gt;, multi packs and other editors.&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">How to setup a truly dynamic combobox in the PropertyGrid?</guid>
      <link>https://visualhint.com/blog/entries%2F44/How%20to%20setup%20a%20truly%20dynamic%20combobox%20in%20the%20PropertyGrid%3F</link>
      <title>How to setup a truly dynamic combobox in the PropertyGrid?</title>
      <description>&lt;p&gt;SPG offers some great ways to build dynamic properties. But often this is a mix of declarative code and dynamic calls to the SPG API to alter the content or the behavior of the grid. However in some cases a complete dynamic solution is needed. For example, some classes may be generated by external tools and it’s impossible or not desired to decorate their properties with attributes. In other contexts, enumerations are not welcome because their content is too ... hardcoded. This article proposes a way to setup a property based on a single integer identifier and a collection of strings to display in the combobox. To make it a little more complex, our combobox will be the unit of another numerical property.&lt;/p&gt;
&lt;p&gt;The first thing we need is a new TypeConverter to instruct the grid that we have a set of values to display in a combobox. The two involved methods to override are GetStandardValuesSupported() and GetStandardValues(). Of course we will derive our converter from the Int32Converter. Here is the code:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-cs"&gt;public class MyIntConverter : Int32Converter
{
    public override bool GetStandardValuesSupported(
        ITypeDescriptorContext context)
    {
        return true;
    }

    public override TypeConverter.StandardValuesCollection
        GetStandardValues(ITypeDescriptorContext context)
    {
        return new StandardValuesCollection( ??? );
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Notice the question marks? This is where you pass the allowed identifiers for your list. There are several ways to get a dynamic list from the TypeConverter. For example you could use the passed context (which in SPG is of type PropertyTypeDescriptorContext) to get the list from the target instance. Here we will create a new attribute that will contain the initial list of integers. The definition of this attribute could be:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-cs"&gt;public class AllowedIntsAttribute : Attribute
{
    public int[] AllowedInts;

    public AllowedIntsAttribute(params int[] allowedInts)
    {
        AllowedInts = allowedInts;
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;GetStandardValues can then be written like this:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-cs"&gt;public override TypeConverter.StandardValuesCollection
    GetStandardValues(ITypeDescriptorContext context)
{
    PropertyTypeDescriptorContext c = (PropertyTypeDescriptorContext)context;
    AllowedIntsAttribute attr = (AllowedIntsAttribute)c.OwnerPropertyEnumerator.Property.
        GetValue(PropertyUnitLook.UnitValue).GetAttribute(typeof(AllowedIntsAttribute));
    return new StandardValuesCollection(attr.AllowedInts);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And here is how all is connected when the grid is filled:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-cs"&gt;propEnum = AppendManagedProperty(rootEnum, _id++, &amp;quot;Width&amp;quot;, typeof(int), 2, &amp;quot;&amp;quot;);
propEnum.Property.Look = new PropertyUnitLook();
propEnum.Property.Feel = GetRegisteredFeel(PropertyGrid.FeelEditUnit);
    
propEnum.Property.AddManagedValue(PropertyUnitLook.UnitValue, typeof(int),
    10, new AllowedIntsAttribute(1,2),
    new TypeConverterAttribute(typeof(MyIntConverter)),
    new PropertyValueDisplayedAsAttribute(new string[2]
        { &amp;quot;feet&amp;quot;, &amp;quot;meters&amp;quot; }));
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If the list of identifiers and the list of displayed strings need to be modified, this is possible in SPG. Attributes set dynamically can be accessed with PropertyValue.GetAttribute() and modified if their API enable to do so.&lt;/p&gt;
&lt;p&gt;I hope you will appreciate this tutorial. If something is unclear or you need more explanations, please leave a comment.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">How to set a null value to a DateTimePicker without any compromise?</guid>
      <link>https://visualhint.com/blog/entries%2F45/How%20to%20set%20a%20null%20value%20to%20a%20DateTimePicker%20without%20any%20compromise%3F</link>
      <title>How to set a null value to a DateTimePicker without any compromise?</title>
      <description>&lt;p&gt;Just to make it clear that this is the first concern about the MS DateTimePicker, here is a list of famous links:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.codeproject.com/cs/miscctrl/DateTimeSlicker.asp"&gt;Yet another DateTime…Slicker?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.codeproject.com/cs/miscctrl/NullableDateTimePicker.asp%22"&gt;Yet another nullable DateTimePicker control&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.codeproject.com/cs/miscctrl/extended_datetimepicker.asp"&gt;Extended DateTimePicker&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.codeproject.com/cs/miscctrl/Nullable_DateTimePicker.asp"&gt;Nullable DateTimePicker&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These articles all try various tricks to create a nullable DateTimePicker. Unfortunately, while the intentions are good, it does always create secondary issues (look into the comments). SFPE will naturally support null values but from a user point of view the path to set null can still be debated. There are two questions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;How does the user clear the control and hence puts null as the value?&lt;/li&gt;
&lt;li&gt;How does the user inputs a new non null value when the current value is null?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;SFPE is flexible so a lot of techniques can be implemented. But before writing here the result of my experiments (I don’t want to influence your ideas), I would like to hear from you in the comments what would be your perfect solution. Don’t limit yourself to what the MS DateTimePicker could do. Forget about it! Just try to imagine the best answers for the two above questions. This “perfect solution” could then be kept for the default mechanism in SFPE.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">How to format a number with a specific CultureInfo/NumberFormatInfo in the PropertyGrid ?</guid>
      <link>https://visualhint.com/blog/entries%2F46/How%20to%20format%20a%20number%20with%20a%20specific%20CultureInfo%2FNumberFormatInfo%20in%20the%20PropertyGrid%20%3F</link>
      <title>How to format a number with a specific CultureInfo/NumberFormatInfo in the PropertyGrid ?</title>
      <description>&lt;p&gt;“How to format a number in the PropertyGrid” is a question that I’m often asked. The following answer is valid for the MS PropertyGrid and for Smart PropertyGrid.Net. Therefore it is not in the SPG documentation.&lt;/p&gt;
&lt;p&gt;The following explanation will be given for a Double number. You can easily apply it to a Single or a Decimal.
If your target instance has a Double property, it uses by default the DoubleConverter TypeConverter. Unfortunately (for the present need) this converter uses the “R” format specifier when it converts from a double to a string in the &lt;a href="code://System:2.0.0.0:b77a5c561934e089/System.ComponentModel.DoubleConverter/ToString(Object,System.Globalization.NumberFormatInfo):String"&gt;ConvertTo&lt;/a&gt; method and the NumberStyles.Float style when it converts back a string to a double in the &lt;a href="code://System:2.0.0.0:b77a5c561934e089/System.ComponentModel.DoubleConverter/FromString(String,System.Globalization.NumberFormatInfo):Object"&gt;ConvertFrom&lt;/a&gt; method. “R” is called the round-trip format and it does not use the culture set for the application. It’s useful to ensure that a double converted to a string will result in the same original double when converted back.&lt;/p&gt;
&lt;p&gt;It means that to solve our problem we must define a new TypeConverter and attach it to our Double property. We can derive it from DoubleConverter but we will override the ConvertTo and ConvertFrom methods. Here is the code of this converter:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-cs"&gt;public class MyConverter : DoubleConverter
{
    public override object ConvertTo(ITypeDescriptorContext context,
        CultureInfo culture, object value, Type destinationType)
    {
        if ((destinationType == typeof(string)) &amp;amp;&amp;amp;
            (value.GetType() == typeof(double)))
        {
            double num = (double)value;
            return num.ToString(&amp;quot;N&amp;quot;, culture.NumberFormat);
        }

        return base.ConvertTo(context, culture, value, destinationType);
    }

    public override object ConvertFrom(ITypeDescriptorContext context,
        CultureInfo culture, object value)
    {
        if (value is string)
            return double.Parse(value as string, culture);

        return base.ConvertFrom(context, culture, value);
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To set a specific culture usable by the PropertyGrid, you can change the global culture of the application. For example:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-cs"&gt;Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(&amp;quot;en-us&amp;quot;); 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In SPG.Net you have also another option. You can set a CultureInfo instance per property. If you don’t, it will use the one of the application. This is useful for example to display numbers with various precisions or different currency formats.&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-cs"&gt;protected override void OnPropertyCreated(PropertyCreatedEventArgs e)
{
    PropertyValue propertyValue = e.PropertyEnum.Property.Value;

    if ((propertyValue != null) &amp;amp;&amp;amp; (propertyValue.UnderlyingType ==
        typeof(double)))
    {
        e.PropertyEnum.Property.Value.CultureInfo.NumberFormat.
            NumberDecimalDigits = 6;
    }

    base.OnPropertyCreated(e);
}
&lt;/code&gt;&lt;/pre&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">The ten deceptions of the DateTimePicker</guid>
      <link>https://visualhint.com/blog/entries%2F47/The%20ten%20deceptions%20of%20the%20DateTimePicker</link>
      <title>The ten deceptions of the DateTimePicker</title>
      <description>&lt;p&gt;If you are here reading these lines it’s because you have something against the .Net DateTimePicker. And you’re not alone since, if you do a search in the newsgroups, the same questions keep coming: “how do I set the background color of the DTP?”, or “it does not accept a null value and my DateTime column in my database has some empty cells”.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.codeproject.com/"&gt;CodeProject&lt;/a&gt; and other similar developer communities give you a lot of pseudo solutions to solve one or two issues of the control… when they don’t create new problems. They start with deriving from the DateTimePicker class and overriding certain methods and end with the magic textbox displayed in front to hide the date value when null is the only thing desired. So it’s obvious that everyone complains about the DateTimePicker shortcomings and everyone needs a solution. What are the problems of this component which is, don’t forget it, the underlying win32 SysDateTimePick32 window class, nothing more:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The complaint number one is that it doesn’t accept a null or DBNull value. This is critical when binding it to a nullable DateTime column in a database. Consequently it’s not possible to display a custom string when this value is null.&lt;/li&gt;
&lt;li&gt;It suffers some display issues: when closing the calendar, the focus cue disappears, except if a checkbox is visible, in which case this is the one taking the focus. Speaking of the checkbox, it will sometimes show this cue even when the control itself is not focused. No mouse hover effect is seen on the dropdown button and checkbox, however there is one for the updown button. And don’t ask me why you can’t show an updown button with a dropdown button at the same time…&lt;/li&gt;
&lt;li&gt;There are also some inconsistencies compared to the usual combobox and checkbox controls. When clicking those buttons, the corresponding action is triggered on mouse down instead of being triggered on mouse up.&lt;/li&gt;
&lt;li&gt;If you disable the date by clicking on the checkbox, which is by the way ridiculously small under a non xp theme, clicking the dropdown button instantly reenables it.&lt;/li&gt;
&lt;li&gt;There is no text formatting options except for the month calendar. The background color can’t be set.&lt;/li&gt;
&lt;li&gt;Programmatically you can’t control which field is the selected one.&lt;/li&gt;
&lt;li&gt;This is the same for the dropdown calendar. You won’t be able to show it or hide it without the user intervention.&lt;/li&gt;
&lt;li&gt;Some people would like a way to automatically jump to the next editable field when all characters have been typed in the current field instead of having to type the right arrow key each time.&lt;/li&gt;
&lt;li&gt;Where are callback fields? Do you remember the DTN_FORMATQUERY and DTN_FORMAT messages? It was great to create custom fields but this feature is not natively present in the .net control.&lt;/li&gt;
&lt;li&gt;No custom culture can be applied on the displayed string. The Microsoft KB &lt;a href="http://support.microsoft.com/?scid=kb%3Ben-us%3B889834&amp;amp;x=18&amp;amp;y=19"&gt;says it clearly&lt;/a&gt;: you can do it only by changing the current culture in the control panel. Pretty annoying for applications that want to change this regional setting on the fly, usually when choosing a language in a preferences box.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;There are some more issues that I had, specifically in Smart PropertyGrid.Net. Among the built-in inplace controls this was the only one to vertically align the text at the top. No way to change that. When a property expands on multiple rows or simply increases its vertical margin this is not very nice. Also, a field calculates its width based on the largest string it can accept (“September” for the month for example). This was also an issue with SPG. When the inplace control was not active, I had no way to display the text with the same spacing between fields and therefore when selecting the datetime property, all the fields were shifting in a non pleasant way.&lt;/p&gt;
&lt;p&gt;I guess there are some more concerns that you encountered while coping with the DateTimePicker. You can add them in the comments so that we have a good starting list to know what else needs to be fixed.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">The perfect DateTimePicker? Not only!</guid>
      <link>https://visualhint.com/blog/entries%2F48/The%20perfect%20DateTimePicker%3F%20Not%20only!</link>
      <title>The perfect DateTimePicker? Not only!</title>
      <description>&lt;p&gt;It is well known that a good product is one that provides a solution to your own problem, and as a result would meet the needs of a wider audience. Some time ago I discovered a problem in &lt;a href="/propertygrid"&gt;SPG.Net&lt;/a&gt;. I couldn’t make a true &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.datetimepicker.aspx"&gt;DateTimePicker&lt;/a&gt; inplace control achieving the level of quality of the overall product. The win32 control from Microsoft has so many issues and inconsistencies that it was a nightmare trying to work around them. Finally I decided to remove this inplace control from SPG and announced it to my customers. I was really dissatisfied by this decision but I had no other choice. Time passed and I was still sure there was nothing I could do about it. I then came to the conclusion that I could rewrite a DateTime picker from scratch but at first I was discouraged because I didn’t know where to start.&lt;/p&gt;
&lt;p&gt;This is quite typical. Let time go by and one day you find the courage. I began slowly, one small thing at a time and sooner than expected I had a base control to work with. Instead of tying it to datetime specific requirements, I made the effort of designing it as a generic editor able to edit a series of rule-based fields, a rule being for example “an integer in a specific range”. Smart FieldPackEditor was born but it didn’t know it yet.&lt;/p&gt;
&lt;p&gt;I was whispering to myself “it would be great if it could be a standalone product but I guess that many component vendors, and especially the big ones, have already covered this domain”. Guess what? No! I found absolutely no “field editor” controls and concerning DateTimePickers I found only two but one seems to emphasize only a vista look and feel, while the other one was so basic that I can’t even remember who offered it. All the other possibilities are in the “free” domain, mainly on CodeProject. They all derive from a DateTimePicker or a TextBox and try to do their best to fix one or several issues of the MS DTP but the result is never the perfect solution.&lt;/p&gt;
&lt;p&gt;So, in essence what are the goals of SFPE:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;To be the best (if not unique right now) DateTimePicker replacement of choice for the old MS DTP.&lt;/li&gt;
&lt;li&gt;To be a generic framework able to let a user edit a set of fields where each field is governed by a rule.&lt;/li&gt;
&lt;li&gt;To be extended via a derived class so that it is fully usable in SPG.Net and therefore will fix my initial problem.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I need your input to make this product an absolute must. So I have opened a new section in the forums and a mailing list on the homepage (so that you can be informed when the beta begins). Given what I wrote above, what do you think ? What are your features of choice ? What are the issues you want fixed first?&lt;/p&gt;
&lt;p&gt;In a next post, I will try to summarize all the problems of the MS DTP and expose how SFPE fixes them.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">A new home for VisualHint</guid>
      <link>https://visualhint.com/blog/entries%2F49/A%20new%20home%20for%20VisualHint</link>
      <title>A new home for VisualHint</title>
      <description>&lt;p&gt;VisualHint has reached another milestone. Today, I’m launching my new web site that offers the GUI components that I design.  The redesign was not out of boredom, but simply the result of a need to support more than one product.  The previous site had been designed around a main product (Smart PropertyGrid) and the accompanying news section and I had no idea how to add another product which would have the same importance. Therefore, it was time for a redesign.&lt;/p&gt;
&lt;p&gt;I took &lt;a href="http://www.xara.com/products/xtreme/?v=pro&amp;amp;t="&gt;Xara Xtreme Pro&lt;/a&gt;, a very nice tool to quickly output vector drawings and began coding css and html pages. I must admit it was quite long for me because I’m not a web designer, but I like the process of being fully involved in the construction of my new home. That being said, I hope you will like it, as much as I do. Btw, here is a list of what changes were made during the redesign:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The previous blog was more a “news section” than a blog. I will now try to maintain a true blog discussing PropertyGrids, DateTimePickers and custom controls in general.&lt;/li&gt;
&lt;li&gt;Comments and trackbacks are open for more communication with visitors and customers.&lt;/li&gt;
&lt;li&gt;The homepage clearly presents the products, the latest announcement and the latest blog post.&lt;/li&gt;
&lt;li&gt;The navigation is easier than before.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So now you would like to know more about this new product, is that it? To be followed on the next post…&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Value validation in great form</guid>
      <link>https://visualhint.com/blog/entries%2F50/Value%20validation%20in%20great%20form</link>
      <title>Value validation in great form</title>
      <description>&lt;p&gt;So far, value validation in SPG was simple and clean: no annoying popup but also the obligation to see the previous value automatically restored.&lt;/p&gt;
&lt;p&gt;For the next release, value validation is being reworked. It will still offer the existing behavior but also a mode called KeepFocus. Under this new mode, the focus stays on the faulty value until the user types a valid value (this is what happens in the Microsoft PropertyGrid but unfortunately spoiled with the modal popup). Inside a new validation callback the client application will be given the choice to display a visual clue to indicate to the end-user that there is a problem. The best option will be to show the free Skybound VisualTip.&lt;/p&gt;
&lt;p&gt;Here are two examples grabbed from my current build. In the first situation, an event is sent to the client application and indicates that a TypeConverter was not able to convert the value set by the user. The text of the exception is passed with the event and the client application made the choice to display it in a customized tooltip.&lt;/p&gt;
&lt;p&gt;&lt;img src="/files/images/TypeConverterFailed.jpg" alt="TypeConverter: invalid value" /&gt;&lt;/p&gt;
&lt;p&gt;In the second situation, the user entered a value out of the range set by an attached PropertyValidatorMinMax class. The validator proposed a generic text but the client application made the choice to display a custom text.&lt;/p&gt;
&lt;p&gt;&lt;img src="/files/images/ValidatorFailed.jpg" alt="Property Validator: invalid value" /&gt;&lt;/p&gt;
&lt;p&gt;I must add that the visual capabilities of VisualTips are endless. Very nice product. Marry it with Smart PropertyGrid.Net and you succeed bringing the right experience to your end-users.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">PropertyValueChanged for collections bug fix</guid>
      <link>https://visualhint.com/blog/entries%2F51/PropertyValueChanged%20for%20collections%20bug%20fix</link>
      <title>PropertyValueChanged for collections bug fix</title>
      <description>&lt;p&gt;I was not aware of this bug in the Microsoft PropertyGrid until a customer told me it was doing the same thing in Smart PropertyGrid. This is interesting enough to add a post here about it. The issue is that PropertyValueChanged is not fired for certain collections. It works with an array but doesn’t for a List&amp;lt;&amp;gt; for instance. The reason is that the UITypeEditor.EditValue(...) method returns the reference on the original collection even if its content has been modified. I looked in Reflector and after this method returns, the Microsoft code does a simple “if (obj1 != obj2) ...” which of course returns false and doesn’t trigger the event. My code was actually doing the same thing, so I fixed it to handle this particular case. This is another reason to purchase from a small company that reacts and makes a product that evolves fast. This enhancement is available in version 2.1 beta2 that is out today.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">A website for PropertyGrid resources</guid>
      <link>https://visualhint.com/blog/entries%2F52/A%20website%20for%20PropertyGrid%20resources</link>
      <title>A website for PropertyGrid resources</title>
      <description>&lt;p&gt;I launched today a new web site, minimalist in page count, intended to .Net developers who use the Microsoft PropertyGrid (and secondarily Smart PropertyGrid.Net since it understands all the framework classes related to Type discovery). Because this is sometimes difficult to get the right information for developers who start using this complex component, it seems it was essential to have a well known page referencing all famous and less famous articles, forum posts and other various materials. I don’t want to spend time on developing the web site itself, but surely want to enrich its content with my findings and your submissions. Even nice tips and tricks can fit there. The address is &lt;a href="http://www.propertygridresourcelist.com"&gt;www.propertygridresourcelist.com&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Navigate with the TAB key in a PropertyGrid</guid>
      <link>https://visualhint.com/blog/entries%2F53/Navigate%20with%20the%20TAB%20key%20in%20a%20PropertyGrid</link>
      <title>Navigate with the TAB key in a PropertyGrid</title>
      <description>&lt;img style="float:left;	margin: 0em 10px 5px 10px;" src="/files/images/propertygrid_tab.jpg" alt="Navigate the PropertyGrid with the TAB key" /&gt;
This feature is one of the most discussed about PropertyGrids in general, whether they are mfc, activeX or .net controls from third party developers. The model provided by Microsoft does not offer the possibility to navigate from value to value with the TAB key, or shift+TAB for reverse order and this is a lack that annoys a lot of people. One of my customers had a long discussion with me about this feature. He wanted absolutely this kind of navigation to help his end-user edit a long list of mandatory variables. Using Return and Escape plus the arrow keys was not enough to provide a good experience to his own customers. Since that time, several other visitors and customers asked me the same feature. After visiting some developer forums and articles, I was convinced that browsing property values with the TAB key would be a must for Smart PropertyGrid.Net. So here is what I came with:
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;You are now able to choose between two major modes. In the first one you need to validate or cancel the current edition of the value and use the arrow key to go to the next editable property. In the second one , you navigate to the next inplace control with TAB and to the previous with shift+TAB. There are also several non-exclusive options for all tastes:&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &amp;quot;TabKeyWithAutoFocus&amp;quot; option will focus inside an inplace control as soon as you click on a property label. This is a great way to minimize the actions required by the end-user.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &amp;quot;TabKeyInSubControls&amp;quot; option will allow to access child components in inplace controls. For example, for a trackbar feel, TAB will first go in the textbox part and another TAB will jump to the slider.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &amp;quot;TabKeyInChildProperties&amp;quot; option will open any collapsed hierarchy to place the focus in the next editable property value.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &amp;quot;TabKeySkipReadonlyProperties&amp;quot; option will skip readonly properties. Without it, these properties are visited so that a clipboard copy operation is possible while navigating the grid with the keyboard.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;At last, the &amp;quot;TabKeyLeavesAtExtremes&amp;quot; option will normally tab to the remaining controls in a form once the top or bottom properties are edited. Without it, the focus will continue to rotate in the PropertyGrid.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There will be a small sample available to showcase all those modes in a few days.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">SelectedObjects ... with a final ‘s’</guid>
      <link>https://visualhint.com/blog/entries%2F54/SelectedObjects%20...%20with%20a%20final%20%E2%80%98s%E2%80%99</link>
      <title>SelectedObjects ... with a final ‘s’</title>
      <description>&lt;p&gt;Since the release of the major version 1.5 with the support of Microsoft UITypeEditor classes is not far away and because many people are asking:&lt;/p&gt;
&lt;p&gt;Yes, SelectedObjects allowing to select multiple target instances in the PropertyGrid is the next major feature to be developed. Once done, this should definitely show that Smart PropertyGrid.Net has now an extensive list of features and can be used as a stable base for even more enhancements in the future.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">The next major feature</guid>
      <link>https://visualhint.com/blog/entries%2F55/The%20next%20major%20feature</link>
      <title>The next major feature</title>
      <description>&lt;p&gt;&lt;strong&gt;&amp;quot;Smart PropertyGrid.Net will now support Microsoft UITypeEditors (dropdown and modal), the built-in ones provided in the .Net framework as well as the custom ones you have created.&amp;quot;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In this post I wanted to announce that I was working on the first of the next major features available in SPG.Net 2.0. But this is a feature that many people requested and therefore I will answer to this wish by creating shortly a version 1.5 that will integrate it, even if officially this is a &amp;quot;2.0&amp;quot; feature.&lt;/p&gt;
&lt;p&gt;The reason to add support for &amp;quot;legacy&amp;quot; (hehe, sorry, couldn’t resist) Type Editors is that my customers often take time to migrate their application to the new way SPG is working. In fact every client application using SPG should reasonnably stop using SelectedObject but I understand time and budget constraint matters and to allow easy switching between the Microsoft PropertyGrid and SPG, UITypeEditors must be fully handled.&lt;/p&gt;
&lt;p&gt;If you have any questions or specific needs related to Microsoft UITypeEditors, please contact me and we will discuss while this is still in the works.&lt;/p&gt;
&lt;p&gt;&lt;img src="/files/images/uitypeeditor1.gif" alt="ShortcutKeys UITypeEditor" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="/files/images/uitypeeditor2.gif" alt="Dock UITypeEditor" /&gt;&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Incredible month of May</guid>
      <link>https://visualhint.com/blog/entries%2F56/Incredible%20month%20of%20May</link>
      <title>Incredible month of May</title>
      <description>&lt;p&gt;I would like to thank all the companies and individuals who suddenly transformed nice sales into a tremendous success. The month of May has been outstanding in terms of sales. As a consequence, my helpdesk system is also showing more and more messages from all of you. I get some &amp;quot;thank-you&amp;quot; for this unique product alongside the Microsoft PropertyGrid, I get new feature requests and also troubleshooting and problem reports ... all the things that will make Smart PropertyGrid continue to grow and become always more stable. Just to give you an idea, here is a blind graphic of my sales since last November:&lt;/p&gt;
&lt;p&gt;&lt;img src="/files/images/sales_may.gif" alt="Sales of May" /&gt;&lt;/p&gt;
&lt;p&gt;As you can see the first day of June just looks very promising...
This chart can be read in terms of income or in license count. It doesn't show the full site licenses since they are an infinite number of licenses for a company site.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">What is coming next?</guid>
      <link>https://visualhint.com/blog/entries%2F57/What%20is%20coming%20next%3F</link>
      <title>What is coming next?</title>
      <description>&lt;p&gt;So far everything is going well with the release of Smart PropertyGrid.Net. No major bugs were reported and each minor bug is fixed the same day it is received. Version 1.0.2 is on its way to bring you the latest updates. The sales are also promising and the last sale being a full site license with one year support allows me to see the near future with confidence.&lt;/p&gt;
&lt;p&gt;Concerning the management of VisualHint, first I have chosen a design company to do the new web site. Production may begin next week. I will also buy a script (still in development) that handles customers, licenses and downloads far better than now. Furthermore it should integrate perfectly with the CMS I’m using. And at last, the addition of an helpdesk software will be a true benefit for me and my customers. Bugs and feature requests will be managed efficiently and it will support documentation books and a knowledge base. As far as documentation is concerned, this is still a weak point. But I am working on a tutorial, kind of quick start guide, that will be available during the first week of April.&lt;/p&gt;
&lt;p&gt;This year will be the real expansion of VisualHint and I hope that you will be part of it.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Countdown to the release of Smart PropertyGrid 1.0</guid>
      <link>https://visualhint.com/blog/entries%2F58/Countdown%20to%20the%20release%20of%20Smart%20PropertyGrid%201.0</link>
      <title>Countdown to the release of Smart PropertyGrid 1.0</title>
      <description>&lt;p&gt;You were waiting for this one I’m sure: &amp;quot;Smart PropertyGrid.Net 1.0 will be out some time next week&amp;quot;. I have no known bugs in the queue and it makes now several days that nobody is reporting some glitches or whatever that could delay the release. That’s why I wanted to make this pre-announcement so that you can still benefit from the current discount (I remind you that it entitles you to buy any additional licenses and subscription renewals at the same discount during your initial subscription, except for full site licenses). After next week, the price will come back to 159 USD for one single license and the subscription of current customers will start.&lt;/p&gt;
&lt;p&gt;Also note that the &lt;a href="/propertygrid/store"&gt;price plan&lt;/a&gt; has been updated and is now final. A 10 licenses pack has been added and definitely clearer discounts applied, giving finally lower prices.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Icons for the combobox</guid>
      <link>https://visualhint.com/blog/entries%2F59/Icons%20for%20the%20combobox</link>
      <title>Icons for the combobox</title>
      <description>&lt;p&gt;Per user request, I added as a built-in feature the possibility to attach images to the elements of a combobox. Before, it would have been possible to achieve such effect but by deriving from several classes. Now the effort for the developer is minimal and just needs to attach an ImageList to a property Value. Here is an example:&lt;/p&gt;
&lt;p&gt;&lt;img src="/files/images/listbox_icons.jpg" alt="Icons in Smart PropertyGrid" /&gt;&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">284</guid>
      <link>https://visualhint.com/blog/entries%2F60/284</link>
      <title>284</title>
      <description>&lt;p&gt;This is the number of registered people who have tried Smart PropertyGrid beta. I am quite impressed by this figure and for sure I was not hoping so much interest, even if I think that if companies want to display a PropertyGrid in their application it should definitely be something more user friendly than the Microsoft grid that has been designed for developers.&lt;/p&gt;
&lt;p&gt;Now this is very difficult to say what sales will be. Do people come by curiosity or do they actually intend to purchase such a product ? At least I have exclusively very good feedback and I am quite confident for the future because &lt;a href="http://www.google.com/analytics/"&gt;Google Analytics&lt;/a&gt; gives me a comfortable and increasing rate of revisits.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Price plans</guid>
      <link>https://visualhint.com/blog/entries%2F61/Price%20plans</link>
      <title>Price plans</title>
      <description>&lt;p&gt;Price plans have been defined and are as follows:&lt;/p&gt;
&lt;p&gt;Initial subscription (30 days) with sources:
&lt;strong&gt;1 license&lt;/strong&gt; = $159 &lt;strong&gt;($127 for a limited time)&lt;/strong&gt;
5 pack = $755 (5% discount)
10 pack = $1,429 (10% discount)
20 pack = $2,544 (20% discount)
Full site = $5,959 (25% discount)
You can mix the packs to obtain the appropriate number of licenses.&lt;/p&gt;
&lt;p&gt;Initial subscription (30 days) without sources:
&lt;strong&gt;1 license&lt;/strong&gt; = &lt;strong&gt;$99&lt;/strong&gt;
5 pack = $469 (5% discount)
10 pack = $891 (10% discount)
20 pack = $1,584 (20% discount)
Full site = $3,712 (25% discount)
You can mix the packs to obtain the appropriate number of licenses.&lt;/p&gt;
&lt;p&gt;Yearly renewal for support and updates:
The formula is simple: you pay half what you paid for the product, and if you purchase the renewal during a valid subscription, you get an additional 30% discount.
For example, a 5 pack renewal purchased in time would cost:
(755 / 2) = 377 - 30% = $264&lt;/p&gt;
&lt;p&gt;Consulting for the implementation of custom lool/feel/inplace controls classes will be available and will be quoted on request.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">The versatility of the Checkbox'ed property</guid>
      <link>https://visualhint.com/blog/entries%2F62/The%20versatility%20of%20the%20Checkbox%27ed%20property</link>
      <title>The versatility of the Checkbox'ed property</title>
      <description>&lt;p&gt;When the user wants to select some values from a definite small number of choices, attaching a checkbox look/feel to the property is a good way to achieve exactly that, instead of using the usual combobox. Instinctively you may think that only an enumeration type can use such a feature. Actually, three types can.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Enumeration&lt;/strong&gt;: this is the usual case. You may apply a custom attribute to display the enum values differently.&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-cs"&gt;[Flags]
public enum SupportedOSs
{
    none = 0,
    win95 = 1,
    win98 = 2,
    winxp = 4
}

private SupportedOSs _oss;

[PropertyValueDisplayedAsAttribute(new string[] { &amp;quot;None&amp;quot;, &amp;quot;Windows 95&amp;quot;, &amp;quot;Windows 98&amp;quot;, &amp;quot;Windows XP&amp;quot; })]
public Checklist SupportedOperatingSystems
{
    get { return _oss; }
    set { _oss = value; }
}

propEnum = AppendProperty(rootEnum, _id, &amp;quot;Supported OSs&amp;quot;, this, &amp;quot;SupportedOperatingSystems&amp;quot;, &amp;quot;&amp;quot;);
propEnum.Property.Feel = GetRegisteredFeel(PropertyGrid.FeelCheckbox);
propEnum.Property.Value.Look = new PropertyCheckboxLook();
propEnum.Property.HeightMultiplier = propEnum.Property.Value.GetDisplayedValues().Length;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Boolean&lt;/strong&gt;: a boolean can be attached to a single line checkbox. This is an extension to the above mechanism to have a convenient way to switch between yes/no, enabled/disabled or such states. This is far more convenient than the traditional combobox. Here again you can customize the displayed strings.&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-cs"&gt;private bool _signalState = false;

[PropertyValueDisplayedAsAttribute(new string[2] { &amp;quot;Signaled&amp;quot;, &amp;quot;Not signaled&amp;quot; })]
public bool SignalState
{
    get { return _signalState ; }
    set { _signalState = value; }
}

propEnum = AppendProperty(rootEnum, _id, &amp;quot;State&amp;quot;, this, &amp;quot;SignalState&amp;quot;, &amp;quot;&amp;quot;);
propEnum.Property.Feel = GetRegisteredFeel(PropertyGrid.FeelCheckbox);
propEnum.Property.Value.Look = new PropertyCheckboxLook();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Collection&lt;/strong&gt;: why to handle collections? Just because you may not know the set of possible values at compile-time. This gives something very easy to manage, like this:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-cs"&gt;private ArrayList _supportedOSs = new ArrayList();

public ArrayList SupportedOSs
{
    get { return _supportedOSs ; }
    set { _supportedOSs = value; }
}

List stdValues = new List();
stdValues.Add(&amp;quot;Windows 95&amp;quot;);
stdValues.Add(&amp;quot;Windows 98&amp;quot;);
stdValues.Add(&amp;quot;Windows 2000&amp;quot;);
stdValues.Add(&amp;quot;Windows XP&amp;quot;);
propEnum = AppendProperty(parentEnum, _id, &amp;quot;Supported OSs&amp;quot;, this, &amp;quot;SupportedOSs&amp;quot;, &amp;quot;&amp;quot;,
       new PropertyValueDisplayedAsAttribute(stdValues));
propEnum.Property.Feel = GetRegisteredFeel(PropertyGrid.FeelCheckbox);
propEnum.Property.HeightMultiplier = stdValues.Count;
propEnum.Property.Value.Look = new PropertyCheckboxLook();
&lt;/code&gt;&lt;/pre&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Properties with hyperlink</guid>
      <link>https://visualhint.com/blog/entries%2F63/Properties%20with%20hyperlink</link>
      <title>Properties with hyperlink</title>
      <description>&lt;p&gt;You already know the HotLinkProperty. It lets you put a static text in a row and it looks blue and underlined, inviting you to a click to activate the link. I have added in the latest build, on request, an editable link. Basically this is a normal property that you create as usual but you just add something like this:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-cs"&gt;propEnum.Property.HyperLinkFormat = &amp;quot;mailto:{0}&amp;quot;;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src="/files/images/hyperlink.jpg" alt="Smart PropertyGrid with hyperlinks" /&gt;&lt;/p&gt;
&lt;p&gt;When Ctrl+clicked (for HotLinkProperty or such normal properties), you will receive the event HotLinkClickedEvent and get the complete hyperlink, with {0} replaced by the actual property value.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">A new logo for VisualHint</guid>
      <link>https://visualhint.com/blog/entries%2F64/A%20new%20logo%20for%20VisualHint</link>
      <title>A new logo for VisualHint</title>
      <description>&lt;p&gt;I’m happy to unveil the new VisualHint identity. It is based on the old logo but now features a brand new look that I find far more attractive, dynamic and professional. It precedes the conception of a new web site that will bring together the existing library for MFC and the new one for .Net.&lt;/p&gt;
&lt;p&gt;&lt;img src="/files/images/logo.jpg" alt="VisualHint logo" /&gt;&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Visual Studio 2005 released</guid>
      <link>https://visualhint.com/blog/entries%2F65/Visual%20Studio%202005%20released</link>
      <title>Visual Studio 2005 released</title>
      <description>&lt;p&gt;I downloaded a copy of the express edition yesterday and I am happy that the Smart PropertyGrid library compiles well. First tests show no crashes also. I encourage you to continue your beta testing under the official release.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">DateTimePicker, PropertyGrid and BackColor wedding</guid>
      <link>https://visualhint.com/blog/entries%2F66/DateTimePicker,%20PropertyGrid%20and%20BackColor%20wedding</link>
      <title>DateTimePicker, PropertyGrid and BackColor wedding</title>
      <description>&lt;p&gt;The Microsoft PropertyGrid doesn’t use the DateTimePicker control to edit a date. It uses a simple dropped down month calendar and therefore it is not even possible to edit a time only. This was the indication of a challenge for me.&lt;/p&gt;
&lt;p&gt;If you do a search with the keywords &amp;quot;DateTime BackColor&amp;quot; on the web and on the newsgroups you will find a lot of posts asking how to change the BackColor of a DateTimePicker control as well as answers saying that it is not so obvious and that you could try this way and this way. Nothing clear. Since I had not a lot of bugs to fix in the last days, I decided to add the DateTimePicker control as a feel for the first release of SPG. And after several days of pain and despair, I finally got it working and integrated in the PropertyGrid. Here it is:
PropertyGrid and DateTime&lt;/p&gt;
&lt;p&gt;&lt;img src="/files/images/datetime.jpg" alt="PropertyGrid and DateTime" /&gt;&lt;/p&gt;
&lt;p&gt;There was several difficulties. The first one was to show the proper BackColor. Once done, I discovered that when made initially visible, there was a nasty flickering effect. So I had to fix that to get the same quality standard as all the other inplace controls. I did it but the fix was producing erratic drawing when clicking on the fieds of the control or using the arrow keys to change the values. Well, now this is done and I am pretty proud of it.&lt;/p&gt;
&lt;p&gt;You can see it in action in the new build 11 and the updated sample application.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">How to manage the appearance of a default value</guid>
      <link>https://visualhint.com/blog/entries%2F67/How%20to%20manage%20the%20appearance%20of%20a%20default%20value</link>
      <title>How to manage the appearance of a default value</title>
      <description>&lt;p&gt;The Microsoft PropertyGrid has a built-in mechanism to handle default values: it displays them by using a non-bold font while the other properties are painted with the bold style. The Visual Studio designer also proposes a menu to reset a property to its default value.&lt;/p&gt;
&lt;p&gt;I could have done the same in SPG but this would not be very flexible. Some people, like I did in a C++ application recently, will want for example to display a very subtle different background for non default values. Or maybe you simply want no difference at all. That's why I provide no built-in mechanism at all !!&lt;/p&gt;
&lt;p&gt;Therefore I had to show you how simple this is to do it externally. Here is an example that will simply mimic the Microsoft way (the code is placed in a derived class of PropertyGrid):&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-cs"&gt;protected void CheckDefaultValue(PropertyEnumerator propEnum)
{
    if (propEnum.Property.Value == null)
        return;

    DefaultValueAttribute attr = (DefaultValueAttribute)propEnum.
        Property.Value.GetAttribute(typeof(DefaultValueAttribute));

    if ((attr != null) &amp;amp;&amp;amp; attr.Value.Equals(propEnum.Property.Value.GetValue()))
        propEnum.Property.Value.Font = this.Font;
    else
        propEnum.Property.Value.Font = new Font(propEnum.Property.
            Value.Font, FontStyle.Bold);
}

// Check the property value against the default value and set the
// font accordingly
protected override void OnPropertyChanged (VisualHint.SmartPropertyGrid.PropertyChangedEventArgs e)
{
    base.OnPropertyChanged(e);
    CheckDefaultValue(e.PropertyEnum);
}

// Set the correct font on the property when it is initially created
protected override void OnPropertyCreated(PropertyCreatedEventArgs e)
{
    base.OnPropertyCreated(e);
    CheckDefaultValue(e.PropertyEnum);
}
&lt;/code&gt;&lt;/pre&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Download a sample application</guid>
      <link>https://visualhint.com/blog/entries%2F68/Download%20a%20sample%20application</link>
      <title>Download a sample application</title>
      <description>&lt;p&gt;I have published today a sample application. In fact this is my test program that showcases almost every feature of the PropertyGrid. At the same time, I have updated the SmartPropertyGrid assembly to build 2 since a dozen of bugs have been fixed.&lt;/p&gt;
&lt;p&gt;&lt;a href="/propertygrid/download"&gt;Download it now&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="/files/images/spgsample1.jpg" alt="Smart PropertyGrid in action" /&gt;&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Multiple values in a row</guid>
      <link>https://visualhint.com/blog/entries%2F69/Multiple%20values%20in%20a%20row</link>
      <title>Multiple values in a row</title>
      <description>&lt;p&gt;Here is the third post of the set I promised &lt;a href="/blog/34/first-insight"&gt;previously&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;To store multiple variables in a single property is a new concept brought by SPG. I wanted to do it when a customer who bought the MFC version asked me if it was possible to have in one row a double value and its associated unit. Although it was feasible with some work it was not instantaneous, and even if this customer achieved to do it I decided to implement a built-in mechanism in the .NET version. And finally this is done. Here is a screenshot from my test app:&lt;/p&gt;
&lt;p&gt;&lt;img src="/files/images/unitproperty.gif" alt="alt text" /&gt;&lt;/p&gt;
&lt;p&gt;It will be demonstrated in the first demo to come.&lt;/p&gt;
&lt;p&gt;So, what else can you do with that ? Your imagination is the limit here, but let's see another example. The font dialog is able to let the user choose a color for a font. But the font doesn't store the color. That's why the Microsoft PropertyGrid doesn't manage colors for fonts. SPG can allow you to store in one row a reference to a font and to a color. By writing the right Look class, it can be displayed the way you want (a color box followed by the font text or a colored font text, ...), and it will be edited by a font dialog that enables color selection.&lt;/p&gt;
&lt;p&gt;Of course this is not limited to two variables. If you have some built-in arrangements of multiple variables that you would like to see developed in the package, just tell me.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Silence</guid>
      <link>https://visualhint.com/blog/entries%2F70/Silence</link>
      <title>Silence</title>
      <description>&lt;p&gt;I’m still here and very active. Because several people asked me the status of the library by mail, here are the very uninteresting reasons of my silence: first some family came here then I took some vacations and very recently I had a major computer crash with data loss. I only got it back from repair some days ago. When everything is restored, I will finalize the evaluation of an obfuscator.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Properties auto-discovery</guid>
      <link>https://visualhint.com/blog/entries%2F71/Properties%20auto-discovery</link>
      <title>Properties auto-discovery</title>
      <description>&lt;p&gt;Here is the second post of the set I promised &lt;a href="/blog/34/first-insight"&gt;previously&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;The strength of &lt;acronym title="Smart PropertyGrid"&gt;SPG&lt;/acronym&gt; is that you can really work with it at run-time. You will be able to add, remove, move and delete properties with very few lines of code. The appearance and the way to edit these properties can also be changed easily. But to be complete, the existing way of showing properties in the grid has still to be available. Right now, this is done with the &lt;em&gt;SelectedObject&lt;/em&gt; Property. It means, among other things, that all the great techniques brought to you on CodeProject by fellow developers still apply to SPG. Here are two of them:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.codeproject.com/cs/miscctrl/bending_property.asp"&gt;Bending the .NET propertygrid to Your Will&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.codeproject.com/cs/miscctrl/customizingcollectiondata.asp"&gt;Customized display of collection data in a propertygrid&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Concerning these two articles, I would like to thank their authors because they helped me, among other sources of documentation, to understand the inner workings of this complex windows forms control. And I'm pretty sure that if I read them again, I will find a small detail that I missed.&lt;/p&gt;
&lt;p&gt;But I digress... I used the reflection to find all the custom properties and populate the control. Sticking to the old way is good, but why not to bring a more convenient ease to it. I take the example of a pen. By default, the Pen class publishes a lot of its properties, and some of them are not very useful when you develop a graphical application. &amp;quot;CompoundArray&amp;quot;, &amp;quot;Transform&amp;quot;, &amp;quot;Brush&amp;quot; only show their class name as value, so why not remove them ? This code will do it:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-cs"&gt;[PropertyHide(&amp;quot;CompoundArray&amp;quot;, &amp;quot;Transform&amp;quot;, &amp;quot;Brush&amp;quot;)]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After removing some properties, it can be beneficial to change the way that some of the remaining ones are displayed and edited. If you have developed your own custom color picker, you would like to assign it to the &amp;quot;Color&amp;quot; property. And maybe you prefer to show updown arrows for editing the pen width. It can be done like this:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-cs"&gt;[PropertyFeel(new string[] {
&amp;quot;Width&amp;quot;, VisualHint.SmartPropertyGrid.PropertyGrid.FeelEditUpDown,
&amp;quot;Color&amp;quot;, VisualHint.SmartPropertyGrid.PropertyGrid.FeelList })]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As you can see, all attributes of this kind will take the name of an auto-discovered property as a first parameter. In the example above, pairs of parameters are passed in an array so that it is possible to change the Feel class of many properties. A picture being better than thousands words, here is one:&lt;/p&gt;
&lt;p&gt;&lt;img src="/files/images/customautodiscover.jpg" alt="PropertyGrid customizations" /&gt;
&lt;img src="/files/images/customautodiscover2.jpg" alt="PropertyGrid customizations" /&gt;&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Short term plans</guid>
      <link>https://visualhint.com/blog/entries%2F15/Short%20term%20plans</link>
      <title>Short term plans</title>
      <description>&lt;p&gt;Sorry not to have posted during several days. Things continue to progress though. The main thing is that I have frozen the development because I am now working heavily on the documentation for the API. NDOC does not fully recognize C# 2.0 but nevertheless I can work with it and preview my progress. Once I am satisfied with it, I will publish an alpha release so that you can play with the PropertyGrid. From the discussion that will result, I will continue the development and create a beta program.&lt;/p&gt;
&lt;p&gt;In the meatime, please continue to give me your thoughts and expectations.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Visual C# Express beta2</guid>
      <link>https://visualhint.com/blog/entries%2F14/Visual%20C%23%20Express%20beta2</link>
      <title>Visual C# Express beta2</title>
      <description>&lt;p&gt;Just installed it yesterday and everything seems fine with the current code. I had only one compile error and it deals with &lt;em&gt;MaskedTextBox.InputText&lt;/em&gt;. This property simply disappeared and this is a real annoyance for me. I currently have a workaround. Let me explain my concern:&lt;/p&gt;
&lt;p&gt;In a previous post, I showed an example with a phone number. It is stored as a string variable that doesn't contain the characters of the mask, i.e. 5551234567 and not (555)123-4567. When the user edits the variable I want to retrieve a string without the special characters and InputText was allowing that. My workaround is to temporarily reset the mask to nothing, grab the string and restore the mask, and even freeze the painting during this operation. Please, Microsoft, restore this property, or let me know how elegantly I can do that ;)&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Properties and categories sorting</guid>
      <link>https://visualhint.com/blog/entries%2F13/Properties%20and%20categories%20sorting</link>
      <title>Properties and categories sorting</title>
      <description>&lt;p&gt;This is a concern often seen in forums or newsgroups. With the Microsoft PropertyGrid, sorting the properties means having to derive from ICustomTypeDescriptor or TypeDescriptionProvider to return the properties in a specific order. Sorting the categories is simply impossible. I think I have to remedy this problem.&lt;/p&gt;
&lt;p&gt;First, don't forget the first mode of operation of &lt;acronym title="Smart PropertyGrid"&gt;SPG&lt;/acronym&gt;: in this mode you can dynamically add and remove categories and properties, so by doing that you control the order.&lt;/p&gt;
&lt;p&gt;In the more traditionnal way (reflection), we need something very easy for the developer. I was thinking to 2 possibilities. Let me know what you think about it:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use a new attribute to decorate a property:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class="language-cs"&gt;[Category(&amp;quot;Personal&amp;quot;)]
[PropertyRank(1)]
public int MyData { set; get; }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This new tag, &amp;quot;PropertyRank&amp;quot;, could be used for categories and properties.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Give access to the collection of sibling child properties/categories for a node and let the user reorder them. It could give something like this:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class="language-cs"&gt;PropertyEnumerator categoryEnum = propGrid.FindProperty(&amp;quot;Personal&amp;quot;);
PropertyEnumerator children = MySort(categoryEnum.Property.Children);
propGrid.Reorder(children);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Of course the usual way with ICustomTypeDescriptor must continue to be available.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">Appearance customization</guid>
      <link>https://visualhint.com/blog/entries%2F12/Appearance%20customization</link>
      <title>Appearance customization</title>
      <description>&lt;p&gt;Here is the first post of the set I promised &lt;a href="/blog/34/first-insight"&gt;previously&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;As you all know, the Microsoft PropertyGrid comes in only one flavour, the one I call the DotNet look. It is neat and simple, no point on that. It was even a reference for me when I began coding the version for MFC. But I realized that people wanted more. Some advanced GUI have their own theme and the control should mimic it. In &lt;acronym title="Smart PropertyGrid"&gt;SPG&lt;/acronym&gt;, this is easy. You will be able to choose between some built-in &amp;quot;drawing managers&amp;quot; and you will eventually develop your own one. I did three right now, but if you have a theme that you would like to see in the base package, just let me know. Here is a theme that is used in &lt;a href="http://mediasoftware.sonypictures.com/Products/showproduct.asp?PID=912&amp;FeatureID=7654" title="DVD Architect screenshots"&gt;Sony DVD Architect&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img src="/files/images/feature21_3.gif" alt="PropertyGridTheme" /&gt;&lt;/p&gt;
&lt;p&gt;Then come all the small details that make the whole difference at runtime:&lt;/p&gt;
&lt;div class="alpha-shadow"&gt;&lt;div&gt;&lt;img src="/files/images/customize1.gif" alt="PropertyGrid customizations" /&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class="aftershadowimg"&gt;&lt;/div&gt;
&lt;p&gt;By looking at this sample shot, here is what you can do (this list is non exhaustive and may be changed in the future):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Change the color of a property/category label.&lt;/li&gt;
&lt;li&gt;Change the color of a property value.&lt;/li&gt;
&lt;li&gt;Change the font of a property/category label.&lt;/li&gt;
&lt;li&gt;Change the font of a property value.&lt;/li&gt;
&lt;li&gt;Add your own drawings in the property/category label area.&lt;/li&gt;
&lt;li&gt;Add your own drawings in the property value area.&lt;/li&gt;
&lt;li&gt;Assign an icon to a property/category label.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You understand that you can modify every aspect of the control. If you want to show an animated cursor, apply a background effect, and so on ... those are all the things that you can implement.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">MaskedTextBox</guid>
      <link>https://visualhint.com/blog/entries%2F11/MaskedTextBox</link>
      <title>MaskedTextBox</title>
      <description>&lt;p&gt;This is just a short post to say that I have many requests to include the MaskedTextBox as a way to edit properties. I confirm here that it will be available in &lt;acronym title="Smart PropertyGrid"&gt;SPG&lt;/acronym&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Update on April 7&lt;/em&gt;: This is done and here is a screenshot.&lt;/p&gt;
&lt;div class="alpha-shadow"&gt;&lt;div&gt;&lt;img src="/files/images/maskedtextbox.gif" alt="MaskedTextBox" /&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class="aftershadowimg"&gt;&lt;/div&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">First insight</guid>
      <link>https://visualhint.com/blog/entries%2F10/First%20insight</link>
      <title>First insight</title>
      <description>&lt;p&gt;I will in a short time post some articles about specific features of &lt;acronym title="Smart PropertyGrid"&gt;SPG&lt;/acronym&gt;.NET. In the meantime you can already read a list of &lt;a href="/propertygridmfc" title=""&gt;existing features&lt;/a&gt; for the MFC version of the library. Here are the topics I will discuss. They will come with screenshots:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Overall look customization&lt;/strong&gt;: modifying the overall look of the grid is already described on the &lt;a href="http://www.visualhint.com" title=""&gt;VisualHint&lt;/a&gt; web site. But I want to recall it here because this is one point that can make your grid really stand out in your product and this is something simply impossible in the standard PropertyGrid.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Auto-discovery&lt;/strong&gt;: SPG has its own way to use reflection to discover the inner properties of an object instance. First it mimics what the standard PropertyGrid does so that you get what you are used to. And additionnaly you can customize it to show what you really want to show and how you want to show it. An example would be a Pen displayed only as one row, showing a visual aspect of the pen, with only one child property showing the pen width whose content could be changed with a slider or an updown arrow.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Multiple values in a row&lt;/strong&gt;: Here is really a new concept. Typically a row in the grid is linked to only one data. Now it will be possible to link with any number of data, making possible to represent for example a number (changed with a textbox) and its unit (changed with a listbox).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;New attributes&lt;/strong&gt;: Some new attributes are defined, and many more will be added later, to be able to customize a property without having to write a ton of code.&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">What can you expect?</guid>
      <link>https://visualhint.com/blog/entries%2F9/What%20can%20you%20expect%3F</link>
      <title>What can you expect?</title>
      <description>&lt;p&gt;You are discovering this web site and of course you are wondering what to expect. What will emerge from all this talk. Let's put it as a shopping list:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A successful and proven design coming from &lt;a href="/propertygridmfc" title="Smart PropertyGrid for MFC"&gt;Smart PropertyGrid for MFC&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Plenty of features, some that will make the control work like the existing .NET PropertyGrid, and other new exciting ones that will fill in all its shortcomings, lacks and drawbacks.&lt;/li&gt;
&lt;li&gt;A fast evolving product, based on your needs and criticisms.&lt;/li&gt;
&lt;li&gt;A top notch support. Your problem is mine and I won't give up until it's solved, even if your subscription is over.&lt;/li&gt;
&lt;li&gt;You can get the sources.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is my goal. Don't hesitate to tell me if I unfortunately diverge from it.&lt;/p&gt;
&lt;p&gt;Some questions? Please use the comments so that everybody can watch. You must first register to do that. And by doing so you will also subscribe to a low traffic announcements mailing-list.&lt;/p&gt;
</description>
    </item>
    <item>
      <guid
        isPermaLink="false">This was an evidence...</guid>
      <link>https://visualhint.com/blog/entries%2F8/This%20was%20an%20evidence...</link>
      <title>This was an evidence...</title>
      <description>&lt;p&gt;... I had to blog to show any interested .NET developers that a new type of PropertyGrid is coming. What better tool than a blog could do that? Anyway, I thought it was easy, but when english is not your natural language and when you face a blank window, writing even the most insipid spiel is not obvious.&lt;/p&gt;
&lt;p&gt;So just let me introduce myself: my name is Nicolas Cadilhac. I live in Montreal, Canada. I'm creating my own company because I want to dedicate the right amount of time to the products I create. And moreover, people from the .NET side are constantly asking me if I will one day or another port this great custom control to their world. So today, the answer is yes.&lt;/p&gt;
&lt;p&gt;There is not real meat here yet, but stay tuned. It will come quicker than you think. The web site also has all the basics to make it work. I will add bit by bit all needed features. If you see something wrong in your browser, thanks to let me know.&lt;/p&gt;
&lt;p&gt;And please, for pity's sake, pardon my english and contact me to correct any big mistake or strange turn of phrase you may see.&lt;/p&gt;
</description>
    </item>
  </channel>
</rss>