<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

    <channel>
    
    <title>VisualHint blog</title>
    <link>http://www.visualhint.com/index.php/blog/</link>
    <description />
    <dc:language>en</dc:language>
    <dc:creator>cadilhac@visualhint.com</dc:creator>
    <dc:rights>Copyright 2009</dc:rights>
    <dc:date>2009-05-20T18:24:00+00:00</dc:date>
    <admin:generatorAgent rdf:resource="http://www.pmachine.com/" />
    

    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/visualhint" type="application/rss+xml" /><feedburner:browserFriendly>This is an XML content feed. It is intended to be viewed in a newsreader or syndicated to another site, subject to copyright and fair use.</feedburner:browserFriendly><item>
      <title>A single checkbox for any property…</title>
      <link>http://www.visualhint.com/index.php/blog/post/a_single_checkbox_for_any_property/</link>
      <guid isPermaLink="true">http://www.visualhint.com/index.php/blog/post/a_single_checkbox_for_any_property/</guid>
      <description>... or at least for properties that care publishing two standard values.</description>
      <dc:subject />
      <content:encoded><![CDATA[<p>In the real life, you won&#8217;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.</p>

<p>In case you are not sure how to do it with your type, there is an example in the updated sample.
</p>]]></content:encoded>
      <dc:date>2009-05-20T18:24:00+00:00</dc:date>
    </item>

    <item>
      <title>The calendar is now kryptonized</title>
      <link>http://www.visualhint.com/index.php/blog/post/the_calendar_is_now_kryptonized/</link>
      <guid isPermaLink="true">http://www.visualhint.com/index.php/blog/post/the_calendar_is_now_kryptonized/</guid>
      <description>A few hours after announcing the addition of a totally new MonthCalendar to the DateTimePicker supplied in Smart FieldPackEditor, here is an addon class that will paint the calendar with the Krypton palettes.</description>
      <dc:subject />
      <content:encoded><![CDATA[<p><img src="http://www.visualhint.com/images/uploads/krypton_date.png" alt="" /></p>

<p>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.<p>

<p>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).</p>

<p>The free <a href="http://www.visualhint.com/index.php/blog/post/a_new_monthcalendar_for_the_datetimepicker_and_the_propertygrid/">MonthCalendar</a>, as well as the Krypton drawing manager and a sample are all zipped in <a href="http://www.visualhint.com/index.php?ACT=24&ID=341">this archive</a>.</p>
]]></content:encoded>
      <dc:date>2008-10-15T00:08:57+00:00</dc:date>
    </item>

    <item>
      <title>A new MonthCalendar for the DateTimePicker and the PropertyGrid</title>
      <link>http://www.visualhint.com/index.php/blog/post/a_new_monthcalendar_for_the_datetimepicker_and_the_propertygrid/</link>
      <guid isPermaLink="true">http://www.visualhint.com/index.php/blog/post/a_new_monthcalendar_for_the_datetimepicker_and_the_propertygrid/</guid>
      <description>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.</description>
      <dc:subject />
      <content:encoded><![CDATA[<p><img src="http://www.visualhint.com/images/uploads/calendar.png" alt="" /></p>

<p>This choice was also motivated by a second category of customers who use the free <a href="http://www.componentfactory.com/products_toolkit.php">Krypton Toolkit</a> 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.</p>

<p>Not to make a big change, my calendar by default looks like the MS one (+ a mouse hover effect) and has the following features:</p>


<ul>
<li><b>It is completely free</b> (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</li>
<li>It can be used standalone or inside the SFPE DateTimePicker</li>
<li>It has a CultureInfo property</li>
<li>It is not limited by the fateful 1753 year but by what the DateTime type can accept</li>
<li>It can display an optional and localizable "Today" button</li>
<li>It is nullable, so it can display an optional and localizable "Clear" button too</li>
<li>There is a true continuous acceleration when keeping the month and year buttons pressed</li>
<li>An overridable drawing manager allows you to customize its look</li>
</ul>

<p>There are some limitations for this first release, simply because I needed a simple calendar for the DateTimePicker:</p>

<ul>
<li>It displays only one month (no rows and columns of months)</li>
<li>It doesn't handle range selections</li>
<li>There is no bolded dates</li>
</ul>

<p>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.</p>

<p>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 <a href="http://visualhint.uservoice.com">UserVoice</a>). Let me know if you like it too...</p>

<p><a href="http://www.visualhint.com/index.php?ACT=24&ID=341">Get the month calendar here</a> (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).</p>]]></content:encoded>
      <dc:date>2008-10-14T14:03:48+00:00</dc:date>
    </item>

    <item>
      <title>An interactive calendar on your windows desktop</title>
      <link>http://www.visualhint.com/index.php/blog/post/an_interactive_calendar_on_your_windows_desktop/</link>
      <guid isPermaLink="true">http://www.visualhint.com/index.php/blog/post/an_interactive_calendar_on_your_windows_desktop/</guid>
      <description>In 2002, when VisualHint was not born yet, I was proposing some components written in C++/MFC under the name aircom.org. The MFC PropertyGrid appeared there, as well as a DateTimePicker and color components.</description>
      <dc:subject />
      <content:encoded><![CDATA[<p>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. <a href="/downloads/deskdate.exe">Take it! It's now free</a> (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:</a>

<p><img style="margin-left:20px;" src="http://www.visualhint.com/images/uploads/deskdate.png" alt="" /></p>

<p>Now, does it give you a clue about my new task for <a href="http://www.visualhint.com/index.php/fieldpackeditor/">SFPE</a>?</p>]]></content:encoded>
      <dc:date>2008-10-02T00:29:52+00:00</dc:date>
    </item>

    <item>
      <title>A suffix for the day of the month in the DateTimePicker</title>
      <link>http://www.visualhint.com/index.php/blog/post/a_suffix_for_the_day_of_the_month_in_the_datetimepicker/</link>
      <guid isPermaLink="true">http://www.visualhint.com/index.php/blog/post/a_suffix_for_the_day_of_the_month_in_the_datetimepicker/</guid>
      <description>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:</description>
      <dc:subject />
      <content:encoded><![CDATA[<p><img style="margin-left:20px;" src="http://www.visualhint.com/images/uploads/dtp_suffix.gif" alt="English suffix for the DateTimePicker" /></p>
<p>To work, you need to handle the ValueChanged event, like this:</p>
<p><pre style="font-size:130%;">
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 = "th, ";
        if (value.Day == 1)
            suffix = "st, ";
        else if (value.Day == 2)
            suffix = "nd, ";
        else if (value.Day == 3)
            suffix = "rd, ";

        if (!field.Value.Equals(suffix))
        {
            field.Value = suffix;
            field.OwnerFieldPack.OwnerEditor.RecalcLayout();
        }
    }
}
</pre></p>
<p>Depending on your language, you can of course change the prefix. Note that there is no particular requirement for the format string.</p>
]]></content:encoded>
      <dc:date>2008-09-19T17:53:43+00:00</dc:date>
    </item>

    <item>
      <title>DateTimePicker and TimeSpanEditor now support frames per second</title>
      <link>http://www.visualhint.com/index.php/blog/post/datetimepicker_and_timespaneditor_now_support_frames_per_second/</link>
      <guid isPermaLink="true">http://www.visualhint.com/index.php/blog/post/datetimepicker_and_timespaneditor_now_support_frames_per_second/</guid>
      <description>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:</description>
      <dc:subject />
      <content:encoded><![CDATA[<p><img style="margin-left:20px;" src="http://www.visualhint.com/images/uploads/frames.png" alt="Frames per second in DateTimePicker and TimeSpan editor" /></p>

<p>As you can see, it takes the "v" character followed by the max frames count. Even a floating number can be used, like 29.97 for NTSC.</p>
<p>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 <a href="http://www.visualhint.com/index.php/about/testimonials/">page</a>.</p>]]></content:encoded>
      <dc:date>2008-07-30T18:57:00+00:00</dc:date>
    </item>

    <item>
      <title>Screencast of the new TimeSpan editor for .Net</title>
      <link>http://www.visualhint.com/index.php/blog/post/screencast_of_the_new_timespan_editor_for_net/</link>
      <guid isPermaLink="true">http://www.visualhint.com/index.php/blog/post/screencast_of_the_new_timespan_editor_for_net/</guid>
      <description>As promised last week, here is a screencast showcasing the features of the new TimeSpan editor, a new creation based on the Smart FieldPackEditor.Net:</description>
      <dc:subject />
      <content:encoded><![CDATA[<p><b>Update</b>: SFPE 1.2 has been <a href="http://www.visualhint.com/index.php/fieldpackeditor/">released</a>.</p>
<div style="margin: 1.5em 0px;">
<object id="csSWF" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="500" height="456" codebase="http://active.macromedia.com/flash7/cabs/ swflash.cab#version=9,0,28,0">
                <param name="src" value="/screencasts/timespaneditor.swf"/>
                <param name="bgcolor" value="#1a1a1a"/>
                <param name="quality" value="best"/>
                <param name="allowScriptAccess" value="always"/>
                <param name="allowFullScreen" value="true"/>
                <param name="scale" value="showall"/>
                <param name="flashVars" value="autostart=false"/>
                <embed name="csSWF" src="/screencasts/timespaneditor.swf" width="500" height="456" bgcolor="#1a1a1a" quality="best" allowScriptAccess="always" allowFullScreen="true" scale="showall" flashVars="autostart=false" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>
            </object>
</div>

<p>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.</p>
<p>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 <a href="http://www.visualhint.com/index.php/fieldpackeditor/">SFPE</a> version 1.2 is out.</p>
]]></content:encoded>
      <dc:date>2008-06-24T01:02:26+00:00</dc:date>
    </item>

    <item>
      <title>A TimeSpan editor for .Net</title>
      <link>http://www.visualhint.com/index.php/blog/post/a_timespan_editor_for_net/</link>
      <guid isPermaLink="true">http://www.visualhint.com/index.php/blog/post/a_timespan_editor_for_net/</guid>
      <description>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.</description>
      <dc:subject />
      <content:encoded><![CDATA[<p><b>Update: a <a href="http://www.visualhint.com/index.php/blog/post/screencast_of_the_new_timespan_editor_for_net/">screencast</a> has been published.</b></p>

<p>First here is a nice screenshot taken from the updated supplied sample:</p>

<p><img style="margin-left:20px;" src="http://www.visualhint.com/images/uploads/timespaneditor.png" alt="" /></p>

<p>You can see the editor in action and a subset of its properties in a PropertyGrid. And here are its features:</p>

<ul>
<li>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).</li>
<li>Flexible format string:<br/>
&nbsp;&nbsp;&bull;&nbsp;D for days without leading zeros<br/>
&nbsp;&nbsp;&bull;&nbsp;d for days with leading zeros<br/>
&nbsp;&nbsp;&bull;&nbsp;H for hours without leading zeros<br/>
&nbsp;&nbsp;&bull;&nbsp;h for hours with leading zeros<br/>
&nbsp;&nbsp;&bull;&nbsp;M for minutes without leading zeros<br/>
&nbsp;&nbsp;&bull;&nbsp;m for minutes with leading zeros<br/>
&nbsp;&nbsp;&bull;&nbsp;S for seconds without leading zeros<br/>
&nbsp;&nbsp;&bull;&nbsp;s for seconds with leading zeros<br/>
&nbsp;&nbsp;&bull;&nbsp;F (up to 7 times) for ticks as fraction without trailing zeros<br/>
&nbsp;&nbsp;&bull;&nbsp;f (up to 7 times) for ticks as fraction with trailing zeros<br/>
&nbsp;&nbsp;&bull;&nbsp;T (up to 7 times) for standalone ticks without trailing zeros<br/>
&nbsp;&nbsp;&bull;&nbsp;t (up to 7 times) for standalone ticks with trailing zeros<br/>
&nbsp;&nbsp;&bull;&nbsp;&quot;:&quot; for the time separtor<br/>
&nbsp;&nbsp;&bull;&nbsp;Static fields can be added, something like d &#39;days&#39; H &#39;hours&#39;
<li>Min and Max values can be set.</li>
<li>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.</li>
<li>Updown button can be displayed.</li>
<li>Nullable (with delete key or checkbox).</li>
<li>Auto-incrementation can be switched on (for ex, seconds passing from 59 to 0 will increment minutes, and so on).</li>
<li>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.</li>
</ul>

<p>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.</p>
]]></content:encoded>
      <dc:date>2008-06-17T17:38:00+00:00</dc:date>
    </item>

    <item>
      <title>The PropertyGrid gets Office 2007 and other themes</title>
      <link>http://www.visualhint.com/index.php/blog/post/the_propertygrid_gets_office_2007_and_other_themes/</link>
      <guid isPermaLink="true">http://www.visualhint.com/index.php/blog/post/the_propertygrid_gets_office_2007_and_other_themes/</guid>
      <description>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:</description>
      <dc:subject />
      <content:encoded><![CDATA[<p><img src="http://www.visualhint.com/images/uploads/krypton_themes.png" alt="" /></p>
<p>This is feasible thanks to the Krypton Toolkit API (which is a free framework available <a href="http://www.componentfactory.com/products.php#toolkit">here</a>). 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: <a href="http://www.visualhint.com/downloads_spg/KryptonDrawingManager.cs">KryptonDrawingManager.cs</a>. It uses all the known themes of the toolkit and you can even design your own palettes.</p>]]></content:encoded>
      <dc:date>2008-06-02T15:13:00+00:00</dc:date>
    </item>

    <item>
      <title>Screencast: How to synchronize two PropertyGrids?</title>
      <link>http://www.visualhint.com/index.php/blog/post/how_to_synchronize_two_propertygrids/</link>
      <guid isPermaLink="true">http://www.visualhint.com/index.php/blog/post/how_to_synchronize_two_propertygrids/</guid>
      <description>A visitor who wanted to evaluate SPG asked me this question the other day: “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?”. The answer is yes with SPG 3.0.1 and I have made a screencast to show you the result:</description>
      <dc:subject />
      <content:encoded><![CDATA[<div style="margin: 1.5em 0px;">
            <object id="csSWF" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="500" height="438" codebase="http://active.macromedia.com/flash7/cabs/ swflash.cab#version=9,0,28,0">
                <param name="src" value="/screencasts/synchro.swf"/>
                <param name="bgcolor" value="#1a1a1a"/>
                <param name="quality" value="best"/>
                <param name="allowScriptAccess" value="always"/>
                <param name="allowFullScreen" value="true"/>
                <param name="scale" value="showall"/>
                <param name="flashVars" value="autostart=false"/>
                <embed name="csSWF" src="/screencasts/synchro.swf" width="500" height="438" bgcolor="#1a1a1a" quality="best" allowScriptAccess="always" allowFullScreen="true" scale="showall" flashVars="autostart=false" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>
            </object>
</div>

<p>The synchronizer class can be downloaded <a href="/downloads_spg/PropertyGridSynchronizer.cs">here</a> (please, let me know if you find any issue with this class, I will be happy to fix it).</p>]]></content:encoded>
      <dc:date>2008-05-18T21:27:00+00:00</dc:date>
    </item>

    
    </channel>
</rss>
