<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="http://www.codeplex.com/rss.xsl"?><rss version="2.0"><channel><title>windowsformsaero Wiki &amp; Documentation Rss Feed</title><link>http://www.codeplex.com/windowsformsaero/Wiki/View.aspx?title=Home</link><description>windowsformsaero Wiki Rss Description</description><item><title>Updated Wiki: Home</title><link>http://windowsformsaero.codeplex.com/Wiki/View.aspx?title=Home&amp;version=17</link><description>&lt;div class="wikidoc"&gt;&lt;b&gt;Windows Forms Aero&lt;/b&gt; is a project started by &lt;b&gt;Marco Minerva&lt;/b&gt; on January 30th, 2007.&lt;br /&gt;&lt;br /&gt;This project aims to create a Windows Control Library that provides controls reproducing the appearance of Microsoft Aero graphic objects, like buttons and links with shield icon, textboxes with cue banner, etc.&lt;br /&gt;
&lt;h2&gt;System requirements&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Visual C# 2008 Express Edition&lt;/b&gt; or &lt;b&gt;Visual Studio 2008&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;A system running &lt;b&gt;Windows Vista&lt;/b&gt; or &lt;b&gt;Windows 7&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;

&lt;h2&gt;Contents&lt;/h2&gt;The &lt;a href="http://windowsformsaero.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=11300"&gt;current version&lt;/a&gt; contains several native Vista controls (such as Buttons, Combo boxes with cue banner, Command links, native List views, Progress bars, explorer-like TreeView...) and some modules that empower the user to exploit some of Vista's advanced GUI features (&lt;i&gt;Glass sheet&lt;/i&gt; effect, text on glass, live thumbnails and the new Task dialogs).&lt;br /&gt;The intellisense documentation file is now available as well.&lt;br /&gt;
&lt;h2&gt;Screenshots&lt;/h2&gt;&lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=windowsformsaero&amp;DownloadId=28497" alt="demoapp2.png" title="demoapp2.png" /&gt;&lt;br /&gt;The demo applications shows off some of the native Vista controls and the Glass sheet effect.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=windowsformsaero&amp;DownloadId=23904" alt="taskdialogs.png" title="taskdialogs.png" /&gt;&lt;br /&gt;An example of a rather complex Task Dialog. The library includes a complete implementation of the Task dialog API, including task dialog navigation, events and animation.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=windowsformsaero&amp;DownloadId=76729" alt="HorizontalPanel.jpg" title="HorizontalPanel.jpg" /&gt;&lt;br /&gt;An example of using the HorizontalPanel and LabeledDivider to create a Windows 7 style form (minus the IE like controls at the top).&lt;br /&gt;&lt;br /&gt;For more information about the new controls that are available in Windows Vista, take a look at &lt;a href="http://msdn2.microsoft.com/en-us/library/aa511456.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/aa511456.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h2&gt;Documentation and Samples&lt;/h2&gt;The complete documentation is currently &lt;i&gt;work in progress&lt;/i&gt;.&lt;br /&gt;&lt;a href="http://windowsformsaero.codeplex.com/Wiki/View.aspx?title=Documentation"&gt;Documentation&lt;/a&gt;&lt;br /&gt;&lt;a href="http://windowsformsaero.codeplex.com/Wiki/View.aspx?title=Samples"&gt;Samples&lt;/a&gt;&lt;br /&gt;
&lt;h2&gt;Applications using the library&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.codeplex.com/OnTopReplica" class="externalLink"&gt;OnTopReplica&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;, utility that allows you to clone a window and keep it &amp;quot;always on top&amp;quot;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>marcom</author><pubDate>Wed, 29 Jul 2009 17:00:52 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20090729050052P</guid></item><item><title>Updated Wiki: Home</title><link>http://windowsformsaero.codeplex.com/Wiki/View.aspx?title=Home&amp;version=16</link><description>&lt;div class="wikidoc"&gt;&lt;b&gt;Windows Forms Aero&lt;/b&gt; is a project started by &lt;b&gt;Marco Minerva&lt;/b&gt; on January 30th, 2007.&lt;br /&gt;&lt;br /&gt;This project aims to create a Windows Control Library that provides controls reproducing the appearance of Microsoft Aero graphic objects, like buttons and links with shield icon, textboxes with cue banner, etc.&lt;br /&gt;
&lt;h2&gt;System requirements&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Visual C# 2008 Express Edition&lt;/b&gt; or &lt;b&gt;Visual Studio 2008&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;A system running &lt;b&gt;Windows Vista&lt;/b&gt; operating system&lt;/li&gt;&lt;/ul&gt;

&lt;h2&gt;Contents&lt;/h2&gt;The &lt;a href="http://windowsformsaero.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=11300"&gt;current version&lt;/a&gt; contains several native Vista controls (such as Buttons, Combo boxes with cue banner, Command links, native List views, Progress bars, explorer-like TreeView...) and some modules that empower the user to exploit some of Vista's advanced GUI features (&lt;i&gt;Glass sheet&lt;/i&gt; effect, text on glass, live thumbnails and the new Task dialogs).&lt;br /&gt;The intellisense documentation file is now available as well.&lt;br /&gt;
&lt;h2&gt;Screenshots&lt;/h2&gt;&lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=windowsformsaero&amp;DownloadId=28497" alt="demoapp2.png" title="demoapp2.png" /&gt;&lt;br /&gt;The demo applications shows off some of the native Vista controls and the Glass sheet effect.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=windowsformsaero&amp;DownloadId=23904" alt="taskdialogs.png" title="taskdialogs.png" /&gt;&lt;br /&gt;An example of a rather complex Task Dialog. The library includes a complete implementation of the Task dialog API, including task dialog navigation, events and animation.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=windowsformsaero&amp;DownloadId=76729" alt="HorizontalPanel.jpg" title="HorizontalPanel.jpg" /&gt;&lt;br /&gt;An example of using the HorizontalPanel and LabeledDivider to create a Windows 7 style form (minus the IE like controls at the top).&lt;br /&gt;&lt;br /&gt;For more information about the new controls that are available in Windows Vista, take a look at &lt;a href="http://msdn2.microsoft.com/en-us/library/aa511456.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/aa511456.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h2&gt;Documentation and Samples&lt;/h2&gt;The complete documentation is currently &lt;i&gt;work in progress&lt;/i&gt;.&lt;br /&gt;&lt;a href="http://windowsformsaero.codeplex.com/Wiki/View.aspx?title=Documentation"&gt;Documentation&lt;/a&gt;&lt;br /&gt;&lt;a href="http://windowsformsaero.codeplex.com/Wiki/View.aspx?title=Samples"&gt;Samples&lt;/a&gt;&lt;br /&gt;
&lt;h2&gt;Applications using the library&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.codeplex.com/OnTopReplica" class="externalLink"&gt;OnTopReplica&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;, utility that allows you to clone a window and keep it &amp;quot;always on top&amp;quot;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>bpell</author><pubDate>Mon, 27 Jul 2009 17:03:01 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20090727050301P</guid></item><item><title>Updated Wiki: Home</title><link>http://windowsformsaero.codeplex.com/Wiki/View.aspx?title=Home&amp;version=15</link><description>&lt;div class="wikidoc"&gt;&lt;b&gt;Windows Forms Aero&lt;/b&gt; is a project started by &lt;b&gt;Marco Minerva&lt;/b&gt; on January 30th, 2007.&lt;br /&gt;&lt;br /&gt;This project aims to create a Windows Control Library that provides controls reproducing the appearance of Microsoft Aero graphic objects, like buttons and links with shield icon, textboxes with cue banner, etc.&lt;br /&gt;
&lt;h2&gt;System requirements&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Visual C# 2008 Express Edition&lt;/b&gt; or &lt;b&gt;Visual Studio 2008&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;A system running &lt;b&gt;Windows Vista&lt;/b&gt; operating system&lt;/li&gt;&lt;/ul&gt;

