Click here to Skip to main content
12,356,154 members (71,180 online)
Click here to Skip to main content

Stats

444K views
16.2K downloads
538 bookmarked
Posted

WPF Diagram Designer - Part 3

, 29 Feb 2008 CPOL
Connecting items
<ResourceDictionary 
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >

  <ResourceDictionary.MergedDictionaries>
    <ResourceDictionary Source="Shared.xaml" />
  </ResourceDictionary.MergedDictionaries>

  <!-- SimpleStyles: GroupBox -->
  <Style TargetType="GroupBox">
    <Setter Property="FontFamily" Value="SegoeUI"/>
    <Setter Property="FontSize" Value="12"/>
    <Setter Property="Foreground" Value="#4C4C4C"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="GroupBox">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Border 
              Grid.Row="0" 
              Background="{StaticResource LightBrush}"
              BorderBrush="{StaticResource NormalBorderBrush}"
              BorderThickness="1" 
              CornerRadius="2,2,0,0" >
              <ContentPresenter 
                Margin="4" 
                ContentSource="Header" 
                RecognizesAccessKey="True" />
            </Border>
            <Border 
              Grid.Row="1" 
              Background="{TemplateBinding Background}"
              BorderBrush="{StaticResource SolidBorderBrush}" 
              BorderThickness="1,0,1,1" 
              CornerRadius="0,0,2,2" >
              <ContentPresenter 
                Margin="4" />
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
</ResourceDictionary>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

sukram
Austria Austria
No Biography provided

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.160621.1 | Last Updated 29 Feb 2008
Article Copyright 2008 by sukram
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid