Go to Changeset from Team Explorer

In a previous posting, I mentioned that Ctrl+G in VS2010 brings up the new Go to Changeset dialog from the Source Control Explorer. In RTM, Ctrl+G from Team Explorer will also do the same. Furthermore, we’ve added another entry for tracking a changeset – directly from the Go to Changeset dialog. Just enter a changeset…


How to convert a Visual Studio 2010 Branch back to a Folder

Visual Studio 2010 extends the concept of a folder as a “first-class” branch and introduces the tools to convert folders to first-class branches to enable exciting new Branch Visualization and Tracking Changes features. For reference, please see http://blogs.msdn.com/hakane/archive/2009/05/19/enable-branch-visualization-in-upgraded-team-projects-tfs-2010-beta1.aspx and http://msdn.microsoft.com/en-us/library/ms181423(VS.100).aspx. Source Control Explorer context menu and toolbar have the button to convert a folder to…


Go to Changeset for Visual Studio 2010

In previous versions of Visual Studio, hitting Ctrl+G from Source Control Explorer brings up the Find Changeset dialog. In VS 2010, Ctrl+G brings up the new Go to Changeset dialog which lets you quickly enter a changeset number and get the changeset details. In this dialog, you can also hit Ctrl+G again to bring up…


WPF TreeView Memory Consumption and Performance

One very simple thing you can do that can significantly reduce the memory consumption and drastically improve performance of a WPF TreeView is to set the following two properties. In XAML, you would do: <TreeView x:Name=”myTreeView”           VirtualizingStackPanel.IsVirtualizing="True"           VirtualizingStackPanel.VirtualizationMode="Recycling" /> In a simple test of a data-bound TreeView containing just 5000 items, turning on…


Data Bind Using Only Code Behind

We are all familiar with the use of WPF Binding in XAML. For example, the following lines bind the caption of a Button (variableCaptionButton) to the text of a TextBox (sourceText). <TextBox x:Name="sourceText" Grid.Row="0" /> <Button x:Name="variableCaptionButton" Grid.Row="1" Content="{Binding ElementName=sourceText, Path=Text}"/>   Have there been times when you need to dynamically build or add UI…


Array as a WPF ConverterParameter

A WPF value converter accepts a value and an optional parameter. The parameter can be specified in the XAML binding as a string like the following:   <TextBlock Background=”{Binding Path=myElement, Converter={StatisResource MyConverter}, ConverterParameter=myParameterText}” />   Instead of one string, what if you want to pass an array of strings as a converter parameter? What about…


Setting Initial Focus in XAML

Last time we looked at a tricky problem of setting the initial focus to a specific item in a populated WPF ListView. Most of the time, however, we just want to set the initial focus to a control (like a TextBox or a Button) in our UI. There are a couple of ways to accomplish…


Setting the Initial Focus to a ListView item

This blog describes the steps needed to set the initial keyboard focus to an item in a WPF ListView. The items in the list can be static or data bound. The trick is to access the ListViewItem associated with an item and then set keyboard focus to it. The following are snippets of the code…


WPF ListView with Check Boxes and No Clipping

  WPF ListView with Check Boxes and No Clipping   Do you need a simple data-bound WPF ListView with check boxed items without text trimming ellipsis and without header columns? I very often do. In this blog, I would like to share with you a simple way to build this control that I call CheckBoxListView….