&lt;h2&gt;Contents&lt;/h2&gt;The &lt;a href="http://windowsformsaero.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=11119"&gt;current version&lt;/a&gt; contains several native Vista controls (such as Buttons, Combo boxes with cue banner, Command links, native List views, Progress bars, explorer-like TreeView...) and some modules that empower the user to exploit some of Vista's advanced GUI features (&lt;i&gt;Glass sheet&lt;/i&gt; effect, text on glass, live thumbnails and the new Task dialogs).&lt;br /&gt;The intellisense documentation file is now available as well.&lt;br /&gt;
&lt;h2&gt;Screenshots&lt;/h2&gt;&lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=windowsformsaero&amp;DownloadId=28497" alt="demoapp2.png" title="demoapp2.png" /&gt;&lt;br /&gt;The demo applications shows off some of the native Vista controls and the Glass sheet effect.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=windowsformsaero&amp;DownloadId=23904" alt="taskdialogs.png" title="taskdialogs.png" /&gt;&lt;br /&gt;An example of a rather complex Task Dialog. The library includes a complete implementation of the Task dialog API, including task dialog navigation, events and animation.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://i3.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=windowsformsaero&amp;DownloadId=76729" alt="HorizontalPanel.jpg" title="HorizontalPanel.jpg" /&gt;&lt;br /&gt;An example of using the HorizontalPanel and LabeledDivider to create a Windows 7 style form (minus the IE like controls at the top).&lt;br /&gt;&lt;br /&gt;For more information about the new controls that are available in Windows Vista, take a look at &lt;a href="http://msdn2.microsoft.com/en-us/library/aa511456.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/aa511456.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h2&gt;Documentation and Samples&lt;/h2&gt;The complete documentation is currently &lt;i&gt;work in progress&lt;/i&gt;.&lt;br /&gt;&lt;a href="http://windowsformsaero.codeplex.com/Wiki/View.aspx?title=Documentation"&gt;Documentation&lt;/a&gt;&lt;br /&gt;&lt;a href="http://windowsformsaero.codeplex.com/Wiki/View.aspx?title=Samples"&gt;Samples&lt;/a&gt;&lt;br /&gt;
&lt;h2&gt;Applications using the library&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.codeplex.com/OnTopReplica" class="externalLink"&gt;OnTopReplica&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;, utility that allows you to clone a window and keep it &amp;quot;always on top&amp;quot;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>bpell</author><pubDate>Sun, 26 Jul 2009 19:13:49 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20090726071349P</guid></item><item><title>UPDATED WIKI: V2_Preview</title><link>http://www.codeplex.com/windowsformsaero/Wiki/View.aspx?title=V2_Preview&amp;version=2</link><description>&lt;div class="wikidoc"&gt;
Lo and behold! &lt;br /&gt; &lt;br /&gt;- TabStrip &amp;amp; AeroTabControl&lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=windowsformsaero&amp;amp;DownloadId=34041" alt="rtl.png" /&gt;&lt;br /&gt; &lt;br /&gt;- DataTip control&lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=windowsformsaero&amp;amp;DownloadId=34040" alt="datatip.png" /&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>jachymko</author><pubDate>Fri, 09 May 2008 02:06:12 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: V2_Preview 20080509020612A</guid></item><item><title>UPDATED WIKI: V2_Preview</title><link>http://www.codeplex.com/windowsformsaero/Wiki/View.aspx?title=V2_Preview&amp;version=1</link><description>&lt;div class="wikidoc"&gt;
Lo and behold! &lt;br /&gt; &lt;br /&gt;- TabStrip &amp;amp; AeroTabControl (IMG TBD)&lt;br /&gt; &lt;br /&gt;- DataTip control (IMG TBD)&lt;br /&gt;
&lt;/div&gt;</description><author>jachymko</author><pubDate>Fri, 09 May 2008 02:04:01 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: V2_Preview 20080509020401A</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/windowsformsaero/Wiki/View.aspx?title=Home&amp;version=14</link><description>&lt;div class="wikidoc"&gt;
&lt;b&gt;Windows Forms Aero&lt;/b&gt; is a project started by &lt;b&gt;Marco Minerva&lt;/b&gt; on January 30th, 2007.&lt;br /&gt; &lt;br /&gt;This project aims to create a Windows Control Library that provides controls reproducing the appearance of Microsoft Aero graphic objects, like buttons and links with shield icon, textboxes with cue banner, etc.
&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
System requirements
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Visual C# 2008 Express Edition&lt;/b&gt; or &lt;b&gt;Visual Studio 2008&lt;/b&gt;&lt;/li&gt;&lt;li&gt;A system running &lt;b&gt;Windows Vista&lt;/b&gt; operating system&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Contents
&lt;/h2&gt;The &lt;a href="http://www.codeplex.com/windowsformsaero/Release/ProjectReleases.aspx?ReleaseId=11119"&gt;current version&lt;/a&gt; contains several native Vista controls (such as Buttons, Combo boxes with cue banner, Command links, native List views, Progress bars, explorer-like TreeView...) and some modules that empower the user to exploit some of Vista's advanced GUI features (&lt;i&gt;Glass sheet&lt;/i&gt; effect, text on glass, live thumbnails and the new Task dialogs).&lt;br /&gt;The intellisense documentation file is now available as well.&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Screenshots
&lt;/h2&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=windowsformsaero&amp;amp;DownloadId=28497" alt="demoapp2.png" /&gt;&lt;br /&gt;The demo applications shows off some of the native Vista controls and the Glass sheet effect.&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=windowsformsaero&amp;amp;DownloadId=23904" alt="taskdialogs.png" /&gt;&lt;br /&gt;An example of a rather complex Task Dialog. The library includes a complete implementation of the Task dialog API, including task dialog navigation, events and animation.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;For more information about the new controls that are available in Windows Vista, take a look at &lt;a href="http://msdn2.microsoft.com/en-us/library/aa511456.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/aa511456.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Documentation and Samples
&lt;/h2&gt;The complete documentation is currently &lt;i&gt;work in progress&lt;/i&gt;.&lt;br /&gt;&lt;a href="http://www.codeplex.com/windowsformsaero/Wiki/View.aspx?title=Documentation&amp;amp;referringTitle=Home"&gt;Documentation&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.codeplex.com/windowsformsaero/Wiki/View.aspx?title=Samples&amp;amp;referringTitle=Home"&gt;Samples&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Applications using the library
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.codeplex.com/OnTopReplica" class="externalLink"&gt;OnTopReplica&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;, utility that allows you to clone a window and keep it &amp;quot;always on top&amp;quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description><author>marcom</author><pubDate>Mon, 21 Apr 2008 13:52:32 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20080421015232P</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/vistacontrols/Wiki/View.aspx?title=Home&amp;version=13</link><description>&lt;div class="wikidoc"&gt;
&lt;b&gt;Windows Vista Controls for .NET 2.0&lt;/b&gt; is a project started by &lt;b&gt;Marco Minerva&lt;/b&gt; on January 30th, 2007.&lt;br /&gt; &lt;br /&gt;This project aims to create a Windows Control Library that provides controls reproducing the appearance of Windows Vista objects, like buttons and links with shield icon, textboxes with cue banner, etc.
&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
System requirements
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Visual C# 2008 Express Edition&lt;/b&gt; or &lt;b&gt;Visual Studio 2008&lt;/b&gt;&lt;/li&gt;&lt;li&gt;A system running &lt;b&gt;Windows Vista&lt;/b&gt; operating system&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Contents
&lt;/h2&gt;The &lt;a href="http://www.codeplex.com/vistacontrols/Release/ProjectReleases.aspx?ReleaseId=11119"&gt;current version&lt;/a&gt; contains several native Vista controls (such as Buttons, Combo boxes with cue banner, Command links, native List views, Progress bars, explorer-like TreeView...) and some modules that empower the user to exploit some of Vista's advanced GUI features (&lt;i&gt;Glass sheet&lt;/i&gt; effect, text on glass, live thumbnails and the new Task dialogs).&lt;br /&gt;The intellisense documentation file is now available as well.&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Screenshots
&lt;/h2&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28497" alt="demoapp2.png" /&gt;&lt;br /&gt;The demo applications shows off some of the native Vista controls and the Glass sheet effect.&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=23904" alt="taskdialogs.png" /&gt;&lt;br /&gt;An example of a rather complex Task Dialog. The library includes a complete implementation of the Task dialog API, including task dialog navigation, events and animation.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;For more information about the new controls that are available in Windows Vista, take a look at &lt;a href="http://msdn2.microsoft.com/en-us/library/aa511456.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/aa511456.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Documentation and Samples
&lt;/h2&gt;The complete documentation is currently &lt;i&gt;work in progress&lt;/i&gt;.&lt;br /&gt;&lt;a href="http://www.codeplex.com/vistacontrols/Wiki/View.aspx?title=Documentation&amp;amp;referringTitle=Home"&gt;Documentation&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.codeplex.com/vistacontrols/Wiki/View.aspx?title=Samples&amp;amp;referringTitle=Home"&gt;Samples&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Applications using the library
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.codeplex.com/OnTopReplica" class="externalLink"&gt;OnTopReplica&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;, utility that allows you to clone a window and keep it &amp;quot;always on top&amp;quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description><author>Lck</author><pubDate>Thu, 28 Feb 2008 23:01:29 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20080228110129P</guid></item><item><title>UPDATED WIKI: Home</title><link>http://www.codeplex.com/vistacontrols/Wiki/View.aspx?title=Home&amp;version=12</link><description>&lt;div class="wikidoc"&gt;
&lt;b&gt;Windows Vista Controls for .NET 2.0&lt;/b&gt; is a project started by &lt;b&gt;Marco Minerva&lt;/b&gt; on January 30th, 2007.&lt;br /&gt; &lt;br /&gt;This project aims to create a Windows Control Library that provides controls reproducing the appearance of Windows Vista objects, like buttons and links with shield icon, textboxes with cue banner, etc.
&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
System requirements
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Visual C# 2008 Express Edition&lt;/b&gt; or &lt;b&gt;Visual Studio 2008&lt;/b&gt;&lt;/li&gt;&lt;li&gt;A system running &lt;b&gt;Windows Vista&lt;/b&gt; operating system&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
Contents
&lt;/h2&gt;The &lt;a href="http://www.codeplex.com/vistacontrols/Release/ProjectReleases.aspx?ReleaseId=11119"&gt;current version&lt;/a&gt; contains several native Vista controls (such as Buttons, Combo boxes with cue banner, Command links, native List views, Progress bars, explorer-like TreeView...) and some modules that empower the user to exploit some of Vista's advanced GUI features (&lt;i&gt;Glass sheet&lt;/i&gt; effect, text on glass, live thumbnails and the new Task dialogs).&lt;br /&gt;The intellisense documentation file is now available as well.&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Screenshots
&lt;/h2&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28497" alt="demoapp2.png" /&gt;&lt;br /&gt;The demo applications shows off some of the native Vista controls and the Glass sheet effect.&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=23904" alt="taskdialogs.png" /&gt;&lt;br /&gt;An example of a rather complex Task Dialog. The library includes a complete implementation of the Task dialog API, including task dialog navigation, events and animation.&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;For more information about the new controls that are available in Windows Vista, take a look at &lt;a href="http://msdn2.microsoft.com/en-us/library/aa511456.aspx" class="externalLink"&gt;http://msdn2.microsoft.com/en-us/library/aa511456.aspx&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Documentation and Samples
&lt;/h2&gt;The complete documentation is currently &lt;i&gt;work in progress&lt;/i&gt;.&lt;br /&gt;&lt;a href="http://www.codeplex.com/vistacontrols/Wiki/View.aspx?title=Documentation&amp;amp;referringTitle=Home"&gt;Documentation&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.codeplex.com/vistacontrols/Wiki/View.aspx?title=Samples&amp;amp;referringTitle=Home"&gt;Samples&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Applications using the library
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="http://www.codeplex.com/OnTopReplica" class="externalLink"&gt;OnTopReplica&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;, utility that allows you to clone a window and keep it &amp;quot;always on top&amp;quot;&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;span class="unresolved"&gt;Cannot resolve link: &lt;/span&gt;[image:http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.codeplex.com%2fvistacontrols&amp;bgcolor=009900]&lt;br /&gt;
&lt;/div&gt;</description><author>Lck</author><pubDate>Thu, 28 Feb 2008 23:00:05 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Home 20080228110005P</guid></item><item><title>UPDATED WIKI: Task Dialogs</title><link>http://www.codeplex.com/vistacontrols/Wiki/View.aspx?title=Task Dialogs&amp;version=6</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;
Task Dialogs
&lt;/h1&gt;Task Dialogs are Windows Vista's alternative to the classic Message Box (&lt;i&gt;System.Windows.Forms.MessageBox&lt;/i&gt; on .NET) which has been used from times immemorial to notify the users about errors, status changes and to prompt for action. Task Dialogs have a much better looking interface and have many more interaction possibilities (customizable text buttons, radio buttons, progress bars, and so on...).&lt;br /&gt; &lt;br /&gt;To get a full guide about Task Dialogs, refer to these MSDN pages:&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/bb760441(VS.85).aspx" class="externalLink"&gt;Task Dialog Overview&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Guidelines for using Task Dialogs in&lt;/li&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa511267.aspx" class="externalLink"&gt;Error messages&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa511263.aspx" class="externalLink"&gt;Warning messages&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa511273.aspx" class="externalLink"&gt;Confirmation messages&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
TaskDialog static methods
&lt;/h2&gt;The &lt;i&gt;TaskDialog&lt;/i&gt; class has been designed to be used exactly as you used MessageBox on standard WinForms applications. The class exposes a set of common static methods which allow you to define highly customizable dialogs without instancing any object and making a single function call:&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
Basic Task Dialogs
&lt;/h3&gt;The simplest TaskDialog call takes a single parameter:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
TaskDialog.Show(&amp;quot;Instruction&amp;quot;);
&lt;/pre&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28671" alt="taskdialog1.png" /&gt;&lt;br /&gt; &lt;br /&gt;You can further customize your dialog with a custom title and verbose instructions:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
TaskDialog.Show(&amp;quot;Instruction&amp;quot;, &amp;quot;My Task Dialog&amp;quot;, &amp;quot;Verbose instructions.&amp;quot;);
&lt;/pre&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28672" alt="taskdialog2.png" /&gt;&lt;br /&gt; &lt;br /&gt;The buttons that appear on the task dialog can be customized by providing one or more elements of the &lt;i&gt;TaskDialogButton&lt;/i&gt; enumeration. Valid values are:&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;OK&lt;/li&gt;&lt;li&gt;Cancel&lt;/li&gt;&lt;li&gt;Yes&lt;/li&gt;&lt;li&gt;No&lt;/li&gt;&lt;li&gt;Close&lt;/li&gt;&lt;li&gt;Retry&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;pre&gt;
TaskDialog.Show(&amp;quot;Instruction&amp;quot;, &amp;quot;My Task Dialog&amp;quot;, &amp;quot;Verbose instructions.&amp;quot;, TaskDialogButton.Retry | TaskDialogButton.Cancel);
&lt;/pre&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28673" alt="taskdialog3.png" /&gt;&lt;br /&gt; &lt;br /&gt;Like with &lt;i&gt;MessageBox&lt;/i&gt;, you may customize the dialog's icon. All new Vista icons are included: from the classic Information and Warning, to the new Security warnings.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
TaskDialog.Show(&amp;quot;Instruction&amp;quot;, &amp;quot;My Task Dialog&amp;quot;, &amp;quot;Verbose instructions.&amp;quot;, TaskDialogButton.Retry | TaskDialogButton.Cancel, TaskDialogIcon.Information);
&lt;/pre&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Information: &lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28674" alt="taskdialog4.png" /&gt;&lt;/li&gt;&lt;li&gt;Stop&lt;/li&gt;&lt;li&gt;Warning&lt;/li&gt;&lt;li&gt;SecurityError: &lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28675" alt="taskdialog5.png" /&gt;&lt;/li&gt;&lt;li&gt;SecurityWarning: &lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28676" alt="taskdialog6.png" /&gt;&lt;/li&gt;&lt;li&gt;SecuritySuccess: &lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28677" alt="taskdialog7.png" /&gt;&lt;/li&gt;&lt;li&gt;SecurityShield&lt;/li&gt;&lt;li&gt;SecurityShieldGray&lt;/li&gt;&lt;li&gt;SecurityShieldBlue&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h3&gt;
Results
&lt;/h3&gt;The static TaskDialog methods return results as a value of the &lt;i&gt;Result&lt;/i&gt; enumeration. It may assume the following values (some values have no corresponding &lt;i&gt;TaskDialogButton&lt;/i&gt; value and cannot be used via static method):&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;None&lt;/li&gt;&lt;li&gt;OK&lt;/li&gt;&lt;li&gt;Cancel&lt;/li&gt;&lt;li&gt;Abort&lt;/li&gt;&lt;li&gt;Retry&lt;/li&gt;&lt;li&gt;Ignore&lt;/li&gt;&lt;li&gt;Yes&lt;/li&gt;&lt;li&gt;No&lt;/li&gt;&lt;li&gt;Close&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
TaskDialog instances
&lt;/h2&gt;To really exploit the power of Vista's Task Dialog library, you'll need to instance a &lt;i&gt;TaskDialog&lt;/i&gt; object and customize it.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
Creating an instance
&lt;/h3&gt;The interface for creating an instance is identical to that of the static methods: you can define an instruction, a title, some content, icons and common buttons.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
TaskDialog dlg = new TaskDialog(&amp;quot;Instruction&amp;quot;, &amp;quot;Title&amp;quot;, &amp;quot;Verbose instruction.&amp;quot;, TaskDialogButton.Cancel, TaskDialogIcon.Warning);
Results results = dlg.Show(this.Handle);
 
if(results.CommonButton == Result.Cancel)
	//...
else
	//...
&lt;/pre&gt; &lt;br /&gt;But using this slightly less practical approach, you can define many other parameters and access the complete results set of the dialog.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
Setting Properties
&lt;/h3&gt; &lt;br /&gt;&lt;h4&gt;
AllowDialogCancellation
&lt;/h4&gt;Setting this property to &lt;i&gt;true&lt;/i&gt; (default) allows the used to cancel the dialog even if no &lt;i&gt;Cancel&lt;/i&gt; button has been added by you (by clicking ESC or the red &lt;i&gt;X&lt;/i&gt;). If you set it to &lt;i&gt;false&lt;/i&gt;, you prevent the user from canceling the dialog and force him/her to select one of the buttons.&lt;br /&gt; &lt;br /&gt;Please note that if a button with the &lt;i&gt;Cancel&lt;/i&gt; value is present, this property will be ignored and the user will be allowed to close the dialog as usual.&lt;br /&gt; &lt;br /&gt;A dialog with this property set to &lt;i&gt;true&lt;/i&gt; and without &lt;i&gt;Cancel&lt;/i&gt; buttons:&lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28684" alt="taskdialog_nocancel.png" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
CanBeMinimized
&lt;/h4&gt;If this property is &lt;i&gt;true&lt;/i&gt; and the Task dialog is shown &lt;b&gt;wihtout&lt;/b&gt; a parent handle, the user may minimize the dialog. Notice that the task dialog will be &lt;i&gt;modal&lt;/i&gt; nonetheless.&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28685" alt="taskdialog_minimize.png" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Expanded information
&lt;/h4&gt;Task Dialogs can display more information on request by the user. This is done by clicking on a special control which will trigger the vertical expansion of the dialog and make place for more text (which can be initially hidden or shown).&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
dlg.ExpandedInformation = &amp;quot;Expanded information.&amp;quot;;
dlg.CollapsedControlText = &amp;quot;Collapsed control text&amp;quot;;
dlg.ExpandedControlText = &amp;quot;Expanded control text&amp;quot;;
dlg.IsExpanded = false;
dlg.ShowExpandedInfoInFooter = false;
&lt;/pre&gt; &lt;br /&gt;&lt;i&gt;ExpandedInformation&lt;/i&gt; is the actual text which will be displayed in the expanding section. &lt;i&gt;CollapsedControlText&lt;/i&gt; and &lt;i&gt;ExpandedControlText&lt;/i&gt; are optional and set the text of the button on the dialog bottom. The &lt;i&gt;IsExpanded&lt;/i&gt; property (default &lt;i&gt;false&lt;/i&gt;) allows you to define whether the expanded text is initially visible or not.&lt;br /&gt;&lt;i&gt;ShowExpandedInfoInFooter&lt;/i&gt; sets whether you'd like the information displayed just below the dialog's content or on the bottom of the dialog.&lt;br /&gt; &lt;br /&gt;Not expanded:&lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28686" alt="taskdialog_expand1.png" /&gt;&lt;br /&gt;Expanded:&lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28687" alt="taskdialog_expand2.png" /&gt;&lt;br /&gt;Expanded on footer:&lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28688" alt="taskdialog_expand3.png" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Common properties
&lt;/h4&gt;The same information that can be set through the constructor can be set individually through properties:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
dlg.Title = &amp;quot;Title&amp;quot;;
dlg.Instruction = &amp;quot;Instruction&amp;quot;;
dlg.Content = &amp;quot;Content.&amp;quot;;
dlg.CommonButtons = TaskDialogButton.OK | TaskDialogButton.Cancel; ;
dlg.CommonIcon = TaskDialogIcon.Information;
&lt;/pre&gt; &lt;br /&gt;&lt;h4&gt;
Custom icon
&lt;/h4&gt;Instead of using one of the common icons, you can easily set a custom icon to be displayed by your task dialog.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
dlg.CustomIcon = new Icon(&amp;quot;myicon.ico&amp;quot;);
&lt;/pre&gt; &lt;br /&gt;The icon can be any instance of &lt;i&gt;System.Drawing.Icon&lt;/i&gt;.&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Footer
&lt;/h4&gt;The footer of a Task dialog is a gray area below the buttons that can optionally contain some information and a common (or a custom) icon. Custom icons can simply be provided as a standard &lt;i&gt;System.Drawing.Icon&lt;/i&gt; instance.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
dlg.Footer = &amp;quot;Footer info.&amp;quot;;
dlg.FooterCommonIcon = TaskDialogIcon.SecurityError;
dlg.FooterCustomIcon = new Icon(&amp;quot;myicon.ico&amp;quot;);
&lt;/pre&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28690" alt="taskdialog_footer.png" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Verification checkbox
&lt;/h4&gt;Task dialog's allow you to add a single &amp;quot;verification&amp;quot; checkbox with custom text and set its state.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
dlg.VerificationText = &amp;quot;Verification&amp;quot;;
dlg.IsVerificationChecked = true;
&lt;/pre&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28691" alt="taskdialog_verification.png" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Custom buttons
&lt;/h4&gt;As shown before, you can freely use and mix the common buttons provided by the Task dialog class. One of the most powerful aspects of the library though, is given by the possibility of defining your own buttons with custom return codes and custom text. These custom buttons can be set very easily using the &lt;i&gt;CustomButtons&lt;/i&gt; property:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
dlg.CustomButtons = new CustomButton[] {
	new CustomButton(100, &amp;quot;Button 100&amp;quot;),
	new CustomButton(Result.Cancel, &amp;quot;Custom cancel&amp;quot;)
};
&lt;/pre&gt; &lt;br /&gt;As you can see, custom buttons are created by instancing objects from the &lt;i&gt;CustomButton&lt;/i&gt; class. Each button can have an own text string and a return code (which may be a common code from the &lt;i&gt;Result&lt;/i&gt; enumeration or a free integer value - just notice that values less than 9 are reserved by common buttons and may cause collisions).&lt;br /&gt; &lt;br /&gt;Also note that you can mix common and custom buttons, like in the following task dialog:&lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28692" alt="taskdialog_custombutton.png" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Command links
&lt;/h4&gt;Task dialogs can obviously use Vista's brand new &amp;quot;Command Link&amp;quot; buttons instead of the more classic styled buttons on the bottom of the window. &lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
dlg.CustomButtons = new CustomButton[] {
	new CustomButton(100, &amp;quot;Button 1&amp;quot;),
	new CustomButton(Result.Cancel, &amp;quot;Button 2\nDescription note.&amp;quot;)
};
 
dlg.UseCommandLinks = true;
&lt;/pre&gt; &lt;br /&gt;Note that when using command links you &lt;b&gt;must define at least one custom button&lt;/b&gt; or the &lt;i&gt;Show()&lt;/i&gt; call will raise an exception. You can also define a description note for the command link by inserting a '\n' newline code in the button text.&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28693" alt="taskdialog_commandlink.png" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Radio buttons
&lt;/h4&gt;Task dialogs not only allow you to define custom buttons, you may also add a set of radio buttons to your dialog. This is done by setting the &lt;i&gt;RadioButtons&lt;/i&gt; property with an array of &lt;i&gt;CustomButton&lt;/i&gt; instances.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
dlg.RadioButtons = new CustomButton[] {
	new CustomButton(1, &amp;quot;Radio button 1&amp;quot;),
	new CustomButton(2, &amp;quot;Radio button 2&amp;quot;),
	new CustomButton(3, &amp;quot;Radio button 3&amp;quot;)
};
dlg.EnabledRadioButton = 2;
dlg.NoDefaultRadioButton = false;
&lt;/pre&gt; &lt;br /&gt;&lt;i&gt;EnabledRadioButton&lt;/i&gt; sets the ID of the radio button that will be selected automatically when the dialog is opened. If you do not provide any default enabled radio button, Windows will automatically select the first one of the list. You can override this behavour by setting &lt;i&gt;NoDefaultRadioButton&lt;/i&gt; to &lt;i&gt;true&lt;/i&gt;.&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28694" alt="taskdialog_radio.png" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
IsShowing
&lt;/h4&gt;&lt;i&gt;IsShowing&lt;/i&gt; is a read-only property that returns &lt;i&gt;true&lt;/i&gt; if the dialog is currently showing and &lt;i&gt;false&lt;/i&gt; otherwise. This can be useful if you define event handlers for your task dialog.&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
PositionRelativeToWindow
&lt;/h4&gt;By default, task dialogs are centered on the screen on which they are displayed. If you set this property to &lt;i&gt;true&lt;/i&gt;, the dialog will be placed centered on its parent window (you &lt;b&gt;must&lt;/b&gt; supply a handle to the parent window in the &lt;i&gt;Show()&lt;/i&gt; call).&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Progress bars
&lt;/h4&gt;Task dialogs can optionally contain a progress bar indicating the progress of an action (check out the section of this page about events and ticks to find out how to update the progress bar).&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
dlg.ShowProgressBar = true;
dlg.ProgressBarState = VistaControls.ProgressBar.States.Paused;
dlg.ProgressBarMinRange = 0;
dlg.ProgressBarMaxRange = 100;
dlg.ProgressBarPosition = 50;
dlg.ShowMarqueeProgressBar = true;
&lt;/pre&gt; &lt;br /&gt;The property &lt;i&gt;ProgressBarState&lt;/i&gt; sets the color and the state of the progress bar (normal, paused/yellow and error/red), &lt;i&gt;MaxRange&lt;/i&gt;, &lt;i&gt;MinRange&lt;/i&gt; and &lt;i&gt;Position&lt;/i&gt; set the numeric range of the progress bar and the current position. &lt;i&gt;ShowMarqueeProgressBar&lt;/i&gt; enables a particular state of the progress bar that expresses activity but does not indicate what proportion of the task is complete.&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28699" alt="taskdialog_progressbar.png" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
Events and Timing
&lt;/h3&gt; &lt;br /&gt;&lt;h4&gt;
ButtonClick
&lt;/h4&gt;This event is raised as soon as the user clicks on any button of the dialog. The EventArgs class contains the ID of the button and a bool value that allows you to prevent the dialog from closing automatically after the click.&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Construction and destruction events
&lt;/h4&gt;Task dialogs raise two events: &lt;i&gt;Constructed&lt;/i&gt;, which is sent first, and &lt;i&gt;Created&lt;/i&gt; which is sent just before the dialog is shown.&lt;br /&gt; &lt;br /&gt;After being destroyed, the &lt;i&gt;Destroyed&lt;/i&gt; event is raised and means that the handle of the dialog isn't valid anymore.&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Expanding
&lt;/h4&gt;This event is raised just before the dialog is expanded or collapsed. The EventArgs class contains a bool value indicating whether the dialog is switching to the expanded state or not.&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Help
&lt;/h4&gt;Is raised when the user requests help (for instance with the F1 key).&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Hyperlinks
&lt;/h4&gt;In task dialogs you can add a hyperlink to the content, which will be displayed underlined and in blue color. When the user clicks one of these hyperlinks, the &lt;i&gt;HyperlinkClick&lt;/i&gt; event is raised, containing the clicked URL. In order to enable this feature, you must set the &lt;i&gt;EnableHyperlinks&lt;/i&gt; property to true:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
dlg.EnableHyperlinks = true;
dlg.Content = &amp;quot;This is content. This is a &amp;lt;a href=\&amp;quot;link\&amp;quot;&amp;gt;hyperlink&amp;lt;/a&amp;gt;.&amp;quot;;
&lt;/pre&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28703" alt="taskdialog_hyperlink.png" /&gt;&lt;br /&gt; &lt;br /&gt;In this case, a click on &amp;quot;hyperlink&amp;quot; will raise the &lt;i&gt;HyperlinkClick&lt;/i&gt; event with the Url property set to &amp;quot;link&amp;quot;.&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Navigating
&lt;/h4&gt;Is raised when the dialog &lt;i&gt;navigates&lt;/i&gt; from one page to another. See Navigation section.&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
RadioButtonClick
&lt;/h4&gt;Is similar to the ButtonClick, except that since the dialog will not automatically close after the click, the &lt;i&gt;PreventClosing&lt;/i&gt; property of the EventArgs class has no effect.&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Ticking
&lt;/h4&gt;In order to allow you to update the dialog's contents in real-time (for instance progress bars), task dialogs provide a &amp;quot;ticking&amp;quot; interface which will call a delegate defined by you at 200ms intervals. In order to enable this callback, you must set the &lt;i&gt;EnableCallbackTimer&lt;/i&gt; property to &lt;i&gt;true&lt;/i&gt;.&lt;br /&gt; &lt;br /&gt;The &lt;i&gt;Tick&lt;/i&gt; event will be raised periodically with an EventArgs class containing the current count of &amp;quot;ticks&amp;quot; which have passed (in milliseconds) and an optional &lt;i&gt;ResetCount&lt;/i&gt; property that, if set to &lt;i&gt;true&lt;/i&gt;, will reset the count on the next call.&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
VerificationClick
&lt;/h4&gt;Is raised when the user clicks on the verification checkbox. The EventArgs class tells whether the checkbox is now checked or not.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
Calling methods on buttons
&lt;/h3&gt;The task dialog interface provides several different ways to change the appearance and behavior of buttons. The following methods give you additional ways to change how your dialog looks and operates.&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
EnableButton
&lt;/h4&gt;Takes the ID of the button you want to change and a bool that allows you to disable (or enable) the button.&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
EnableRadioButton
&lt;/h4&gt;Takes the ID of the radio button and a bool that allows you to disable (or enable) the button.&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
SetShieldButton
&lt;/h4&gt;Takes the ID of the button and a bool indicating whether to add or remove the UAC shield icon. This works for common buttons, custom buttons and command links, but not for radio buttons.&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Click simulation
&lt;/h4&gt;The methods &lt;i&gt;SimulateButtonClick()&lt;/i&gt;, &lt;i&gt;SimulateRadioButtonClick()&lt;/i&gt; and &lt;i&gt;SimulateVerificationClick()&lt;/i&gt; allow you to inject virtual clicks on any button of the dialog at runtime. This can be used to change the state when reacting to events.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
Navigation
&lt;/h3&gt;One of the most complex aspects of Task dialogs, is that you can &amp;quot;navigate&amp;quot; from one to another. The Windows Vista Controls implementation simplifies everything to a single method call:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
TaskDialog firstDialog; //instance has been created and is currently showing
 
TaskDialog secondDialog = new TaskDialog(&amp;quot;New Task Dialog&amp;quot;);
 
