tag:blogger.com,1999:blog-23809231441313136662024-02-21T08:45:46.116+05:30αrβitrαry βytesarbitrary assortment of thoughts en-route the world of ITVaibhav Sharmahttp://www.blogger.com/profile/08550674290122756598noreply@blogger.comBlogger22125tag:blogger.com,1999:blog-2380923144131313666.post-56821145377553327482015-09-20T20:58:00.001+05:302015-09-20T21:12:09.792+05:30Wikipedia –Read random article within a category<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
Since its creation in 2001, <a href="https://en.wikipedia.org/wiki/Wikipedia:About" target="_blank">Wikipedia</a> has grown enormously into one of the largest reference websites, with more than <span class="plainlinks"><a class="external text" href="https://stats.wikimedia.org/EN/TablesWikipediansEditsGt5.htm" target="_blank">70,000 active contributors</a></span> working on more than <a class="extiw" href="https://meta.wikimedia.org/wiki/List_of_Wikipedias#Grand_Total" target="_blank" title="m:List of Wikipedias">35,000,000 articles</a> in <a href="https://en.wikipedia.org/wiki/Special:SiteMatrix" target="_blank" title="Special:SiteMatrix">290 languages</a>.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Most of us generally use our favorite search engine or Wikipedia's in-built search functionality to find and read articles. A lesser known (or used) feature of Wikipedia is available on the left navigation menu beside any article known as <a href="https://en.wikipedia.org/wiki/Special:Random" target="_blank">random article</a> (shown below).</div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxIS0-OYjCGQvOktHlvfZ6N-0P66tJKfktqlK9lNPetGzWc1OrXOpi4-J_kCPmpmCZCnzD8FMFjUDyb8FnGE40lGj91-hM-0l5z0PY903zQHMGlNK5vqXk1bQYnTrhwgqWtErBErKi3Hg/s1600/random.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="302" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxIS0-OYjCGQvOktHlvfZ6N-0P66tJKfktqlK9lNPetGzWc1OrXOpi4-J_kCPmpmCZCnzD8FMFjUDyb8FnGE40lGj91-hM-0l5z0PY903zQHMGlNK5vqXk1bQYnTrhwgqWtErBErKi3Hg/s320/random.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: justify;">
The link uses a special address to retrieve a random article:</div>
<div style="text-align: justify;">
<a href="https://en.wikipedia.org/wiki/Special:Random" target="_blank">https://en.wikipedia.org/wiki/Special:Random</a> </div>
<div style="text-align: justify;">
(bookmark it in your favorite browser <i>before browsing the link</i>)</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
With millions of articles in the repository, this is an addictive way of reading about random stuffs on Wikipedia.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
However, if you are more interested in a filtered subset of articles, say, based on categories, Wikipedia has a special link for category wise randomized article too.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
For eg. the following will give you a random article under Physics category:</div>
<div style="text-align: justify;">
<a href="https://en.wikipedia.org/wiki/Special:RandomInCategory/Physics" target="_blank">https://en.wikipedia.org/wiki/Special:RandomInCategory/Physics</a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
For Computers related articles:</div>
<div style="text-align: justify;">
<a href="https://en.wikipedia.org/wiki/Special:RandomInCategory/Computers" target="_blank">https://en.wikipedia.org/wiki/Special:RandomInCategory/Computers</a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
For the list of categories, check this <a href="https://en.wikipedia.org/wiki/Category:Fundamental_categories" target="_blank">link</a>.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Be warned, this is an addictive tip, that could keep you engrossed for hours on Wikipedia :)</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Happy reading!</div>
</div>
Vaibhav Sharmahttp://www.blogger.com/profile/05834457630459295446noreply@blogger.com0tag:blogger.com,1999:blog-2380923144131313666.post-77551220198225998252015-01-13T20:35:00.000+05:302015-01-13T20:35:00.862+05:30Syncfusion announces free toolkit for individual developers and small companies<div dir="ltr" style="text-align: left;" trbidi="on">
The .NET eco-system is undergoing some exciting changes making it a great time to be a .NET developer. With Microsoft offering its flagship IDE to individual developers for free through the <a href="http://www.visualstudio.com/products/visual-studio-community-vs" target="_blank">Visual Studio Community Edition</a>, and embracing larger community through open-source of <a href="https://github.com/dotnet" target="_blank">core library</a>, it is now Syncfusion which has jumped on to become the default toolset for possibly millions of developers across platforms.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://www.syncfusion.com/Content/en-US/products/Images/CommunityLicense/community-license-banner.png?v=06012015232225" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="247" src="https://www.syncfusion.com/Content/en-US/products/Images/CommunityLicense/community-license-banner.png?v=06012015232225" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Image courtesy: Syncfusion</td></tr>
</tbody></table>
The <a href="https://www.syncfusion.com/products/communitylicense" target="_blank">community edition</a> which is free for individual developers and small companies includes around 650+ controls across various platforms, with full support and updates that is expected from a professional edition (valued at $9,975).<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><span style="margin-left: auto; margin-right: auto;"><img alt="Syncfusion Community Edition product list" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgw_AJTvP7Y1sMF0l5FbPQjf9fFNG5rZzXoY-nAUzvvRg1RDQKBpp6TGwXY6P-J6zQipEdvcgxj9z4aiXd6Vf_Mf08ZqmqNaJksUrIyT09zvk9utMDQu62Bm5DsV3z-Zzuu1Tg0F81cLVE/s1600/syncfusion-community-license.png" height="360" title="Syncfusion Community Edition product list" width="560" /></span></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Image courtesy: Syncfusion</td></tr>
</tbody></table>
You can claim your free license by heading on to the <a href="https://www.syncfusion.com/products/communitylicense" target="_blank">Community edition page</a> at Syncfusion <a href="https://www.syncfusion.com/products/communitylicense" target="_blank">here</a>.<br />
<br />
Happy Coding!</div>
Vaibhav Sharmahttp://www.blogger.com/profile/05834457630459295446noreply@blogger.com0tag:blogger.com,1999:blog-2380923144131313666.post-21302034676382666762014-09-07T21:16:00.000+05:302014-09-07T21:44:50.559+05:30AvalonEdit – Search panel customization<p align="justify">AvalonEdit serves as the underlying text editor for <a title="Visit SharpDevelop IDE page" href="http://www.icsharpcode.net/opensource/sd/" target="_blank">SharpDevelop</a>, the free and open source alternative to Visual Studio. The team at SharpDevelop have decoupled a lot of functionalities and have provided the text editor as a separate Nuget Package (available <a title="AvalonEdit on Nuget" href="https://www.nuget.org/packages/AvalonEdit" target="_blank">here</a>).</p> <p align="justify">While configurable syntax highlighting and code-completion is a very well-known and advertised feature of AvalonEdit, few are aware that AvalonEdit ships with an out-of-the-box Search panel functionality.</p> <h2>Search panel in action</h2> <p><img title="ILSpy Search panel" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="ILSpy Search panel" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1Sq255fJL_UQsikLI_h12w5NTopLMdGexSm2DAv9I1XuM7LPBj2MLG-UvjOy1sLqUEYLvqckTChUTjVj2Zzf0I9gM8NxYO7XpGkX-kIa_teKxS2wNXCmKCIQFq1B0-9SlaeObN6EAuko/?imgmax=800" width="582" height="308" /></p> <p>Image source: AvalonEdit default search panel in ILSpy</p> <h2>Implementation</h2> <p>After referencing the TextEditor in XAML and in code-behind, simply call the <em>install</em> method on the <em>SearchPanel</em> class to enable integrated search panel functionality.</p> <pre style="font-size: 15px; font-family: monaco,consolas,courier, monospace; background: white; color: black"><span style="color: darkblue">SearchPanel</span>.<span style="color: darkcyan">Install</span>(<span style="color: purple">HostsEditor</span>);</pre><br /><p>The above snippet will enable the search panel functionality in the editor when the user presses the “<strong>CTRL + F</strong>” shortcut.</p><br /><p>There is a handy <strong><em>Uninstall</em></strong> method available too to disable the search panel functionality.</p><br /><h2>Customizing the search panel’s look and feel</h2><br /><p align="justify">While the default UI for the search panel might be sufficient for your application, you might need to style the panel in general, to match the look and feel of your application.</p><br /><p align="justify">While developing <a title="Visit EasyHosts on Codeplex" href="http://easyhosts.codeplex.com" target="_blank">EasyHosts</a> (an open-source hosts file editor), I had to re-style the default look and feel of the search panel to match the theme of the application (shown below). Re-styling the search panel template is a breeze thanks to WPF.</p><br /><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTCBpRX4cKrJq-dp82Zxv9X7bCtZx8YZTp7nyLORY38Ln_FgK_B24-3gG_rs-jC_fXl3lzjRCb-8Q0KK4krIb3B_n4pHLOw-LqLHrpmC7_MRHax-4XDhbqvRNLDT148byI1G0mID3O1mw/s1600-h/EasyHosts-Search-panel5.png" target="_blank"><img title="EasyHosts Search panel" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="EasyHosts Search panel" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfad2PFxqPbIC0CLcJr12LhgsZawHPQpSatoLGvfueCOCNTLcOoCMnVzxeIelqFLGyOmM0gZ_3xMKyihyphenhyphen9p4BDw5qEg7bXyeRHJFUDKPO5nH2azASukWU776u4qT7-7wocVxpIue4XE8A/?imgmax=800" width="603" height="386" /></a></p><br /><h3>Search panel template</h3><br /><p align="justify">The default search panel template is available <a title="AvalonEdit Search Panel template on GitHub" href="https://github.com/icsharpcode/AvalonEdit/blob/master/ICSharpCode.AvalonEdit/Search/SearchPanel.xaml" target="_blank">on Github</a>.</p><br /><p align="justify">Note: <a title="Visit EasyHosts on Codeplex" href="http://easyhosts.codeplex.com" target="_blank">EasyHosts</a> uses MahApps.Metro UI theme, so brush references below will have to be replaced by your custom theme brushes.</p><br /><div id="codeSnippetWrapper" style="overflow: auto; cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; background-color: #f4f4f4"><br /> <div id="codeSnippet" style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"><span style="color: #0000ff"><</span><span style="color: #800000">Style</span> <span style="color: #ff0000">TargetType</span><span style="color: #0000ff">="editor:SearchPanel"</span><span style="color: #0000ff">></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #0000ff"><</span><span style="color: #800000">Setter</span> <span style="color: #ff0000">Property</span><span style="color: #0000ff">="Template"</span><span style="color: #0000ff">></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> <span style="color: #0000ff"><</span><span style="color: #800000">Setter.Value</span><span style="color: #0000ff">></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #0000ff"><</span><span style="color: #800000">ControlTemplate</span> <span style="color: #ff0000">TargetType</span><span style="color: #0000ff">="{x:Type editor:SearchPanel}"</span><span style="color: #0000ff">></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> <span style="color: #0000ff"><</span><span style="color: #800000">Border</span> <span style="color: #ff0000">Background</span><span style="color: #0000ff">="{DynamicResource WindowBackgroundBrush}"</span> </pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #ff0000">BorderBrush</span><span style="color: #0000ff">="{DynamicResource AccentColorBrush}"</span> </pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> <span style="color: #ff0000">BorderThickness</span><span style="color: #0000ff">="1,0,1,1"</span> <span style="color: #ff0000">HorizontalAlignment</span><span style="color: #0000ff">="Right"</span> </pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #ff0000">VerticalAlignment</span><span style="color: #0000ff">="Top"</span> <span style="color: #ff0000">Cursor</span><span style="color: #0000ff">="Arrow"</span><span style="color: #0000ff">></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> <span style="color: #0000ff"><</span><span style="color: #800000">StackPanel</span> <span style="color: #ff0000">Orientation</span><span style="color: #0000ff">="Horizontal"</span><span style="color: #0000ff">></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #0000ff"><</span><span style="color: #800000">TextBox</span> <span style="color: #ff0000">Name</span><span style="color: #0000ff">="PART_searchTextBox"</span> <span style="color: #ff0000">Focusable</span><span style="color: #0000ff">="True"</span> </pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> <span style="color: #ff0000">BorderBrush</span><span style="color: #0000ff">="{DynamicResource AccentColorBrush}"</span> </pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #ff0000">Width</span><span style="color: #0000ff">="150"</span> <span style="color: #ff0000">Height</span><span style="color: #0000ff">="Auto"</span> <span style="color: #ff0000">Margin</span><span style="color: #0000ff">="3,3,0,3"</span><span style="color: #0000ff">></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> <span style="color: #0000ff"><</span><span style="color: #800000">TextBox.Text</span><span style="color: #0000ff">></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #0000ff"><</span><span style="color: #800000">Binding</span> <span style="color: #ff0000">Path</span><span style="color: #0000ff">="SearchPattern"</span> </pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> <span style="color: #ff0000">RelativeSource</span><span style="color: #0000ff">="{RelativeSource TemplatedParent}"</span> </pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #ff0000">UpdateSourceTrigger</span><span style="color: #0000ff">="PropertyChanged"</span><span style="color: #0000ff">></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> <span style="color: #0000ff"><</span><span style="color: #800000">Binding.ValidationRules</span><span style="color: #0000ff">></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #0000ff"><</span><span style="color: #800000">ExceptionValidationRule</span> <span style="color: #0000ff">/></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> <span style="color: #0000ff"></</span><span style="color: #800000">Binding.ValidationRules</span><span style="color: #0000ff">></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #0000ff"></</span><span style="color: #800000">Binding</span><span style="color: #0000ff">></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> <span style="color: #0000ff"></</span><span style="color: #800000">TextBox.Text</span><span style="color: #0000ff">></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #0000ff"></</span><span style="color: #800000">TextBox</span><span style="color: #0000ff">></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> </pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #008000"><!-- FindNext button --></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> <span style="color: #0000ff"><</span><span style="color: #800000">Button</span> <span style="color: #ff0000">Margin</span><span style="color: #0000ff">="0,1,1,1"</span> <span style="color: #ff0000">Height</span><span style="color: #0000ff">="30"</span> <span style="color: #ff0000">Width</span><span style="color: #0000ff">="30"</span> <span style="color: #ff0000">Command</span><span style="color: #0000ff">="editor:SearchCommands.FindNext"</span> </pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #ff0000">ToolTip</span><span style="color: #0000ff">="{Binding Localization.FindNextText, </pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> RelativeSource={RelativeSource TemplatedParent}}"</span> </pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #ff0000">Padding</span><span style="color: #0000ff">="1"</span> <span style="color: #ff0000">Style</span><span style="color: #0000ff">="{DynamicResource MetroAccentButton}"</span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> <span style="color: #ff0000">BorderThickness</span><span style="color: #0000ff">="0"</span> <span style="color: #ff0000">BorderBrush</span><span style="color: #0000ff">="Transparent"</span><span style="color: #0000ff">></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #0000ff"><</span><span style="color: #800000">Path</span> <span style="color: #ff0000">Data</span><span style="color: #0000ff">="F1M-218.342,2910.79L-234.066,2926.52 -233.954,2926.63 -225.428,2926.63 -210.87,2912.07 -206.495,2907.7 -225.313,2888.88 -234.066,2888.88 -218.342,2904.6 -259.829,2904.6 -259.829,2910.79 -218.342,2910.79z"</span> </pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> <span style="color: #ff0000">Style</span><span style="color: #0000ff">="{DynamicResource DefaultButtonPathStyle}"</span> <span style="color: #0000ff">/></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #0000ff"></</span><span style="color: #800000">Button</span><span style="color: #0000ff">></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> </pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #008000"><!-- FindPrevious (set visibility if required) button --></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> <span style="color: #0000ff"><</span><span style="color: #800000">Button</span> <span style="color: #ff0000">Margin</span><span style="color: #0000ff">="1"</span> <span style="color: #ff0000">Height</span><span style="color: #0000ff">="30"</span> <span style="color: #ff0000">Width</span><span style="color: #0000ff">="30"</span> <span style="color: #ff0000">Command</span><span style="color: #0000ff">="editor:SearchCommands.FindPrevious"</span> </pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #ff0000">ToolTip</span><span style="color: #0000ff">="{Binding Localization.FindPreviousText, </pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> RelativeSource={RelativeSource TemplatedParent}}"</span> </pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #ff0000">Padding</span><span style="color: #0000ff">="1"</span> <span style="color: #ff0000">Style</span><span style="color: #0000ff">="{DynamicResource AccentedSquareButtonStyle}"</span> </pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> <span style="color: #ff0000">BorderThickness</span><span style="color: #0000ff">="0"</span> <span style="color: #ff0000">BorderBrush</span><span style="color: #0000ff">="Transparent"</span> <span style="color: #ff0000">Visibility</span><span style="color: #0000ff">="Collapsed"</span><span style="color: #0000ff">></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #0000ff"><</span><span style="color: #800000">Path</span> <span style="color: #ff0000">Data</span><span style="color: #0000ff">="F1M-185.925,-2026.96L-203.062,-2048.74C-197.485,-2056.51 -197.433,-2067.31 -203.64,-2075.2 -211.167,-2084.76 -225.019,-2086.42 -234.588,-2078.89 -244.154,-2071.36 -245.808,-2057.51 -238.282,-2047.94 -231.986,-2039.95 -221.274,-2037.5 -212.337,-2041.31L-195.262,-2019.61 -185.925,-2026.96z M-231.201,-2053.51C-235.653,-2059.17 -234.674,-2067.36 -229.02,-2071.81 -223.36,-2076.26 -215.169,-2075.29 -210.721,-2069.63 -206.269,-2063.97 -207.245,-2055.78 -212.902,-2051.33 -218.559,-2046.88 -226.752,-2047.86 -231.201,-2053.51z"</span> </pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> <span style="color: #ff0000">Stretch</span><span style="color: #0000ff">="Uniform"</span> <span style="color: #ff0000">Fill</span><span style="color: #0000ff">="{DynamicResource IdealForegroundColorBrush}"</span> </pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #ff0000">Width</span><span style="color: #0000ff">="16"</span> <span style="color: #ff0000">Height</span><span style="color: #0000ff">="16"</span> <span style="color: #0000ff">/></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> <span style="color: #0000ff"></</span><span style="color: #800000">Button</span><span style="color: #0000ff">></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> </pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> <span style="color: #0000ff"><</span><span style="color: #800000">StackPanel</span> <span style="color: #ff0000">Orientation</span><span style="color: #0000ff">="Horizontal"</span><span style="color: #0000ff">></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #0000ff"><</span><span style="color: #800000">ToggleButton</span> <span style="color: #ff0000">Width</span><span style="color: #0000ff">="36"</span> <span style="color: #ff0000">Height</span><span style="color: #0000ff">="36"</span> <span style="color: #ff0000">Margin</span><span style="color: #0000ff">="0"</span> <span style="color: #ff0000">Cursor</span><span style="color: #0000ff">="Hand"</span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> <span style="color: #ff0000">ToolTip</span><span style="color: #0000ff">="{Binding Localization.MatchCaseText, RelativeSource={RelativeSource TemplatedParent}}"</span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #ff0000">IsChecked</span><span style="color: #0000ff">="{Binding MatchCase, RelativeSource={RelativeSource TemplatedParent}}"</span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> <span style="color: #ff0000">Style</span><span style="color: #0000ff">="{DynamicResource MetroCircleToggleButtonStyle}"</span> <span style="color: #ff0000">Content</span><span style="color: #0000ff">="aA"</span> <span style="color: #ff0000">FontWeight</span><span style="color: #0000ff">="Bold"</span> <span style="color: #ff0000">FontFamily</span><span style="color: #0000ff">="Consolas,Courier New,Courier"</span><span style="color: #0000ff">></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #0000ff"></</span><span style="color: #800000">ToggleButton</span><span style="color: #0000ff">></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> </pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #0000ff"><</span><span style="color: #800000">ToggleButton</span> <span style="color: #ff0000">Width</span><span style="color: #0000ff">="36"</span> <span style="color: #ff0000">Height</span><span style="color: #0000ff">="36"</span> <span style="color: #ff0000">Margin</span><span style="color: #0000ff">="0"</span> <span style="color: #ff0000">Cursor</span><span style="color: #0000ff">="Hand"</span> <span style="color: #ff0000">Style</span><span style="color: #0000ff">="{DynamicResource MetroCircleToggleButtonStyle}"</span> </pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> <span style="color: #ff0000">ToolTip</span><span style="color: #0000ff">="{Binding Localization.MatchWholeWordsText, RelativeSource={RelativeSource TemplatedParent}}"</span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #ff0000">IsChecked</span><span style="color: #0000ff">="{Binding WholeWords, RelativeSource={RelativeSource TemplatedParent}}"</span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> <span style="color: #ff0000">Content</span><span style="color: #0000ff">="Ab"</span> <span style="color: #ff0000">FontWeight</span><span style="color: #0000ff">="Bold"</span> <span style="color: #ff0000">FontFamily</span><span style="color: #0000ff">="Consolas,Courier New,Courier"</span><span style="color: #0000ff">></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #0000ff"></</span><span style="color: #800000">ToggleButton</span><span style="color: #0000ff">></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> </pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #0000ff"><</span><span style="color: #800000">ToggleButton</span> <span style="color: #ff0000">Width</span><span style="color: #0000ff">="36"</span> <span style="color: #ff0000">Height</span><span style="color: #0000ff">="36"</span> <span style="color: #ff0000">Margin</span><span style="color: #0000ff">="0"</span> <span style="color: #ff0000">Cursor</span><span style="color: #0000ff">="Hand"</span> <span style="color: #ff0000">Style</span><span style="color: #0000ff">="{DynamicResource MetroCircleToggleButtonStyle}"</span> </pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> <span style="color: #ff0000">ToolTip</span><span style="color: #0000ff">="{Binding Localization.UseRegexText, RelativeSource={RelativeSource TemplatedParent}}"</span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #ff0000">IsChecked</span><span style="color: #0000ff">="{Binding UseRegex, RelativeSource={RelativeSource TemplatedParent}}"</span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> <span style="color: #ff0000">Content</span><span style="color: #0000ff">="a*"</span> <span style="color: #ff0000">FontWeight</span><span style="color: #0000ff">="Bold"</span> <span style="color: #ff0000">FontFamily</span><span style="color: #0000ff">="Consolas,Courier New,Courier"</span><span style="color: #0000ff">></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #0000ff"></</span><span style="color: #800000">ToggleButton</span><span style="color: #0000ff">></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> <span style="color: #0000ff"></</span><span style="color: #800000">StackPanel</span><span style="color: #0000ff">></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> </pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> <span style="color: #008000"><!-- Search Panel close button --></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #0000ff"><</span><span style="color: #800000">Button</span> <span style="color: #ff0000">Height</span><span style="color: #0000ff">="16"</span> <span style="color: #ff0000">Width</span><span style="color: #0000ff">="16"</span> <span style="color: #ff0000">HorizontalAlignment</span><span style="color: #0000ff">="Right"</span> <span style="color: #ff0000">Padding</span><span style="color: #0000ff">="0"</span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> <span style="color: #ff0000">Background</span><span style="color: #0000ff">="Transparent"</span> <span style="color: #ff0000">Cursor</span><span style="color: #0000ff">="Hand"</span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #ff0000">VerticalAlignment</span><span style="color: #0000ff">="Top"</span> <span style="color: #ff0000">Command</span><span style="color: #0000ff">="editor:SearchCommands.CloseSearchPanel"</span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> <span style="color: #ff0000">VerticalContentAlignment</span><span style="color: #0000ff">="Center"</span> <span style="color: #ff0000">HorizontalContentAlignment</span><span style="color: #0000ff">="Center"</span><span style="color: #0000ff">></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #0000ff"><</span><span style="color: #800000">Path</span> <span style="color: #ff0000">Data</span><span style="color: #0000ff">="F1M54.0573,47.8776L38.1771,31.9974 54.0547,16.1198C55.7604,14.4141 55.7604,11.6511 54.0573,9.94531 52.3516,8.23962 49.5859,8.23962 47.8802,9.94531L32.0026,25.8229 16.1224,9.94531C14.4167,8.23962 11.6511,8.23962 9.94794,9.94531 8.24219,11.6511 8.24219,14.4141 9.94794,16.1198L25.8255,32 9.94794,47.8776C8.24219,49.5834 8.24219,52.3477 9.94794,54.0534 11.6511,55.7572 14.4167,55.7585 16.1224,54.0534L32.0026,38.1745 47.8802,54.0534C49.5859,55.7585 52.3516,55.7572 54.0573,54.0534 55.7604,52.3477 55.763,49.5834 54.0573,47.8776z"</span> </pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> <span style="color: #ff0000">Height</span><span style="color: #0000ff">="10"</span> <span style="color: #ff0000">Width</span><span style="color: #0000ff">="10"</span> <span style="color: #ff0000">Stretch</span><span style="color: #0000ff">="Uniform"</span> <span style="color: #ff0000">Fill</span><span style="color: #0000ff">="Red"</span> <span style="color: #ff0000">Margin</span><span style="color: #0000ff">="0"</span> <span style="color: #0000ff">/></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #0000ff"></</span><span style="color: #800000">Button</span><span style="color: #0000ff">></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> <span style="color: #0000ff"></</span><span style="color: #800000">StackPanel</span><span style="color: #0000ff">></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #0000ff"></</span><span style="color: #800000">Border</span><span style="color: #0000ff">></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> <span style="color: #0000ff"></</span><span style="color: #800000">ControlTemplate</span><span style="color: #0000ff">></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"> <span style="color: #0000ff"></</span><span style="color: #800000">Setter.Value</span><span style="color: #0000ff">></span></pre><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: white"> <span style="color: #0000ff"></</span><span style="color: #800000">Setter</span><span style="color: #0000ff">></span></pre><br /><br /> <pre style="border-top-style: none; overflow: visible; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"><span style="color: #0000ff"></</span><span style="color: #800000">Style</span><span style="color: #0000ff">></span></pre><br /><!--CRLF--></div><br /></div><br /><br /><p><strong>Happy Coding!</strong></p> Vaibhav Sharmahttp://www.blogger.com/profile/08550674290122756598noreply@blogger.com0tag:blogger.com,1999:blog-2380923144131313666.post-41001856388267748432014-05-08T23:20:00.000+05:302014-05-08T23:26:52.308+05:30Azure Portal Navigation Style in WPF<p align="justify">When it comes to product user experiences, Microsoft has always delighted and surprised its users with innovative user interfaces, be it the Office Ribbon UI, Dynamics CRM or Metro UI in Windows 8. The Windows Azure portal too is a great example of elegant user experience that embraces effective call to action. Below is one of the screens from the management portal:</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7pIL3yf7Ll-w8i2RTOQBeZuSHBJstQln4tVwzNQWUIZAqAsGUM7gEGyGwaSBe_kelSWRsXVZB1pROfs-0KG_htTvtD4SNMbOLvVx3Pp0BVXtx8lYE25dmwUwWTCo382sKnsLlYkkc0aU/s1600-h/clip_image002%25255B23%25255D.png"><img title="clip_image002" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto" border="0" alt="clip_image002" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqgwApHFVVgY4yAPZFt4S7SnU1nbCMEtm74vKnTbzOkpYFn-me_G__PoXynWNf7eIoarmsOjoMG7iFb0LgXD8lAxbKnAHWk_xl1Wy9OLAmSbWEE0LDFB9-c18j-GPS1yNfBKYnr3mO9h8/?imgmax=800" width="568" height="224" /></a></p> <p><b>Image source</b>: Microsoft Azure <a href="http://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-tutorial/" target="_blank">portal</a>.</p> <p align="justify">Ever since I got a glimpse of the portal I have been inching to use this navigation pattern in my application and when finally I did get a chance to put the navigation pattern to use, WPF was the obvious choice. The final result of the ListBox styling is shown below:</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdpGhaiA1F5e854KJqmXXUzFQlCNu0a5FqDIq1-egfvvXSya9mV9ph3wTwfdvpqtoPBxtbHxHKvlVxzUxK0wq0lhKUAIV7Lq_wpbT6ueMuT8WOdKo5DCRvqqkXyNmGzjKmDuSfAO7hdZ0/s1600-h/clip_image004%25255B7%25255D.jpg"><img title="clip_image004" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto" border="0" alt="clip_image004" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0lWSKj9-3gw75OCtRUX5AeTSlFMke3N9mItQJ9AIov03V5EECxnysjHJVPFvJRG0BAYfHv5n99gF0BnecoHV9Jc0XXqezJOpc6gztyc9neSHCtYllBK3cEjbLZ27bJwru3NjiAZqZLA4/?imgmax=800" width="568" height="196" /></a></p> <p>The tools and techniques used to design/style the UI is described below.</p> <h2>Tools of the trade:</h2> <ul> <li><a href="http://www.kaxaml.com" target="_blank">Kaxaml</a> – the hands down best XAML editor on this planet (and beyond) <br /></li> <li><a href="http://www.colorzilla.com" target="_blank">ColorZilla</a>’s eye dropper – for extracting colors from the portal image above <br /></li> <li><a href="http://www.syncfusion.com/metrostudio" target="_blank">Metro Studio</a> – the awesome developer friendly icon editor for XAML icons </li> </ul> <p> </p> <h2>Step 1: Defining base colors</h2> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: "><font face="Consolas"><font style="font-size: 10pt" color="#008000"><!-- background color of the grid and the list box --></font></font></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><font style="font-size: 10pt"><SolidColorBrush </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">x:Key</font></span><span style="font-family: ; color: "><font color="#0000ff">="azureItemBackground" </font></span><span style="font-family: ; color: "><font color="#ff0000">Color</font></span><span style="font-family: ; color: "><font color="#0000ff">="#3C454F" </font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">/></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: "><font face="Consolas"><font style="font-size: 10pt" color="#008000"><!-- background color of the selected list box item --></font></font></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><font style="font-size: 10pt"><SolidColorBrush </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">x:Key</font></span><span style="font-family: ; color: "><font color="#0000ff">="azureItemSelected" </font></span><span style="font-family: ; color: "><font color="#ff0000">Color</font></span><span style="font-family: ; color: "><font color="#0000ff">="#6D747B" </font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">/></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: "><font face="Consolas"><font style="font-size: 10pt" color="#008000"><!-- foreground color for the extra text displayed under the primary text --></font></font></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><font style="font-size: 10pt"><SolidColorBrush </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">x:Key</font></span><span style="font-family: ; color: "><font color="#0000ff">="azureItemHighlightText" </font></span><span style="font-family: ; color: "><font color="#ff0000">Color</font></span><span style="font-family: ; color: "><font color="#0000ff">="#89C402" </font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">/></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: "><font face="Consolas"><font style="font-size: 10pt" color="#008000"><!-- metro color for the title and other highlighting --></font></font></span></p> <p class="MsoNormal" style="margin: 0in 0in 8pt; text-justify: inter-ideograph; line-height: 12pt" align="justify"><font face="Consolas"><span style="font-family: ; color: ; line-height: 11pt"><font color="#8b008b"><font style="font-size: 10pt"><SolidColorBrush </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: ; line-height: 11pt"><font color="#ff0000">x:Key</font></span><span style="font-family: ; color: ; line-height: 11pt"><font color="#0000ff">="AccentColorBrush" </font></span><span style="font-family: ; color: ; line-height: 11pt"><font color="#ff0000">Color</font></span><span style="font-family: ; color: ; line-height: 11pt"><font color="#0000ff">="CornflowerBlue" </font></span></font><span style="font-family: ; color: ; line-height: 11pt"><font style="font-size: 10pt" color="#8b008b">/></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 8pt; text-justify: inter-ideograph; line-height: 12pt" align="justify"><font color="#8b008b" size="2" face="Consolas"><span style="font-family: ; color: ; line-height: 11pt"></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 8pt; text-justify: inter-ideograph; line-height: 12pt" align="justify"><font color="#8b008b" size="2" face="Consolas"><span style="font-family: ; color: ; line-height: 11pt"></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 8pt; text-justify: inter-ideograph; line-height: 12pt" align="justify"><font color="#8b008b" size="2" face="Consolas"><span style="font-family: ; color: ; line-height: 11pt"></span></font></p> <h2 align="justify">Step 2: Styling the ListBox</h2> <p align="justify">The ListBox control along with the content composition model in WPF makes designing this interface a breeze. First the ListBox control itself requires some property changes as below:</p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><font style="font-size: 10pt"><Style </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">x:Key</font></span><span style="font-family: ; color: "><font color="#0000ff">="azureListBoxStyle" </font></span><span style="font-family: ; color: "><font color="#ff0000">TargetType</font></span><span style="font-family: ; color: "><font color="#0000ff">="ListBox"</font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">   </font></span><font style="font-size: 10pt"><Setter </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Property</font></span><span style="font-family: ; color: "><font color="#0000ff">="BorderThickness" </font></span><span style="font-family: ; color: "><font color="#ff0000">Value</font></span><span style="font-family: ; color: "><font color="#0000ff">="0,0,1,0" </font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">/></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">   </font></span><font style="font-size: 10pt"><Setter </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Property</font></span><span style="font-family: ; color: "><font color="#0000ff">="Background" </font></span><span style="font-family: ; color: "><font color="#ff0000">Value</font></span><span style="font-family: ; color: "><font color="#0000ff">="{StaticResource azureItemBackground}" </font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">/></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">   </font></span><font style="font-size: 10pt"><Setter </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Property</font></span><span style="font-family: ; color: "><font color="#0000ff">="HorizontalAlignment" </font></span><span style="font-family: ; color: "><font color="#ff0000">Value</font></span><span style="font-family: ; color: "><font color="#0000ff">="Left" </font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">/></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">   </font></span><font style="font-size: 10pt"><Setter </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Property</font></span><span style="font-family: ; color: "><font color="#0000ff">="VerticalAlignment" </font></span><span style="font-family: ; color: "><font color="#ff0000">Value</font></span><span style="font-family: ; color: "><font color="#0000ff">="Stretch" </font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">/></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">   </font></span><font style="font-size: 10pt"><Setter </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Property</font></span><span style="font-family: ; color: "><font color="#0000ff">="HorizontalContentAlignment" </font></span><span style="font-family: ; color: "><font color="#ff0000">Value</font></span><span style="font-family: ; color: "><font color="#0000ff">="Stretch" </font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">/></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">   </font></span><font style="font-size: 10pt"><Setter </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Property</font></span><span style="font-family: ; color: "><font color="#0000ff">="VerticalContentAlignment" </font></span><span style="font-family: ; color: "><font color="#ff0000">Value</font></span><span style="font-family: ; color: "><font color="#0000ff">="Stretch" </font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">/></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: ; line-height: 11pt; mso-fareast-font-family: simsun; mso-fareast-theme-font: minor-fareast; mso-ansi-language: en-us; mso-fareast-language: zh-cn; mso-bidi-language: ar-sa"><font face="Consolas"><font style="font-size: 10pt" color="#8b008b"></Style></font></font></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: ; line-height: 11pt; mso-fareast-font-family: simsun; mso-fareast-theme-font: minor-fareast; mso-ansi-language: en-us; mso-fareast-language: zh-cn; mso-bidi-language: ar-sa"><font color="#8b008b" size="2" face="Consolas"></font></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: ; line-height: 11pt; mso-fareast-font-family: simsun; mso-fareast-theme-font: minor-fareast; mso-ansi-language: en-us; mso-fareast-language: zh-cn; mso-bidi-language: ar-sa"><font color="#8b008b" size="2" face="Consolas"></font></span></p> <h2>Step 3: Creating the ListBoxItemTemplate (the critical piece)</h2> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><font style="font-size: 10pt"><DataTemplate </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">x:Key</font></span><span style="font-family: ; color: "><font color="#0000ff">="azureListItemTemplate"</font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">        </font></span><font style="font-size: 10pt"><Grid </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">HorizontalAlignment</font></span><span style="font-family: ; color: "><font color="#0000ff">="Stretch" </font></span><span style="font-family: ; color: "><font color="#ff0000">VerticalAlignment</font></span><span style="font-family: ; color: "><font color="#0000ff">="Stretch"</font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: "><font face="Consolas"><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">            </font></span><font style="font-size: 10pt"><Grid.ColumnDefinitions></font></font></font></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">                </font></span><font style="font-size: 10pt"><ColumnDefinition </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Width</font></span><span style="font-family: ; color: "><font color="#0000ff">="20" </font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">/></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">                </font></span><font style="font-size: 10pt"><ColumnDefinition </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Width</font></span><span style="font-family: ; color: "><font color="#0000ff">="Auto" </font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">/></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">                </font></span><font style="font-size: 10pt"><ColumnDefinition </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Width</font></span><span style="font-family: ; color: "><font color="#0000ff">="*" </font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">/></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: "><font face="Consolas"><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">            </font></span><font style="font-size: 10pt"></Grid.ColumnDefinitions></font></font></font></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">            </font></span><font style="font-size: 10pt"><Rectangle </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Width</font></span><span style="font-family: ; color: "><font color="#0000ff">="13" </font></span><span style="font-family: ; color: "><font color="#ff0000">Margin</font></span><span style="font-family: ; color: "><font color="#0000ff">="-30,0,0,0" </font></span><span style="font-family: ; color: "><font color="#ff0000">Grid.Column</font></span><span style="font-family: ; color: "><font color="#0000ff">="0"</font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: "><font face="Consolas"><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">                </font></span><font style="font-size: 10pt"><Rectangle.Style></font></font></font></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">                 </font></span><font style="font-size: 10pt"><span style="mso-spacerun: yes">   </span><Style </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">TargetType</font></span><span style="font-family: ; color: "><font color="#0000ff">="Rectangle"</font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">                        </font></span><font style="font-size: 10pt"><Setter </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Property</font></span><span style="font-family: ; color: "><font color="#0000ff">="Fill" </font></span><span style="font-family: ; color: "><font color="#ff0000">Value</font></span><span style="font-family: ; color: "><font color="#0000ff">="Transparent" </font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">/></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: "><font face="Consolas"><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">                        </font></span><font style="font-size: 10pt"><Style.Triggers></font></font></font></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">                            </font></span><font style="font-size: 10pt"><DataTrigger </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Binding</font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#0000ff">="{Binding Path=IsSelected, </font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><span style="mso-spacerun: yes"><font color="#0000ff"><font style="font-size: 10pt">                                                   </font></font></span></span><font style="font-size: 10pt"><span lang="FR" style="font-family: ; color: ; mso-ansi-language: fr"><font color="#ff0000">RelativeSource</font></span><span lang="FR" style="font-family: ; color: ; mso-ansi-language: fr"><font color="#0000ff">=</font></span><span lang="FR" style="font-family: ; color: ; mso-ansi-language: fr"><font color="#8b008b">{RelativeSource </font></span><span lang="FR" style="font-family: ; color: ; mso-ansi-language: fr"><font color="#ff0000">Mode</font></span><span lang="FR" style="font-family: ; color: ; mso-ansi-language: fr"><font color="#0000ff">=</font></span></font><span lang="FR" style="font-family: ; color: ; mso-ansi-language: fr"><font style="font-size: 10pt" color="#8b008b">FindAncestor, </font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span lang="FR" style="font-family: ; color: ; mso-ansi-language: fr"><span style="mso-spacerun: yes"><font color="#8b008b"><font style="font-size: 10pt">                                                   </font></font></span></span><font style="font-size: 10pt"><span lang="FR" style="font-family: ; color: ; mso-ansi-language: fr"><font color="#ff0000">AncestorType</font></span><span lang="FR" style="font-family: ; color: ; mso-ansi-language: fr"><font color="#0000ff">=</font></span><span lang="FR" style="font-family: ; color: ; mso-ansi-language: fr"><font color="#8b008b">{x:Type ListBoxItem}}}</font></span></font><span lang="FR" style="font-family: ; color: ; mso-ansi-language: fr"><font style="font-size: 10pt" color="#0000ff">"</font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span lang="FR" style="font-family: ; color: ; mso-ansi-language: fr"><span style="mso-spacerun: yes"><font color="#0000ff"><font style="font-size: 10pt">                                     </font></font></span></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Value</font></span><span style="font-family: ; color: "><font color="#0000ff">="True"</font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">                                </font></span><font style="font-size: 10pt"><Setter </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Property</font></span><span style="font-family: ; color: "><font color="#0000ff">="Fill" </font></span><span style="font-family: ; color: "><font color="#ff0000">Value</font></span><span style="font-family: ; color: "><font color="#0000ff">="White" </font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">/></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: "><font face="Consolas"><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">                            </font></span><font style="font-size: 10pt"></DataTrigger></font></font></font></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">                            </font></span><font style="font-size: 10pt"><DataTrigger </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Binding</font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#0000ff">="{Binding Path=IsMouseOver, </font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><span style="mso-spacerun: yes"><font color="#0000ff"><font style="font-size: 10pt">                                                   </font></font></span></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">RelativeSource</font></span><span style="font-family: ; color: "><font color="#0000ff">=</font></span><span style="font-family: ; color: "><font color="#8b008b">{RelativeSource </font></span><span style="font-family: ; color: "><font color="#ff0000">Mode</font></span><span style="font-family: ; color: "><font color="#0000ff">=</font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">FindAncestor, </font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><span style="mso-spacerun: yes"><font color="#8b008b"><font style="font-size: 10pt">                                                   </font></font></span></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">AncestorType</font></span><span style="font-family: ; color: "><font color="#0000ff">=</font></span><span style="font-family: ; color: "><font color="#8b008b">{x:Type ListBoxItem}}}</font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#0000ff">"</font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><span style="mso-spacerun: yes"><font color="#0000ff"><font style="font-size: 10pt">                                     </font></font></span></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Value</font></span><span style="font-family: ; color: "><font color="#0000ff">="True"</font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">                                </font></span><font style="font-size: 10pt"><Setter </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Property</font></span><span style="font-family: ; color: "><font color="#0000ff">="Fill" </font></span><span style="font-family: ; color: "><font color="#ff0000">Value</font></span><span style="font-family: ; color: "><font color="#0000ff">="{DynamicResource AccentColorBrush}" </font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">/></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: "><font face="Consolas"><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">                            </font></span><font style="font-size: 10pt"></DataTrigger></font></font></font></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: "><font face="Consolas"><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">                        </font></span><font style="font-size: 10pt"></Style.Triggers></font></font></font></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: "><font face="Consolas"><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">                    </font></span><font style="font-size: 10pt"></Style></font></font></font></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: "><font face="Consolas"><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">                </font></span><font style="font-size: 10pt"></Rectangle.Style></font></font></font></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: "><font face="Consolas"><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">            </font></span><font style="font-size: 10pt"></Rectangle></font></font></font></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: "><span style="mso-spacerun: yes"><font face="Consolas"><font style="font-size: 10pt" color="#8b008b">    </font></font></span></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">            </font></span><font style="font-size: 10pt"><Path </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Margin</font></span><span style="font-family: ; color: "><font color="#0000ff">="0,10,5,10" </font></span><span style="font-family: ; color: "><font color="#ff0000">Grid.Row</font></span><span style="font-family: ; color: "><font color="#0000ff">="0" </font></span><span style="font-family: ; color: "><font color="#ff0000">Grid.Column</font></span><span style="font-family: ; color: "><font color="#0000ff">="1" </font></span><span style="font-family: ; color: "><font color="#ff0000">x:Name</font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#0000ff">="listItemIcon"</font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><span style="mso-spacerun: yes"><font color="#0000ff"><font style="font-size: 10pt">              </font></font></span></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">HorizontalAlignment</font></span><span style="font-family: ; color: "><font color="#0000ff">="Center" </font></span><span style="font-family: ; color: "><font color="#ff0000">VerticalAlignment</font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#0000ff">="Center"</font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><span style="mso-spacerun: yes"><font color="#0000ff"><font style="font-size: 10pt">              </font></font></span></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Stretch</font></span><span style="font-family: ; color: "><font color="#0000ff">="Uniform" </font></span><span style="font-family: ; color: "><font color="#ff0000">Width</font></span><span style="font-family: ; color: "><font color="#0000ff">="30" </font></span><span style="font-family: ; color: "><font color="#ff0000">Height</font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#0000ff">="30" </font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><span style="mso-spacerun: yes"><font color="#0000ff"><font style="font-size: 10pt">              </font></font></span></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Data</font></span><span style="font-family: ; color: "><font color="#0000ff">="{Binding XPath=@Picture}"</font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: "><font face="Consolas"><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">                </font></span><font style="font-size: 10pt"><Path.Style></font></font></font></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">  </font></span><font style="font-size: 10pt"><span style="mso-spacerun: yes">                  </span><Style </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">TargetType</font></span><span style="font-family: ; color: "><font color="#0000ff">="Path"</font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">                        </font></span><font style="font-size: 10pt"><Setter </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Property</font></span><span style="font-family: ; color: "><font color="#0000ff">="Fill" </font></span><span style="font-family: ; color: "><font color="#ff0000">Value</font></span><span style="font-family: ; color: "><font color="#0000ff">="#DADCDE" </font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">/></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: "><font face="Consolas"><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">                        </font></span><font style="font-size: 10pt"><Style.Triggers></font></font></font></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">                            </font></span><font style="font-size: 10pt"><DataTrigger </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Binding</font></span><span style="font-family: ; color: "><font color="#0000ff">="{Binding Path=IsSelected, </font></span><span style="font-family: ; color: "><font color="#ff0000">RelativeSource</font></span><span style="font-family: ; color: "><font color="#0000ff">=</font></span><span style="font-family: ; color: "><font color="#8b008b">{RelativeSource </font></span><span style="font-family: ; color: "><font color="#ff0000">Mode</font></span><span style="font-family: ; color: "><font color="#0000ff">=</font></span><span style="font-family: ; color: "><font color="#8b008b">FindAncestor, </font></span><span style="font-family: ; color: "><font color="#ff0000">AncestorType</font></span><span style="font-family: ; color: "><font color="#0000ff">=</font></span><span style="font-family: ; color: "><font color="#8b008b">{x:Type ListBoxItem}}}</font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#0000ff">"</font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><span style="mso-spacerun: yes"><font color="#0000ff"><font style="font-size: 10pt">                                     </font></font></span></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Value</font></span><span style="font-family: ; color: "><font color="#0000ff">="True"</font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">                                </font></span><font style="font-size: 10pt"><Setter </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Property</font></span><span style="font-family: ; color: "><font color="#0000ff">="Fill" </font></span><span style="font-family: ; color: "><font color="#ff0000">Value</font></span><span style="font-family: ; color: "><font color="#0000ff">="White" </font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">/></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: "><font face="Consolas"><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">                            </font></span><font style="font-size: 10pt"></DataTrigger></font></font></font></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">                            </font></span><font style="font-size: 10pt"><DataTrigger </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Binding</font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#0000ff">="{Binding Path=IsMouseOver, </font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><span style="mso-spacerun: yes"><font color="#0000ff"><font style="font-size: 10pt">                                                   </font></font></span></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">RelativeSource</font></span><span style="font-family: ; color: "><font color="#0000ff">=</font></span><span style="font-family: ; color: "><font color="#8b008b">{RelativeSource </font></span><span style="font-family: ; color: "><font color="#ff0000">Mode</font></span><span style="font-family: ; color: "><font color="#0000ff">=</font></span><span style="font-family: ; color: "><font color="#8b008b">FindAncestor, </font></span><span style="font-family: ; color: "><font color="#ff0000">AncestorType</font></span><span style="font-family: ; color: "><font color="#0000ff">=</font></span><span style="font-family: ; color: "><font color="#8b008b">{x:Type ListBoxItem}}}</font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#0000ff">"</font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><span style="mso-spacerun: yes"><font color="#0000ff"><font style="font-size: 10pt">                                     </font></font></span></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Value</font></span><span style="font-family: ; color: "><font color="#0000ff">="True"</font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">                  </font></span><font style="font-size: 10pt"><span style="mso-spacerun: yes">              </span><Setter </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Property</font></span><span style="font-family: ; color: "><font color="#0000ff">="Fill" </font></span><span style="font-family: ; color: "><font color="#ff0000">Value</font></span><span style="font-family: ; color: "><font color="#0000ff">="White" </font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">/></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: "><font face="Consolas"><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">                            </font></span><font style="font-size: 10pt"></DataTrigger></font></font></font></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: "><font face="Consolas"><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">                        </font></span><font style="font-size: 10pt"></Style.Triggers></font></font></font></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: "><font face="Consolas"><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">                    </font></span><font style="font-size: 10pt"></Style></font></font></font></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: "><font face="Consolas"><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">                </font></span><font style="font-size: 10pt"></Path.Style></font></font></font></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: "><font face="Consolas"><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">            </font></span><font style="font-size: 10pt"></Path></font></font></font></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: "><span style="mso-spacerun: yes"><font face="Consolas"><font style="font-size: 10pt" color="#8b008b">    </font></font></span></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">            </font></span><font style="font-size: 10pt"><TextBlock </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Grid.Row</font></span><span style="font-family: ; color: "><font color="#0000ff">="0" </font></span><span style="font-family: ; color: "><font color="#ff0000">Grid.Column</font></span><span style="font-family: ; color: "><font color="#0000ff">="2" </font></span><span style="font-family: ; color: "><font color="#ff0000">Margin</font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#0000ff">="10"</font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><span style="mso-spacerun: yes"><font color="#0000ff"><font style="font-size: 10pt">                   </font></font></span></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">HorizontalAlignment</font></span><span style="font-family: ; color: "><font color="#0000ff">="Left" </font></span><span style="font-family: ; color: "><font color="#ff0000">VerticalAlignment</font></span><span style="font-family: ; color: "><font color="#0000ff">="Center"</font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">              </font></span><font style="font-size: 10pt"><Run </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Text</font></span><span style="font-family: ; color: "><font color="#0000ff">="{Binding XPath=@Name}" </font></span><span style="font-family: ; color: "><font color="#ff0000">FontWeight</font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#0000ff">="SemiBold"</font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><span style="mso-spacerun: yes"><font color="#0000ff"><font style="font-size: 10pt">                   </font></font></span></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Foreground</font></span><span style="font-family: ; color: "><font color="#0000ff">="{Binding ElementName=listItemIcon, Path=Fill}" </font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">/></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">              </font></span><font style="font-size: 10pt"><Run </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Text</font></span><span style="font-family: ; color: "><font color="#0000ff">="{Binding XPath=@Hint}" </font></span><span style="font-family: ; color: "><font color="#ff0000">FontWeight</font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#0000ff">="Bold"</font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><span style="mso-spacerun: yes"><font color="#0000ff"><font style="font-size: 10pt">                   </font></font></span></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Foreground</font></span><span style="font-family: ; color: "><font color="#0000ff">="{StaticResource azureItemHighlightText}" </font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">/></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: "><font face="Consolas"><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">            </font></span><font style="font-size: 10pt"></TextBlock></font></font></font></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: "><font face="Consolas"><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">        </font></span><font style="font-size: 10pt"></Grid></font></font></font></span></p> <span style="font-family: ; color: ; line-height: 11pt; mso-fareast-font-family: simsun; mso-fareast-theme-font: minor-fareast; mso-ansi-language: en-us; mso-fareast-language: zh-cn; mso-bidi-language: ar-sa"><font face="Consolas"><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">    </font></span><font style="font-size: 10pt"></DataTemplate></font></font></font></span> <p> </p> <h2>Step 4: Styling the ItemContainer</h2> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><font style="font-size: 10pt"><Style </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">x:Key</font></span><span style="font-family: ; color: "><font color="#0000ff">="azureItemContainerStyle" </font></span><span style="font-family: ; color: "><font color="#ff0000">TargetType</font></span><span style="font-family: ; color: "><font color="#0000ff">="ListBoxItem"</font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">   </font></span><font style="font-size: 10pt"><Setter </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Property</font></span><span style="font-family: ; color: "><font color="#0000ff">="Cursor" </font></span><span style="font-family: ; color: "><font color="#ff0000">Value</font></span><span style="font-family: ; color: "><font color="#0000ff">="Hand" </font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">/></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">   </font></span><font style="font-size: 10pt"><Setter </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Property</font></span><span style="font-family: ; color: "><font color="#0000ff">="Background" </font></span><span style="font-family: ; color: "><font color="#ff0000">Value</font></span><span style="font-family: ; color: "><font color="#0000ff">="{StaticResource azureItemBackground}" </font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">/></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: "><font face="Consolas"><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">   </font></span><font style="font-size: 10pt"><Style.Triggers></font></font></font></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">      </font></span><font style="font-size: 10pt"><Trigger </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Property</font></span><span style="font-family: ; color: "><font color="#0000ff">="IsMouseOver" </font></span><span style="font-family: ; color: "><font color="#ff0000">Value</font></span><span style="font-family: ; color: "><font color="#0000ff">="True"</font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">         </font></span><font style="font-size: 10pt"><Setter </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Property</font></span><span style="font-family: ; color: "><font color="#0000ff">="Background" </font></span><span style="font-family: ; color: "><font color="#ff0000">Value</font></span><span style="font-family: ; color: "><font color="#0000ff">="{StaticResource azureItemSelected}" </font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">/></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: "><font face="Consolas"><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">      </font></span><font style="font-size: 10pt"></Trigger></font></font></font></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">      </font></span><font style="font-size: 10pt"><Trigger </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Property</font></span><span style="font-family: ; color: "><font color="#0000ff">="IsSelected" </font></span><span style="font-family: ; color: "><font color="#ff0000">Value</font></span><span style="font-family: ; color: "><font color="#0000ff">="True"</font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">         </font></span><font style="font-size: 10pt"><Setter </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Property</font></span><span style="font-family: ; color: "><font color="#0000ff">="Background" </font></span><span style="font-family: ; color: "><font color="#ff0000">Value</font></span><span style="font-family: ; color: "><font color="#0000ff">="{StaticResource azureItemSelected}" </font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">/></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; text-indent: 0.5in; mso-layout-grid-align: none"><span style="font-family: ; color: "><font face="Consolas"><font style="font-size: 10pt" color="#8b008b"></Trigger></font></font></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: "><font face="Consolas"><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">   </font></span><font style="font-size: 10pt"></Style.Triggers></font></font></font></span></p> <span style="font-family: ; color: ; line-height: 11pt; mso-fareast-font-family: simsun; mso-fareast-theme-font: minor-fareast; mso-ansi-language: en-us; mso-fareast-language: zh-cn; mso-bidi-language: ar-sa"><font face="Consolas"><font style="font-size: 10pt" color="#8b008b"></Style></font></font></span> <p> </p> <h2>Step 5: Overwriting windows Highlight Brush styles</h2> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><font style="font-size: 10pt"><ListBox </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">Grid.Row</font></span><span style="font-family: ; color: "><font color="#0000ff">="1" </font></span><span style="font-family: ; color: "><font color="#ff0000">ItemTemplate</font></span><span style="font-family: ; color: "><font color="#0000ff">="{StaticResource azureListItemTemplate}" </font></span><span style="font-family: ; color: "><font color="#ff0000">Width</font></span><span style="font-family: ; color: "><font color="#0000ff">="300" </font></span><span style="font-family: ; color: "><font color="#ff0000">Style</font></span><span style="font-family: ; color: "><font color="#0000ff">="{StaticResource azureListBoxStyle}" </font></span><span style="font-family: ; color: "><font color="#ff0000">ItemContainerStyle</font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#0000ff">="{StaticResource azureItemContainerStyle}"</font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><span style="mso-spacerun: yes"><font color="#0000ff"><font style="font-size: 10pt">     </font></font></span></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">ItemsSource</font></span><span style="font-family: ; color: "><font color="#0000ff">="{Binding Source={StaticResource AzureActions}, XPath=//Action}"</font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: "><font face="Consolas"><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">   </font></span><font style="font-size: 10pt"><ListBox.Resources></font></font></font></span></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">        </font></span><font style="font-size: 10pt"><SolidColorBrush </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">x:Key</font></span><span style="font-family: ; color: "><font color="#0000ff">="{x:Static SystemColors.HighlightBrushKey}" </font></span><span style="font-family: ; color: "><font color="#ff0000">Color</font></span><span style="font-family: ; color: "><font color="#0000ff">="#6D747B" </font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">/></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><font face="Consolas"><span style="font-family: ; color: "><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">        </font></span><font style="font-size: 10pt"><SolidColorBrush </font></font></span><font style="font-size: 10pt"><span style="font-family: ; color: "><font color="#ff0000">x:Key</font></span><span style="font-family: ; color: "><font color="#0000ff">="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" </font></span><span style="font-family: ; color: "><font color="#ff0000">Color</font></span><span style="font-family: ; color: "><font color="#0000ff">="#6D747B" </font></span></font><span style="font-family: ; color: "><font style="font-size: 10pt" color="#8b008b">/></font></span></font></p> <p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-autospace: ; mso-layout-grid-align: none"><span style="font-family: ; color: "><font face="Consolas"><font color="#8b008b"><span style="mso-spacerun: yes"><font style="font-size: 10pt">   </font></span><font style="font-size: 10pt"></ListBox.Resources></font></font></font></span></p> <p class="MsoNormal" style="margin: 0in 0in 8pt; text-justify: inter-ideograph; line-height: 12pt" align="justify"><span style="font-family: ; color: ; line-height: 11pt"><font face="Consolas"><font style="font-size: 10pt" color="#8b008b"></ListBox></font></font></span></p> <p>For populating the ListBox’s with data, XmlDataProvider has been used.</p> <p align="justify">Please download the full XAML file and paste it in Kaxaml or Visual Studio to see it in action. No external dependencies.</p> <p align="justify"><a title="Download the XAML style from Google Drive" href="http://goo.gl/LB5IT8" target="_blank"><img title="download" style="float: left; display: inline" alt="download" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5pBD6lPH1uhOUCROHLzqG1gY5tJwcL4_GZ-SWwHCJuWAq99qFRSX29lSaD1W0FX75t2m2A7_Af4wZWcSyiAmPhYS7QaQrmPHg37FgvGJCsAmBs2STiliRrcHJOJ0-nEnd_v1F6kEofC4/?imgmax=800" width="24" align="left" height="24" /></a> <a title="Download the Style file and preview in Kaxaml or Visual Studio" href="http://goo.gl/LB5IT8" target="_blank">AzureNavigationStyle.xaml</a></p> <p><i></i></p> <p><i></i></p> <p><em>Imitation is indeed the best form of flattery.</em></p> <p>Happy Coding!</p> Vaibhav Sharmahttp://www.blogger.com/profile/08550674290122756598noreply@blogger.com0tag:blogger.com,1999:blog-2380923144131313666.post-53007226510621991992011-05-28T13:14:00.000+05:302011-05-28T13:14:31.742+05:30Visual Studio 2010–Before you begin<div dir="ltr" style="text-align: left;" trbidi="on"><div align="justify"><em>“Give me six hours to chop down a tree and I will spend the first four sharpening the axe.” <br />
</em><br />
The saying above probably fits developers the most. More so if one happens to be a Microsoft technology developer, spending his day in and out of Visual Studio – the ultimate development experience (<em>no offence intended to the Notepad developer</em>). I am almost always amazed by the insane complexity that Visual Studio abstracts away from a developer, presenting it in a visually elegant and magnificent way. Before you even think of disagreeing, think of the top 3 features of the Visual Studio code editor according to you and try integrating it on a Rich Text Box in the language of your choice.<br />
<br />
</div><div align="justify">The bytes that follow intend to assist you in sharpening your axe, a.k.a Visual Studio 2010.</div><ul><li> <div align="justify"><strong>Service Pack 1 – Looking beyond the bug fixes</strong>: Gone are the days when Visual Studio Service Packs were a means to provide bugs and stability fixes. The trend in general has shifted to providing users with considerable feature additions, providing a sense of fulfillment and extended satisfaction to the developer community in general. Entity Framework was included as part of the Visual Studio 2008 Service Pack 1. With Visual Studio 2010 too, apart from the huge number of bug fixes and stability enhancements to the core editor, several new features were added: <br />
</div><ul><li> <div align="justify"><strong>Help Viewer 1.1</strong> – A stand-alone application for viewing locally installed help documentation.<br />
</div></li>
<li> <div align="justify"><strong>Silverlight 4</strong> – Pre installed support for Silverlight 4 with designer and project system support.<br />
</div></li>
<li> <div align="justify"><strong>Silverlight Profiling</strong> – Performance Wizard for Silverlight allows profiling of Silverlight applications which were cumbersome, to say the least in Visual Studio 2008.<br />
</div></li>
<li> <div align="justify"><strong>SQL Server CE 4</strong> – Support for managing Microsoft SQL Server Compact 4.0 databases (SDF) added to Solution and Server explorer.<br />
</div></li>
<li> <div align="justify"><strong>HTML5 and CSS3</strong> – Support for HTML5 and CSS3 in the html editor.<br />
</div></li>
<li> <div align="justify"><strong>IIS Express support</strong> – Visual Studio 2010 SP1 enables you to use the Internet Information Services (IIS) 7.5 Express as the local hosting server for the website and Web Application Projects. Scott Guthrie’s introductory <a href="http://weblogs.asp.net/scottgu/archive/2010/06/28/introducing-iis-express.aspx" target="_blank" title="Read the blog post">blog post</a> about IIS Express explains distinctively how you can leverage local IIS right from your development box. <br />
<br />
A complete description of the Service Pack 1 can be found <a href="http://support.microsoft.com/kb/983509" target="_blank" title="Visual Studio 2010 SP1">here</a>. <br />
<br />
</div></li>
</ul></li>
<li> <div align="justify"><strong>Extend to conquer</strong>: Visual Studio 2010 not only sports a brand new managed code editor but it also includes a managed <strong><a href="http://msdn.microsoft.com/en-us/library/dd460648.aspx" target="_blank" title="Managed Extensibility Framework on MSDN">MEF</a></strong> based Extension Manager that lets you customize almost everything that comes by default with Visual Studio, including the Start Page. The following are few extensions that you wouldn’t regret installing:<br />
</div><ul><li> <div align="justify"><strong><a href="http://visualstudiogallery.msdn.microsoft.com/d0d33361-18e2-46c0-8ff2-4adea1e34fef" target="_blank" title="Visit the extension page on Visual Studio Gallery">Productivity Power Tools</a> (Microsoft)</strong>: By far the best (free) extension to Visual Studio 2010, developed by Microsoft, Productivity Power Tools does what its name implies, improve, rather boost the overall productivity of the IDE. A really slick looking Find box, a vibrant Solution Navigator and middle click scroll support, are some of the features that hooked me up instantly. More information and download can be found <a href="http://visualstudiogallery.msdn.microsoft.com/d0d33361-18e2-46c0-8ff2-4adea1e34fef" target="_blank" title="Visit the extension page on Visual Studio Gallery">here</a>. <br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhU6QYNM3x5JqJfE__H1vYKWQ6lIUAiDkUFoMhT_R2VsBy0hm9N7tz5fUUB9esBuQVQTldZQ-B3r4Zi_ZIVo7xNQEW-0TMB0X_-lb64JmuJ6Lyjqh7yycxuloFEDziSNa2YnIpgbJ7SsDo/s1600-h/image%25255B16%25255D.png"><img alt="Productivity Power Tools" border="0" height="235" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4pwLGgf1yWkx6_Baa7Bc8VGxoKcI8D3SWCSktjjFeR-bS_vIuGOhbzCyd1vBU31-GBwll-_A9oMtbiBVxm9DDGlnq2l8n8qCAKGBft8OHEi8kt2tkWGArnrJfMX1t7lPkwldgr7r6yRY/?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="Productivity Power Tools" width="496" /></a><br />
</div></li>
<li> <div align="justify"><strong>Visual Studio Color Theme Editor</strong>: Customize the Visual Studio 2010 color palette for menus, toolbars, tabs, title bars and more. It comes in with predefined themes to choose from and allows you to customize the palettes or create new themes. Check out the <a href="http://blogs.msdn.com/visualstudio/archive/2010/01/04/changing-visual-studio-s-color-palette.aspx" target="_blank">Visual Studio blog post</a> or download the extension <a href="http://visualstudiogallery.msdn.microsoft.com/20cd93a2-c435-4d00-a797-499f16402378" target="_blank" title="Download Visual Studio Color Theme Editor">here</a>. <br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiT-J44AHhIl2bW4n9qe92ByPXKK59-7d3BbnjEcWCFO7eUrJnZ8Ic4V7LWKul5HhyuECduR54lSB-iFk_duEJHM2H1ZJlrVKzupT_827lnbBdqILKc1EE9_VVCaIJuJdUKYiyTL3ssNV4/s1600-h/image%25255B22%25255D.png"><img alt="VS Color Theme Editor" border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyoG8nrC0J7qSSoew1BruP1kbD9h9fkGNborx9osbLsfvkoFWOMAr0RxgwpvPQ6tglu6-JxfOTIq9233p6AI3zV539CvrjN2iz1Oz1vb_rQVz3TBxPGoJv1QiT7XbhOZKGG2oVQfCcD1Y/?imgmax=800" style="background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-left: 0px; padding-right: 0px; padding-top: 0px;" title="VS Color Theme Editor" width="200" /></a></div></li>
</ul></li>
</ul><br />
The <a href="http://visualstudiogallery.msdn.microsoft.com/" target="_blank" title="Visual Studio Gallery">Visual Studio Gallery</a> has enormous number of extensions (quite a few of them are free) already listed for you to try out. Go ahead. Customize, extend Visual Studio. Super charge it. <br />
<br />
Visual Studio – It amazes me. First time, every time!</div>Vaibhav Sharmahttp://www.blogger.com/profile/08550674290122756598noreply@blogger.com0tag:blogger.com,1999:blog-2380923144131313666.post-73026910738111859752010-11-24T22:06:00.000+05:302010-11-24T22:10:30.938+05:30Static Vs Dynamic Vs Embedded Vs Entity SQL<p align="justify">Structured Query Language (SQL) is a way to communicate with a relational database that lets you define, query, modify, and control the data. Using SQL syntax, you can construct a statement that extracts records according to criteria you specify (<em>I know, you know that</em>). However, there are certain <em>flavors</em> of SQL, which you should be aware of like Static SQL, Dynamic SQL and Embedded SQL, to better understand and apply them, as and when required.</p> <p align="justify">With .NET you would also end up using Entity SQL, which when used with Entities (as in the <a title="Entity Framework" href="http://msdn.microsoft.com/en-us/data/ef.aspx" target="_blank">Entity Framework</a>), could eventually generate dynamic SQL, executing and returning results as entities.</p> <p align="justify"><strong>Static SQL</strong>: The most commonly used type of SQL, static SQL, as its name implies allows you to fulfill your data access requirements, which <strong>might be known</strong> to you at design time of your application. Having static SQL queries can lead to better performance, since the queries are not required to be parsed every time before being executed.</p> <p align="justify"><strong>Dynamic SQL</strong>: There are instances of applications where the data to be processed cannot be determined at the design time of the application. A typical example would be processing of a spreadsheet, which in turn can contain variable number of columns, and the program is needed to process and store the data into the database. Typically, you would generate a string value with the columns and send across the database to process it. </p> <p align="justify">The following points are to be considered:</p> <ul> <li> <div align="justify">Since the database engine doesn’t have an access plan, it would parse, compile and generate an access plan. Hence <em>dynamic SQL is slower</em> than static SQL.</div> </li> <li> <div align="justify">EXECUTE IMMEDIATE statement can be used to execute the dynamic SQL statement, which in turn passes the SQL to database for compilation and execution.</div> </li> <li> <div align="justify">The problem with EXECUTE IMMEDIATE is that the database would be executing each of the 5 steps of processing SQL statement and the overhead could be significant for multiple dynamic statements executed at once.</div> </li> <li> <div align="justify">Dynamic SQL offers optimization via prepared execution whereby all the host variables are replaced by a question mark (?), known as <strong>parameter marker</strong>, which can be substituted later with the host value. The <strong>PREPARE</strong> statement is used by the program to pass the SQL statement to the DBMS for parsing, validation and optimizing the statement. The <strong>EXECUTE</strong> statement is used instead of the EXECUTE IMMEDIATE statement, and the parameter values are supplied via a special data structure called the SQLDA or <strong>SQL Data Area</strong>. By having the execute statement and supplying different parameter values, optimization is gained over the EXECUTE IMMEDIATE statement.</div> </li> <li> <div align="justify">It is to be noted that PREPARED execution is still slower than static SQL since with static SQL the first 4 steps of processing takes place at compile time, whereas with PREPARED execution, they are still executed at runtime, however, only for the first time.</div> </li> </ul> <p align="justify"><strong>Embedded SQL</strong>: <em>Because SQL does not use variables and control-of-flow statements, it is often used as a database sublanguage that can be added to a program written in a conventional programming language, such as C or COBOL. This is a central idea of embedded SQL: placing SQL statements in a program written in a host programming language.</em> </p> <p align="justify">The following points are to be considered:</p> <ul> <li> <div align="justify">Embedded SQL is processed by a special SQL precompiler.</div> </li> <li> <div align="justify">Host language variables can be used in place of the constants in the SQL statements.</div> </li> <li> <div align="justify">To optimize the SQL which returns a single row as a result, singleton SELECT statements are used.</div> </li> <li> <div align="justify">Statements that return and require multiple rows are processed using <a title="More on SQL Server CURSORS" href="http://msdn.microsoft.com/en-us/library/ms181441.aspx" target="_blank">CURSORS</a>.</div> </li> <li> <div align="justify">Errors while executing Embedded SQL are reported to the application programs via <strong>SQL Communications Area</strong> or SQLCA.</div> </li> </ul> <p align="justify"><strong>Disclaimer: The following does not directly relate to databases and are features specific to the Microsoft .NET Framework.</strong></p> <p align="justify">Typically you would be developing an application to access the data stored in the databases. <a title="More on Relational Database" href="http://en.wikipedia.org/wiki/Relational_database" target="_blank">Relational databases</a> provide specific added advantages and are widely used in the general business applications domain. <a title="Whats new in .NET Framework" href="http://www.microsoft.com/net/whatsnew.aspx" target="_blank">Microsoft .NET 3.5 SP1</a> introduced Entity Framework, which in turn allows you to model your database objects as entities, which may or may not be inter related, and provides an abstracted way to process them via Entity SQL or LINQ to Entities.</p> <p align="justify"><strong>Entity SQL</strong>: <em>Entity SQL is a SQL-like language that enables you to query conceptual models in the Entity Framework. Conceptual models represent data as entities and relationships, and Entity SQL allows you to query those entities and relationships in a format that is familiar to those who have used SQL.</em></p> <p align="justify">The following points are to be considered:</p> <ul> <li> <div align="justify">Entity SQL supports conceptual model features like relationships and inheritance.</div> </li> <li> <div align="justify">Collections are treated as first class citizens in Entity SQL, hence set operators like UNION, INTERSECT and EXCEPT, work on collections.</div> </li> <li> <div align="justify">Everything in Entity SQL is an expression which in turn enables it to be more composable than <a title="Transact SQL" href="http://msdn.microsoft.com/en-us/library/ms189826(SQL.90).aspx" target="_blank">Transact SQL</a> (the SQL language of <a title="Microsoft SQL Server" href="http://www.microsoft.com/sqlserver/" target="_blank">Microsoft SQL Server</a>).</div> </li> <li> <div align="justify">Entity SQL doesn’t support the <strong>*</strong> construct, and hence the <strong>count(*)</strong> statement is invalid, instead use <strong>count(0).</strong></div> </li> <li> <div align="justify">Entity SQL supports a <a title="Entity SQL Vs Transact SQL" href="http://msdn.microsoft.com/en-us/library/bb738573.aspx" target="_blank">subset of Transact-SQL</a>'s built in functions and operators and does not provide support for DDL in the current version.</div> </li> </ul> <p align="justify"><strong>LINQ to Entities</strong> <em>provides <a title="More on LINQ" href="http://msdn.microsoft.com/en-us/library/bb308959.aspx" target="_blank">Language-Integrated Query (LINQ)</a> support that enables developers to write queries against the Entity Framework conceptual model using <a title="Visual Basic Developer Center" href="http://msdn.microsoft.com/en-us/vbasic/default.aspx" target="_blank">Visual Basic</a> or <a title="Visual C# Developer Center" href="http://msdn.microsoft.com/en-us/vcsharp/default.aspx" target="_blank">Visual C#</a>. Queries against the Entity Framework are represented by command tree queries, which execute against the object context. LINQ to Entities converts Language-Integrated Queries (LINQ) queries to command tree queries, executes the queries against the Entity Framework, and returns objects that can be used by both the Entity Framework and LINQ</em>. <strong>–</strong> <strong>MSDN</strong></p> <p align="justify">The above mentioned constitutes literally all the typical types of SQL related concepts that you might encounter in your general database (relational) programming tasks day-in-day-out or in any developer centric interview session.</p> <p align="justify">As always, you are welcome to share any ideas or thoughts about any other flavor of SQL, which you might have encountered.</p> <p align="justify">Prepare > Execute!</p> Vaibhav Sharmahttp://www.blogger.com/profile/08550674290122756598noreply@blogger.com1tag:blogger.com,1999:blog-2380923144131313666.post-26221913364603651082010-11-15T22:47:00.000+05:302010-11-15T22:50:29.601+05:30WPF – An Overview<p align="justify">Ever since Windows Vista (sorry Microsoft, for reminding you of that product again) and .NET Framework 3.0 were released, the <a title="Windows Client" href="http://windowsclient.net" target="_blank">Windows client</a> developer (the one who is intentionally unaware and exceedingly pleasured by ignoring JS, HTML, DHTML and other useless irrelevant terms in technology) was puzzled with an (frankly) unwanted choice that never existed for him before: continue using the ultimately productive Windows Forms framework, that has been the cornerstone of Windows client applications ever since Visual Basic (classic), or learn, explore and rewrite the apps in the WPF framework for building (what’s now become an overly exploited term in software development) <em>next generation user experiences</em>.</p> <p align="justify">Microsoft has always assured (many consider it a curse) its developers of continued abundance of options and tooling support for all the major line of business applications that one develops. While this has obvious and much desired advantages, the real problem comes in at the start of the adoption phase of the new technology or framework. The earlier releases of the framework don’t (in almost all cases) provide a complete replacement of the previous technology and there is a very steep learning curve involved, with an exceedingly high cost and risk factor in recreating the missing bits, by extending the not so feature complete releases.</p> <p>My personal approach while dealing with this <strong>new-technology-every-PDC</strong> kind of releases is fairly simple:</p> <table border="1" cellspacing="0" cellpadding="2" width="99%"><tbody> <tr> <th style="text-align: center" valign="top" width="40%">Version</th> <th style="text-align: center" valign="top" width="60%">Action</th> </tr> <tr> <td valign="top"> <p align="center">Alpha/Beta/CTP or <br />v1.0</p> </td> <td valign="top"> <p align="justify">Just be <strong><em>aware</em></strong>, a new (yet again awesome, silver bullet kind of) technology has arrived!</p> </td> </tr> <tr> <td valign="top"> <p align="center">v2.0</p> </td> <td valign="top"> <p align="justify">Seems interesting, lets look at the <em><strong>real</strong></em> benefits.</p> </td> </tr> <tr> <td valign="top"> <p align="center">v3.0+</p> </td> <td valign="top"> <p align="justify"><strong><em>Use it</em></strong> (OMG, its actually awesome and the silver bullet for everything a MS developer ever needed)</p> </td> </tr> </tbody></table> <p align="justify">WPF (codename <strong>Avalon</strong>) was launched with .NET Framework 3.0 and at its time of release, had a substandard support in terms of tooling. Mr. Reader, be informed, that this is not a WPF tutorial series on <em>how to get started with WPF.</em> The attempt is to dive (as deep as possible) into the architecture of WPF and to understand why things are the way they are in WPF.</p> <p align="justify"><strong>Windows & Graphics: </strong>The primary technologies behind many Windows-based user interfaces, <strong>GDI </strong>(graphics device interface) and <strong>USER</strong> subsystems, were introduced with Windows 1.0 in 1985. The next major support for graphics came with OpenGL (created by Silicon Graphics) in early 1990s for doing advanced <a title="2-Dimensional" href="http://abc.com" target="_blank">2-D</a> and <a title="3-Dimensional" href="http://abc.com" target="_blank">3-D</a> graphics on both Windows and non-Windows based systems. In 1995, Microsoft introduced <a href="http://www.microsoft.com/games/en-US/aboutGFW/pages/directx.aspx" target="_blank">DirectX</a>, for providing a new high performance alternative for 2-D graphics, input, sound, communications and eventually 3-D (with DirectX 2 in 1996). With Windows XP, GDI+ was introduced by adding support for <a title="Click for more information about alpha blending" href="http://msdn.microsoft.com/en-us/library/ms533803%28VS.85%29.aspx" target="_blank">alpha blending</a> and gradient brushes, but ended up being slower due to its complexity and lack of hardware acceleration.</p> <p align="justify">With the release of .NET (and the managed world) in 2002, Windows Forms (built on top of GDI+) became the primary way for a C# or Visual Basic developer, to create rich and compelling user interfaces for Windows based systems. Windows Forms has proved itself as a productive and successful technology, but it still suffers from the limitations of GDI+ and USER subsystems, when it comes to graphics, layouts and rendering.</p> <p align="center"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Major Components of WPF" border="0" alt="Major Components of WPF" align="right" src="http://i.msdn.microsoft.com/dynimg/IC159631.png" width="300" height="333" /></p> <p align="justify">In the adjoining image, the major code for WPF are highlighted in red, and its interesting to note, that out of the three components (PresentationFramework, PresentationCore and MilCore), only MilCore is unmanaged. Milcore is written in unmanaged code in order to enable tight integration with DirectX. All display in WPF is done through the DirectX engine, allowing for efficient hardware and software rendering. WPF also required fine control over memory and execution. The composition engine in milcore is extremely performance sensitive, and required giving up many advantages of the CLR to gain performance.</p> <p align="justify"><strong>The Dispatcher</strong>:The DispatcherObject acts as a base class for most objects in WPF and encapsulates the basic constructs for concurrency and threading. The Dispatcher is the messaging system of WPF, which acts similar to the Win32 message pump and uses User32 messages for performing cross thread calls.</p> <p align="justify"><strong>Dependency Object </strong>and richer Property system: In WPF, properties are preferred over methods or events and this constitutes one of the primary philosophies of the WPF architecture. The property system in WPF is based on the DependencyObject which enables tracking of dependency properties and revalidating values when changes occur. Another feature of properties in WPF is the notion of “<em>attached properties”</em>, which enables composition and component reuse, one of the primary goals of WPF. With attached properties, any object can now specify the properties of other objects, enabling tighter composition.</p> <p align="justify"><strong>Routed Events</strong>: WPF introduces Routed Events, which from an implementation perspective, is an object backed by an instance of the RoutedEvent class and processed by the event system. From a functional perspective, <em>it is a type of event that can invoke handlers on multiple listeners in an element tree, rather than just on the object that raised the event.</em> Since WPF enables richer composition model, it was essential for the event system to be able to <em>“bubble up”</em> events, generally upward through the element tree, until it reaches the root. It is to be noted that in WPF, literally any control can act as a container control, unlike Windows Forms where container controls inherited from a different base class. To enable routed events, or event bubbling in Windows Forms, you would have to attach the same event to multiple elements, while in WPF, you could do that by attaching them to a single element.</p> <p align="justify"><strong>XAML</strong> (<strong>X</strong>ml <strong>A</strong>pplication <strong>M</strong>arkup <strong>L</strong>anguage): The current trend in programming languages (specifically Microsoft technologies) has been towards declarative rather than imperative, and there are underlying benefits to it. XAML typically allows you to create the entire application declaratively, enabling the decoupling of the UI with the logic, supporting unprecedented designer-developer collaboration. <br />“<em>XAML directly represents the instantiation of objects in a specific set of backing types defined in assemblies. This is unlike most other markup languages, which are typically an interpreted language without such a direct tie to a backing type system. XAML enables a workflow where separate parties can work on the UI and the logic of an application, using potentially different tools.”</em> – MSDN</p> <p align="justify">The intent of this post is to provide a starting point in understanding the complexities and terminologies associated with the WPF architecture. I wish and hope, the initial hesitation associated with moving to and understanding WPF, is eased after going through this post. As with any framework, the best way to learn and leverage it still remains to be writing applications using it!</p> <p align="justify">Dispatch!</p> Vaibhav Sharmahttp://www.blogger.com/profile/08550674290122756598noreply@blogger.com2tag:blogger.com,1999:blog-2380923144131313666.post-38730250552551570232010-10-12T16:15:00.001+05:302010-10-12T16:15:37.540+05:3077 Outright Rajinikanth Facts<p align="justify">For those of you who were so unfortunate to not know about <em><strong>the Rajinikanth</strong>,</em> <a title="Rajinikanth is on wikipedia" href="http://en.wikipedia.org/wiki/Rajinikanth" target="_blank">here</a> is a tip of the iceberg about him. Of course I understand you were amongst the unfortunate who were exiled to the planet Pluto, (all other planets are aware of Rajinikanth) and couldn’t keep up with the most illusive force on planet Earth.</p> <p align="justify">What follows are 77 outright (an understatement indeed) facts about the man himself that demystifies (more than what Da Vinci did) literally every fact that you have ever known or would ever know. Some of the facts mentioned below are highlighted to do the intended justice.</p> <p align="justify"><strong>Disclaimer</strong>: All the following facts, incidents or individuals involved are real and any resemblance to any person, living or dead is purely intentional.</p> <ol> <li> <div align="justify">Rajinikanth killed the Dead Sea.</div> </li> <li> <div align="justify">When Rajinikanth does push-ups, he isn't lifting himself up. He is pushing the earth down.</div> </li> <li> <div align="justify"><strong>There is no such thing as evolution; it's just a list of creatures that Rajinikanth allowed to live.</strong></div> </li> <li> <div align="justify">Rajinikanth gave Mona Lisa that smile.</div> </li> <li> <div align="justify"><strong><em>Rajinikanth can divide by zero.</em></strong></div> </li> <li> <div align="justify">Rajinikanth can judge a book by its cover.</div> </li> <li> <div align="justify">Rajinikanth can drown a fish.</div> </li> <li> <div align="justify"><strong><em>Rajinikanth can delete the Recycle Bin.</em></strong></div> </li> <li> <div align="justify">Rajinikanth once got into a fight with a VCR player. Now it plays DVDs.</div> </li> <li> <div align="justify"><strong>Rajinikanth can slam a revolving door.</strong></div> </li> <li> <div align="justify">Rajinikanth once kicked a horse in the chin. Its descendants are today called giraffes.</div> </li> <li> <div align="justify">Rajinikanth once ordered a plate of Idli in McDonald's, and got it. </div> </li> <li> <div align="justify">Rajinikanth can win at Solitaire with only 18 cards. </div> </li> <li> <div align="justify">The Bermuda Triangle used to be the Bermuda Square, until Rajinikanth kicked one of the corners off. </div> </li> <li> <div align="justify"><strong>Rajinikanth can strangle you with a cordless phone. </strong></div> </li> <li> <div align="justify">Rajinikanth destroyed the periodic table, because he only recognizes the element of surprise. </div> </li> <li> <div align="justify">Rajinikanth can watch the show 60 minutes in 20 minutes. </div> </li> <li> <div align="justify"><strong><em>Rajinikanth has counted to infinity, twice. </em></strong></div> </li> <li> <div align="justify">Rajinikanth will attain separate statehood in 2013. </div> </li> <li> <div align="justify">Rajinikanth did in fact, build Rome in a day. </div> </li> <li> <div align="justify">Rajinikanth once got into a knife-fight. The knife lost. </div> </li> <li> <div align="justify">Rajinikanth can play the violin with a piano. </div> </li> <li> <div align="justify">Rajinikanth never wet his bed as a child. The bed wet itself in fear. </div> </li> <li> <div align="justify">The only man who ever outsmarted Rajinikanth was Stephen Hawking, and he got what he deserved. </div> </li> <li> <div align="justify">Rajinikanth doesn't breathe. Air hides in his lungs for protection. </div> </li> <li> <div align="justify"><strong>There are no weapons of mass destruction in Iraq. Rajinikanth lives in Chennai. </strong></div> </li> <li> <div align="justify"><strong>Rajinikanth kills Harry Potter in the eighth book. </strong></div> </li> <li> <div align="justify">Rajinikanth does not own a stove, oven, or microwave, because revenge is a dish best served cold. </div> </li> <li> <div align="justify">Rajinikanth has already been to Mars, that's why there are no signs of life there. </div> </li> <li> <div align="justify"><strong>Rajinikanth doesn't move at the speed of light. Light moves at the speed of Rajinikanth. </strong></div> </li> <li> <div align="justify">Water boils faster when Rajinikanth stares at it. </div> </li> <li> <div align="justify">Rajinikanth kills two stones with one bird. </div> </li> <li> <div align="justify"><strong>Google won't find Rajinikanth because you don't find Rajinikanth; Rajinikanth finds you. </strong></div> </li> <li> <div align="justify">Rajinikanth gave the Joker those scars. </div> </li> <li> <div align="justify"><strong><em>Rajinikanth leaves messages before the beep. </em></strong></div> </li> <li> <div align="justify">Rajinikanth electrocuted the Iron Man. </div> </li> <li> <div align="justify">Rajinikanth killed Spiderman using Baygon Anti Bug Spray. </div> </li> <li> <div align="justify"><strong>Rajinikanth can make PCs better than the Mac. </strong></div> </li> <li> <div align="justify">Rajinikanth goes to court and sentences the judge. </div> </li> <li> <div align="justify">Rajinikanth can handle the truth. </div> </li> <li> <div align="justify">Rajinikanth can teach old dog new tricks. </div> </li> <li> <div align="justify"><strong>Rajinikanth calls Voldemort by his name. </strong></div> </li> <li> <div align="justify"><strong>Rajinikanth's calendar goes straight from March 31st to April 2nd, no one fools Rajinikanth. </strong></div> </li> <li> <div align="justify">The last time Rajinikanth killed someone, he slapped himself to do it. The other guy just disintegrated. Resonance. </div> </li> <li> <div align="justify">Rajinikanth is so fast, he can run around the world and punch himself in the back of the head. </div> </li> <li> <div align="justify"><strong><em>Rajinikanth once ate an entire bottle of sleeping pills. They made him blink. </em></strong></div> </li> <li> <div align="justify">Rajinikanth does not get frostbite. Rajinikanth bites frost. </div> </li> <li> <div align="justify">Rajinikanth doesn't wear a watch. He decides what time it is. </div> </li> <li> <div align="justify"><strong>Rajinikanth got his driver’s license at the age of 16 seconds. </strong></div> </li> <li> <div align="justify"><strong>When you say "no one is perfect", Rajinikanth takes this as a personal insult. </strong></div> </li> <li> <div align="justify">In an average living room there are 1,242 objects Rajinikanth could use to kill you, including the room itself. </div> </li> <li> <div align="justify">Words like awesomeness, brilliance, legendary etc. were added to the dictionary in the year 1949. That was the year Rajinikanth was born. </div> </li> <li> <div align="justify">The statement "nobody can cheat death” is a personal insult to Rajinikanth. He cheats and fools death every day. </div> </li> <li> <div align="justify">When Rajinikanth is asked to kill someone he doesn't know, he shoots the bullet and directs it the day he finds out. </div> </li> <li> <div align="justify"><strong>Rajinikanth can double click 2 icons at the same time. </strong></div> </li> <li> <div align="justify">Rajinikanth doesn't answer nature's call; nature answers Rajinikanth's call. </div> </li> <li> <div align="justify">Rajinikanth house has no doors, only walls that he walks through. </div> </li> <li> <div align="justify"><strong>Rajinikanth is the only man to ever defeat a brick wall in a game of tennis. </strong></div> </li> <li> <div align="justify">When Rajinikanth plays Monopoly, it affects the actual world economy. </div> </li> <li> <div align="justify">Rajinikanth does not style his hair. It lies perfectly in place out of sheer terror. </div> </li> <li> <div align="justify">Rajinikanth‘s first job was as a bus conductor. There were no survivors. </div> </li> <li> <div align="justify">If at first you don't succeed, you're not Rajinikanth. </div> </li> <li> <div align="justify">We live in an expanding universe. All of it is trying to get away from Rajinikanth. </div> </li> <li> <div align="justify"><strong>Once a cobra bit Rajinikanth' leg. After five days of excruciating pain, the cobra died. </strong></div> </li> <li> <div align="justify">There is no such thing as global warming. Rajinikanth was feeling cold, so brought the sun closer to heat the earth up. </div> </li> <li> <div align="justify">Archaeologists unearthed an old English dictionary dating back to the year 1236. It defined "victim" as "one who has encountered Rajinikanth". </div> </li> <li> <div align="justify">Rajinikanth doesn't bowl strikes, he just knocks down one pin and the other nine faint out of fear. </div> </li> <li> <div align="justify"><strong>Rajinikanth's every step creates a mini whirlwind. Hurricane Katrina was the result of a morning jog. </strong></div> </li> <li> <div align="justify">Rajinikanth doesn't shower. He only takes blood baths. </div> </li> <li> <div align="justify"><strong>Rajinikanth can answer a missed call. </strong></div> </li> <li> <div align="justify">As a child when Rajinikanth had dyslexia, he simply re-scripted the alphabet. </div> </li> <li> <div align="justify"><strong>Rajinikanth sneezed only once in his entire life, that's when the tsunami occurred in the Indian Ocean. </strong></div> </li> <li> <div align="justify">Time and tide wait for Rajinikanth. </div> </li> <li> <div align="justify">Rajinikanth knows what women really want. </div> </li> <li> <div align="justify">Rajinikanth can give pain to Painkillers and headache to Anacin. </div> </li> <li> <div align="justify">Rajinikanth has a wax statue of Madame Tussauds in his house! </div> </li> <li> <div align="justify"><strong>Once Dinosaurs borrowed money from Rajinikanth and refused to pay him back. That was the last time anyone saw Dinosaurs. </strong></div> </li> </ol> <p align="justify">Dare not doubt on any of the above mentioned facts, for they are true to the last bit that stores them on the screen.</p> <p align="justify">The inspiration of the post came from the movie <a title="More info on the movie Robot" href="http://www.imdb.com/title/tt1305797/" target="_blank">Robot (Endhiran)</a>, the mention of which, should indefinitely terminate all the questions that might be jumping on and off your head.</p> <p align="justify">Feel free to contribute any other notable fact about <em><strong>the Rajinikanth</strong> </em>(and yes, its Rajini and not Rajni).</p> <p align="justify">Mind it™!</p> Vaibhav Sharmahttp://www.blogger.com/profile/08550674290122756598noreply@blogger.com1tag:blogger.com,1999:blog-2380923144131313666.post-19357690356658500322010-09-23T23:30:00.001+05:302010-09-23T23:30:59.537+05:30The Self-Adaptable Software<p align="justify">Indelicately speaking, self-adaptable software is any software (specialized or otherwise) that has the ability to respond to the needs of the users and doesn’t completely depend on the operating environment and is further proficient in dealing with faults, curtailing the chances of partial or complete failures. At its core it’s flexible. With flexibility, comes complexity. But then, we are software developers, and complexity is as native to us, as pointers to C/C++ (no pun intended).</p> <p align="justify">I am a decently mini-pro type of a PC gamer (I am proud of it, even though its mini) and was trying out <a title="EA Sports FIFA 2010" href="http://www.ea.com/soccer/history/fifa-10" target="_blank">FIFA 2010</a> on my PC with an <a title="NVidia GeForce 8400GS" href="http://www.nvidia.com/object/geforce_8400.html" target="_blank">NVidia GeForce 8400GS</a> graphics card installed onto it. As is true for all the recently launched games, on-board graphics simply doesn’t suffice their needs. They humbly need more powerful GPUs to render the superior graphics intensive characters, surroundings and their interactions. On the beautiful start of a weekend (yes I can still recall, it was a beautiful Saturday morning) my graphics card passed away (pardon me for my emotions, but they are as real as the <em>real</em> data-type). </p> <p align="justify">Utterly shattered, with muted curses to everyone including luck, hardware industry, vendors and my by-now torn off warranty card (it had expired 3months ago); I reverted my display onto the onboard graphics display and began lamenting on the lost opportunities of scoring goals (so what if they were virtual). Being a programmer, and the huge belief (read disbelief) I have with fellow programmers, I decided to run FIFA 2010 without a GPU. To be frank, I was curious to see the error message and the entire experience from the user’s point of view. The introductory video played off, and I was certain of it being a video file with absolutely no requirements of the GPU. The menu came up and I loaded my profile and started a fixture.</p> <p align="justify"><strong>“Awesome! </strong><a title="EA Sports" href="http://www.easports.com/" target="_blank">EA</a><strong>”</strong> is all that I shouted (I actually did). The game ran on <a title="Software Rendering" href="http://en.wikipedia.org/wiki/Software_rendering" target="_blank">software renderer</a>, the graphics were of lower quality, shadows had vanished, the ground looked pale and the players could never look more than androids (read robots). To sum it up, the game was playable and it had adapted to the software renderer seamlessly. A good deal of animation still persisted while really GPU intensive operations were skipped and that didn’t bother me the least. As a user, I was not deprived of my primary objective of playing the game thanks to the self-adaptive graphics system built into the software (i.e. the game). At the core of everything, I sighed <br />“Why couldn’t all software self-adapt?”</p> <p align="justify">Most of us, most of the times, skip the process of even thinking (forget developing) adaptable systems either because it’s precisely not in the scope of the <a title="Software Requirements Specification (SRS)" href="http://en.wikipedia.org/wiki/Software_Requirements_Specification" target="_blank">SRS</a> or maybe it’s not cost effective enough and doesn’t provide the expected <a title="Return On Investment (ROI)" href="http://en.wikipedia.org/wiki/Return_on_Investment" target="_blank">ROI</a>. Not only do we expect users to use the software as we intend, we end up limiting their capabilities and implied rights to have self-correcting systems.</p> <p align="justify">To avoid being misinterpreted I don’t intend to make a <a title="Line Of Business (LOB)" href="http://en.wikipedia.org/wiki/Line_of_business" target="_blank">LOB</a> application go <a title="Artificial Intelligence" href="http://en.wikipedia.org/wiki/AI" target="_blank">AI</a> and do crazy stuffs. A common scenario of network related dependency can be cited as an example of the ill-intent to not create self-adaptive software. Network turbulence recursively entails us to go berserk almost every day and we wish (at least I wish) the network dependent, and not merely network connected app, could do and let me do something offline.</p> <p align="justify">The issue is not merely of OCA or occasionally connected applications. There could (and would) be plenty of scenarios where we, as developers, limit the users from experiencing the app in a limited way.</p> <p align="justify">Have you recently encountered any of them?</p> <blockquote> <p align="justify">if ( answer == true ) <br />        shareThem();</p> </blockquote> <p align="justify">Happy Adapting!</p> Vaibhav Sharmahttp://www.blogger.com/profile/08550674290122756598noreply@blogger.com0tag:blogger.com,1999:blog-2380923144131313666.post-29050970295717557342010-08-01T22:40:00.001+05:302010-08-01T22:47:16.966+05:30Being Numero Uno!<p align="justify">Half a decade into the technology industry, primarily software development, and post working on varied nature projects, with some of the most diligent and unswerving programmers I ever came across, this intends to be a succinct summary of what in essence could assist in being the <strong><em>numero uno</em></strong> in the surroundings we live in. Even though some slices of this post relates to the Information Technology landscape, this could easily map to any other industry or sector you recognize.</p> <p align="justify">Irrespective of the organizations I worked for, there always were few elite professionals that stood apart right from the inception. It was surprising to observe that they just excelled at a quantum pace while all others seem to have had trouble placing their foot in place. There were some common characteristics that could be discovered from their conduct and their supremacy in their relevant world.</p> <p align="justify">Listed below are some of the <em>base</em> (deriving from my programming background in OOPS) characteristics that I came across which might propel you to the right track of being the chosen one (the Matrix effect):</p> <ul> <li> <p align="justify"><strong>Professionally yours</strong>: If you are one of the types who choose to dabble into the tasks assigned, you will wind up with a dabbled life. There'll be no satisfaction in it because there will be no real production you can be proud of. <em>Society does not emphasize the importance of professionalism, so people tend to believe that amateur work is normal</em>. Even businesses accept sub-standard results, but that shouldn’t ever be consumed as an excuse for being unprofessional in whatever you do. Our professional careers are a long and the most significant journey of our lives. Think twice before compromising on the output you contribute, the impact could be everlasting!</p> </li> <li> <p align="justify"><strong>Evaluate feasibility not possibility</strong>: A common behavior exhibited by most software developers is to jump straight into the problem domain and declare or decide on its possibility. The elite are seldom concerned about the possibility of the solutions. Their seasoned experience and confidence allows them to leverage that advantage. What sets them apart is the ability to peek into the future and evaluate the scenarios that may curtail future existence of the business domain they are working in and contributing to. A practice that every software developer must inculcate is to consider himself/herself as a consultant and not an ordinary employee of an organization. Irrespective of the role you play, expand your horizon by placing yourself as a consultant to the client, the results would mostly be positive and obvious.</p> </li> <li> <p align="justify"><strong>Context switching abilities</strong>: No matter where you work, and irrespective of the size of the team and the environment you are in, the key to understanding and infusing trust and confidence among fellow developer colleagues is to put yourself into their shoes before even distantly deciding to criticize their actions or doings. Very few amongst us have this unique and most wanted characteristic of being able to switch contexts and place ourselves in other’s place before deciding on issues relating to them. Conveying a mistake is way dissimilar than blaming it upon and most of the elite people I come across had a chiseled way of conveying the mistakes I kept constructing and it was more of learning than embarrassment.</p> </li> <li> <p align="justify"><strong>Passion is the key</strong>: Long term success or real success is hard to achieve than short term or virtual success. And there is a very simple and almost overlooked reason for that. There are difficult times in the journey to real success when you feel like you are working for nothing, that you don’t get anything in return for all your effort. In such difficult times, only passion can keep you moving forward! The beauty of being passionate about the things you do is that it will show up in your work without you having to put that extra tiring effort.</p> </li> <li> <p align="justify"><strong>Clearly defined goals</strong>: A pre-requisite to success and an omnipresent quality in the elite group of people, clear goals ensure and increase the chances to succeed by manifolds. Its importance can never be over-emphasized. While most of us compromise for short term goals, it is surprising to note that the top-notch pros compromise and adjust keeping in view the primary long term ones.</p> </li> </ul> <p align="justify">All of us have an innate desire to succeed and lead the space we exist in, either professionally or personally and the list above could well contribute in focusing on the more relevant spheres leading to our relevant destinations.</p> <p align="justify">The motivation for this post came from a very small and surprisingly truthful and influential quote I read on success, which for me, answered approximately 90% of the questions I had left unanswered to myself:</p> <p align="justify"><strong><em>“deserve before you desire!”</em></strong></p> Vaibhav Sharmahttp://www.blogger.com/profile/08550674290122756598noreply@blogger.com1tag:blogger.com,1999:blog-2380923144131313666.post-46707071392357545912010-07-17T17:50:00.003+05:302010-07-17T18:09:42.129+05:30Theme Up!<div style="text-align: justify;">With the dawn of the last decade, <a href="http://en.wikipedia.org/wiki/User-centered_design" target="_blank">user-centered design</a> and end-user customization of literally every fragment of an application (web, client or phone) has taken a quantum leap. It has virtually become quintessential to have multiple ways of allowing end users to customize their experience with the software. With the advent of graphics cards and graphics accelerated hardware, pixels literally lit up, giving a whole new dimension to user experience and enabling creation of stunning user interfaces.</div><div style="text-align: justify;"><a href="http://en.wikipedia.org/wiki/Abstraction" target="_blank">Abstraction</a>, which is the dominantly prevailing concept, in every software methodology or framework today, impacted the design process as well, and what once was limited to selection of colors, got somewhat abstracted to selection of <i>themes, </i>even though the underlying idea was to only change the colors and at times, background graphics.</div><div style="text-align: justify;">For business application (smart client or desktop) developers, the change was almost forced by popular applications like browsers, instant messaging tools and utility applications. It was amusing to note that even Antivirus applications <i>themed</i> their UI to better present their functionalities. The nail was hit by Microsoft’s Office suite v2007, when Office applications allowed users to select a theme for its UI.</div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhddgwPLeSyYSFD2HlnC13LCERHHB1-LsCtcjQGIs0SLWkJ15TcV5qNVrAeLbUmHy4OKvD93nksauskOTkin3W2T4WKUD6gyrmbr-R2J611m0VBdKUneh77RzlnT1tx7TXEzB-ir2LBdPA/s1600-h/clip_image002%5B9%5D.png" target="_blank"><img alt="Office 2007 themes" height="203" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQRm2E0gJ6gbtIP4PYh5jfzv8GtDQzYGFnPPBhyYqd_B4IZBMHH-9xOaLkLF92bee2umkXYLDMIvfIrFr-ekpGGx5b5jIe608h8ocbA-9XoPgj7HTeWNRSTGsvHQ1Vkj7dxjMyMyKzGvY/?imgmax=800" style="display: block; float: none; margin-left: auto; margin-right: auto;" title="Office 2007 themes" width="301" /></a><br />
<div style="text-align: justify;">Once Office <i>themed</i> up, jinx, if any, that existed, preventing business apps from looking attractive was broken. It almost made it conventional for business applications to expose sleek interface that enabled innovative user experiences, irrespective of the type of application. Also, it enabled data entry applications to look far less tedious and cumbersome; a snap from them Dynamics CRM follows.</div><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioaqYHYj-ltmYljWeJzgOcBSr1lt3Cg2Dha8CcvuHuIlIxAQAiQLcsREEdtjkuSj6LUqH6ls2VlKyF2ZCXrMV1IR_iAPZTsd4p2Or9vYi6AV56CYUceWsO-0FjF55sbNm4yEtOFz2x8go/s1600-h/clip_image004%5B5%5D.png" target="_blank"><img alt=" Dynamics CRM data entry" height="171" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDkzlDV7NPdN_Z5uHUeDCHXg0aFIvNvY9DILi78vK17iRJmfKc9Hvs39Ypvpr1imzJaHnexY7bKOKnFZ3O8tvakONY0BAcZQNn_4meAJamNRvcuod0ZAIKuW9smkZI0kqPU2qiQog65kU/?imgmax=800" style="display: block; float: none; margin-left: auto; margin-right: auto;" title=" Dynamics CRM data entry" width="326" /></a><br />
<div style="text-align: justify;">The following is a list of some popular applications along with the associated resources to theme them. The list was never meant to be exhaustive, besides care has been exercised not to list untrusted sites to the extent possible. </div><div style="text-align: justify;"><b>Disclaimer: Users are informed to exercise caution before downloading third party extensions, themes and similar add-ons from untrusted sources. </b></div><div style="text-align: justify;"><ul><li><b><a href="http://www.microsoft.com/windows/windows-7" target="_blank">Windows 7</a></b> – Prior to Windows 7, Microsoft didn’t provide an active support for themes to the earlier versions of Windows, primarily XP (and yes I almost forgot there was Vista too). The support was mostly commercial in nature from vendors, mostly Microsoft Partners. With Windows 7, a change in strategy implied better and newer themes for end-users thanks to the <a href="http://windows.microsoft.com/en-US/windows/downloads/personalize/themes" target="_blank">Themes gallery</a>.</li>
</ul></div><div style="text-align: justify;"><ul><li><b><a href="http://www.microsoft.com/visualstudio/en-us/" target="_blank">Visual Studio 2010</a></b> – Having a brand new code editor and huge chunks of it’s codebase in WPF enabled the extension developers of Visual Studio 2010 to incorporate themes into the most popular (I don’t care if you disagree) IDE of all times. <a href="http://visualstudiogallery.msdn.microsoft.com/en-us/20cd93a2-c435-4d00-a797-499f16402378?SRC=Home" target="_blank">Visual Studio color theme editor</a> comes in with pre-defined themes and allows you to customize or create new themes.</li>
</ul></div><div style="text-align: justify;"><ul><li><b><a href="http://www.mozilla.com/firefox" target="_blank">Mozilla Firefox</a></b> – The leading (again who cares if you disagree) open source browser incorporated and provided themes right from its early versions and an active community meant Firefox users never faced any scarcities in terms of <a href="https://addons.mozilla.org/en-US/firefox/themes/" target="_blank">themes</a>. However, with <a href="http://www.getpersonas.com/en-US/" target="_blank">Personas</a>, a graduated project of <a href="https://mozillalabs.com/" target="_blank">Mozilla Labs</a>, themes became lighter and somewhat better.</li>
</ul></div><div style="text-align: justify;"><ul><li><b>Twitter clients</b> – The ever expanding universe of <a href="http://twitter.com/" target="_blank">twitter</a> clients is more of an amusing for me considering the fact that twitter is just slightly older than a toddler. <a href="http://desktop.seesmic.com/" target="_blank">Seesmic Desktop</a> and <a href="http://www.metrotwit.com/" target="_blank">MetroTwit</a> surely standup for a mention with theme enabled sleek user interface.</li>
</ul></div><div style="text-align: justify;"><ul><li><b>Mobile Phone Themes</b>: I regularly use themes from <a href="http://www.zedge.net/" target="_blank">Zedge</a> for my Nokia phone (<a href="http://europe.nokia.com/find-products/devices/nokia-5800-xpressmusic" target="_blank">5800 XpressMusic</a>), and have found some certificate issues with the themes they list. Hence, exercise your judicious half before installing or even downloading any themes on your mobile phones.</li>
</ul></div><div style="text-align: justify;"><ul><li><b>Silverlight applications</b>: If you are a Silverlight application developer, you may use the <a href="http://silverlight.codeplex.com/" target="_blank">Silverlight toolkit</a> from <a href="http://www.codeplex.com/" target="_blank">Codeplex</a>.</li>
</ul></div><div style="text-align: justify;"><ul><li><b>WPF applications</b>: As a WPF (Windows Presentation Foundation) developer, a good collection of <a href="http://wpfthemes.codeplex.com/" target="_blank">themes</a> is available from <a href="http://www.codeplex.com/" target="_blank">Codeplex</a>.</li>
</ul></div><div style="text-align: justify;"><ul><li><b>Blogger themes</b>: If you are like me and are overly uninterested by the default themes provided by blogger you may visit <a href="http://btemplates.com/" target="_blank">bTemplates</a> for refreshing and mostly free blogger templates/themes.</li>
</ul></div><div style="text-align: justify;"><ul><li><b>Website themes</b>: Looking for free website themes for general usage? Try <a href="http://www.oswd.org/" target="_blank">OSWD</a>.</li>
</ul></div><div style="text-align: justify;"><br />
The above mentioned are just some of the common popular apps that enable you to theme up the experience. </div><br />
To conclude, I would like to mention some apps that I wish had themes, the sooner the better:<br />
<br />
<div style="text-align: justify;"><ul><li><b>Internet Explorer</b> – The most arrogant software ever sent to production tops my wish list for theme<i> </i>enabled apps. When the entire world embraced tabbed browsing, MS IE was arrogant enough to wait until v7 with undoubtedly the slowest implementation of tab switching. Continuing with its tradition, even now, with v8, it’s incapable of providing a simple downloads management snap-in. Microsoft has time and again ended up being complacent and literally handed over its market share to its competitors. </li>
</ul></div><div style="text-align: justify;"><ul><li><b>SQL Server Management Studio</b> – Like every other Microsoft technology enthusiast, the legitimate next step with Management Studio seems to be a T-SQL IDE based on WPF and then following up with themes. Awaiting SQL Server 2012 may be (who knows?). There surely wouldn’t be <i>Office 2013</i>, so <i>SQL Server 2013</i> seems unlikely too.</li>
</ul></div><div style="text-align: justify;"><br />
Please feel free to enlist any application that you use which already provides support for themes or should provide them at the earliest! <br />
<br />
The list above only limits to the applications I use to ease out my work/good life.</div><b><i><br />
</i></b><i> Theme Up!</i>Vaibhav Sharmahttp://www.blogger.com/profile/08550674290122756598noreply@blogger.com4tag:blogger.com,1999:blog-2380923144131313666.post-80337933838662225612010-06-27T13:54:00.001+05:302010-06-27T13:54:25.836+05:30Reacting to Exceptions<p align="justify">While preparing my slides for the <a title="Visit the CTD website" href="http://communitytechdays.com" target="_blank">Community Tech Days</a> at <a title="Register for Kolkata CTD" href="http://www.kolkatanet.com/CTD" target="_blank">Kolkata</a>, I encountered a very interesting exceptional situation. Just to sync you up, I was evaluating Office 2010, specifically PowerPoint 2010. The very first slide had an effect exclusive to the 2010 version of PowerPoint. Just to check the compatibility I ran the slides on another system with PowerPoint 2007 version installed. To my amazement, the slides ran without any effects. No messages or warnings whatsoever! I went berserk (and FYI when I go berserk, that ends up into a new blog post).</p> <p align="justify">The immediate question that spring up was: shouldn’t PowerPoint protest about missing effects? Should it just skip the problem-causing effect, and continue with the show (and prove itself to be robust) or at least caution the user about something that did go wrong at execution or runtime? This spawns up a simple yet important question for us developers: how should we react to exceptions that we don’t predominantly expect and when should we completely disregard them?</p> <p align="justify">Missing effects in a PowerPoint show is surely not a <i>consistent</i> exception. In my personal view (and that’s what this blog is all about), the Office team has full rights to expect a v12 presentation to be opened with v12 of PowerPoint. When I ship an app’s v2 version and supposedly I have a custom document type registered with my application (say <b><i>.vaibhav </i></b>or <b>.<i>vaibhavx</i></b>, to better match the document format trends), I surely would expect a v2 file to be opened by v2 of my app. If the user attempts to open my custom document with an earlier version, I would simply <i>penalize</i> the user for not using the most recent version of my app by throwing an exception, and maybe (I do this for fun) shutting the application. This, I believe is a common trail that most (if not all) of us take when determining on similar problems (saves time and heaps of code, trust me). But then, where exactly does app compatibility fit in? </p> <p align="justify">Software is<b> backwards</b> or <b>downwards compatible</b> when it can work with input generated by an older version. If software designed for the new standard can receive, read, view or play older standards or formats, then the software is said to be backwards-compatible. <b>Forward compatibility</b> or <b>upwards compatibility</b> (sometimes confused with <a href="http://en.wikipedia.org/wiki/Extensibility" target="_blank">extensibility</a>) is the ability of software to <b><i>gracefully</i></b> accept input intended for later versions of itself. The introduction of a forward compatible software technology implies that old software partly can understand data generated by new version of itself. A forward-compatible system is expected to "<a href="http://en.wikipedia.org/wiki/Graceful_exit" target="_blank">gracefully</a>" handle input which is intended for a newer version, by ignoring the unknowns and selecting the known subset of the data that the system is capable of handling. Forward compatibility is harder to achieve than <a href="http://en.wikipedia.org/wiki/Backward_compatibility" target="_blank">backward compatibility</a> because a system needs to cope gracefully with an unknown future <a href="http://en.wikipedia.org/wiki/Data_format" target="_blank">data format</a> or requests for unknown future <i>features</i>.</p> <p align="justify">The keyword above (for me at least) is <b>graceful.</b> But, should I leave the user in an indecisive status by removing the obtrusive exception messages? Will that tantamount to a tolerable UX (user experience)? Wouldn’t it be better if I could inform the user, what the problem was, and what its probable solution would (could) be?</p> <p align="justify">How would you resolve a similar situation?</p> <p align="justify">And in the meantime, let me continue to <em>discipline</em> my users with beautiful dialog boxes with subsequent calls to Application.Exit()</p> <p align="justify">Happy Coding!</p> Vaibhav Sharmahttp://www.blogger.com/profile/08550674290122756598noreply@blogger.com1tag:blogger.com,1999:blog-2380923144131313666.post-79220296599367908132010-06-05T19:57:00.005+05:302010-06-05T20:37:43.915+05:30Heard it somewhere!<div style="margin-left: 36pt; text-align: justify;">The world it seems, is moving towards an age where an intellectual person will be judged based on the blog posts per week he writes, the tweets he generates (or regenerates) per day, the number of new jargons demystified or created by him per minute and the number of questions he answers per second on stackoverflow.com (think before you rule out the possibility of such a world in near future). To <i>validate</i> myself as a deserving citizen of that world (as and when it comes to existence), I went ahead to demystify certain words and phrases which the gigantic personas of technology in general (credit for the inspiration of this post should go to <a href="http://research.microsoft.com/en-us/um/people/emeijer/default.aspx" target="_blank">Erik Meijer</a>, <a href="http://www.microsoft.com/presspass/exec/techfellow/hejlsberg/default.mspx" target="_blank">Anders Hejlsberg</a>, <a href="http://www.hanselman.com/" target="_blank">Scott Hanselman</a>, <a href="http://weblogs.asp.net/scottgu/" target="_blank">Scott Guthrie</a> and so many more who couldn't be <i>declared</i> for genuine space constraints), often use without even considering the fact that some of their audience (read me and only me) have no idea of what that word or phrase corresponds to.</div><div style="margin-left: 36pt; text-align: justify;">This is an attempt to collate certain phrases which most of us have heard numerous times but haven't essentially researched our way into understanding them comprehensively.</div><ul><li><div style="text-align: justify;"><a href="http://en.wikipedia.org/wiki/Domain-specific_language" target="_blank">Domain Specific Language (DSL)</a>: It's a programming or <a href="http://en.wikipedia.org/wiki/Specification_language" target="_blank" title="Specification language">specification language</a> dedicated to a particular problem domain or a particular problem representation technique. The concept isn't new—<i>special-purpose programming languages</i> and all kinds of modeling/specification languages have always existed, but the term has become more popular due to the rise of <a href="http://en.wikipedia.org/wiki/Domain-specific_modeling" target="_blank" title="Domain-specific modeling">domain-specific modeling</a>. Examples of domain-specific languages include <a href="http://en.wikipedia.org/wiki/Logo_%28programming_language%29" target="_blank" title="Logo (programming language)">Logo</a> for children, <a href="http://en.wikipedia.org/wiki/Spreadsheet" target="_blank" title="Spreadsheet">spreadsheet</a> formulas and macros, <a href="http://en.wikipedia.org/wiki/SQL" target="_blank" title="SQL">SQL</a> for <a href="http://en.wikipedia.org/wiki/Relational_database" target="_blank" title="Relational database">relational database</a> queries, <a href="http://en.wikipedia.org/wiki/Yacc" target="_blank" title="Yacc">YACC</a> grammars for creating <a href="http://en.wikipedia.org/wiki/Parsers" target="_blank" title="Parsers">parsers</a>, <a href="http://en.wikipedia.org/wiki/Regular_expressions" target="_blank" title="Regular
expressions">regular expressions</a> for specifying <a href="http://en.wikipedia.org/wiki/Lexical_analysis" target="_blank" title="Lexical
analysis">lexers</a>.</div></li>
<li><div style="text-align: justify;"><a href="http://en.wikipedia.org/wiki/Mashup_%28web_application_hybrid%29">Mashup</a> (Web application hybrid): In web development, a <i>mashup</i> is a web page or application that uses or combines data or functionality from two or many more external sources to create a new service. The term implies easy, fast integration, frequently using open APIs and data sources to produce enriching results that were not necessarily the original reason for producing the raw source data. In the past years, more and more web applications provide APIs that enable software developers to easily integrate data and functions instead of building it themselves. Mashups can be considered to have an active role in the evolution of <a href="http://en.wikipedia.org/wiki/Social_software" target="_blank" title="Social
software">social software</a> and <a href="http://en.wikipedia.org/wiki/Web_2.0" target="_blank" title="Web 2.0">Web 2.0</a>. The term <i>mashup</i> is also used to describe a <i>remix</i> of digital data.</div></li>
<li><div style="text-align: justify;"><a href="http://en.wikipedia.org/wiki/Cloud_computing">Cloud computing</a>: It is Internet-based computing, whereby shared resources, software and information are provided to computers and other devices on-demand. It is a <a href="http://en.wikipedia.org/wiki/Paradigm_shift" target="_blank" title="Paradigm shift">paradigm shift</a> following the shift from mainframe to client–server that preceded it in the early 1980s. Details are abstracted from the users who no longer have need of expertise in, or control over the technology infrastructure <i>"in the cloud"</i> that supports them. Cloud computing describes a new supplement, consumption and delivery model for IT services based on the Internet, and it typically involves the provision of dynamically <a href="http://en.wikipedia.org/wiki/Scalability" target="_blank" title="Scalability">scalable</a> and often <a href="http://en.wikipedia.org/wiki/Virtualization" target="_blank" title="Virtualization">virtualized</a> resources as a service over the Internet. It is a byproduct and consequence of the ease-of-access to remote computing sites provided by the Internet.<sup><br />
</sup>The term "cloud" is used as a metaphor for the Internet, based on the cloud drawing used in the past to represent the telephone network, and later to depict the Internet in computer network diagrams as an abstraction of the underlying infrastructure it represents. Typical cloud computing providers deliver common business applications online which are accessed from another web service or software like a web browser, while the software and data are stored on servers.</div></li>
<li><div style="text-align: justify;">Atom: It is an alternate XML format for easily sharing content, much like <a href="http://www.netlingo.com/word/rss.php" target="_blank">RSS</a> Really Simple Syndication (format). Blogs for example, publish Atom feeds. Atom and RSS have very similar uses; the motivation behind Atom sprang from a desire to add improvements to the RSS specification. Apparently the keeper of the RSS specification froze the spec (declaring that RSS 2.0 would be the last version) and so the authors of Atom felt that a new format was necessary.</div></li>
<li style="text-align: justify;"><a href="http://oauth.net/" target="_blank">OAuth</a> and <a href="http://openid.net/" target="_blank">OpenId</a>: OAuth is a simple way to publish and interact with protected data. OAuth attempts to provide a standard way for developers to offer their services via an API without forcing their users to expose their passwords (and other credentials). OAuth is not an OpenID extension and at the specification level, shares only few things with OpenID – some common authors and the fact both are open specification in the realm of authentication and access control. If OAuth depended on OpenID, only OpenID services would be able to use it, and while OpenID is great, there are many applications where it is not suitable or desired. OAuth talks about getting users to grant access while OpenID talks about making sure the users are really who they say they are.</li>
<li style="text-align: justify;"><a href="http://www.odata.org/" title="Learn more about OData here">OData</a>: The Open Data Protocol (OData) is a Web protocol for querying and updating data that provides a way to unlock your data and free it from silos that exist in applications today. OData does this by applying and building upon Web technologies such as HTTP, Atom Publishing Protocol (AtomPub) and <a href="http://json.org/">JSON</a> to provide access to information from a variety of applications, services, and stores. The protocol emerged from experiences implementing AtomPub clients and servers in a variety of products over the past several years. OData is being used to expose and access information from a variety of sources including, but not limited to, relational databases, file systems, content management systems and traditional Web sites.</li>
<li><div style="text-align: justify;"><a href="http://en.wikipedia.org/wiki/Mixin" title="Learn more about Mixins">Mixin</a>: In object-oriented programming languages, a mixin is a class that provides a certain functionality to be inherited by a subclass, while not meant for instantiation (the generation of objects of that class). Inheriting from a mixin is not a form of specialization but is rather a means of collecting functionality. A class may inherit most or all of its functionality from one or more mixins through multiple inheritance. Mixins encourage code reuse and avoid well-known pathologies associated with multiple inheritance. However, mixins introduce their own set of compromises. A mixin can also be viewed as an interface with implemented methods. When a class includes a mixin, the class implements the interface and includes, rather than inherits, all the mixin's attributes and methods. They become part of the class during compilation. Interestingly enough, mixins don't need to implement an interface. The advantage of implementing an interface is that instances of the class may be passed as parameters to methods requiring that interface. A mixin can defer definition and binding of methods until runtime, though attributes and instantiation parameters are still defined at compile time. This differs from the most widely-used approach, which originated in the programming language <a href="http://en.wikipedia.org/wiki/Simula" title="Simula">Simula</a>, of defining all attributes, methods and initialization at compile time.</div></li>
<li style="text-align: justify;"><a href="http://en.wikipedia.org/wiki/Monad_%28functional_programming%29">Monads</a>: A monad is a construction that, given an underlying <a href="http://en.wikipedia.org/wiki/Type_system" title="Type system">type system</a>, embeds a corresponding type system (called the <i>monadic type system</i>) into it (that is, each monadic type acts as the underlying type). This monadic type system preserves all significant aspects of the underlying type system, while adding features particular to the monad. In <a href="http://en.wikipedia.org/wiki/Functional_programming" title="Functional programming">functional programming</a>, a monad is a kind of <a href="http://en.wikipedia.org/wiki/Abstract_data_type" title="Abstract data type">abstract data type</a> used to represent <a href="http://en.wikipedia.org/wiki/Computation" title="Computation">computations</a> (instead of data in the <a href="http://en.wikipedia.org/wiki/Domain_model" title="Domain model">domain model</a>). Monads allow the programmer to chain actions together to build a <a href="http://en.wikipedia.org/wiki/Pipeline_%28computing%29" title="Pipeline (computing)">pipeline</a>, in which each action is decorated with additional processing rules provided by the monad. Programs written in functional style can make use of monads to structure procedures that include sequenced operations, or to define arbitrary <a href="http://en.wikipedia.org/wiki/Control_flow" title="Control flow">control flows</a> (like handling <a href="http://en.wikipedia.org/wiki/Concurrency_%28computer_science%29" title="Concurrency (computer science)">concurrency</a>, <a href="http://en.wikipedia.org/wiki/Continuation" title="Continuation">continuations</a>, or <a href="http://en.wikipedia.org/wiki/Exception_handling" title="Exception handling">exceptions</a>). Formally, a monad is constructed by defining two operations (<i>bind</i> and <i>return</i>) and a type constructor <i>M</i> that must fulfill several properties to allow the correct composition of <i>monadic</i> functions (i.e. functions that use values from the monad as their arguments). The <i>return</i> operation takes a value from a plain type and puts it into a monadic container of type <i>M</i>. The <i>bind</i> operation performs the reverse process, extracting the original value from the container and passing it to the associated next function in the pipeline.</li>
<li style="text-align: justify;"><a href="http://en.wikipedia.org/wiki/Type_safety">Type Safety</a>: In <a href="http://en.wikipedia.org/wiki/Computer_science" title="Computer science">computer science</a>, type safety is the extent to which a <a href="http://en.wikipedia.org/wiki/Programming_language" title="Programming language">programming language</a> discourages or prevents <i>type errors</i>. A type error is erroneous or undesirable program behaviour caused by a discrepancy between differing <a href="http://en.wikipedia.org/wiki/Data_type" title="Data type">data types</a>. Type safety is sometimes alternatively considered to be a property of a computer program rather than the language in which that program is written; that is, some languages have type-safe facilities that can be circumvented by programmers who adopt practices that exhibit poor type safety. The formal <a href="http://en.wikipedia.org/wiki/Type_theory" title="Type theory">type-theoretic</a> definition of type safety is considerably stronger than what is understood by most programmers. Type enforcement can be static, catching potential errors at <a href="http://en.wikipedia.org/wiki/Compile_time" title="Compile time">compile time</a>, or dynamic, associating type information with values at <a href="http://en.wikipedia.org/wiki/Run_time_%28computing%29" title="Run
time (computing)">run time</a> and consulting them as needed to detect imminent errors, or a combination of both. Type safety is closely linked to <a href="http://en.wikipedia.org/wiki/Memory_safety" title="Memory safety"><i>memory safety</i></a>, a restriction on the ability to copy arbitrary bit patterns from one memory location to another. For instance, in an implementation of a language that has some type <i>t</i>, such that some sequence of bits (of the appropriate length) does not represent a legitimate member of <i>t</i>, if that language allows data to be copied into a <a href="http://en.wikipedia.org/wiki/Variable_%28programming%29" title="Variable (programming)">variable</a> of type <i>t</i>, then it is not type-safe because such an operation might assign a non-<i>t</i> value to that variable. Conversely, if the language is type-unsafe to the extent of allowing an arbitrary integer to be used as a <a href="http://en.wikipedia.org/wiki/Pointer_%28computing%29" title="Pointer (computing)">pointer</a>, then it is clearly not memory-safe.</li>
<li style="text-align: justify;">Immutable Objects: In <a href="http://en.wikipedia.org/wiki/Object-oriented_computer_programming" title="Object-oriented computer programming">object-oriented</a> and <a href="http://en.wikipedia.org/wiki/Functional_programming" title="Functional programming">functional</a> programming, an immutable object is an <a href="http://en.wikipedia.org/wiki/Object_%28computer_science%29" title="Object (computer science)">object</a> whose state cannot be modified after it is created. This is in contrast to a mutable object, which can be modified after it is created. An object can be either entirely immutable or some attributes in the object may be declared immutable; for example, using the <a href="http://en.wikipedia.org/wiki/Const_correctness" title="Const
correctness">const</a> member data attribute in the <a href="http://en.wikipedia.org/wiki/C%2B%2B" title="C++">C++</a> programming language. In some cases, an object is considered immutable even if some internally used attributes change but the object's state appears to be unchanging from an external point of view. For example, an object that uses <a href="http://en.wikipedia.org/wiki/Memoization" title="Memoization">memoization</a> to cache the results of expensive computations could still be considered an immutable object. The initial state of an immutable object is usually set at its <a href="http://en.wikipedia.org/wiki/Object_lifetime" title="Object lifetime">inception</a>, but can also be set before actual use of the object. Immutable objects are often useful because some costly operations for copying and comparing can be omitted, simplifying the program code and speeding execution. However, making an object immutable is usually inappropriate if the object contains a large amount of changeable data. Because of this, many languages allow for both immutable and mutable objects.</li>
<li><div style="text-align: justify;"><a href="http://en.wikipedia.org/wiki/Thread-safe" target="_blank">Thread safety</a> is a <a href="http://en.wikipedia.org/wiki/Computer_programming" title="Computer
programming">computer programming</a> concept applicable in the context of <a href="http://en.wikipedia.org/wiki/Multi-threaded" title="Multi-threaded">multi-threaded</a> programs. A piece of code is thread-safe if it functions correctly during simultaneous execution by multiple threads.<br />
Thread safety is a key challenge in multi-threaded programming. It was not a concern of most application programmers but since the late 1990s has become a commonplace issue. In a multi-threaded program, several threads execute simultaneously in a shared <a href="http://en.wikipedia.org/wiki/Address_space" title="Address space">address space</a>. Every thread has access to virtually all the <a href="http://en.wikipedia.org/wiki/Computer_storage" title="Computer
storage">memory</a> of every other thread. Thus the flow of control and the sequence of accesses to data often have little relation to what would be reasonably expected by looking at the text of the program, violating the <a href="http://en.wikipedia.org/wiki/Principle_of_least_astonishment" title="Principle of least astonishment">principle of least astonishment</a>. Thread safety is a property aimed at minimizing surprising <a href="http://en.wikipedia.org/wiki/Behavior" title="Behavior">behavior</a> by re-establishing some of the correspondences between the actual flow of control and the text of the program.</div></li>
<li><div style="text-align: justify;"><a href="http://en.wikipedia.org/wiki/Metaprogramming">Metaprogramming</a> is the writing of <a href="http://en.wikipedia.org/wiki/Computer_program" title="Computer
program">computer programs</a> that write or manipulate other programs (or themselves) as their data, or that do part of the work at <a href="http://en.wikipedia.org/wiki/Compile_time" title="Compile time">compile time</a> that would otherwise be done at <a href="http://en.wikipedia.org/wiki/Run_time_%28computing%29" title="Run
time (computing)">runtime</a>. In many cases, this allows programmers to get more done in the same amount of time as they would take to write all the code manually, or it gives programs greater flexibility to efficiently handle new situations without recompilation. </div><div style="text-align: justify;">The language in which the metaprogram is written is called the <a href="http://en.wikipedia.org/wiki/Metalanguage" title="Metalanguage">metalanguage</a>. The language of the programs that are manipulated is called the <a href="http://en.wikipedia.org/wiki/Object_language" title="Object language"><i>object language</i></a>. The ability of a programming language to be its own metalanguage is called <a href="http://en.wikipedia.org/wiki/Reflection_%28computer_science%29" title="Reflection (computer science)"><i>reflection</i></a> or <i>reflexivity</i>.</div><div style="text-align: justify;">Reflection is a valuable language feature to facilitate metaprogramming. Having the programming language itself as a <a href="http://en.wikipedia.org/wiki/First-class_object" title="First-class object">first-class data type</a> (as in <a href="http://en.wikipedia.org/wiki/Lisp_%28programming_language%29" title="Lisp (programming language)">Lisp</a>, <a href="http://en.wikipedia.org/wiki/Forth_%28programming_language%29" title="Forth (programming language)">Forth</a> or <a href="http://en.wikipedia.org/wiki/Rebol" title="Rebol">Rebol</a>) is also very useful. <a href="http://en.wikipedia.org/wiki/Generic_programming" title="Generic programming">Generic programming</a> invokes a metaprogramming facility within a language, in those languages supporting it.</div>Metaprogramming usually works in one of two ways. The first way is to expose the internals of the run-time engine to the programming code through <a href="http://en.wikipedia.org/wiki/Application_programming_interface" title="Application programming interface">application programming interfaces</a> (APIs). The second approach is dynamic execution of string expressions that contain programming commands. Thus, "programs can write programs". Although both approaches can be used in the same language, most languages tend to lean toward one or the other.</li>
<li><div style="text-align: justify;"><a href="http://en.wikipedia.org/wiki/Lambda_lifting">Lambda lifting</a> or closure conversion is the process of eliminating <a href="http://en.wikipedia.org/wiki/Free_variable" title="Free variable">free variables</a> from local function definitions from a computer program. The elimination of free variables allows the compiler to hoist local definitions out of their surrounding contexts into a fixed set of top-level functions with an extra parameter replacing each local variable. By eliminating the need for run-time access-links, this may reduce the run-time cost of handling implicit <a href="http://en.wikipedia.org/wiki/Scope_%28programming%29" title="Scope (programming)">scope</a>. Many <a href="http://en.wikipedia.org/wiki/Functional_programming" title="Functional programming">functional programming</a> language implementations use lambda lifting during compilation. </div><div style="text-align: justify;">The term lambda lifting was first introduced by <a href="http://en.wikipedia.org/w/index.php?title=Thomas_Johnsson&action=edit&redlink=1" title="Thomas Johnsson (page does not exist)">Thomas Johnsson</a> around 1982.</div></li></ul><div style="text-align: justify;">As expressed, it was never my intent to demystify all the trendy concepts in technology and programming world. Thanks to the definite source of information, Wikipedia, for assisting in collating the above information.</div><br />
<div style="text-align: justify;">Hope you find some of it (if not all) useful.</div><br />
<div style="text-align: justify;">Thanks Mr. Reader for your time! Comments as always, are cherished and welcomed!</div><ul></ul>Vaibhav Sharmahttp://www.blogger.com/profile/08550674290122756598noreply@blogger.com2tag:blogger.com,1999:blog-2380923144131313666.post-70147981201571650292010-04-11T11:09:00.000+05:302010-04-11T22:53:15.672+05:30Let’s Zune<p align="justify">As a professional developer (don’t care if you disagree) one thing that has always stayed on my priority list is UX (User eXperience). UX is what makes an ordinary app stand out in the crowd and boost its adoption rate. There has been a sudden upsurge in the resources that are now being directed towards designing and developing effective UX.</p> <p align="justify">Media players have been there since forever (it almost seems so) and we all have our personal favorites. Our boxes come bundled up with something default which for some cynical reasons never suffices our hunger for the <em>numero uno</em> media experience. And there begins a never ending exploration for the most amazing media player. It’s surprising though, all that a media player (and I am directing my focus on music primarily) is supposed to do is yell out noise (dear music lover, no hard feelings intended), allow repeat, shuffle and essentially play a single song at a time (how many of you play multiple songs in parallel? Try it out, its fun!).</p> <p align="justify">Developers are always criticized for making simple things complex and that’s <em>indeed true</em>. Media players today have a fortune of features, 90% of which are unknown to lay end users while the remaining 10% of the end users are too busy comparing and contrasting these features with a rival player. With smart media devices rolling out, features like synchronization with the devices and amongst devices, cd ripping and burning from within the player have graduated to become the minimal set of features that a media player must expose to be even considered a decent enough option. When it comes to playing my songs I usually limit down to two players (again, a single player doesn’t simply suffice and I know not why), the primary being Windows Media Player 11 and the secondary being WinAmp, the modest media player for the masses. I stumbled upon Zune Software, the premiere media playing application for the PC primarily targeting Microsoft’s Zune player (aka the iPod killer). For more information about Zune MP3 Player visit <a href="http://www.zune.net/en-us/products/mp3players/default.htm">here</a>.</p> <p align="justify">The Zune software is what startled me and my curiosity grew when I read the tag line of the <a href="http://www.zune.net/en-us/products/software/">Zune software home page</a> which declared: <i>browse music, not spreadsheets</i>. I like the concept and went ahead and decided to try it out. I might sound like the Indian TV news media, but it was AWESOME! AWESOME! AWESOME! (the words repeated directly correspond to propose the degree of awesomeness experienced). What follows is a quick overview of what looked to me as a really cool (again, I don’t know what this word means but it sounds geeky, so must over use it) media player and let me remind you, I don’t own a Zune MP3 Player and I don’t intend to rip music or buy music online. So I was totally concentrated on playing (offline) music that occupied very precious bits on my HDD.</p> <p align="justify">The <i>Now Playing</i> view impressed me a lot especially with the innovative UX that it proposed. Have a look at it:</p> <p align="justify"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKiqnzgKdPHV08RupfAQlbawzxx1QIY6rD9p7OvXvHOEtV5e0F4FlB_g3c_xLO8vVd4EfUsvEAJ9nWaVnBkyFHMop7E-oT1i12HOl3JDAUGc1XETyCEvI-vfniFwCqg57kgadqigY5b6E/s1600-h/clip_image0024.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="clip_image002" border="0" alt="clip_image002" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHzDx5wrCAzv8_D1m1dhLeCEgjAZrYEgba8wAIXzQzSoY8FREymGx8tQ2HZLayCGKBc-JPfKrp-7T0cfTvGzxo8p2kyzE72tlnvT6N2IdHTHIX8ELlAkdcKpXNxxPzeNDbxo_TVOlu7FI/?imgmax=800" width="604" height="404" /></a></p> <p align="justify">This single view has colossal amount of functionality and the reason why I love it lies in its unobtrusive UX design. To quickly sync you up with my point, notice the red wave at the bottom center of the window; that’s the visualization, very elegantly forming the part of the player experience. That to me was the Aha! moment. Also notice the basic media player controls and the track bar alongside the play list, completely forming the part of the player but elegantly sidelined for the premiere music playing experience. The player background served the album art of most of the songs that were in my music library (a Windows 7 feature). Hope you notice the back arrow on the top left corner of the window that takes you to the wealth of features that the Zune software supports. Very elegant, more so, mashing up with the general Windows 7 UI experience.</p> <p align="justify">Next up was the <i>mini view</i>; I had experiences of the mini view(s) of many other media players but this looked cooler (yes, I am sounding biased, but you have to try it out yourself to believe me).</p> <p align="justify"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh58QdVuEG-dhzZ1H-POT_juexrph_i063oq1SXRXuW_D6MiNWu6KRiy4yzn9xOx-Vg4rHQWH1FtAK71GObocskROVbj5vfBBzCMS3hxxWmbU7aaZLzdTiubNqkFFU5p4ujcHAwuuC5FQA/s1600-h/LearningCenter_7_MiniPlayer3.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="LearningCenter_7_MiniPlayer" border="0" alt="LearningCenter_7_MiniPlayer" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiJ6v3mBkq4pJ95mBi9-xbFQI9UxZuyyLNXCTOiL_yokdubfOWnpjLqWOcNWWaknZ7OJqF1bs1mRt_02jCjR2n32y_1_sG3P4igmaIIJZBQDQok86r9NjuPWNjhGU5FI7coBCIyYVGsXE/?imgmax=800" width="554" height="243" /></a> </p> <p align="justify">There were two other major views that looked astounding to me and if you are like me and keep your music organized and updated, editing even the least used tags of the individual MP3 songs you would love what this software has in store for you.</p> <p align="justify">The collections view looked really simple to me, just displaying enough information as I would need and abstracting away the chores of it. Also, this window links you to all the major functionality of the software. Notice the sign in option that connects you to the world (literally).</p> <p align="justify"> </p> <p align="justify"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXjQ6oESkWsE_oianqwhBCjlfK50AbqR54hbiGowOpD_08X5S6hethoLsi-yeoUG1mfQfYiFEyO_jItR3Pp_kcXNcm-CFRD28nn1RF_C8L9rQo_YIaNFRtH93M4ZC7ROIpgBs4mMs4zk8/s1600-h/clip_image0068.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="clip_image006" border="0" alt="clip_image006" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjacazJ6TCSMPifKWXHnscHRmf6I5a9D1WTZFqyfiRIhg-CEEMgvwDDPdKALqyKV_pXbfDK6SrBh4TkBe6pCq914aFRfEqvjT18SWUj4-_BYdVQkqDgqEWK68ydfZobOtbWdiLIeaotUds/?imgmax=800" width="604" height="403" /></a></p> <p align="justify">The final screenshot I wanted to share was that of the edit screen which to say the least, lived up to my expectations:</p> <p align="justify"> </p> <p align="justify"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHR-XlFgHvq5Y3iKgDWV2PxU1w-w84cqKr0aQYGycqfhrTC3WREc5JhOOqRvqpqCbjvrffDbCzMwFa6OY6YKUkl3j52q0C_EWiaxN-GkpX8YPtF_e_jfFhloNPXaf_bkIbnE_RP2NPIZQ/s1600-h/clip_image0087.jpg"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="clip_image008" border="0" alt="clip_image008" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_9a2zXcmhF6oHJWLO-bmss77pn9A1Fg-Dx-NvR3ZgVVawj0pNAW4ylS2cikr5YMV_HKS1fb4F2xhKrB5t_rfFnVsfBcJQ_Abl6NPDET_1HJ42VGAvmv2y5gPVmGbbM8zJP0cOOqCEx0s/?imgmax=800" width="604" height="403" /></a></p> <p align="justify"> </p> <p align="justify">This post was never intended to be a product review of Zune software, rather it just wanted to express the really innovative, unobtrusive UI design that seems to be taking the threshold now a days with consumer software.</p> <p align="justify">Leave out your comments (if any) about your experience with the Zune software or any other application that stood out from the rest.</p> <p align="justify">Must admit, the primary reason that made me inclined to try it out was the fact that it was a WPF application (that’s geeky, but then that’s what the developer in me is).</p> <p align="justify">Happy listening!</p> Vaibhav Sharmahttp://www.blogger.com/profile/08550674290122756598noreply@blogger.com0tag:blogger.com,1999:blog-2380923144131313666.post-19108234656728031392010-03-28T19:06:00.000+05:302010-03-28T19:06:11.231+05:30Installing Life or Uninstalling it?<div align="justify">“<i>But now I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth</i>”.</div><br />
<div align="justify">It’s astonishing to discover how many of us are existing without doing the most imperative thing in our life – living! Bizarre, but true, don’t know if anyone of you have observed it, but we (most of us, if not all) suddenly have become enclosed and to some extent aggrieved by the toxic environment encompassing us. And before you start dwelling into the <i>Go Green</i> initiatives, I must declare, this is not about <i>carbon footprint</i>, <i>greenhouse gases</i> or for that matter, <i>earth hour</i>! We are no longer happy (attempts to inherit <i>virtual</i> happiness have failed time and again).</div><br />
<div align="justify">The global economic downturn certainly triggered and aggravated it, but to solely blame it and move on would be an under-observation, indisputably leading to a lethal mistake. A quick glance down memory lane would bring back what now has become the epitome of happiness. School and/or college days, once sloppily spent, have now become desperately desired. Most of us would agree, we all were passionate about our <i>to-be jobs</i>. Why are we then loosing what’s called life – the<i> intrinsically simple phenomenon of enjoying atomic moments sans dependencies</i>?</div><br />
<div align="justify">At the time of inception, happiness, in general was supposed to encompass monetary capacity in general and fulfillment of passion, in particular. Most, if not all of us, have reached a point whereby the monetary fulfillment is somewhat achieved (before you start shouting <i>no ways</i>, ask yourself how much was the first paycheck that you got and how satisfied you were with that and what do you draw today), if not surpassed. What went missing was that flare, that passion which in the first place drew us to what we are into today.</div><br />
<div align="justify">For you Mr. Reader who is still figuring out what this post is all about, let me decompile the above LIL (Life Intermediate Language) code for you. It’s about our (you are allowed to exclude yourself if you so consider) inadequacy to achieve something simple, something atomic – a sensation called happiness! Every other disremembered friend I encounter nowadays seems to have a problem (the dictionary meaning of which is <i>a state of difficulty that needs to be resolved</i>). And regardless of the gravity of his problem, he simply <i>wishes</i> to resolve it! The keyword here is <i>wish</i> (the dictionary defines it as <i>an expression of some desire or inclination</i>), and also consider that one is wishing for the problem to be resolved and not making earnest attempts to do the same. My intent here is to express the undeclared, catastrophic phenomenon that is taking away <i>life</i> as it exists in the purest acceptable form, from most of us.</div><div align="justify"><br />
</div><div align="justify">What follows might be considered a litmus check that attempts to compute whether you are <i>missing life</i> or <i>living it. <br />
<br />
</i>If you don’t find yourself reacting <i>yes</i> to most of the points below, then must say </div><div align="justify">“<i>Houston! We have a problem</i>!” </div><div align="justify"><br />
</div><i></i> <br />
1. Do you like your company? (Intellisense suggests <i>like</i> as <i>find enjoyable or agreeable</i>)<br />
2. Do you like to work with your immediate superior?<br />
3. Do you like the people adjacent to you?<br />
4. Do you like your day-to-day work?<br />
5. Do you have time for yourself at the end of the day?<br />
6. Do you spend adequate time with your family?<br />
7. Do you have a private domain to cater to? (no Intellisense for this)<br />
8. Do you think your current professional step would lead you to your esteemed destination?<br />
9. Do you consider yourself to be adequately skilled and improving on a routine basis towards your desired level of expertise?<br />
10. Do you believe in yourself and your aptitude to change the tide in your favor?<br />
<br />
Shout out your <i>Yes</i> scores in the comments section, would be prodigious to know!<br />
<br />
The programmer in me couldn’t resist myself from injecting some code (dependency injection?) into this post, so here we go.<br />
<br />
The LINQ query for the above resulting questions could look something like this:<br />
<br />
<div style="font-family: courier new;"><span style="color: blue;">var</span> query = <span style="color: blue;">from</span> Moments <span style="color: blue;">in</span> Life<br />
<div style="padding-left: 30px;"><span style="color: blue;">where</span> LifeTime != Timespan.Future</div><div style="padding-left: 30px;"><span style="color: blue;">select</span> Moments</div><div style="padding-left: 30px;"><span style="color: blue;">order by</span> gravity <span style="color: blue;">descending</span>; <span style="color: green;">//vital criteria appears first</span></div><div style="padding-left: 30px;"><span style="color: green;"></span></div></div><i>query</i>, in this case would be an <i>IOrderedQueryable<Life></i> and not <i>an IQueryable<Life></i> (I am just venturing into LINQ, so do bring out the compilation errors and/or warnings in the code above).<br />
<br />
Happy living and for that, Happy coding too!Vaibhav Sharmahttp://www.blogger.com/profile/08550674290122756598noreply@blogger.com0tag:blogger.com,1999:blog-2380923144131313666.post-42383883607334540682010-03-14T08:32:00.000+05:302010-03-14T08:32:18.618+05:30Awaiting .NET 4The .NET Framework version 4.0 is slated for release in April 2010 and everyone seems to be excited about it (<em>everyone by definition includes everyone, so me too</em>). Being the next big release of the framework, there exists number of enhancements and fusion of several new ways of writing old and new <em>smart</em> applications.<br />
I sat down searching for what’s in it for me, the conventional (it’s the most reputable word I could afford for myself, corollary to calling bugs as exceptions) .NET developer for whom writing .NET code is not only about developing cool new smart applications (hardly get to do it thanks to the huge number of legacy and combo apps we need to upgrade day-in day-out) but also write that enlightening code quickly and smartly.<br />
I have made an honest (as if honesty still exists?) attempt to compile what I felt was just so super cool changes to the framework or language in general. Let me #warn you not to expect the entire v4 enhancements from the lines that follow. That won’t ever happen (if I could do that MSDN would be hosted at my local desktop, right?). <br />
<br />
1. <strong>StringBuilder.Clear()</strong>: I was surprised to see this as an addition to the v4 version, as all this time I had expected this member function to be omnipresent in the <i>StringBuilder</i> class (going by the superior and smart design of the .NET framework). Just recently while using it for dynamic html generation (I was using VB9 and still didn’t use VB XML Literals for some bizarre reason, which is indeed classified), I found the absence of this method. The workaround was setting the <i>Length</i> property to <i>0</i> which would then clear the contents of the <i>StringBuilder</i> object. <br />
2. <strong>String.IsNullOrWhiteSpace()</strong>: As is eminent from the name of the method, it checks not only the Null or Empty content of the string object but also helps avoid the use of the <i>Trim</i>() method to make certain we don’t end up with a string of <i>precious</i> whitespaces. An authentic admittance though, I already had added my own extension method in my v3.5 extension methods repository that did verify the absence of both Null and Whitespaces before performing any further string operations and was aptly named <i>String.HasValue</i>(). I am indeed smart (I always knew this, but formally broadcasting it on this <i>DateTime.Now</i>).<br />
3. <strong>ServiceProcessInstaller.DelayedAutoStart</strong>: While developing Smart Client applications it is a very common requirement to register the application to launch on Windows startup. However, as is eminent, too many applications loading on startup will upsurge the boot time significantly deteriorating the end user experience. This feature comes to the rescue by delaying the start of the application until all other auto-start services have already started.<br />
4. <strong>SMTP Client enhancements</strong>: Some of the enhancements include <em>enabling SSL mode in application configuration files, specifying heading encoding </em><i>and most importantly, </i><em>multiple replying to addresses through </em><i>MailMessage.ReplyToList()</i>.<br />
5. <b>Guid.TryParse()</b>: The <i>TryParse</i> method has now been added to the <i>Guid</i>, <i>Version</i> and <i>Enum</i> types and behaves exactly as its counterparts in other types.<br />
6. <b>64Bit enhancements</b>: Recognising the mainstream adoption of 64 bit systems the Environment class has been decorated with: <em>Environment.Is64BitProcess</em> and <em>Environment.Is64BitOperatingSystem</em>.<br />
7. <strong>IEnumerable<T> everywhere</strong>: New overloads of <i>String.Concat</i>() and <i>String.Join</i>() now support <i>IEnumerable</i> elements so that you don’t have to convert them to strings prior to performing Join or Concat operations on them. Also enhanced are several System.IO members like the new <i>File.ReadLines</i>() which returns <i>an IEnumerable<String></i> rather than a string array. This in turn gives superior performance benefits as its always (read mostly) desirable to read a file one line at time rather than loading the entire content in memory as in <i>File.ReadAllLines</i>().<br />
8. <strong>Corrupted State Exceptions</strong>: How many times have I written the following?<br />
try{<br />
// Something that should fail, or else why did i incur this try cost, right?<br />
}<br />
catch(Exception ex)<br />
{<br />
// Never do anything here. Let them come back to me for fixes (guarantees job security)<br />
}<br />
In .NET 4.0, corrupted state exceptions will never be caught even if you specify a <i>try… catch</i> block. Even though this is a huge obstacle (a setback or even a crisis) on my attempts towards my job security, yet I welcome it as it encourages writing more stable (in theory) code. Before you start depreciating your intentions to upgrade to .NET 4 for this particular reason, there is a switch that allows you to get the old behavior back by setting the following attribute <i>LegacyCorruptedStateExceptionsPolicy=true</i> in the config file.<br />
This behavior can also be enabled on individual methods with the following attribute: <br />
<i>[HandleProcessCorruptedStateExceptions] </i><br />
9. <strong>System.Data.OracleClient</strong>: Before you plunge into thinking why MS shelled it’s resources to enhance OracleClient, instead of their own franchise SQL Server, there is a surprise awaiting you. OracleClient is available in .NET 4 but marked as deprecated. Don’t believe me? No need to, just help yourself by visiting <a href="http://blogs.msdn.com/adonet/archive/2009/06/15/system-data-oracleclient-update.aspx">http://blogs.msdn.com/adonet/archive/2009/06/15/system-data-oracleclient-update.aspx</a> .<br />
10. <strong>VB Auto Implemented Properties and C# Named and Optional Parameters</strong>: These are some of the language specific enhancements essentially following Microsoft’s strategy of co-evolving the two languages. <br />
VB now has auto implemented properties thereby reducing the amount of code generated significantly (I hated VB Dev Center for not introducing it in VB9). <br />
C# developers now stand equal by having named and optional parameters (which to me should have been there at least since v2 of the language). <br />
<br />
The list above was never meant to be exhaustive, it does not even attempt to touch the Parallel computing extensions and dynamic (or functional) enhancements to the framework, but it surely addresses most of us, the conventional .NET developers, writing managed code that manages our company, our clients and primarily us!<br />
<br />
Happy Coding!Vaibhav Sharmahttp://www.blogger.com/profile/08550674290122756598noreply@blogger.com0tag:blogger.com,1999:blog-2380923144131313666.post-78487682322898497442010-01-31T14:04:00.004+05:302010-01-31T14:14:30.216+05:30Truth be told<div class="MsoNormal" style="text-align: justify;"><span class="Apple-style-span" style="font-family: inherit;"><br />
The IT industry in particular has been guilty of over using (read misusing) acronyms and phrases, the </span><i><span class="Apple-style-span" style="font-family: inherit;">real</span></i><span class="Apple-style-span" style="font-family: inherit;"> meaning of which is not known to many, in and outside the industry. The following is an honest attempt for people at large to get to know or revive their knowledge about few such phrases.</span></div><div class="MsoNormal" style="text-align: justify;"><span class="Apple-style-span" style="font-family: inherit;"><br />
</span></div><div class="MsoNormal" style="text-align: justify;"><span class="Apple-style-span" style="font-family: inherit;">Certain terms or phrases used are developer centric but I still believe you would have over heard it while walking past a cluster of developers talking to themselves. The list was never meant to be exhaustive, so inject your own and help educate the people at large (the good people who aren’t part of this typical industry).<br />
<br />
</span></div><div class="MsoNormal" style="text-align: justify;"></div><ul><li><b><span class="Apple-style-span" style="font-family: inherit;">Alpha</span></b><span class="Apple-style-span" style="font-family: inherit;"> – a synonym often used in place of the disclaimer clause in relation to software<br />
<br />
</span></li>
<li><b><span class="Apple-style-span" style="font-family: inherit;">Beta</span></b><span class="Apple-style-span" style="font-family: inherit;"> – the deliberate act of making people dependant on software that you know doesn’t work the way it is supposed to.<br />
<br />
</span></li>
<li><b><span class="Apple-style-span" style="font-family: inherit;">Unit Testing</span></b><span class="Apple-style-span" style="font-family: inherit;"> – It’s taking responsibility for the subsequent ill effects of the code you wrote.<br />
<br />
</span></li>
<li><b><span class="Apple-style-span" style="font-family: inherit;">Integration Testing</span></b><span class="Apple-style-span" style="font-family: inherit;"> – the act of shifting the responsibility above to some other person or module.<br />
<br />
</span></li>
<li><b><span class="Apple-style-span" style="font-family: inherit;">Dependency Injection</span></b><span class="Apple-style-span" style="font-family: inherit;"> – the art of writing code that you know will crash, but making sure you alone can fix it. </span><i><span class="Apple-style-span" style="font-family: inherit;">In current scenario, this is the only way to have job security in the software development industry</span></i><span class="Apple-style-span" style="font-family: inherit;">.<br />
<br />
</span></li>
<li><b><span class="Apple-style-span" style="font-family: inherit;">Community Technology Preview (CTP)</span></b><span class="Apple-style-span" style="font-family: inherit;"> – the only way whereby a company gets testers for free.<br />
<br />
</span></li>
<li><b><span class="Apple-style-span" style="font-family: inherit;">Release Candidate (RC)</span></b><span class="Apple-style-span" style="font-family: inherit;"> – the difference between a CTP and a working release of software.<br />
<br />
</span></li>
<li><b><span style="font-size: 11pt; line-height: 115%;"><span class="Apple-style-span" style="font-family: inherit;">Project Manager (PM)</span></span></b><span style="font-size: 11pt; line-height: 115%;"><span class="Apple-style-span" style="font-family: inherit;"> – A mysterious organism over engrossed in excel whole day long, meetings for whom marks the coolest way to chill out.<br />
</span></span></li>
</ul><div><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-size: 15px; line-height: 17px;"><br />
Post in your comments and assist in carrying this list to the next level (Beta 2 to be specific).</span></span></div><div><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-size: 15px; line-height: 17px;"><br />
</span></span></div><div><span class="Apple-style-span" style="font-size: medium;"><span class="Apple-style-span" style="font-size: 15px; line-height: 17px;">Happy Coding!<br />
<br />
</span></span></div>Vaibhav Sharmahttp://www.blogger.com/profile/08550674290122756598noreply@blogger.com0tag:blogger.com,1999:blog-2380923144131313666.post-7362857375100203672009-11-15T13:31:00.000+05:302010-01-31T13:33:04.309+05:30The Criminal Coder<br/>Mr. Reader, <i>in case</i> you have read my previous posts (<i>in case</i>, is the key phrase here), you might be by now thinking me to have lost my psyche. How can I, the ubiquitous attorney of coders on this planet (and Mars) call them evil? Well, to clear out doubts, they are criminals when compared to their superiors (read developers).<br /><br />How can anyone deglamorise the developer by comparing him with a coder? To me coders are beginners, not absolute beginners, but people who know stuffs, but simply skip to do them, the way it is meant to be done, for laziness or for reasons I fail to understand. It’s not the lack of <i>intellectual capacity </i>that causes them to commit mistakes (read crime), its rather their sluggishness, that makes them do what they want to do, even if that brings about compromise in terms of the code they inject to dilute (read pollute) the system.<br /><br />The following are some snippets from production code(basic changes made to trim the demo) that I have encountered, in this short span of life (read professional life), and when debugging performance problems in applications, stumbled upon them, and literally felt like giving <i>digital life imprisonment </i>to those who had the audacity to commit these bits!<br/><br /><ul><li><b>Object declarations inside loops:</b> For simple objects I sometimes feel it’s unavoidable to declare objects of types inside a loop, but for complex types, it’s simply a crime. The following code was intended to improve the performance of the application by spawning new threads. Don’t find the need to say more, the code is self explanatory (and yes, gives a boost to performance): <br /><br /><br /><pre class="brush: csharp">public void UploadXML()<br />{<br /> DataTable dt = GetDataTableFromXML();<br /> for(int i=0; i<dt.Rows.Count; i++)<br /> {<br /> Thread th = new Thread(…);<br /> th.Start();<br /> }<br />}</pre>Guess what will be the first problem that your app may run into? An OutOfMemoryException.<br /><br /><br /></li><li><b>Unacceptable usage of If construct:</b> The code is overly expressive of my intent.<br /><br /><br /><pre class="brush: csharp">for(int i=0; i<1000; i++)<br />{<br /> if(IsPostBack==false)<br /> {<br /> //Do something here<br /> }<br />}</pre><br /></li><li><b>Overly expressive logic:</b> I didn’t have the courage to congratulate this guy and kept shut even after seeing this. There were 10 checkboxes in the page and all of them had this. All of them! <br /><br /><br /><pre class="brush: csharp">//As if Checked return a float<br />bool b = (checkBox.Checked==true? true: false);<br /></pre>And I have seen even experienced guys do a <br /><br /><br /><pre class="brush: csharp">.ToString()<br /></pre>on a string. What more do you expect from visual studio? Auto-detect these overly expressive conversions? Surely, it would do so, may be in VS 2014!<br /><br /><br /></li><li><b>Global declarations in methods:</b> Why not lazy declare and initialize at the point of usage? We are not in the <i>C</i> age any more (or are we?). <br /><br /><br /><pre class="brush: csharp">public void Foo()<br />{<br /> int a, b, c, d; <br /> //50 LOC before using c and d<br /> c=c+1;<br />}<br /></pre><br /></li><li><b> Avoiding short circuits:</b> Short circuits were provided in the language for some reasons, why not use them to decrease the number of characters typed and let the compiler expand them? <br /><br /><br /><pre class="brush: csharp">//Enjoy...<br />bool a = false;<br />bool b = true;<br /><br />//do something with b here<br />if(a ==false)<br />{<br /> //this is left blank (and yes, intentionally)<br />}<br />else<br />{<br /> if(b == true)<br /> {<br /> //Some code to execute<br /> }<br /> else<br /> {<br /> //Again left blank (intentionally ofcourse)<br /> }<br />}<br /></pre>Why is the following so uncommon to write amongst few geniuses (strict pun intended)? <br /><br /><br /><pre class="brush: csharp">if(a == true && b==true)<br />{<br /> //Some code to execute<br />}<br /></pre><br />I know you might be thinking who on earth will follow the above pattern and dilute the code, but I have seen it far too many places to avoid mentioning it. Fact is, some coders simply <i>forget </i>the fact that an <i>if</i> can stay without an <i>else</i>. There are innumerable examples and I will certainly update this post to show some really valid places for short circuits, which were completely skipped (and did i mention, knowingly?).<br /><br /></li></ul>The above list can’t ever be exhaustive, since each coder has his own pattern of seeing the code. At times I tend to give them (the coders) some leniency by considering their experience with a particular language, but most times, it’s just unacceptable and unforgiveable.<br /><br />The following is a beautiful extract about the types of competence (or incompetence) that we encounter:<br /><ul><li><b>Unconscious incompetence: </b>You don’t know what you don’t know. </li><li><b>Conscious incompetence: </b>You know what you don’t know.</li><li><b>Conscious competence:</b> You know how to do it, but you have to think your way through it.</li><li><b>Unconscious competence:</b> You can do it without thinking. You just know what to do.</li></ul><br/><br/>By the way, the reason I termed the above as crime, was because all those coders had live code at their disposal while adding these bits. They simply ignored the style of existing code used in the application and were arrogant enough to not tilt from their style of coding.<br /><br/>To me, that is simply unacceptable and unforgivable crime!<br/><br />Hail Visual Studio! Save us from the criminal coders!Vaibhav Sharmahttp://www.blogger.com/profile/08550674290122756598noreply@blogger.com0tag:blogger.com,1999:blog-2380923144131313666.post-70673124653582836762009-11-08T10:03:00.000+05:302010-01-31T13:33:04.315+05:30The agonizing SME developer<br/>Before you begin to think too much into SME, let me sync you up by expanding it for you to the <b><i>Small & Medium Enterprise (SME)</i></b>. To me these enterprises are a source of <i>raw mystery</i>. When hiring or making decisions up front they are humble to use the latter portion of the acronym (considering themselves no less to Google or MS), and while sharing rewards and parting with <i>their</i> stuffs, the former part is acknowledged (the financial stability is, as they say, <i>on the rocks</i>, literally and did I mention, <i>always</i>).<br /><br />An interesting find about the word "agony" is that it not only covers intense physical pain but also the "mental anguish" associated with or without it. Through recursion, I soon found out that anguish leads to extreme anxiety or emotional torment. Emotions, almost always, shell themselves into passions, which by the way, is the root cause of misery of all software developers on planet Earth and Mars (they, the guys at NASA, have been shouting all along that life exists at Mars and if life exists, you bet, software developers exist too). So what has a naïve SME developer got to do with agony? Well, at the lowest permissible degree, <i>they</i> were married, in time and space, forever and ever and ever (infinite loop begins, statement truncated).<br /><br />The lifecycle of an agonized SME developer is what follows…<br /><br /><i><b>the morning</b></i><br />A beautiful day begins with a beautiful morning, and this, surprisingly doesn’t hold good any more for the SME dev. Unlike any other professional, the first thought that crosses his (not intending to be gender biased, it’s just natural, you see, it could have been <i>her </i>as well, instead of <i>his</i>) mind is: <b>what can go wrong today, it’s such a beautiful day? </b>Little does he know, that for no fault of his (yes, almost always, there is no fault of his directly, and I am being subjective here) the day will turn out to be, to say the least, bewildering!<br /><br /><b><i>the journey to the castle</i></b><br />Notwithstanding the delight of travelling via public transport (describing it as pathetic would be an understatement, hence skipped), he transcends to the castle a.k.a. office in other professions. The unquestionable devotion (no pun intended) towards his work is physically visible as he takes long strides and enters the castle. Life, society, culture, esteem, pride and many other eligible candidates of personal character stay out as he walks in to <i>the castle</i>.<br /><br /><i><b>the starters</b></i><br />The most crucial activity of the day begins, checking personal email account. And to just give an example of the overflowing talent in him, even the strictest of firewalls and blockages are incapable of preventing him from accessing his aspirations. His concealed talent, resembling his meager pay slip, can by no measures be hidden, no matter how much he endeavors.<br /><br /><i><b>the dream</b></i><br />Unlike other professionals of his age (and beyond), he doesn’t intend to spend (again, skipping <i>waste</i> to avert understatement) his time, forwarding mails to his friends (remember, the social thing in him just stayed out as he entered the castle?). Rather with translucent aspirations, all he searches for (with a far optimized index then what Google can ever manage) is a call from anyone (being complacent) from his list of dream companies. Aghast! Unlike Google, which returns a million results for even the most horrendous search terms, he witnesses a <b><i>no results found </i></b>(that’s why Google roars about its better, less optimized index).<br /><br /><i><b>the call</b></i><br />And before he could balance himself, here comes <b>the call</b>, from no one else, but his PM or TL or MD or CEO (remember its SME, so even CEOs have enough time to get on with individuals) or anyone at a relatively higher position then him. Yes, this is it! Life, if ever existed, will cease to exist. Problems, in case they don’t exist, will be created and accredited to him.<br /><br /><i><b>the aftermath</b></i><br />The repercussions of the call, a tiny list of tasks, generally, varied in nature and ranging from simple to super complex tasks, to be, in all magnitudes of time, be completed by the currently running day. And did I mention it’s already lunch time!<br /><br /><b><i>the optimizations</i></b><br />Being super talented has its own advantages; it allows you to optimize time, beyond the ordinary, spent in professional activities. And the SME dev is no exception, he quickly walks through the tasks list, completing the tasks ranging from simple to considerably complex in irrelevant time spans. The ultimate desire at any point of the day that keeps him inclined - leaving for home (sweet home) at the right time.<br /><br /><i><b>the valor</b></i><br />Quickly sensing that the day isn't as good (sarcasm intended) as it was supposed to be, he aims towards his superior with one of the most irrelevant issues of his life, increment (presuming his steady association with the company, which simply refuses to end).<br /><br /><i><b>the crime</b></i><br />Approaching for increment in an SME is in itself an offense, <i>unforgiving</i> and <i>regretful</i>. Irrespective of the person being approached, the debate, most of the time leads to a plethora of branching discussions (healthy ones) about - the ubiquitous <b><i>recession</i></b><i>.</i> Even though he wasn't the offender in bringing the slump to the economy in general, still, as a solemn employee of the company, it is his (and solely his duty) to forget increments, incentives, and any other term that relatively maps to the same meaning. He is a developer, passion feeds him, and code recharges him, why on earth has he the need of a better pay scale? Why do we need money? Mostly for our social activities, and if the very social element is missing, why direct the funds in the wrong place?<br /><br /><i><b>the return</b></i><br />With an absolute sense of satisfaction, understanding his very own importance in the company and the role (the most important one) that he plays in the general growth of the company (as alluded by his superior), he returns to his desk, unaffected by the discussions, proceeding to what he was supposed to do, code!<br />The evening is as stale as the dreams he has, and proving his multitasking abilities, he goes ahead in search of his dreams again (accessing his personal email account, remember?) while coding the most complex tasks, wishing them to auto-complete, be auto-verified and surely get auto-published.<br /><br /><i><b>the home coming</b></i><br />It would be audacious to imagine that nothing went wrong while the evening squeezed past. Client feedback (mostly neutral, the positive, if any, never make up to him, an auto-transfer mechanism transfers his credits to his superior's account), bug lists, pending tasks (even after a full dedicated day of work) and an extinguished desire to return home is what awaits.<br /> The journey to home is as exciting (remember the public transport factor?) as it can be and seldom enough does he get time to re-structure his goals (which by now have been declared static).<br /><br />The day ends, as any other; battles won (and battles lost), nevertheless the passion, the dream, the very sense of being a developer, remains!<br /><br /><i>Be an SME developer, its an experience life apart!</i>Vaibhav Sharmahttp://www.blogger.com/profile/08550674290122756598noreply@blogger.com1tag:blogger.com,1999:blog-2380923144131313666.post-15698163182692554472009-10-24T21:59:00.000+05:302010-01-31T13:33:04.318+05:30IMiserable <T><br />Before you think otherwise let me clarify that IMiserable <T> is not a new generic interface introduced in .NET 4.0. As I climb up the stairs as a developer, every passing day, there are certain things that simply make my life miserable day-in and day-out.<br /><br />I hereby attempt to list down the top 3 things that I believe are a mess for developers at large. It’s amazing how most of us (if not all) find ourselves hooked up eradicating these miseries per project, per day basis.<br /><br /><ul><li><b>#3: My Code, my browser:</b> I have been developing web applications for around 3years now and I simply couldn’t understand why I am supposed to make my pages compatible on all major browsers. For people who might say “why not”, here is my defense: Web is everywhere and the way to access it, the ubiquitous browser. Give me 1 reason as to why as a browser vendor, you need to make your own rendering decisions? Why can’t differences be only in terms of the underlying performance engine and client script execution engine? Why do u need to render tags differently, be it alignment for certain tags or other rendering decisions or awfully at times, some completely new names for similar elements across the DOM (supported across the browser with different names for same elements)? And to add insult to injury, you guys can’t even maintain compatibility between your own versions (and someone asked cross browser compatibility).<br /><br />Just because I don’t have a browser of my own (<i>Vaibhav Explorer</i> or <i>VaiFox</i> or <i>Vaifari</i>), am I supposed to tolerate this misery?<br /><br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJ1_3o5X0wj-LapRqAUM-29qAmUSzD2vMUBJQ7znujo6CtFYs1YIZ8WdfA-eUlI0lnUQcVRGsHTHPqLx5g3xDDpnEjRe-oy-F_Qge-BmhaWGZo4hhWrW0vnh_a5LFECG9iLVnbnCRREL4/s1600-h/what-version-are-you-running.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;" target="_blank"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJ1_3o5X0wj-LapRqAUM-29qAmUSzD2vMUBJQ7znujo6CtFYs1YIZ8WdfA-eUlI0lnUQcVRGsHTHPqLx5g3xDDpnEjRe-oy-F_Qge-BmhaWGZo4hhWrW0vnh_a5LFECG9iLVnbnCRREL4/s400/what-version-are-you-running.jpg" /></a></div><br /></li><li><b>#2: this.Validate():</b> Did it ever cross your mind that if you were not supposed to write validation code (for all possible combinations of mess that the user can create) how much<i> time, LOC, and execution optimization</i> you might have gained? Just recently I was coding a Registration page with something around 30 fields with good numbers of <i>Checkboxes</i>, <i>RadioButtons </i>(in various groups) and plenty of <i>DropDownLists </i>and <i>TextBoxes</i>. And guess what, each dropdown was supposed to have a “Select” item at the top of the list and awfully enough, all fields (except checkboxes) were required. So selecting “Select” in a DropDownList wasn’t allowed and I was supposed to validate and prevent the user from submitting <i>“invalid”</i> input. This is the too common misery for all of us developers out there. And yes, did I mention that I was asked not to use the ASP .NET Validator controls (for some cynical reasons which only my PM can answer). And needless to say, every failed validation would prompt an alert box (in client script) with a custom prompt message. Trust me, and you would agree, roughly 60% of LOC of that page was validation script code. And yes, the ultimate saver of any developer <b>Mr. Copy & Paste</b> couldn’t help me beat the frustration out!<br /><br />Why can’t the world (denoting my dear clients and their honest and well-intentioned users) just provide valid input in the first place! I know it’s impossible but just imagine a world with no validation where every byte of input comes from a trusted source, is perfectly what I need and needless to say, side-effect free!<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqMGfNzcAf9XFNlSA-125PfVWhFrZV7Abct0lODhxa-R1vA_ySBwLUBHVgev4z-d5qV2F4bqxTs2j9a02KANLYAWRG3FDL2V_WXlSqT4nOJiuG6LOkwkgisFMa2wWvD91FR2I_F73erW0/s1600-h/ValidationError.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;" target="_blank"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqMGfNzcAf9XFNlSA-125PfVWhFrZV7Abct0lODhxa-R1vA_ySBwLUBHVgev4z-d5qV2F4bqxTs2j9a02KANLYAWRG3FDL2V_WXlSqT4nOJiuG6LOkwkgisFMa2wWvD91FR2I_F73erW0/s400/ValidationError.JPG" /></a><br /></div><br /></li><li><b>#1: Works on my Machine:</b> This is undoubtedly the<i> numero uno</i> of our miseries! How many times have you found something perfectly executing on your local workstation and simply freaked up on the live server. And the first reply that comes<i> (by default)</i> when the PM enquires for the crash is: <i>“It works on my Machine”</i>! As if you didn’t knew that the <i>client didn’t pay to browse “localhost”</i>. It’s humorous how even seasoned developers cite this reason. And I have self witnessed this so many times that while my fellow dev was freaking out I was almost insane with an internal laughter (<i>an external display of laughter will only dispose me and make me garbage collected by my company</i>).<br /><br /><br />And you would agree, the maximum time this misery appears is when it’s time for you to buzz off and the PM being a very<i> respectable, honorable </i>and <i>understanding person</i>, makes it clear that you aren’t leaving before everything is fixed showing absolutely <i>no interest nor intent</i> of lending even half the hand to help you out.<br /><br /><br /><br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOybjajbtyAvuH8_76noYsG-qjdDwEuJ0OuHvPLpcjbHM1ZfdYudCPhnTCaMo5IZj_dBIMsM8T346u5l8Ztj0A7dV5XqMxX9JMu10DwQpjv1P31AgiLAzNDo8Zb5LVSvXtV7FovvM6JNM/s1600-h/it_works_on_my_machine_tshirt-p235376182944057048qjrs_400.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;" target="_blank"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOybjajbtyAvuH8_76noYsG-qjdDwEuJ0OuHvPLpcjbHM1ZfdYudCPhnTCaMo5IZj_dBIMsM8T346u5l8Ztj0A7dV5XqMxX9JMu10DwQpjv1P31AgiLAzNDo8Zb5LVSvXtV7FovvM6JNM/s400/it_works_on_my_machine_tshirt-p235376182944057048qjrs_400.jpg" /></a> <br /></div><br /><br /></li></ul>Share your miseries that you feel are worthy of being added to this list!<br /><br />Debugging miseries is all we do day-in and day-out. Let’s just continue with it (<i>as if there were other options available</i>)!<br /><br /><b>Happy Coding!</b>Vaibhav Sharmahttp://www.blogger.com/profile/08550674290122756598noreply@blogger.com1tag:blogger.com,1999:blog-2380923144131313666.post-71313419480813396482009-05-23T18:58:00.000+05:302010-01-31T13:33:04.320+05:30Windows 7 - Dreams come true!Welcome to Windows 7!<br /><br />Yes, version 7 of the flagship product from Microsoft, the successor of the <span style="font-weight: bold;">not so </span>overwhelmingly popular Windows Vista. Going by the release of this edition of Windows, it won't be unsafe to say, <span style="font-weight: bold;">they finally got it right!</span><br /><br />Having received thrashing from all corners of the world and from all user bases, including Developers, for the earlier version of Windows, “<span style="font-style: italic;">Windows Vista</span>”, Microsoft was under tremendous pressure to recapture its lost <span style="font-style: italic;">esteem</span> in the ever dominated arena of Operating Systems.<br />How many of us know the full names of operating systems that don’t start with the word Windows? <span style="font-style: italic;">Apple Mangoes anybody?<br /></span> Truth be told, no matter how many times we hate that Blue Screen of Death (BSOD) or the sudden domination of the <span style="font-style: italic;">invisible force</span> that hangs our work (<span style="font-style: italic;">and us literally</span>), Windows is “<span style="font-style: italic;">the One</span>” when it comes to the system software that runs atop stupid hardware!<br /><br />Windows 7 is in the Release Candidate phase, meaning it’s <span style="font-style: italic;">almost complete,</span> and is awaiting final feedback from users worldwide before final <span style="font-style: italic;">release to manufacturing</span> (RTM). You can download it <a href="http://www.microsoft.com/windows/windows-7/download.aspx">here</a>.<br /><br />Here’s what you need to have:<br /><ul><ul><li> 1 GHz 32-bit or 64-bit processor or higher</li><li>1 GB of system memory or more</li><li>16 GB of available disk space</li><li>Support for DirectX 9 graphics with 128 MB memory (to enable the Aero theme)</li><li>DVD-R/W Drive</li><ul><br /><br />Quick preview of the things that caught my eye, instantly:<br /><br /><ul><li>Taskbar -see it to believe it</li></ul><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGuVlHD2Mf48KJEIOKSP4R3pXuEkqcyDaowbusMm8d3JtbJyvbV2eJQLOaLLQF-cBH4IUbhe4TlFsuqaKbVB56q4Bbb0FwZM6PN1wcG7b_ChfXDfzaVebHaSITWAF4-lSuCpwc23uY0ck/s1600-h/Taskbar1.png"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 254px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGuVlHD2Mf48KJEIOKSP4R3pXuEkqcyDaowbusMm8d3JtbJyvbV2eJQLOaLLQF-cBH4IUbhe4TlFsuqaKbVB56q4Bbb0FwZM6PN1wcG7b_ChfXDfzaVebHaSITWAF4-lSuCpwc23uY0ck/s320/Taskbar1.png" alt="" id="BLOGGER_PHOTO_ID_5339025340593108034" border="0" /></a></ul></ul></ul><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><ul><li>Windows Media Player 12 - simply awesome!</li></ul><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4PNYNAnX_BeWVLlZJ4YjbAikeq0LqjKUwvI7DFVuWAEKVDnA2ELoend1Vb0TT3BXWM45zxETNVHeHxK1e0bmcG3llc-xdOVeUAj7WTgT9hOYiWdf9KyPa2L2OIVMae0rmRO-2eAVsXME/s1600-h/WMP12.png"><img style="cursor: pointer; width: 320px; height: 191px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4PNYNAnX_BeWVLlZJ4YjbAikeq0LqjKUwvI7DFVuWAEKVDnA2ELoend1Vb0TT3BXWM45zxETNVHeHxK1e0bmcG3llc-xdOVeUAj7WTgT9hOYiWdf9KyPa2L2OIVMae0rmRO-2eAVsXME/s320/WMP12.png" alt="" id="BLOGGER_PHOTO_ID_5339030187427740930" border="0" /></a><br /><br /><br /><ul><li>Math Input Panel - awestruck!</li></ul><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcsYqy9VT22rlBxOXZMqxKEOd8t5vy0oQmEySbiuwgGZMBW0_hfkidrS_rkRnTXlmiR56NpacDGeAyTkMfsz61un4RC_qMNtVXYq901KKpt2Rq6byJRZGVELbEfeyvPH8poPZIB2mXVe0/s1600-h/MathHandwriting.jpg"><img style="cursor: pointer; width: 320px; height: 127px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcsYqy9VT22rlBxOXZMqxKEOd8t5vy0oQmEySbiuwgGZMBW0_hfkidrS_rkRnTXlmiR56NpacDGeAyTkMfsz61un4RC_qMNtVXYq901KKpt2Rq6byJRZGVELbEfeyvPH8poPZIB2mXVe0/s320/MathHandwriting.jpg" alt="" id="BLOGGER_PHOTO_ID_5339030851048925762" border="0" /></a><br /><br /><br /><ul><li>Sticky Notes - why wasn't it included earlier?</li></ul><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvgcOwrh-iKB6sO5HkIBDdpiQx2-Tr1Re8wbzeSSGUnDpw-aABbPnw9CKech53cnUhATYCib8FOowz1sOaD1rWnhVm3LvDzbaaBeJaL46iisFwDrZdMQJ8AHx-mFE8smXgxNLFV3fn3ww/s1600-h/Sticky.GIF"><img style="cursor: pointer; width: 320px; height: 245px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvgcOwrh-iKB6sO5HkIBDdpiQx2-Tr1Re8wbzeSSGUnDpw-aABbPnw9CKech53cnUhATYCib8FOowz1sOaD1rWnhVm3LvDzbaaBeJaL46iisFwDrZdMQJ8AHx-mFE8smXgxNLFV3fn3ww/s320/Sticky.GIF" alt="" id="BLOGGER_PHOTO_ID_5339032777740384450" border="0" /></a><br /><br /><br /><ul><li>Calculator - on steroids!</li></ul><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9unuTGSiAhsDa0PSb7lP7L7KKG3fhQz-lmm7ON5dUiJF_SCq_lrNOaALr0wSIDtP3TvjEVNENP7FEJgevQectpwAr6o-ApROuR_xoFrt4-dTGhy36tj4TVMZ1ymB9ujh-O730Wj16D20/s1600-h/Calc.GIF"><img style="cursor: pointer; width: 320px; height: 176px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9unuTGSiAhsDa0PSb7lP7L7KKG3fhQz-lmm7ON5dUiJF_SCq_lrNOaALr0wSIDtP3TvjEVNENP7FEJgevQectpwAr6o-ApROuR_xoFrt4-dTGhy36tj4TVMZ1ymB9ujh-O730Wj16D20/s320/Calc.GIF" alt="" id="BLOGGER_PHOTO_ID_5339033631860380834" border="0" /></a><br /><br /><br /><ul><li>Paint & WordPad - kids grow up finally </li></ul><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi74Nt_6_nCMN1eCHjXCt1MBZSEC7zlHUF68796qRkD5vYbu9kd9SAQAxOv6abq-28_NGUEd-9neQEl_9boLHvK1B3me2EMQVVbf4s9L7pW_VRAC8mWSWnxg_lwT2C0i4iBhmdHP4eRmhY/s1600-h/Paint.GIF"><img style="cursor: pointer; width: 320px; height: 199px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi74Nt_6_nCMN1eCHjXCt1MBZSEC7zlHUF68796qRkD5vYbu9kd9SAQAxOv6abq-28_NGUEd-9neQEl_9boLHvK1B3me2EMQVVbf4s9L7pW_VRAC8mWSWnxg_lwT2C0i4iBhmdHP4eRmhY/s320/Paint.GIF" alt="" id="BLOGGER_PHOTO_ID_5339035247456081858" border="0" /></a><br /><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhabJFM-ba2f3S9igXHHYQXcyrdWkER4zkfHF-uceJb7RwAgrZgZSi1sTuvfd4e0SrwnT92HNVCh2hxjh-BSr48JzJlz8v7v2-pKUhKhM87pMNiqX3aGFXhbbIP77UIt7-czxHYaIFlne0/s1600-h/WordPad.GIF"><img style="cursor: pointer; width: 320px; height: 194px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhabJFM-ba2f3S9igXHHYQXcyrdWkER4zkfHF-uceJb7RwAgrZgZSi1sTuvfd4e0SrwnT92HNVCh2hxjh-BSr48JzJlz8v7v2-pKUhKhM87pMNiqX3aGFXhbbIP77UIt7-czxHYaIFlne0/s320/WordPad.GIF" alt="" id="BLOGGER_PHOTO_ID_5339035373856464818" border="0" /></a><br /><br />Folks, I have been using Windows 7 since its RC (its free until March 01, 2010 after which the computer will start shutting down on itself every 2hours to remind me to purchase the final build). Its hard to believe but once you use Windows 7, u will end up saying <span style="font-weight: bold; font-style: italic;">"Gosh! How did i never feel the necessity of all these supremely essential features ever ?"<br /></span><br />Its insane to say this, but this is by far the best Windows ever!<br />(Sorry XP darling, you have finally come off age)<br /><br />Tall claims huh! Well, i can support it with some logic<br />(deriving from my programming background):<br /><ul><li>Built on the <span style="font-style: italic;">failure</span> of Windows Vista, it boasts of all the customer driven improvements that Microsoft received for its previous release of Windows.</li><li>Compatibility, the core of the problem that plagued Vista, gets accurately and reasonably addressed, thanks to the thousands of devices that Windows 7 supports, simply out-of-the-box.</li><li>Superior performance, the gains are clearly visible if you have installed Windows Vista and then migrated to Windows 7. Same platform, same configuration, a boost in performance guaranteed, and as Microsoft claims, RC is just a work-in-progress as far as perf is concerned!</li><li>Customise, customise and customise. The biggest USP of Windows XP, that makes it still the most popular and widely acclaimed version of Windows till date, was customisation. With XP, you controlled your PC, literally. With Vista, they simply messed it up! Accessible options of XP were simply missing or unreachable. With Windows 7, you will experience the ultimate in customisation and usability.</li></ul>There are simply innumerable features in this gigantic release of Windows 7, an entire bible might even fall short of explaining and exploring them. If you have reasonable hardware and a descent intent to enterprise, go ahead and install Windows 7.<br /><br /><div style="text-align: center;"><span style="font-weight: bold; font-style: italic;">You won't regret it!</span><br /></div><br />Happy Windows 7 exploration!Vaibhav Sharmahttp://www.blogger.com/profile/08550674290122756598noreply@blogger.com1tag:blogger.com,1999:blog-2380923144131313666.post-89914977311223298932009-02-08T22:54:00.000+05:302010-01-31T13:33:04.323+05:30Why Software Development ?<br/><br />I have been thinking off late as to why I chose to be a Software Developer ?<br /><br/><br />Here is what some of us may be driven by:<br /><ol dtid="281474976710660"><li style="list-style-position: outside;" dtid="281474976710661">humble pay slips,<br /></li><li style="list-style-position: outside;" dtid="281474976710662">hi-tech (cool) workspaces, or<br /></li><li style="list-style-position: outside;" dtid="281474976710663">sheer joy of being under stress?</li></ol>The fact is, we don't do it for money, and neither did we choose it for the hi-tech life that comes with it. Also, people seldom like being under stress throughout the day (and more so as the evening approaches and clock strikes 07.00 pm, and you start wondering, why the task list is still incomplete, though you did nothing but the tasks, whole daylong)!<br /><br />So what is it that drives us (we developers)?<br /><br />Let’s face it, we are software developers because we were born such ways!<br />Nothing else fits us; we are good for nothing but code.<br />Our limited area of knowledge extends mostly to the following list:<br /><ol><li>bugs (the entire day passes with these ugly things),</li><li>stacks (varied nature, call stack, locals stack, global stack),</li><li>heaps (ya, even though we didn’t create them in the first place, we simply used it),</li><li>errors (design time, run time, unhandled, handled, may be even deliberate ones created by us).<br /></li></ol>For us the ultimate joy in life is seeing the error list shrinking down and eventually getting empty; the output window emitting “<span style="font-weight: bold;">Build successful</span>” and pressing <span style="font-weight: bold;">F5 </span>always is a path to glory (untold and unrewarded).<br /><br />Isn’t it the most fulfilling thing on earth to see people using our applications and fulfilling their dreams and aspirations?<br /><br />What is more satisfying then to see the <span style="font-weight: bold;">minor </span>differences that exist between our pay slip and the re-reimbursement that our company receives from our esteemed clients?<br /><br />Truth be told,<span style="font-weight: bold;"> </span><span style="font-style: italic; font-weight: bold;">we are proud of ourselves</span>.<br />So much so that, we don’t care who gains what due to us; rather we care about our<span style="font-style: italic;"> IDEs</span>, our <span style="font-style: italic;">editor font</span>, and most importantly our <span style="font-style: italic;">clients’ feedback</span> (they also call it bug list, but I would rather keep it motivating and call it feedback).<br /><br />Be a developer... there is simply nothing more sufficing, nothing more rocking!<br /><br />Happy Coding!<br /><style> <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-fareast-font-family:Calibri; mso-bidi-font-family:"Times New Roman";} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-size:10.0pt; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt; mso-ascii-font-family:Calibri; mso-fareast-font-family:Calibri; mso-hansi-font-family:Calibri;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} </style> <![endif]-->Vaibhav Sharmahttp://www.blogger.com/profile/08550674290122756598noreply@blogger.com3