GridSplitter Inside a TabItem

By John at September 12, 2009 15:03
Filed Under: Techy

Someone on Silverlight.net was having trouble with this one so I worked up an example.  Here’s the Xaml:

  1. <UserControl xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" x:Class="GridsplitterInTabItem.MainPage"
  2.     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3.     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4.     xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5.     mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480">
  6.   <Grid x:Name="LayoutRoot">
  7.         <controls:TabControl>
  8.             <controls:TabItem Header="Tab 1">
  9.                 <Grid>
  10.                     <Grid.ColumnDefinitions>
  11.                         <ColumnDefinition Width="*"></ColumnDefinition>
  12.                         <ColumnDefinition Width="*"></ColumnDefinition>
  13.                     </Grid.ColumnDefinitions>
  14.                     <Grid Background="Red"></Grid>
  15.                     <Grid Background="Blue" Grid.Column="1"></Grid>
  16.                     <controls:GridSplitter Grid.Column="1" Width="5" HorizontalAlignment="Left"></controls:GridSplitter>
  17.                 </Grid>
  18.             </controls:TabItem>
  19.             <controls:TabItem Header="Tab 2"></controls:TabItem>
  20.         </controls:TabControl>
  21.     </Grid>
  22. </UserControl>

 

Here’s the working version of it:

Comments are closed

What is myOSity?

myOSity is a On-Demand Operating System that runs in your browser.  You can run applications, work with files, keep in touch and share things with your friends, and more.  The goal of myOSity is to combine the best aspects of operating systems and social networking, while hopefully leaving out all the annoying stuff.

Curious?

To check out myOSity for yourself click here.

Have a game or other Silverlight project that you want to become part of the growing list of applications on myOSity? Contact Me for details.

Join The Team!

Currently looking for other developers interested in being a part of the project.  Contact Me for details or read this post.

About John

I am the founder and lead designer of myOSity.com.  I've been a technologist, in one form or another, for over 20 years.

Protected by Commentor
0 comments approved
4 spam caught
Since December 1, 2008
Powered by Spam Counter