firstDialog.Navigate(secondDialog);
&lt;/pre&gt; &lt;br /&gt;This will cause the first dialog to fade out, &lt;i&gt;transform&lt;/i&gt; into the second dialog and then fade in again. You don't have to call &lt;i&gt;Show()&lt;/i&gt; again on the second dialog and must not keep its reference: just keep the original task dialog reference (&lt;i&gt;firstDialog&lt;/i&gt; in the sample above). All delegates registered on the dialog's events will be kept and be called correctly.&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Fallback for previous Windows versions
&lt;/h2&gt;The Windows Vista Controls library does &lt;b&gt;not&lt;/b&gt; currently provide an automatic fallback for non-Vista versions of Windows, eventhough this may be implemented in future versions. You should always provide an alternative dialog to task dialogs and check if you can call the native version using the &lt;i&gt;VistaControls.OSSupport&lt;/i&gt; class provided by the library.&lt;br /&gt;
&lt;/div&gt;</description><author>Lck</author><pubDate>Thu, 28 Feb 2008 22:34:25 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Task Dialogs 20080228103425P</guid></item><item><title>UPDATED WIKI: Task Dialogs</title><link>http://www.codeplex.com/vistacontrols/Wiki/View.aspx?title=Task Dialogs&amp;version=5</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;
Task Dialogs
&lt;/h1&gt;Task Dialogs are Windows Vista's alternative to the classic Message Box (&lt;i&gt;System.Windows.Forms.MessageBox&lt;/i&gt; on .NET) which has been used from times immemorial to notify the users about errors, status changes and to prompt for action. Task Dialogs have a much better looking interface and have many more interaction possibilities (customizable text buttons, radio buttons, progress bars, and so on...).&lt;br /&gt; &lt;br /&gt;To get a full guide about Task Dialogs, refer to these MSDN pages:&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/bb760441(VS.85).aspx" class="externalLink"&gt;Task Dialog Overview&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Guidelines for using Task Dialogs in&lt;/li&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa511267.aspx" class="externalLink"&gt;Error messages&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa511263.aspx" class="externalLink"&gt;Warning messages&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa511273.aspx" class="externalLink"&gt;Confirmation messages&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
TaskDialog static methods
&lt;/h2&gt;The &lt;i&gt;TaskDialog&lt;/i&gt; class has been designed to be used exactly as you used MessageBox on standard WinForms applications. The class exposes a set of common static methods which allow you to define highly customizable dialogs without instancing any object and making a single function call:&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
Basic Task Dialogs
&lt;/h3&gt;The simplest TaskDialog call takes a single parameter:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
TaskDialog.Show(&amp;quot;Instruction&amp;quot;);
&lt;/pre&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28671" alt="taskdialog1.png" /&gt;&lt;br /&gt; &lt;br /&gt;You can further customize your dialog with a custom title and verbose instructions:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
TaskDialog.Show(&amp;quot;Instruction&amp;quot;, &amp;quot;My Task Dialog&amp;quot;, &amp;quot;Verbose instructions.&amp;quot;);
&lt;/pre&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28672" alt="taskdialog2.png" /&gt;&lt;br /&gt; &lt;br /&gt;The buttons that appear on the task dialog can be customized by providing one or more elements of the &lt;i&gt;TaskDialogButton&lt;/i&gt; enumeration. Valid values are:&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;OK&lt;/li&gt;&lt;li&gt;Cancel&lt;/li&gt;&lt;li&gt;Yes&lt;/li&gt;&lt;li&gt;No&lt;/li&gt;&lt;li&gt;Close&lt;/li&gt;&lt;li&gt;Retry&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;pre&gt;
TaskDialog.Show(&amp;quot;Instruction&amp;quot;, &amp;quot;My Task Dialog&amp;quot;, &amp;quot;Verbose instructions.&amp;quot;, TaskDialogButton.Retry | TaskDialogButton.Cancel);
&lt;/pre&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28673" alt="taskdialog3.png" /&gt;&lt;br /&gt; &lt;br /&gt;Like with &lt;i&gt;MessageBox&lt;/i&gt;, you may customize the dialog's icon. All new Vista icons are included: from the classic Information and Warning, to the new Security warnings.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
TaskDialog.Show(&amp;quot;Instruction&amp;quot;, &amp;quot;My Task Dialog&amp;quot;, &amp;quot;Verbose instructions.&amp;quot;, TaskDialogButton.Retry | TaskDialogButton.Cancel, TaskDialogIcon.Information);
&lt;/pre&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Information: &lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28674" alt="taskdialog4.png" /&gt;&lt;/li&gt;&lt;li&gt;Stop&lt;/li&gt;&lt;li&gt;Warning&lt;/li&gt;&lt;li&gt;SecurityError: &lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28675" alt="taskdialog5.png" /&gt;&lt;/li&gt;&lt;li&gt;SecurityWarning: &lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28676" alt="taskdialog6.png" /&gt;&lt;/li&gt;&lt;li&gt;SecuritySuccess: &lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28677" alt="taskdialog7.png" /&gt;&lt;/li&gt;&lt;li&gt;SecurityShield&lt;/li&gt;&lt;li&gt;SecurityShieldGray&lt;/li&gt;&lt;li&gt;SecurityShieldBlue&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h3&gt;
Results
&lt;/h3&gt;The static TaskDialog methods return results as a value of the &lt;i&gt;Result&lt;/i&gt; enumeration. It may assume the following values (some values have no corresponding &lt;i&gt;TaskDialogButton&lt;/i&gt; value and cannot be used via static method):&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;None&lt;/li&gt;&lt;li&gt;OK&lt;/li&gt;&lt;li&gt;Cancel&lt;/li&gt;&lt;li&gt;Abort&lt;/li&gt;&lt;li&gt;Retry&lt;/li&gt;&lt;li&gt;Ignore&lt;/li&gt;&lt;li&gt;Yes&lt;/li&gt;&lt;li&gt;No&lt;/li&gt;&lt;li&gt;Close&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
TaskDialog instances
&lt;/h2&gt;To really exploit the power of Vista's Task Dialog library, you'll need to instance a &lt;i&gt;TaskDialog&lt;/i&gt; object and customize it.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
Creating an instance
&lt;/h3&gt;The interface for creating an instance is identical to that of the static methods: you can define an instruction, a title, some content, icons and common buttons.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
TaskDialog dlg = new TaskDialog(&amp;quot;Instruction&amp;quot;, &amp;quot;Title&amp;quot;, &amp;quot;Verbose instruction.&amp;quot;, TaskDialogButton.Cancel, TaskDialogIcon.Warning);
Results results = dlg.Show(this.Handle);
 
if(results.CommonButton == Result.Cancel)
	//...
else
	//...
&lt;/pre&gt; &lt;br /&gt;But using this slightly less practical approach, you can define many other parameters and access the complete results set of the dialog.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
Setting Properties
&lt;/h3&gt; &lt;br /&gt;&lt;h4&gt;
AllowDialogCancellation
&lt;/h4&gt;Setting this property to &lt;i&gt;true&lt;/i&gt; (default) allows the used to cancel the dialog even if no &lt;i&gt;Cancel&lt;/i&gt; button has been added by you (by clicking ESC or the red &lt;i&gt;X&lt;/i&gt;). If you set it to &lt;i&gt;false&lt;/i&gt;, you prevent the user from canceling the dialog and force him/her to select one of the buttons.&lt;br /&gt; &lt;br /&gt;Please note that if a button with the &lt;i&gt;Cancel&lt;/i&gt; value is present, this property will be ignored and the user will be allowed to close the dialog as usual.&lt;br /&gt; &lt;br /&gt;A dialog with this property set to &lt;i&gt;true&lt;/i&gt; and without &lt;i&gt;Cancel&lt;/i&gt; buttons:&lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28684" alt="taskdialog_nocancel.png" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
CanBeMinimized
&lt;/h4&gt;If this property is &lt;i&gt;true&lt;/i&gt; and the Task dialog is shown &lt;b&gt;wihtout&lt;/b&gt; a parent handle, the user may minimize the dialog. Notice that the task dialog will be &lt;i&gt;modal&lt;/i&gt; nonetheless.&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28685" alt="taskdialog_minimize.png" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Expanded information
&lt;/h4&gt;Task Dialogs can display more information on request by the user. This is done by clicking on a special control which will trigger the vertical expansion of the dialog and make place for more text (which can be initially hidden or shown).&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
dlg.ExpandedInformation = &amp;quot;Expanded information.&amp;quot;;
dlg.CollapsedControlText = &amp;quot;Collapsed control text&amp;quot;;
dlg.ExpandedControlText = &amp;quot;Expanded control text&amp;quot;;
dlg.IsExpanded = false;
dlg.ShowExpandedInfoInFooter = false;
&lt;/pre&gt; &lt;br /&gt;&lt;i&gt;ExpandedInformation&lt;/i&gt; is the actual text which will be displayed in the expanding section. &lt;i&gt;CollapsedControlText&lt;/i&gt; and &lt;i&gt;ExpandedControlText&lt;/i&gt; are optional and set the text of the button on the dialog bottom. The &lt;i&gt;IsExpanded&lt;/i&gt; property (default &lt;i&gt;false&lt;/i&gt;) allows you to define whether the expanded text is initially visible or not.&lt;br /&gt;&lt;i&gt;ShowExpandedInfoInFooter&lt;/i&gt; sets whether you'd like the information displayed just below the dialog's content or on the bottom of the dialog.&lt;br /&gt; &lt;br /&gt;Not expanded:&lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28686" alt="taskdialog_expand1.png" /&gt;&lt;br /&gt;Expanded:&lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28687" alt="taskdialog_expand2.png" /&gt;&lt;br /&gt;Expanded on footer:&lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28688" alt="taskdialog_expand3.png" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Common properties
&lt;/h4&gt;The same information that can be set through the constructor can be set individually through properties:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
dlg.Title = &amp;quot;Title&amp;quot;;
dlg.Instruction = &amp;quot;Instruction&amp;quot;;
dlg.Content = &amp;quot;Content.&amp;quot;;
dlg.CommonButtons = TaskDialogButton.OK | TaskDialogButton.Cancel; ;
dlg.CommonIcon = TaskDialogIcon.Information;
&lt;/pre&gt; &lt;br /&gt;&lt;h4&gt;
Custom icon
&lt;/h4&gt;Instead of using one of the common icons, you can easily set a custom icon to be displayed by your task dialog.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
dlg.CustomIcon = new Icon(&amp;quot;myicon.ico&amp;quot;);
&lt;/pre&gt; &lt;br /&gt;The icon can be any instance of &lt;i&gt;System.Drawing.Icon&lt;/i&gt;.&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Footer
&lt;/h4&gt;The footer of a Task dialog is a gray area below the buttons that can optionally contain some information and a common (or a custom) icon. Custom icons can simply be provided as a standard &lt;i&gt;System.Drawing.Icon&lt;/i&gt; instance.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
dlg.Footer = &amp;quot;Footer info.&amp;quot;;
dlg.FooterCommonIcon = TaskDialogIcon.SecurityError;
dlg.FooterCustomIcon = new Icon(&amp;quot;myicon.ico&amp;quot;);
&lt;/pre&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28690" alt="taskdialog_footer.png" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Verification checkbox
&lt;/h4&gt;Task dialog's allow you to add a single &amp;quot;verification&amp;quot; checkbox with custom text and set its state.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
dlg.VerificationText = &amp;quot;Verification&amp;quot;;
dlg.IsVerificationChecked = true;
&lt;/pre&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28691" alt="taskdialog_verification.png" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Custom buttons
&lt;/h4&gt;As shown before, you can freely use and mix the common buttons provided by the Task dialog class. One of the most powerful aspects of the library though, is given by the possibility of defining your own buttons with custom return codes and custom text. These custom buttons can be set very easily using the &lt;i&gt;CustomButtons&lt;/i&gt; property:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
dlg.CustomButtons = new CustomButton[] {
	new CustomButton(100, &amp;quot;Button 100&amp;quot;),
	new CustomButton(Result.Cancel, &amp;quot;Custom cancel&amp;quot;)
};
&lt;/pre&gt; &lt;br /&gt;As you can see, custom buttons are created by instancing objects from the &lt;i&gt;CustomButton&lt;/i&gt; class. Each button can have an own text string and a return code (which may be a common code from the &lt;i&gt;Result&lt;/i&gt; enumeration or a free integer value - just notice that values less than 9 are reserved by common buttons and may cause collisions).&lt;br /&gt; &lt;br /&gt;Also note that you can mix common and custom buttons, like in the following task dialog:&lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28692" alt="taskdialog_custombutton.png" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Command links
&lt;/h4&gt;Task dialogs can obviously use Vista's brand new &amp;quot;Command Link&amp;quot; buttons instead of the more classic styled buttons on the bottom of the window. &lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
dlg.CustomButtons = new CustomButton[] {
	new CustomButton(100, &amp;quot;Button 1&amp;quot;),
	new CustomButton(Result.Cancel, &amp;quot;Button 2\nDescription note.&amp;quot;)
};
 
dlg.UseCommandLinks = true;
&lt;/pre&gt; &lt;br /&gt;Note that when using command links you &lt;b&gt;must define at least one custom button&lt;/b&gt; or the &lt;i&gt;Show()&lt;/i&gt; call will raise an exception. You can also define a description note for the command link by inserting a '\n' newline code in the button text.&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28693" alt="taskdialog_commandlink.png" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Radio buttons
&lt;/h4&gt;Task dialogs not only allow you to define custom buttons, you may also add a set of radio buttons to your dialog. This is done by setting the &lt;i&gt;RadioButtons&lt;/i&gt; property with an array of &lt;i&gt;CustomButton&lt;/i&gt; instances.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
dlg.RadioButtons = new CustomButton[] {
	new CustomButton(1, &amp;quot;Radio button 1&amp;quot;),
	new CustomButton(2, &amp;quot;Radio button 2&amp;quot;),
	new CustomButton(3, &amp;quot;Radio button 3&amp;quot;)
};
dlg.EnabledRadioButton = 2;
dlg.NoDefaultRadioButton = false;
&lt;/pre&gt; &lt;br /&gt;&lt;i&gt;EnabledRadioButton&lt;/i&gt; sets the ID of the radio button that will be selected automatically when the dialog is opened. If you do not provide any default enabled radio button, Windows will automatically select the first one of the list. You can override this behavour by setting &lt;i&gt;NoDefaultRadioButton&lt;/i&gt; to &lt;i&gt;true&lt;/i&gt;.&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28694" alt="taskdialog_radio.png" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
IsShowing
&lt;/h4&gt;&lt;i&gt;IsShowing&lt;/i&gt; is a read-only property that returns &lt;i&gt;true&lt;/i&gt; if the dialog is currently showing and &lt;i&gt;false&lt;/i&gt; otherwise. This can be useful if you define event handlers for your task dialog.&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
PositionRelativeToWindow
&lt;/h4&gt;By default, task dialogs are centered on the screen on which they are displayed. If you set this property to &lt;i&gt;true&lt;/i&gt;, the dialog will be placed centered on its parent window (you &lt;b&gt;must&lt;/b&gt; supply a handle to the parent window in the &lt;i&gt;Show()&lt;/i&gt; call).&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Progress bars
&lt;/h4&gt;Task dialogs can optionally contain a progress bar indicating the progress of an action (check out the section of this page about events and ticks to find out how to update the progress bar).&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
dlg.ShowProgressBar = true;
dlg.ProgressBarState = VistaControls.ProgressBar.States.Paused;
dlg.ProgressBarMinRange = 0;
dlg.ProgressBarMaxRange = 100;
dlg.ProgressBarPosition = 50;
dlg.ShowMarqueeProgressBar = true;
&lt;/pre&gt; &lt;br /&gt;The property &lt;i&gt;ProgressBarState&lt;/i&gt; sets the color and the state of the progress bar (normal, paused/yellow and error/red), &lt;i&gt;MaxRange&lt;/i&gt;, &lt;i&gt;MinRange&lt;/i&gt; and &lt;i&gt;Position&lt;/i&gt; set the numeric range of the progress bar and the current position. &lt;i&gt;ShowMarqueeProgressBar&lt;/i&gt; enables a particular state of the progress bar that expresses activity but does not indicate what proportion of the task is complete.&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28699" alt="taskdialog_progressbar.png" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
Events and Timing
&lt;/h3&gt; &lt;br /&gt;&lt;h4&gt;
ButtonClick
&lt;/h4&gt;This event is raised as soon as the user clicks on any button of the dialog. The EventArgs class contains the ID of the button and a bool value that allows you to prevent the dialog from closing automatically after the click.&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Construction and destruction events
&lt;/h4&gt;Task dialogs raise two events: &lt;i&gt;Constructed&lt;/i&gt;, which is sent first, and &lt;i&gt;Created&lt;/i&gt; which is sent just before the dialog is shown.&lt;br /&gt; &lt;br /&gt;After being destroyed, the &lt;i&gt;Destroyed&lt;/i&gt; event is raised and means that the handle of the dialog isn't valid anymore.&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Expanding
&lt;/h4&gt;This event is raised just before the dialog is expanded or collapsed. The EventArgs class contains a bool value indicating whether the dialog is switching to the expanded state or not.&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Help
&lt;/h4&gt;Is raised when the user requests help (for instance with the F1 key).&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Hyperlinks
&lt;/h4&gt;In task dialogs you can add a hyperlink to the content, which will be displayed underlined and in blue color. When the user clicks one of these hyperlinks, the &lt;i&gt;HyperlinkClick&lt;/i&gt; event is raised, containing the clicked URL. In order to enable this feature, you must set the &lt;i&gt;EnableHyperlinks&lt;/i&gt; property to true:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
dlg.EnableHyperlinks = true;
dlg.Content = &amp;quot;This is content. This is a &amp;lt;a href=\&amp;quot;link\&amp;quot;&amp;gt;hyperlink&amp;lt;/a&amp;gt;.&amp;quot;;
&lt;/pre&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28703" alt="taskdialog_hyperlink.png" /&gt;&lt;br /&gt; &lt;br /&gt;In this case, a click on &amp;quot;hyperlink&amp;quot; will raise the &lt;i&gt;HyperlinkClick&lt;/i&gt; event with the Url property set to &amp;quot;link&amp;quot;.&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Navigating
&lt;/h4&gt;Is raised when the dialog &lt;i&gt;navigates&lt;/i&gt; from one page to another. See Navigation section.&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
RadioButtonClick
&lt;/h4&gt;Is similar to the ButtonClick, except that since the dialog will not automatically close after the click, the &lt;i&gt;PreventClosing&lt;/i&gt; property of the EventArgs class has no effect.&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Ticking
&lt;/h4&gt;In order to allow you to update the dialog's contents in real-time (for instance progress bars), task dialogs provide a &amp;quot;ticking&amp;quot; interface which will call a delegate defined by you at 200ms intervals. In order to enable this callback, you must set the &lt;i&gt;EnableCallbackTimer&lt;/i&gt; property to &lt;i&gt;true&lt;/i&gt;.&lt;br /&gt; &lt;br /&gt;The &lt;i&gt;Tick&lt;/i&gt; event will be raised periodically with an EventArgs class containing the current count of &amp;quot;ticks&amp;quot; which have passed and an optional &lt;i&gt;ResetCount&lt;/i&gt; property that, if set to &lt;i&gt;true&lt;/i&gt;, will reset the count on the next call.&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
VerificationClick
&lt;/h4&gt;Is raised when the user clicks on the verification checkbox. The EventArgs class tells whether the checkbox is now checked or not.&lt;br /&gt;
&lt;/div&gt;</description><author>Lck</author><pubDate>Thu, 28 Feb 2008 22:02:17 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Task Dialogs 20080228100217P</guid></item><item><title>UPDATED WIKI: Task Dialogs</title><link>http://www.codeplex.com/vistacontrols/Wiki/View.aspx?title=Task Dialogs&amp;version=4</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;
Task Dialogs
&lt;/h1&gt;Task Dialogs are Windows Vista's alternative to the classic Message Box (&lt;i&gt;System.Windows.Forms.MessageBox&lt;/i&gt; on .NET) which has been used from times immemorial to notify the users about errors, status changes and to prompt for action. Task Dialogs have a much better looking interface and have many more interaction possibilities (customizable text buttons, radio buttons, progress bars, and so on...).&lt;br /&gt; &lt;br /&gt;To get a full guide about Task Dialogs, refer to these MSDN pages:&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/bb760441(VS.85).aspx" class="externalLink"&gt;Task Dialog Overview&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Guidelines for using Task Dialogs in&lt;/li&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa511267.aspx" class="externalLink"&gt;Error messages&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa511263.aspx" class="externalLink"&gt;Warning messages&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa511273.aspx" class="externalLink"&gt;Confirmation messages&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
TaskDialog static methods
&lt;/h2&gt;The &lt;i&gt;TaskDialog&lt;/i&gt; class has been designed to be used exactly as you used MessageBox on standard WinForms applications. The class exposes a set of common static methods which allow you to define highly customizable dialogs without instancing any object and making a single function call:&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
Basic Task Dialogs
&lt;/h3&gt;The simplest TaskDialog call takes a single parameter:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
TaskDialog.Show(&amp;quot;Instruction&amp;quot;);
&lt;/pre&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28671" alt="taskdialog1.png" /&gt;&lt;br /&gt; &lt;br /&gt;You can further customize your dialog with a custom title and verbose instructions:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
TaskDialog.Show(&amp;quot;Instruction&amp;quot;, &amp;quot;My Task Dialog&amp;quot;, &amp;quot;Verbose instructions.&amp;quot;);
&lt;/pre&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28672" alt="taskdialog2.png" /&gt;&lt;br /&gt; &lt;br /&gt;The buttons that appear on the task dialog can be customized by providing one or more elements of the &lt;i&gt;TaskDialogButton&lt;/i&gt; enumeration. Valid values are:&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;OK&lt;/li&gt;&lt;li&gt;Cancel&lt;/li&gt;&lt;li&gt;Yes&lt;/li&gt;&lt;li&gt;No&lt;/li&gt;&lt;li&gt;Close&lt;/li&gt;&lt;li&gt;Retry&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;pre&gt;
TaskDialog.Show(&amp;quot;Instruction&amp;quot;, &amp;quot;My Task Dialog&amp;quot;, &amp;quot;Verbose instructions.&amp;quot;, TaskDialogButton.Retry | TaskDialogButton.Cancel);
&lt;/pre&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28673" alt="taskdialog3.png" /&gt;&lt;br /&gt; &lt;br /&gt;Like with &lt;i&gt;MessageBox&lt;/i&gt;, you may customize the dialog's icon. All new Vista icons are included: from the classic Information and Warning, to the new Security warnings.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
TaskDialog.Show(&amp;quot;Instruction&amp;quot;, &amp;quot;My Task Dialog&amp;quot;, &amp;quot;Verbose instructions.&amp;quot;, TaskDialogButton.Retry | TaskDialogButton.Cancel, TaskDialogIcon.Information);
&lt;/pre&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Information: &lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28674" alt="taskdialog4.png" /&gt;&lt;/li&gt;&lt;li&gt;Stop&lt;/li&gt;&lt;li&gt;Warning&lt;/li&gt;&lt;li&gt;SecurityError: &lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28675" alt="taskdialog5.png" /&gt;&lt;/li&gt;&lt;li&gt;SecurityWarning: &lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28676" alt="taskdialog6.png" /&gt;&lt;/li&gt;&lt;li&gt;SecuritySuccess: &lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28677" alt="taskdialog7.png" /&gt;&lt;/li&gt;&lt;li&gt;SecurityShield&lt;/li&gt;&lt;li&gt;SecurityShieldGray&lt;/li&gt;&lt;li&gt;SecurityShieldBlue&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h3&gt;
Results
&lt;/h3&gt;The static TaskDialog methods return results as a value of the &lt;i&gt;Result&lt;/i&gt; enumeration. It may assume the following values (some values have no corresponding &lt;i&gt;TaskDialogButton&lt;/i&gt; value and cannot be used via static method):&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;None&lt;/li&gt;&lt;li&gt;OK&lt;/li&gt;&lt;li&gt;Cancel&lt;/li&gt;&lt;li&gt;Abort&lt;/li&gt;&lt;li&gt;Retry&lt;/li&gt;&lt;li&gt;Ignore&lt;/li&gt;&lt;li&gt;Yes&lt;/li&gt;&lt;li&gt;No&lt;/li&gt;&lt;li&gt;Close&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
TaskDialog instances
&lt;/h2&gt;To really exploit the power of Vista's Task Dialog library, you'll need to instance a &lt;i&gt;TaskDialog&lt;/i&gt; object and customize it.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
Creating an instance
&lt;/h3&gt;The interface for creating an instance is identical to that of the static methods: you can define an instruction, a title, some content, icons and common buttons.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
TaskDialog dlg = new TaskDialog(&amp;quot;Instruction&amp;quot;, &amp;quot;Title&amp;quot;, &amp;quot;Verbose instruction.&amp;quot;, TaskDialogButton.Cancel, TaskDialogIcon.Warning);
Results results = dlg.Show(this.Handle);
 
if(results.CommonButton == Result.Cancel)
	//...
else
	//...
&lt;/pre&gt; &lt;br /&gt;But using this slightly less practical approach, you can define many other parameters and access the complete results set of the dialog.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
Setting Properties
&lt;/h3&gt; &lt;br /&gt;&lt;h4&gt;
AllowDialogCancellation
&lt;/h4&gt;Setting this property to &lt;i&gt;true&lt;/i&gt; (default) allows the used to cancel the dialog even if no &lt;i&gt;Cancel&lt;/i&gt; button has been added by you (by clicking ESC or the red &lt;i&gt;X&lt;/i&gt;). If you set it to &lt;i&gt;false&lt;/i&gt;, you prevent the user from canceling the dialog and force him/her to select one of the buttons.&lt;br /&gt; &lt;br /&gt;Please note that if a button with the &lt;i&gt;Cancel&lt;/i&gt; value is present, this property will be ignored and the user will be allowed to close the dialog as usual.&lt;br /&gt; &lt;br /&gt;A dialog with this property set to &lt;i&gt;true&lt;/i&gt; and without &lt;i&gt;Cancel&lt;/i&gt; buttons:&lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28684" alt="taskdialog_nocancel.png" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
CanBeMinimized
&lt;/h4&gt;If this property is &lt;i&gt;true&lt;/i&gt; and the Task dialog is shown &lt;b&gt;wihtout&lt;/b&gt; a parent handle, the user may minimize the dialog. Notice that the task dialog will be &lt;i&gt;modal&lt;/i&gt; nonetheless.&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28685" alt="taskdialog_minimize.png" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Expanded information
&lt;/h4&gt;Task Dialogs can display more information on request by the user. This is done by clicking on a special control which will trigger the vertical expansion of the dialog and make place for more text (which can be initially hidden or shown).&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
dlg.ExpandedInformation = &amp;quot;Expanded information.&amp;quot;;
dlg.CollapsedControlText = &amp;quot;Collapsed control text&amp;quot;;
dlg.ExpandedControlText = &amp;quot;Expanded control text&amp;quot;;
dlg.IsExpanded = false;
dlg.ShowExpandedInfoInFooter = false;
&lt;/pre&gt; &lt;br /&gt;&lt;i&gt;ExpandedInformation&lt;/i&gt; is the actual text which will be displayed in the expanding section. &lt;i&gt;CollapsedControlText&lt;/i&gt; and &lt;i&gt;ExpandedControlText&lt;/i&gt; are optional and set the text of the button on the dialog bottom. The &lt;i&gt;IsExpanded&lt;/i&gt; property (default &lt;i&gt;false&lt;/i&gt;) allows you to define whether the expanded text is initially visible or not.&lt;br /&gt;&lt;i&gt;ShowExpandedInfoInFooter&lt;/i&gt; sets whether you'd like the information displayed just below the dialog's content or on the bottom of the dialog.&lt;br /&gt; &lt;br /&gt;Not expanded:&lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28686" alt="taskdialog_expand1.png" /&gt;&lt;br /&gt;Expanded:&lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28687" alt="taskdialog_expand2.png" /&gt;&lt;br /&gt;Expanded on footer:&lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28688" alt="taskdialog_expand3.png" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Common properties
&lt;/h4&gt;The same information that can be set through the constructor can be set individually through properties:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
dlg.Title = &amp;quot;Title&amp;quot;;
dlg.Instruction = &amp;quot;Instruction&amp;quot;;
dlg.Content = &amp;quot;Content.&amp;quot;;
dlg.CommonButtons = TaskDialogButton.OK | TaskDialogButton.Cancel; ;
dlg.CommonIcon = TaskDialogIcon.Information;
&lt;/pre&gt; &lt;br /&gt;&lt;h4&gt;
Custom icon
&lt;/h4&gt;Instead of using one of the common icons, you can easily set a custom icon to be displayed by your task dialog.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
dlg.CustomIcon = new Icon(&amp;quot;myicon.ico&amp;quot;);
&lt;/pre&gt; &lt;br /&gt;The icon can be any instance of &lt;i&gt;System.Drawing.Icon&lt;/i&gt;.&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Footer
&lt;/h4&gt;The footer of a Task dialog is a gray area below the buttons that can optionally contain some information and a common (or a custom) icon. Custom icons can simply be provided as a standard &lt;i&gt;System.Drawing.Icon&lt;/i&gt; instance.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
dlg.Footer = &amp;quot;Footer info.&amp;quot;;
dlg.FooterCommonIcon = TaskDialogIcon.SecurityError;
dlg.FooterCustomIcon = new Icon(&amp;quot;myicon.ico&amp;quot;);
&lt;/pre&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28690" alt="taskdialog_footer.png" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Verification checkbox
&lt;/h4&gt;Task dialog's allow you to add a single &amp;quot;verification&amp;quot; checkbox with custom text and set its state.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
dlg.VerificationText = &amp;quot;Verification&amp;quot;;
dlg.IsVerificationChecked = true;
&lt;/pre&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28691" alt="taskdialog_verification.png" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Custom buttons
&lt;/h4&gt;As shown before, you can freely use and mix the common buttons provided by the Task dialog class. One of the most powerful aspects of the library though, is given by the possibility of defining your own buttons with custom return codes and custom text. These custom buttons can be set very easily using the &lt;i&gt;CustomButtons&lt;/i&gt; property:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
dlg.CustomButtons = new CustomButton[] {
	new CustomButton(100, &amp;quot;Button 100&amp;quot;),
	new CustomButton(Result.Cancel, &amp;quot;Custom cancel&amp;quot;)
};
&lt;/pre&gt; &lt;br /&gt;As you can see, custom buttons are created by instancing objects from the &lt;i&gt;CustomButton&lt;/i&gt; class. Each button can have an own text string and a return code (which may be a common code from the &lt;i&gt;Result&lt;/i&gt; enumeration or a free integer value - just notice that values less than 9 are reserved by common buttons and may cause collisions).&lt;br /&gt; &lt;br /&gt;Also note that you can mix common and custom buttons, like in the following task dialog:&lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28692" alt="taskdialog_custombutton.png" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Command links
&lt;/h4&gt;Task dialogs can obviously use Vista's brand new &amp;quot;Command Link&amp;quot; buttons instead of the more classic styled buttons on the bottom of the window. &lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
dlg.CustomButtons = new CustomButton[] {
	new CustomButton(100, &amp;quot;Button 1&amp;quot;),
	new CustomButton(Result.Cancel, &amp;quot;Button 2\nDescription note.&amp;quot;)
};
 
