2012-08-10 94 views
1

我如何可以存储和网格容器的背景显示一行一条线吗? 我必须设置每个资源字典的背景。显示在网格背景

<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> 

screenshot

的问题是,我需要的红色页脚在应用程序的每个窗口。我使用ResourceDictionary进行造型。我无法使用图片,因为我必须在运行时/为每个应用程序设置颜色。

+1

你能表现出一定的XAML,并解释多一点你正在尝试做什么?你想要哪条线?垂直?水平?一条线?许多行?莫名其妙地与网格对齐? – 2012-08-10 13:55:23

+0

我有一个网格,重写我的网格的标准样式。 的问题是,我不得不颜色设定为窗口中的每个申请的全部背景,并画垂直线,这是设置在底部,并具有窗口 的宽度为我的代码,见我的交...我有编辑它 – user1565467 2012-08-10 14:00:27

+0

是有可能的窗口的背景设置为 颜色,并在太行一个选项? 与网格的想法是不是一个好主意,我认为^^ – user1565467 2012-08-10 14:05:58

回答