Silverlight 2 Beta 2 TabControl

June 10th, 2008 / Development in a Blink

After asking the oracle of infinite knowledge (Google) for examples on Silverlight Beta TabControl, I came up with nothing.

Attempting to Close the Discoverability Gap I changed my search to WPF TabControl. Starting with this example I came up with this working Silverlight TabControl.

image 

Xaml

  <c:TabControl TabStripPlacement="Left">
   <c:TabItem >
    <c:TabItem.Header>
     <StackPanel Orientation="Horizontal">
      <Ellipse Width="10" Height="10" Fill="Green"/>
      <TextBlock Text="Toolbox" Margin="5"/>
     </StackPanel>
    </c:TabItem.Header>
   </c:TabItem>
   <c:TabItem >
    <c:TabItem.Header>
     <StackPanel Orientation="Horizontal">
      <Ellipse Width="10" Height="10" Fill="DarkGray"/>
      <TextBlock Text="Server" Margin="5"/>
     </StackPanel>
    </c:TabItem.Header>
   </c:TabItem>
   <c:TabItem>
    <c:TabItem.Header>
     <StackPanel Orientation="Horizontal">
      <Ellipse Width="10" Height="10" Fill="DarkGray"/>
      <TextBlock Text="General" Margin="5"/>
     </StackPanel>
    </c:TabItem.Header>
   </c:TabItem>
  </c:TabControl>
 </Grid>

Comments are closed.