dlg.UseCommandLinks = true;
&lt;/pre&gt; &lt;br /&gt;Note that when using command links you &lt;b&gt;must define at least one custom button&lt;/b&gt; or the &lt;i&gt;Show()&lt;/i&gt; call will raise an exception. You can also define a description note for the command link by inserting a '\n' newline code in the button text.&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28693" alt="taskdialog_commandlink.png" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Radio buttons
&lt;/h4&gt;Task dialogs not only allow you to define custom buttons, you may also add a set of radio buttons to your dialog. This is done by setting the &lt;i&gt;RadioButtons&lt;/i&gt; property with an array of &lt;i&gt;CustomButton&lt;/i&gt; instances.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
dlg.RadioButtons = new CustomButton[] {
	new CustomButton(1, &amp;quot;Radio button 1&amp;quot;),
	new CustomButton(2, &amp;quot;Radio button 2&amp;quot;),
	new CustomButton(3, &amp;quot;Radio button 3&amp;quot;)
};
dlg.EnabledRadioButton = 2;
dlg.NoDefaultRadioButton = false;
&lt;/pre&gt; &lt;br /&gt;&lt;i&gt;EnabledRadioButton&lt;/i&gt; sets the ID of the radio button that will be selected automatically when the dialog is opened. If you do not provide any default enabled radio button, Windows will automatically select the first one of the list. You can override this behavour by setting &lt;i&gt;NoDefaultRadioButton&lt;/i&gt; to &lt;i&gt;true&lt;/i&gt;.&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28694" alt="taskdialog_radio.png" /&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>Lck</author><pubDate>Thu, 28 Feb 2008 19:20:52 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Task Dialogs 20080228072052P</guid></item><item><title>UPDATED WIKI: Task Dialogs</title><link>http://www.codeplex.com/vistacontrols/Wiki/View.aspx?title=Task Dialogs&amp;version=3</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;
Task Dialogs
&lt;/h1&gt;Task Dialogs are Windows Vista's alternative to the classic Message Box (&lt;i&gt;System.Windows.Forms.MessageBox&lt;/i&gt; on .NET) which has been used from times immemorial to notify the users about errors, status changes and to prompt for action. Task Dialogs have a much better looking interface and have many more interaction possibilities (customizable text buttons, radio buttons, progress bars, and so on...).&lt;br /&gt; &lt;br /&gt;To get a full guide about Task Dialogs, refer to these MSDN pages:&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/bb760441(VS.85).aspx" class="externalLink"&gt;Task Dialog Overview&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Guidelines for using Task Dialogs in&lt;/li&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa511267.aspx" class="externalLink"&gt;Error messages&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa511263.aspx" class="externalLink"&gt;Warning messages&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa511273.aspx" class="externalLink"&gt;Confirmation messages&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
TaskDialog static methods
&lt;/h2&gt;The &lt;i&gt;TaskDialog&lt;/i&gt; class has been designed to be used exactly as you used MessageBox on standard WinForms applications. The class exposes a set of common static methods which allow you to define highly customizable dialogs without instancing any object and making a single function call:&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
Basic Task Dialogs
&lt;/h3&gt;The simplest TaskDialog call takes a single parameter:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
TaskDialog.Show(&amp;quot;Instruction&amp;quot;);
&lt;/pre&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28671" alt="taskdialog1.png" /&gt;&lt;br /&gt; &lt;br /&gt;You can further customize your dialog with a custom title and verbose instructions:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
TaskDialog.Show(&amp;quot;Instruction&amp;quot;, &amp;quot;My Task Dialog&amp;quot;, &amp;quot;Verbose instructions.&amp;quot;);
&lt;/pre&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28672" alt="taskdialog2.png" /&gt;&lt;br /&gt; &lt;br /&gt;The buttons that appear on the task dialog can be customized by providing one or more elements of the &lt;i&gt;TaskDialogButton&lt;/i&gt; enumeration. Valid values are:&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;OK&lt;/li&gt;&lt;li&gt;Cancel&lt;/li&gt;&lt;li&gt;Yes&lt;/li&gt;&lt;li&gt;No&lt;/li&gt;&lt;li&gt;Close&lt;/li&gt;&lt;li&gt;Retry&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;pre&gt;
TaskDialog.Show(&amp;quot;Instruction&amp;quot;, &amp;quot;My Task Dialog&amp;quot;, &amp;quot;Verbose instructions.&amp;quot;, TaskDialogButton.Retry | TaskDialogButton.Cancel);
&lt;/pre&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28673" alt="taskdialog3.png" /&gt;&lt;br /&gt; &lt;br /&gt;Like with &lt;i&gt;MessageBox&lt;/i&gt;, you may customize the dialog's icon. All new Vista icons are included: from the classic Information and Warning, to the new Security warnings.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
TaskDialog.Show(&amp;quot;Instruction&amp;quot;, &amp;quot;My Task Dialog&amp;quot;, &amp;quot;Verbose instructions.&amp;quot;, TaskDialogButton.Retry | TaskDialogButton.Cancel, TaskDialogIcon.Information);
&lt;/pre&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Information: &lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28674" alt="taskdialog4.png" /&gt;&lt;/li&gt;&lt;li&gt;Stop&lt;/li&gt;&lt;li&gt;Warning&lt;/li&gt;&lt;li&gt;SecurityError: &lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28675" alt="taskdialog5.png" /&gt;&lt;/li&gt;&lt;li&gt;SecurityWarning: &lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28676" alt="taskdialog6.png" /&gt;&lt;/li&gt;&lt;li&gt;SecuritySuccess: &lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28677" alt="taskdialog7.png" /&gt;&lt;/li&gt;&lt;li&gt;SecurityShield&lt;/li&gt;&lt;li&gt;SecurityShieldGray&lt;/li&gt;&lt;li&gt;SecurityShieldBlue&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h3&gt;
Results
&lt;/h3&gt;The static TaskDialog methods return results as a value of the &lt;i&gt;Result&lt;/i&gt; enumeration. It may assume the following values (some values have no corresponding &lt;i&gt;TaskDialogButton&lt;/i&gt; value and cannot be used via static method):&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;None&lt;/li&gt;&lt;li&gt;OK&lt;/li&gt;&lt;li&gt;Cancel&lt;/li&gt;&lt;li&gt;Abort&lt;/li&gt;&lt;li&gt;Retry&lt;/li&gt;&lt;li&gt;Ignore&lt;/li&gt;&lt;li&gt;Yes&lt;/li&gt;&lt;li&gt;No&lt;/li&gt;&lt;li&gt;Close&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
TaskDialog instances
&lt;/h2&gt;To really exploit the power of Vista's Task Dialog library, you'll need to instance a &lt;i&gt;TaskDialog&lt;/i&gt; object and customize it.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
Creating an instance
&lt;/h3&gt;The interface for creating an instance is identical to that of the static methods: you can define an instruction, a title, some content, icons and common buttons.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
TaskDialog dlg = new TaskDialog(&amp;quot;Instruction&amp;quot;, &amp;quot;Title&amp;quot;, &amp;quot;Verbose instruction.&amp;quot;, TaskDialogButton.Cancel, TaskDialogIcon.Warning);
Results results = dlg.Show(this.Handle);
 
if(results.CommonButton == Result.Cancel)
	//...
else
	//...
&lt;/pre&gt; &lt;br /&gt;But using this slightly less practical approach, you can define many other parameters and access the complete results set of the dialog.&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
Setting Properties
&lt;/h3&gt; &lt;br /&gt;&lt;h4&gt;
AllowDialogCancellation
&lt;/h4&gt;Setting this property to &lt;i&gt;true&lt;/i&gt; (default) allows the used to cancel the dialog even if no &lt;i&gt;Cancel&lt;/i&gt; button has been added by you (by clicking ESC or the red &lt;i&gt;X&lt;/i&gt;). If you set it to &lt;i&gt;false&lt;/i&gt;, you prevent the user from canceling the dialog and force him/her to select one of the buttons.&lt;br /&gt; &lt;br /&gt;Please note that if a button with the &lt;i&gt;Cancel&lt;/i&gt; value is present, this property will be ignored and the user will be allowed to close the dialog as usual.&lt;br /&gt; &lt;br /&gt;A dialog with this property set to &lt;i&gt;true&lt;/i&gt; and without &lt;i&gt;Cancel&lt;/i&gt; buttons:&lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28684" alt="taskdialog_nocancel.png" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
CanBeMinimized
&lt;/h4&gt;If this property is &lt;i&gt;true&lt;/i&gt; and the Task dialog is shown &lt;b&gt;wihtout&lt;/b&gt; a parent handle, the user may minimize the dialog. Notice that the task dialog will be &lt;i&gt;modal&lt;/i&gt; nonetheless.&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28685" alt="taskdialog_minimize.png" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
Expanded information
&lt;/h3&gt;Task Dialogs can display more information on request by the user. This is done by clicking on a special control which will trigger the vertical expansion of the dialog and make place for more text (which can be initially hidden or shown).&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
dlg.ExpandedInformation = &amp;quot;Expanded information.&amp;quot;;
dlg.CollapsedControlText = &amp;quot;Collapsed control text&amp;quot;;
dlg.ExpandedControlText = &amp;quot;Expanded control text&amp;quot;;
dlg.IsExpanded = false;
&lt;/pre&gt; &lt;br /&gt;&lt;i&gt;ExpandedInformation&lt;/i&gt; is the actual text which will be displayed in the expanding section. &lt;i&gt;CollapsedControlText&lt;/i&gt; and &lt;i&gt;ExpandedControlText&lt;/i&gt; are optional and set the text of the button on the dialog bottom. The &lt;i&gt;IsExpanded&lt;/i&gt; property (default &lt;i&gt;false&lt;/i&gt;) allows you to define whether the expanded text is initially visible or not.&lt;br /&gt; &lt;br /&gt;Not expanded:&lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28686" alt="taskdialog_expand1.png" /&gt;&lt;br /&gt;Expanded:&lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28687" alt="taskdialog_expand2.png" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h4&gt;
Common properties
&lt;/h4&gt;
&lt;/div&gt;</description><author>Lck</author><pubDate>Thu, 28 Feb 2008 18:29:19 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Task Dialogs 20080228062919P</guid></item><item><title>UPDATED WIKI: Task Dialogs</title><link>http://www.codeplex.com/vistacontrols/Wiki/View.aspx?title=Task Dialogs&amp;version=2</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;
Task Dialogs
&lt;/h1&gt;Task Dialogs are Windows Vista's alternative to the classic Message Box (&lt;i&gt;System.Windows.Forms.MessageBox&lt;/i&gt; on .NET) which has been used from times immemorial to notify the users about errors, status changes and to prompt for action. Task Dialogs have a much better looking interface and have many more interaction possibilities (customizable text buttons, radio buttons, progress bars, and so on...).&lt;br /&gt; &lt;br /&gt;To get a full guide about Task Dialogs, refer to these MSDN pages:&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/bb760441(VS.85).aspx" class="externalLink"&gt;Task Dialog Overview&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Guidelines for using Task Dialogs in&lt;/li&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa511267.aspx" class="externalLink"&gt;Error messages&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa511263.aspx" class="externalLink"&gt;Warning messages&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa511273.aspx" class="externalLink"&gt;Confirmation messages&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
TaskDialog static methods
&lt;/h2&gt;The &lt;i&gt;TaskDialog&lt;/i&gt; class has been designed to be used exactly as you used MessageBox on standard WinForms applications. The class exposes a set of common static methods which allow you to define highly customizable dialogs without instancing any object and making a single function call:&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
Basic Task Dialogs
&lt;/h3&gt;The simplest TaskDialog call takes a single parameter:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
TaskDialog.Show(&amp;quot;Instruction&amp;quot;);
&lt;/pre&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28671" alt="taskdialog1.png" /&gt;&lt;br /&gt; &lt;br /&gt;You can further customize your dialog with a custom title and verbose instructions:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
TaskDialog.Show(&amp;quot;Instruction&amp;quot;, &amp;quot;My Task Dialog&amp;quot;, &amp;quot;Verbose instructions.&amp;quot;);
&lt;/pre&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28672" alt="taskdialog2.png" /&gt;&lt;br /&gt; &lt;br /&gt;The buttons that appear on the task dialog can be customized by providing one or more elements of the &lt;i&gt;TaskDialogButton&lt;/i&gt; enumeration. Valid values are:&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;OK&lt;/li&gt;&lt;li&gt;Cancel&lt;/li&gt;&lt;li&gt;Yes&lt;/li&gt;&lt;li&gt;No&lt;/li&gt;&lt;li&gt;Close&lt;/li&gt;&lt;li&gt;Retry&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;pre&gt;
TaskDialog.Show(&amp;quot;Instruction&amp;quot;, &amp;quot;My Task Dialog&amp;quot;, &amp;quot;Verbose instructions.&amp;quot;, TaskDialogButton.Retry | TaskDialogButton.Cancel);
&lt;/pre&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28673" alt="taskdialog3.png" /&gt;&lt;br /&gt; &lt;br /&gt;Like with &lt;i&gt;MessageBox&lt;/i&gt;, you may customize the dialog's icon. All new Vista icons are included: from the classic Information and Warning, to the new Security warnings.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
TaskDialog.Show(&amp;quot;Instruction&amp;quot;, &amp;quot;My Task Dialog&amp;quot;, &amp;quot;Verbose instructions.&amp;quot;, TaskDialogButton.Retry | TaskDialogButton.Cancel, TaskDialogIcon.Information);
&lt;/pre&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Information: &lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28674" alt="taskdialog4.png" /&gt;&lt;/li&gt;&lt;li&gt;Stop&lt;/li&gt;&lt;li&gt;Warning&lt;/li&gt;&lt;li&gt;SecurityError: &lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28675" alt="taskdialog5.png" /&gt;&lt;/li&gt;&lt;li&gt;SecurityWarning: &lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28676" alt="taskdialog6.png" /&gt;&lt;/li&gt;&lt;li&gt;SecuritySuccess: &lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28677" alt="taskdialog7.png" /&gt;&lt;/li&gt;&lt;li&gt;SecurityShield&lt;/li&gt;&lt;li&gt;SecurityShieldGray&lt;/li&gt;&lt;li&gt;SecurityShieldBlue&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h3&gt;
Results
&lt;/h3&gt;The static TaskDialog methods return results as a value of the &lt;i&gt;Result&lt;/i&gt; enumeration. It may assume the following values (some values have no corresponding &lt;i&gt;TaskDialogButton&lt;/i&gt; value and cannot be used via static method):&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;None&lt;/li&gt;&lt;li&gt;OK&lt;/li&gt;&lt;li&gt;Cancel&lt;/li&gt;&lt;li&gt;Abort&lt;/li&gt;&lt;li&gt;Retry&lt;/li&gt;&lt;li&gt;Ignore&lt;/li&gt;&lt;li&gt;Yes&lt;/li&gt;&lt;li&gt;No&lt;/li&gt;&lt;li&gt;Close&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
TaskDialog instances
&lt;/h2&gt;To really exploit the power of Vista's Task Dialog library, you'll need to instance a &lt;i&gt;TaskDialog&lt;/i&gt; object and customize it.&lt;br /&gt;
&lt;/div&gt;</description><author>Lck</author><pubDate>Thu, 28 Feb 2008 18:02:42 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Task Dialogs 20080228060242P</guid></item><item><title>UPDATED WIKI: Task Dialogs</title><link>http://www.codeplex.com/vistacontrols/Wiki/View.aspx?title=Task Dialogs&amp;version=1</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;
Task Dialogs
&lt;/h1&gt;Task Dialogs are Windows Vista's alternative to the classic Message Box (System.Windows.Forms.MessageBox on .NET) which has been used from times immemorial to notify the users about errors, status changes and to promt for action. Task Dialogs have a much better looking interface and have many more interaction possibilities (customizable text buttons, radio buttons, progress bars, and so on...).&lt;br /&gt; &lt;br /&gt;To get a full guide about Task Dialogs, refer to these MSDN pages:&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/bb760441(VS.85).aspx" class="externalLink"&gt;Task Dialog Overview&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Guidelines for using Task Dialogs in&lt;/li&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa511267.aspx" class="externalLink"&gt;Error messages&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa511263.aspx" class="externalLink"&gt;Warning messages&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa511273.aspx" class="externalLink"&gt;Confirmation messages&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
TaskDialog static methods
&lt;/h2&gt;The &lt;i&gt;TaskDialog&lt;/i&gt; class has been designed to be used exactly as you used MessageBox on standard WinForms applications. The class exposes a set of common static methods which allow you to define highly customizable dialogs without instancing any object and making a single function call:&lt;br /&gt; &lt;br /&gt;&lt;h3&gt;
Basic Task Dialogs
&lt;/h3&gt;The simplest TaskDialog call takes a single parameter:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
TaskDialog.Show(&amp;quot;Instruction&amp;quot;);
&lt;/pre&gt; &lt;br /&gt;&lt;span class="unresolved"&gt;Cannot resolve link: &lt;/span&gt;[image:taskdialog1.png]&lt;br /&gt; &lt;br /&gt;You can further customize your dialog with a custom title and verbose instructions:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
TaskDialog.Show(&amp;quot;Instruction&amp;quot;, &amp;quot;My Task Dialog&amp;quot;, &amp;quot;Verbose instructions.&amp;quot;);
&lt;/pre&gt; &lt;br /&gt;&lt;span class="unresolved"&gt;Cannot resolve link: &lt;/span&gt;[image:taskdialog2.png]&lt;br /&gt; &lt;br /&gt;The buttons that appear on the task dialog can be customized by providing one or more elements of the &lt;i&gt;TaskDialogButton&lt;/i&gt; enumeration. Valid values are:&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;OK&lt;/li&gt;&lt;li&gt;Cancel&lt;/li&gt;&lt;li&gt;Yes&lt;/li&gt;&lt;li&gt;No&lt;/li&gt;&lt;li&gt;Close&lt;/li&gt;&lt;li&gt;Retry&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;pre&gt;
TaskDialog.Show(&amp;quot;Instruction&amp;quot;, &amp;quot;My Task Dialog&amp;quot;, &amp;quot;Verbose instructions.&amp;quot;, TaskDialogButton.Retry | TaskDialogButton.Cancel);
&lt;/pre&gt; &lt;br /&gt;&lt;span class="unresolved"&gt;Cannot resolve link: &lt;/span&gt;[image:taskdialog3.png]&lt;br /&gt; &lt;br /&gt;Like with &lt;i&gt;MessageBox&lt;/i&gt;, you may customize the dialog's icon. All new Vista icons are included: from the classic Information and Warning, to the new Security warnings.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
TaskDialog.Show(&amp;quot;Instruction&amp;quot;, &amp;quot;My Task Dialog&amp;quot;, &amp;quot;Verbose instructions.&amp;quot;, TaskDialogButton.Retry | TaskDialogButton.Cancel, TaskDialogIcon.Information);
&lt;/pre&gt; &lt;br /&gt;&lt;ul&gt;
&lt;li&gt;Information: &lt;span class="unresolved"&gt;Cannot resolve link: &lt;/span&gt;[image:taskdialog4.png]&lt;/li&gt;&lt;li&gt;Stop&lt;/li&gt;&lt;li&gt;Warning&lt;/li&gt;&lt;li&gt;SecurityError: &lt;span class="unresolved"&gt;Cannot resolve link: &lt;/span&gt;[image:taskdialog5.png]&lt;/li&gt;&lt;li&gt;SecurityWarning: &lt;span class="unresolved"&gt;Cannot resolve link: &lt;/span&gt;[image:taskdialog6.png]&lt;/li&gt;&lt;li&gt;SecuritySuccess: &lt;span class="unresolved"&gt;Cannot resolve link: &lt;/span&gt;[image:taskdialog7.png]&lt;/li&gt;&lt;li&gt;SecurityShield&lt;/li&gt;&lt;li&gt;SecurityShieldGray&lt;/li&gt;&lt;li&gt;SecurityShieldBlue&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h3&gt;
Results
&lt;/h3&gt;The static TaskDialog methods return results as a value of the &lt;i&gt;Result&lt;/i&gt; enumeration. It may assume the following values (some values have no corresponding &lt;i&gt;TaskDialogButton&lt;/i&gt; value and cannot be used via static method):&lt;br /&gt;&lt;ul&gt;
&lt;li&gt;None&lt;/li&gt;&lt;li&gt;OK&lt;/li&gt;&lt;li&gt;Cancel&lt;/li&gt;&lt;li&gt;Abort&lt;/li&gt;&lt;li&gt;Retry&lt;/li&gt;&lt;li&gt;Ignore&lt;/li&gt;&lt;li&gt;Yes&lt;/li&gt;&lt;li&gt;No&lt;/li&gt;&lt;li&gt;Close&lt;/li&gt;
&lt;/ul&gt; &lt;br /&gt;&lt;h2&gt;
TaskDialog instances
&lt;/h2&gt;To really exploit the power of Vista's Task Dialog library, you'll need to instance a &lt;i&gt;TaskDialog&lt;/i&gt; object and customize it.&lt;br /&gt;
&lt;/div&gt;</description><author>Lck</author><pubDate>Thu, 28 Feb 2008 17:59:00 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Task Dialogs 20080228055900P</guid></item><item><title>UPDATED WIKI: Adding Vista Controls to a Visual Studio 2008 project</title><link>http://www.codeplex.com/vistacontrols/Wiki/View.aspx?title=Adding Vista Controls to a Visual Studio 2008 project&amp;version=2</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;
Adding Vista Controls to a Visual Studio 2008 project
&lt;/h1&gt; &lt;br /&gt;&lt;h2&gt;
Add the library reference
&lt;/h2&gt;In order to start using the library, you simply must download the latest binary release, copy the files in a folder of your choice and then add a reference to it in the &lt;i&gt;Solution Explorer&lt;/i&gt; panel of Visual Studio 2008:&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28656" alt="setup1.png" /&gt;&lt;br /&gt; &lt;br /&gt;The library will be listed as &lt;b&gt;VistaControls&lt;/b&gt; in your project's references:&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28657" alt="setup2.png" /&gt;&lt;br /&gt; &lt;br /&gt;Remember that all classes are included in the &lt;i&gt;VistaControls&lt;/i&gt; namespace.&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Adding the controls to the WinForms designer toolbox
&lt;/h2&gt;You may also add the Windows Vista Controls to a custom toolbox and use them in the WinForms designer of Visual Studio. To do so, right click on the toolbox, select &amp;quot;Add Tab&amp;quot; and assign a significant name to new tab (for instance &amp;quot;Vista Controls&amp;quot;). Then right click on the tab and select &amp;quot;Choose Items...&amp;quot;. This will display a dialog that allows you to select which controls should be added to the tab: browse to the Windows Vista Controls DLL, open it and click OK.&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28658" alt="setup3.png" /&gt;&lt;br /&gt; &lt;br /&gt;Now you can simply drag &amp;amp; drop the controls to the WinForm designer and start using them. Some functionalities of the library are not available as drag &amp;amp; drop controls and must be called from your code.&lt;br /&gt;
&lt;/div&gt;</description><author>Lck</author><pubDate>Thu, 28 Feb 2008 15:48:33 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Adding Vista Controls to a Visual Studio 2008 project 20080228034833P</guid></item><item><title>UPDATED WIKI: Adding Vista Controls to a Visual Studio 2008 project</title><link>http://www.codeplex.com/vistacontrols/Wiki/View.aspx?title=Adding Vista Controls to a Visual Studio 2008 project&amp;version=1</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;
Adding Vista Controls to a Visual Studio 2008 project
&lt;/h1&gt; &lt;br /&gt;&lt;h2&gt;
Add the library reference
&lt;/h2&gt;In order to start using the library, you simply must download the latest binary release, copy the files in a folder of your choice and then add a reference to it in the &lt;i&gt;Solution Explorer&lt;/i&gt; panel of Visual Studio 2008:&lt;br /&gt; &lt;br /&gt;img&lt;br /&gt; &lt;br /&gt;The library will be listed as &lt;b&gt;VistaControls&lt;/b&gt; in your project's references:&lt;br /&gt; &lt;br /&gt;img&lt;br /&gt; &lt;br /&gt;Remember that all classes are included in the &lt;i&gt;VistaControls&lt;/i&gt; namespace.&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Adding the controls to the WinForms designer toolbox
&lt;/h2&gt;You may also add the Windows Vista Controls to a custom toolbox and use them in the WinForms designer of Visual Studio. To do so, right click on the toolbox, select &amp;quot;Add Tab&amp;quot; and assign a significant name to new tab (for instance &amp;quot;Vista Controls&amp;quot;). Then right click on the tab and select &amp;quot;Choose Items...&amp;quot;. This will display a dialog that allows you to select which controls should be added to the tab: browse to the Windows Vista Controls DLL, open it and click OK.&lt;br /&gt; &lt;br /&gt;img&lt;br /&gt; &lt;br /&gt;Now you can simply drag &amp;amp; drop the controls to the WinForm designer and start using them. Some functionalities of the library are not available as drag &amp;amp; drop controls and must be called from your code.&lt;br /&gt;
&lt;/div&gt;</description><author>Lck</author><pubDate>Thu, 28 Feb 2008 15:47:31 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Adding Vista Controls to a Visual Studio 2008 project 20080228034731P</guid></item><item><title>UPDATED WIKI: Glass on WinForms</title><link>http://www.codeplex.com/vistacontrols/Wiki/View.aspx?title=Glass on WinForms&amp;version=2</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;
Glass on WinForms
&lt;/h1&gt;Enabling the &amp;quot;glass sheet&amp;quot; effect with WinForms requires two simple steps:&lt;br /&gt;&lt;ol&gt;
&lt;li&gt;Set the Form background to Black&lt;/li&gt;&lt;li&gt;Call &lt;i&gt;EnableGlassSheet&lt;/i&gt; (for instance in the &lt;i&gt;OnLoad&lt;/i&gt; event).&lt;/li&gt;
&lt;/ol&gt; &lt;br /&gt;&lt;pre&gt;
protected override void OnLoad(EventArgs e) {
	base.OnLoad(e);
 
	VistaControls.DWM.DWMManager.EnableGlassSheet(this);
}
&lt;/pre&gt; &lt;br /&gt;This will create a completely transparent glass frame. The problem is, WinForms control are &lt;b&gt;not&lt;/b&gt; &lt;i&gt;alpha-blended&lt;/i&gt; and won't render correctly on the glass frame (all black elements will be completely transparent).&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28649" alt="glass_wf1.png" /&gt;&lt;br /&gt; &lt;br /&gt;Even if you can draw shapes and text on the frame correctly using GDI+, in order to use the controls you'll need to define a non-glassy area of the frame on which to place all controls. You'll also need to draw the black background only on the areas which will in fact be transparent:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
protected override void OnLoad(EventArgs e) {
	base.OnLoad(e);
 
	VistaControls.DWM.DWMManager.EnableGlassFrame(this, new VistaControls.DWM.Margins(30));
}
 
protected override void OnPaint(PaintEventArgs e) {
	base.OnPaint(e);
 
	e.Graphics.FillRectangles(Brushes.Black, new Rectangle[] {
		new Rectangle(0, 0, this.ClientSize.Width, 30),
		new Rectangle(this.ClientSize.Width - 30, 0, 30, this.ClientSize.Height),
		new Rectangle(0, this.ClientSize.Height - 30, this.ClientSize.Width, 30),
		new Rectangle(0, 0, 30, this.ClientSize.Height)
	});
}
&lt;/pre&gt; &lt;br /&gt;The following code creates a 30 pixel glass border around the center of the window, which will look like a normal WinForms window and can contain normal controls as usual. Remember to set the Form's background to the default &amp;quot;Control&amp;quot; color in the Visual Studio Form designer. This is the result:&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28650" alt="glass_wf2.png" /&gt;&lt;br /&gt; &lt;br /&gt;Remember that the Windows Vista Controls library includes several &lt;a href="http://www.codeplex.com/vistacontrols/Wiki/View.aspx?title=Glass%20Helpers&amp;amp;referringTitle=Glass%20on%20WinForms"&gt;helper classes&lt;/a&gt; that will help you taking over the most trivial tasks of making a glass Form (like the black background painting and moving the form when the user clicks on any glass part).&lt;br /&gt;
&lt;/div&gt;</description><author>Lck</author><pubDate>Thu, 28 Feb 2008 13:52:15 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Glass on WinForms 20080228015215P</guid></item><item><title>UPDATED WIKI: Glass on WinForms</title><link>http://www.codeplex.com/vistacontrols/Wiki/View.aspx?title=Glass on WinForms&amp;version=1</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;
Glass on WinForms
&lt;/h1&gt;Enabling the &amp;quot;glass sheet&amp;quot; effect with WinForms requires two simple steps:&lt;br /&gt;&lt;ol&gt;
&lt;li&gt;Set the Form background to Black&lt;/li&gt;&lt;li&gt;Call &lt;i&gt;EnableGlassSheet&lt;/i&gt; (for instance in the &lt;i&gt;OnLoad&lt;/i&gt; event).&lt;/li&gt;
&lt;/ol&gt; &lt;br /&gt;&lt;pre&gt;
protected override void OnLoad(EventArgs e) {
	base.OnLoad(e);
 
	VistaControls.DWM.DWMManager.EnableGlassSheet(this);
}
&lt;/pre&gt; &lt;br /&gt;This will create a completely transparent glass frame. The problem is, WinForms control are &lt;b&gt;not&lt;/b&gt; &lt;i&gt;alpha-blended&lt;/i&gt; and won't render correctly on the glass frame (all black elements will be completely transparent).&lt;br /&gt; &lt;br /&gt;img&lt;br /&gt; &lt;br /&gt;Even if you can draw shapes and text on the frame correctly using GDI+, in order to use the controls you'll need to define a non-glassy area of the frame on which to place all controls. You'll also need to draw the black background only on the areas which will in fact be transparent:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
protected override void OnLoad(EventArgs e) {
	base.OnLoad(e);
 
	VistaControls.DWM.DWMManager.EnableGlassFrame(this, new VistaControls.DWM.Margins(30));
}
 
protected override void OnPaint(PaintEventArgs e) {
	base.OnPaint(e);
 
	e.Graphics.FillRectangles(Brushes.Black, new Rectangle[] {
		new Rectangle(0, 0, this.ClientSize.Width, 30),
		new Rectangle(this.ClientSize.Width - 30, 0, 30, this.ClientSize.Height),
		new Rectangle(0, this.ClientSize.Height - 30, this.ClientSize.Width, 30),
		new Rectangle(0, 0, 30, this.ClientSize.Height)
	});
}
&lt;/pre&gt; &lt;br /&gt;The following code creates a 30 pixel glass border around the center of the window, which will look like a normal WinForms window and can contain normal controls as usual. Remember to set the Form's background to the default &amp;quot;Control&amp;quot; color in the Visual Studio Form designer. This is the result:&lt;br /&gt; &lt;br /&gt;img&lt;br /&gt; &lt;br /&gt;Remember that the Windows Vista Controls library includes several &lt;a href="http://www.codeplex.com/vistacontrols/Wiki/View.aspx?title=Glass%20Helpers&amp;amp;referringTitle=Glass%20on%20WinForms"&gt;helper classes&lt;/a&gt; that will help you taking over the most trivial tasks of making a glass Form (like the black background painting and moving the form when the user clicks on any glass part).&lt;br /&gt;
&lt;/div&gt;</description><author>Lck</author><pubDate>Thu, 28 Feb 2008 13:48:43 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Glass on WinForms 20080228014843P</guid></item><item><title>UPDATED WIKI: Glass on WPF</title><link>http://www.codeplex.com/vistacontrols/Wiki/View.aspx?title=Glass on WPF&amp;version=2</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;
Glass on WPF
&lt;/h1&gt;Complete sample available on MSDN: &lt;a href="http://msdn2.microsoft.com/en-us/library/ms748975.aspx" class="externalLink"&gt;Extend Glass Frame into a WPF application&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Enabling glass and transparency
&lt;/h2&gt;First of all, you must tell the composition renderer to use a black background for your application (same goes for WinForms) and then enable the glass border. Since the window will be drawn on top of your black composition background, you'll also need to tell WPF to use a transparent background (otherwise, the white background of the window will simply be rendered on top of the glass). We also define an event handler for the &lt;i&gt;Loaded&lt;/i&gt; event:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
&amp;lt;Window x:Class=&amp;quot;WpfApplication1.Window1&amp;quot;
    xmlns=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;
    xmlns:x=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;
    Title=&amp;quot;Window1&amp;quot; Height=&amp;quot;300&amp;quot; Width=&amp;quot;300&amp;quot; Loaded=&amp;quot;Window_Loaded&amp;quot; Background=&amp;quot;Transparent&amp;quot;&amp;gt;
&lt;/pre&gt; &lt;br /&gt;The event handler creates a &lt;i&gt;WindowInteropHelper&lt;/i&gt; in order to get the window's Handle. This is needed to set the composition target's background to black and to enable the &amp;quot;glass sheet&amp;quot; effect on the whole window.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
private void Window_Loaded(object sender, RoutedEventArgs e) {
	IntPtr hwnd = new WindowInteropHelper(this).Handle;
 
	//Set backgroung to black
	HwndSource source = HwndSource.FromHwnd(hwnd);
	source.CompositionTarget.BackgroundColor = Color.FromArgb(0, 0, 0, 0);
 
	//Set glass
	VistaControls.DWM.DWMManager.EnableGlassSheet(hwnd);
}
&lt;/pre&gt; &lt;br /&gt;Since WPF controls are rendered with &lt;i&gt;alpha blending&lt;/i&gt; enabled (whereas WinForms controls are not), you can put controls on glass areas or fade the opacity of certain elements:&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28643" alt="glass_wpf1.png" /&gt;&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Partial glass effect
&lt;/h2&gt;If you prefer the glass not to be over the whole window and to extend on only one side (or two), you can simply change the call to the Windows Vista Controls library:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
//Set glass
VistaControls.DWM.DWMManager.EnableGlassFrame(hwnd, new VistaControls.DWM.Margins(50, 0, 0, 0));
&lt;/pre&gt; &lt;br /&gt;The result is this:&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28644" alt="glass_wpf2.png" /&gt;&lt;br /&gt; &lt;br /&gt;The problem is, we told WPF to draw a transparent background and that's what is being done: the window has no background and the only &amp;quot;painted&amp;quot; area is the actual extended glass border. In order to draw the background correctly, you'll need to draw it &lt;i&gt;manually&lt;/i&gt; on the areas which are not transparent:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
&amp;lt;Grid&amp;gt;
    &amp;lt;Grid.ColumnDefinitions&amp;gt;
        &amp;lt;ColumnDefinition Width=&amp;quot;50&amp;quot; /&amp;gt;
        &amp;lt;ColumnDefinition Width=&amp;quot;*&amp;quot; /&amp;gt;
    &amp;lt;/Grid.ColumnDefinitions&amp;gt;
    
    &amp;lt;Grid Grid.Column=&amp;quot;1&amp;quot;&amp;gt;
        &amp;lt;Rectangle Fill=&amp;quot;{x:Static SystemColors.WindowBrush}&amp;quot; /&amp;gt;
        
        &amp;lt;!-- CONTENT OF YOUR WINDOW --&amp;gt;
    &amp;lt;/Grid&amp;gt;
&amp;lt;/Grid&amp;gt;
&lt;/pre&gt; &lt;br /&gt;In this case we simply define a Grid with columns and rows matching the structure of the window's glass and then draw a rectangle on the non-glassy area (using the default WindowBrush as color). This is the result:&lt;br /&gt; &lt;br /&gt;&lt;img src="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=vistacontrols&amp;amp;DownloadId=28645" alt="glass_wpf3.png" /&gt;&lt;br /&gt;
&lt;/div&gt;</description><author>Lck</author><pubDate>Thu, 28 Feb 2008 12:37:55 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Glass on WPF 20080228123755P</guid></item><item><title>UPDATED WIKI: Glass on WPF</title><link>http://www.codeplex.com/vistacontrols/Wiki/View.aspx?title=Glass on WPF&amp;version=1</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;
Glass on WPF
&lt;/h1&gt;Complete sample available on MSDN: &lt;a href="http://msdn2.microsoft.com/en-us/library/ms748975.aspx" class="externalLink"&gt;Extend Glass Frame into a WPF application&lt;span class="externalLinkIcon"&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Enabling glass and transparency
&lt;/h2&gt;First of all, you must tell the composition renderer to use a black background for your application (same goes for WinForms) and then enable the glass border. Since the window will be drawn on top of your black composition background, you'll also need to tell WPF to use a transparent background (otherwise, the white background of the window will simply be rendered on top of the glass). We also define an event handler for the &lt;i&gt;Loaded&lt;/i&gt; event:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
&amp;lt;Window x:Class=&amp;quot;WpfApplication1.Window1&amp;quot;
    xmlns=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;
    xmlns:x=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;
    Title=&amp;quot;Window1&amp;quot; Height=&amp;quot;300&amp;quot; Width=&amp;quot;300&amp;quot; Loaded=&amp;quot;Window_Loaded&amp;quot; Background=&amp;quot;Transparent&amp;quot;&amp;gt;
&lt;/pre&gt; &lt;br /&gt;The event handler creates a &lt;i&gt;WindowInteropHelper&lt;/i&gt; in order to get the window's Handle. This is needed to set the composition target's background to black and to enable the &amp;quot;glass sheet&amp;quot; effect on the whole window.&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
private void Window_Loaded(object sender, RoutedEventArgs e) {
	IntPtr hwnd = new WindowInteropHelper(this).Handle;
 
	//Set backgroung to black
	HwndSource source = HwndSource.FromHwnd(hwnd);
	source.CompositionTarget.BackgroundColor = Color.FromArgb(0, 0, 0, 0);
 
	//Set glass
	VistaControls.DWM.DWMManager.EnableGlassSheet(hwnd);
}
&lt;/pre&gt; &lt;br /&gt;Since WPF controls are rendered with &lt;i&gt;alpha blending&lt;/i&gt; enabled (whereas WinForms controls are not), you can put controls on glass areas or fade the opacity of certain elements:&lt;br /&gt; &lt;br /&gt;img&lt;br /&gt; &lt;br /&gt;&lt;h2&gt;
Partial glass effect
&lt;/h2&gt;If you prefer the glass not to be over the whole window and to extend on only one side (or two), you can simply change the call to the Windows Vista Controls library:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
//Set glass
VistaControls.DWM.DWMManager.EnableGlassFrame(hwnd, new VistaControls.DWM.Margins(50, 0, 0, 0));
&lt;/pre&gt; &lt;br /&gt;The result is this:&lt;br /&gt; &lt;br /&gt;img&lt;br /&gt; &lt;br /&gt;The problem is, we told WPF to draw a transparent background and that's what is being done: the window has no background and the only &amp;quot;painted&amp;quot; area is the actual extended glass border. In order to draw the background correctly, you'll need to draw it &lt;i&gt;manually&lt;/i&gt; on the areas which are not transparent:&lt;br /&gt; &lt;br /&gt;&lt;pre&gt;
&amp;lt;Grid&amp;gt;
    &amp;lt;Grid.ColumnDefinitions&amp;gt;
        &amp;lt;ColumnDefinition Width=&amp;quot;50&amp;quot; /&amp;gt;
        &amp;lt;ColumnDefinition Width=&amp;quot;*&amp;quot; /&amp;gt;
    &amp;lt;/Grid.ColumnDefinitions&amp;gt;
    
    &amp;lt;Grid Grid.Column=&amp;quot;1&amp;quot;&amp;gt;
        &amp;lt;Rectangle Fill=&amp;quot;{x:Static SystemColors.WindowBrush}&amp;quot; /&amp;gt;
        
        &amp;lt;!-- CONTENT OF YOUR WINDOW --&amp;gt;
    &amp;lt;/Grid&amp;gt;
&amp;lt;/Grid&amp;gt;
&lt;/pre&gt; &lt;br /&gt;In this case we simply define a Grid with columns and rows matching the structure of the window's glass and then draw a rectangle on the non-glassy area (using the default WindowBrush as color). This is the result:&lt;br /&gt; &lt;br /&gt;img&lt;br /&gt;
&lt;/div&gt;</description><author>Lck</author><pubDate>Thu, 28 Feb 2008 12:36:20 GMT</pubDate><guid isPermaLink="false">UPDATED WIKI: Glass on WPF 20080228123620P</guid></item></channel></rss>