Skip to content

Instantly share code, notes, and snippets.

@podhmo
Created February 4, 2014 04:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save podhmo/8798251 to your computer and use it in GitHub Desktop.
Save podhmo/8798251 to your computer and use it in GitHub Desktop.
<Window x:Class="WpfApplication6.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:c="clr-namespace:WpfApplication6"
Title="MainWindow" Height="350" Width="525">
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<c:UserControl1>
<Border Margin="0,10,0,10" >
<WrapPanel>
<TextBlock Foreground="Aqua">AAAA</TextBlock>
<TextBlock Foreground="BlanchedAlmond">xyz</TextBlock>
</WrapPanel>
</Border>
</c:UserControl1>
<c:UserControl1>
<WrapPanel>
<TextBlock Foreground="Aqua">AAAA</TextBlock>
<TextBlock Foreground="BlanchedAlmond">xyz</TextBlock>
</WrapPanel>
</c:UserControl1>
</StackPanel>
</Window>
<UserControl x:Class="WpfApplication6.UserControl1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<UserControl.ContentTemplate>
<DataTemplate>
<StackPanel Orientation="Vertical" HorizontalAlignment="Center">
<TextBlock>-------</TextBlock>
<ContentPresenter Content="{TemplateBinding Content}"/>
<TextBlock>-------</TextBlock>
</StackPanel>
</DataTemplate>
</UserControl.ContentTemplate>
</UserControl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment