The TargetType for Line in style doesn't work in UWP
问题 I have the following code: <Grid> <Grid.Resources> <Style TargetType="Line"> <Setter Property="Stroke" Value="Black"></Setter> <Setter Property="StrokeDashArray" Value="3"></Setter> <Setter Property="StrokeThickness" Value="3"></Setter> </Style> </Grid.Resources> <Line X1="20" X2="500" Y1="50" Y2="50"></Line> <Line X1="20" X2="500" Y1="100" Y2="100"></Line> <Line X1="20" X2="500" Y1="150" Y2="150"></Line> </Grid> You could see the screenshoot, the StrokeDashArray property value in the style