Entries Categorized as 'Uncategorized'

Visual Studio 2005 Tips

Date March 11, 2007

Check out this time-saving article on visual studio 2005 tips and tricks: http://msdn2.microsoft.com/en-us/library/bb245788(vs.80).aspx from MSDN
Share this post: email it! | bookmark it! | digg it! | reddit! | kick it! | live it!

Related PostsVisual Studio Window ManagerThis is a great productivity plugin and time saver… Have you ever [...]

My First WPF Application

Date March 9, 2007

Here is my first Windows Presentation Foundation (WPF) application. This was developed using Orcas March CTP and deployed using VS 2005 + WPF extensions due to a bug in Orcas with ClickOnce (read previous post).
This is a simple notepad replacement with multiple tabs and spell checking. It works and looks better in Vista. Get [...]

ClickOnce in WPF and Orcas Project

Date March 9, 2007

For some reason, I couldn’t get ClickOnce to work correctly using the Orcas March CTP. So when time came to deploy I move my files to VS 2005 + WPF Extensions and deployed it from there. It worked right away.

Does anyone know of a fix for this?
Share this post: email it! | [...]

How to add a User Control to your WPF Window

Date March 9, 2007

In the window XAML add the namespace of your control. So, if your control is called MyControl and your project is called MyProj then most likely the full namespace is MyProj.MyControl.

The control might look like this:

<UserControl
x:Class=“MyControl”

xmlns=“http://schemas.microsoft.com/winfx/2006/xaml/presentation”

xmlns:x=“http://schemas.microsoft.com/winfx/2006/xaml“>

    <DockPanel>

        <Button>Test</Button>

        <Button>Test</Button>

        <Button>Test</Button>

        <Button>Test</Button>

    </DockPanel>

</UserControl>

 
Your form header will look like this:

<Window
x:Class=“Window1”

xmlns=“http://schemas.microsoft.com/winfx/2006/xaml/presentation”

xmlns:x=“http://schemas.microsoft.com/winfx/2006/xaml”

    xmlns:l=“clr-namespace:MyProj”

Title=“wpf“
Height=“300“
Width=“300”

>

Then to use the control you will do this:

<l:MyControl></l:MyControl>

I got this to work [...]

Add Context Menu to Tab Control in WPF

Date March 8, 2007

You can add a context menu to tab control or to individual tabs. If you add it to tab control it works on anywhere in the tab area. If you add it to a tab item, it only works on that tab item. Take a look at this code:

<TabControl
Name=“tcMain“ >

    <TabControl.ContextMenu>

        <ContextMenu
Name=“mnuTabContext1“>

            <MenuItem
Header=“_Vertical Tab“
Name=“mnuVerticalTab1“></MenuItem>

            <MenuItem
Header=“_Horizontal Tab“
Name=“mnuHorizontalTab1“></MenuItem>

        </ContextMenu>

    </TabControl.ContextMenu>

    <TabItem
Name=“tabNew“
Header=“[new]“
IsTabStop=“False“ [...]