Two Lines in a StackPanel : Line « Windows Presentation Foundation « VB.Net Tutorial






<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      HorizontalAlignment="Stretch" VerticalAlignment="Stretch">

    <StackPanel Orientation="Vertical">
      <TextBlock Background="Red">A</TextBlock>
      <Line Stroke="Green" X1="20" Y1="10" X2="100" Y2="40" />
      <TextBlock Background="LightGray">B</TextBlock>
      <Line Stroke="Green" X1="0" Y1="10" X2="100" Y2="0" />
    </StackPanel>

</Page>
WPF Two Lines In A Stack Panel








16.65.Line
16.65.1.Line position and color and thicknessLine position and color and thickness
16.65.2.Draw a LineDraw a Line
16.65.3.Add Line to StackPanelAdd Line to StackPanel
16.65.4.Set line Stroke and StrokeThicknessSet line Stroke and StrokeThickness
16.65.5.Add Line and TextBlock to CanvasAdd Line and TextBlock to Canvas
16.65.6.Set Line Along Canvas Top and LeftSet Line Along Canvas Top and Left
16.65.7.Draws a diagonal line from (10,10) to (40,50)Draws a diagonal line from (10,10) to (40,50)
16.65.8.Two Lines in a StackPanelTwo Lines in a StackPanel
16.65.9.Create a simple line using the LineSegment and PathGeometryCreate a simple line using the LineSegment and PathGeometry
16.65.10.Creates a blue line from point (30, 30) to point (180, 30):Creates a blue line from point (30, 30) to point (180, 30):
16.65.11.Creating LinesCreating Lines