So I want to put some text next to it's lable. (both of which are text blocks - which are faster than lables as I understand it) The best way i've found for doing this is a strack panel.
So I have, (repeated 3 times in a control) code like:
<StackPanel Grid.Column="1" Grid.Row="2" Grid.ColumnSpan="2" Orientation="Horizontal">
<TextBlock Text="Start:" FontWeight="DemiBold" VerticalAlignment="Bottom" HorizontalAlignment="Left"/>
<TextBlock Text="12:00pm" VerticalAlignment="Bottom" HorizontalAlignment="Left" Margin="5,0"/>
</StackPanel>
Is this the cleanest, way to do this, oris there a better control. I was kind of thinkingabout may i should make a wrapper control around the stack panel - but then i just would end up with:
<LabeledTextBlock Grid.Column="1" Grid.Row="2" Grid.ColumnSpan="2">
<LabledTextBlock.Label>
<TextBlock Text="Start:" FontWeight="DemiBold" VerticalAlignment="Bottom" HorizontalAlignment="Left"/>
</LabledTextBlock.Label>
<TextBlock Text="12:00pm" VerticalAlignment="Bottom" HorizontalAlignment="Left" Margin="5,0"/>
</LabeledTextBlock >
I Guess I could refine it more:
<LabeledContent Grid.Column="1" Grid.Row="2" Grid.ColumnSpan="2" Label="Start" Content="12:00pm"/>
Simplicity at the cost of flexibility. Perhaps instead I should be doing it as a style?
giving me: