Skip to content

Instantly share code, notes, and snippets.

@andersonimes
Created October 25, 2010 20:09
Show Gist options
  • Save andersonimes/645636 to your computer and use it in GitHub Desktop.
Save andersonimes/645636 to your computer and use it in GitHub Desktop.
<ItemsControl Grid.IsSharedSizeScope="True">
<ItemsControl.ItemTemplate>
<DataTemplate DataType="HeaderedContentControl">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition SharedSizeGroup="Labels" />
<ColumnDefinition SharedSizeGroup="Inputs" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding Header}" />
<ContentControl Grid.Column="1" Content="{Binding Content}" />
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
<ItemsControl.Items>
<HeaderedContentControl>
<HeaderedContentControl.Header>Label1</HeaderedContentControl.Header>
<HeaderedContentControl.Content>
<TextBlock Text="{Binding Name, Mode=TwoWay}" />
</HeaderedContentControl.Content>
</HeaderedContentControl>
</ItemsControl.Items>
</ItemsControl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment