如何在网格容器的背景中存储和显示一条线?我必须为每个资源字典设置背景。
<Style TargetType="{x:Type Grid}">
<Setter Property="Background">
<Setter.Value>
<!--here I had to display a vertical line at bottom,
which goes over the whole window -->
</Setter.Value>
</Setter>
</Style>
或者:
<Style TargetType="{x:Type Window}">
<Setter Property="Background">
<Setter.Value>
<!-- here I had to display a vertical line at bottom,
which goes over the whole window and set the background color-->
</Setter.Value>
</Setter>
</Style>
问题是我需要应用程序的每个窗口中的红色页脚。我使用 aResourceDictionary
样式。我不能使用图片,因为我必须在运行时/为每个应用程序设置颜色。