我创建了一条线来显示网格底线,如果我将它放在page.xaml
. 我需要在 Orientation 期间更改线条,所以我在app.xaml
. 但是它有Application_UnhandledException
错误。我在页面上使用了没有 sytle 的代码,它可以工作。有人会告诉我如何使它工作。提前致谢。
<Line X1="0" X2="700" Y1="0" Y2="0" Grid.Row="0" Grid.ColumnSpan="3" Grid.Column="0"
VerticalAlignment="Bottom" Stroke="Blue" StrokeThickness="5"/>
以下是 app.xaml 上 line 的样式
<Style x:Key="queuePortraitLine" TargetType="Line">
<Setter Property="X1" Value="0"/>
<Setter Property="X2" Value="700"/>
<Setter Property="Y1" Value="0"/>
<Setter Property="Y2" Value="0"/>
<Setter Property="VerticalAlignment" Value="Bottom"/>
<Setter Property="Stroke" Value="Blue"/>
<Setter Property="StrokeThickness" Value="5"/>
</Style>