Line position and color and thickness : Line « Windows Presentation Foundation « VB.Net






Line position and color and thickness

Line position and color and thickness
     

<Window x:Class="GraphicsTests.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="GraphicsTests" Height="400" Width="400">
    <Grid>
      <Line X1="200" Y1="200" X2="300" Y2="200" Stroke="Black" StrokeThickness="3"></Line>
      <Line X1="300" Y1="200" X2="300" Y2="100" Stroke="Black" StrokeThickness="3"></Line>
      <Line X1="300" Y1="100" X2="250" Y2="50" Stroke="Black" StrokeThickness="3"></Line>
      <Line X1="250" Y1="50" X2="200" Y2="100" Stroke="Black" StrokeThickness="3"></Line>
      <Line X1="200" Y1="100" X2="300" Y2="100" Stroke="Black" StrokeThickness="3"></Line>
      <Line X1="300" Y1="100" X2="200" Y2="200" Stroke="Black" StrokeThickness="3"></Line>
      <Line X1="200" Y1="200" X2="200" Y2="100" Stroke="Black" StrokeThickness="3"></Line>
      <Line X1="200" Y1="100" X2="300" Y2="200" Stroke="Black" StrokeThickness="3"></Line> 
    </Grid>
</Window>

   
    
    
    
    
  








Related examples in the same category

1.Draw a LineDraw a Line
2.Add Line to StackPanelAdd Line to StackPanel
3.Set line Stroke and StrokeThicknessSet line Stroke and StrokeThickness
4.Add Line and TextBlock to CanvasAdd Line and TextBlock to Canvas
5.Set Line Along Canvas Top and LeftSet Line Along Canvas Top and Left
6.Draws a diagonal line from (10,10) to (40,50)Draws a diagonal line from (10,10) to (40,50)
7.Two Lines in a StackPanelTwo Lines in a StackPanel
8.Create a simple line using the LineSegment and PathGeometryCreate a simple line using the LineSegment and PathGeometry
9.Creates a blue line from point (30, 30) to point (180, 30):Creates a blue line from point (30, 30) to point (180, 30):
10.Creating LinesCreating Lines