by using a style for a HeaderedContentControl
<HeaderedContentControl Header="Title" Content="what is the best way to define label and TextBox">
<HeaderedContentControl.Template>
<ControlTemplate TargetType="HeaderedContentControl">
<StackPanel Orientation="Horizontal">
<Label Content="{TemplateBinding Header}"/>
<TextBox Text="{TemplateBinding Content}"/>
</StackPanel>
</ControlTemplate>
</HeaderedContentControl.Template>
</HeaderedContentControl>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.