Add a close button to SidePanelControl in the demo

Mar 16, 2009 at 3:14 AM
Edited Mar 16, 2009 at 4:10 AM
We can add a close button in the SidePanelControl, avoiding to move mouse and click the button in the Nav toolbar.
Some code snippet, and maybe it is useful.

<Button x:Name="BtnClose" Width="30" Height="24" Style="{StaticResource CloseButton}" Click="BtnClose_Click" />

        private void BtnClose_Click(object sender, RoutedEventArgs e)



            SidePanelIsVisible = false;


<!--Style CloseButton-->

        <Style x:Key="CloseButton" TargetType="Button">

            <Setter Property="HorizontalAlignment" Value="Right"/>

            <Setter Property="Width" Value="50"/>

            <Setter Property="Height" Value="25"/>


            <Setter Property="Template">




                        <Border x:Name="brd1" Width="22" Height="22" CornerRadius="15">

                            <TextBlock x:Name="txt1" Foreground="#222" TextAlignment="center" Text="r" FontSize="11" VerticalAlignment="center" FontFamily="Webdings"/>


                                <RadialGradientBrush GradientOrigin=".3, .3">

                                    <GradientStop Color="#FFF" Offset=".15"/>

                                    <GradientStop Color="#777" Offset="1"/>










Mar 16, 2009 at 3:45 AM
Here are some Visual Studio Addins you may like, they are all free

Smart Paster 1.1 Add-In - StringBuilder and Better C# Handling

I received some great ideas for new features and thought I'd incorporate them in a new version. Here's what's new:

  • Tab/linebreak escape choices for C#
  • Verbatim Literals (optional line spanning) for C#
  • Paste As StringBuilder (with optional AppendFormat usage)
  • Auto Formatting After Paste (optional)
  • Ability to hide Paste As options on the context menu
  • Add-In Commands for adding to custom menus and keyboard shortcuts

DPack DPack is a FREE collection of Microsoft Visual Studio 2005 and 2008 tools. DPack is designed to greatly increase developer's productivity, automate repetitive processes and expand upon some of Microsoft Visual Studio features.

DPack includes various browser tools that allow the developer to quickly find solution files, types, particular type members, methods or properties for instance, or quickly find and reference standard .NET framework types. DPack includes greatly enhanced numbered bookmarks feature, various code navigation tools as well as streamlined surround with feature, and much more. See screenshots and learn more about individual features using Features menu.


CopySourceAsHtml is an add-in for Microsoft Visual Studio 2008 that allows you to copy source code, syntax highlighting, and line numbers as HTML. CSAH uses Visual Studio's syntax highlighting and font and color settings automatically. If Visual Studio can highlight it, CSAH can copy it, and your source should look the same in your browser as it does in your editor.

there are more cool ones listed here

Mar 16, 2009 at 3:55 AM
You are so  kind . I am finding how to paste the code tidily in the codeplex editor. And you tell me. Thanks . I am still a freshman? Maybe.