<Window.Resources>
<Style x:Key="SeparatorStyle"
TargetType="{x:Type Border}">
<Setter Property="BorderThickness" Value="1,0,0,0"/>
<Setter Property="BorderBrush" Value="#FFC5C5C5"/>
<Setter Property="Margin" Value="10,0,10,0"/>
<Setter Property="Width" Value="2"/>
<Setter Property="Background" Value="White"/>
</Style>
</Window.Resources>
<StackPanel Orientation="Horizontal">
<TextBlock>Hello</TextBlock>
<Border Style="{StaticResource SeparatorStyle}"/>
<TextBlock>Hello</TextBlock>
</StackPanel>