Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Draw horizontal line in a grid row

$
0
0

Hi, I want horizontal line in the 2nd row of a grid and the following code isn't working. I don't see any horizontal line. I don't want to show grid lines, just custom horizontal line in rows I need

<Window x:Class="WpfAppLine.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525"><Grid><Grid.RowDefinitions><RowDefinition Height="Auto"></RowDefinition><RowDefinition Height="Auto"></RowDefinition><RowDefinition Height="Auto"></RowDefinition></Grid.RowDefinitions><Grid.ColumnDefinitions><ColumnDefinition Width="Auto"></ColumnDefinition></Grid.ColumnDefinitions><TextBlock Grid.Row="0">First Row</TextBlock><Line Grid.Row="1" Stroke="Red" StrokeThickness="10" Stretch="Uniform"></Line><TextBlock Grid.Row="2">Third Row</TextBlock></Grid></Window>


Thanks,

-srinivas y.


sri


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>