我如何可以存儲和網格容器的背景顯示一行一條線嗎? 我必須設置每個資源字典的背景。顯示在網格背景
<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>
的問題是,我需要的紅色頁腳在應用程序的每個窗口。我使用ResourceDictionary
進行造型。我無法使用圖片,因爲我必須在運行時/爲每個應用程序設置顏色。
你能表現出一定的XAML,並解釋多一點你正在嘗試做什麼?你想要哪條線?垂直?水平?一條線?許多行?莫名其妙地與網格對齊? – 2012-08-10 13:55:23
我有一個網格,重寫我的網格的標準樣式。 的問題是,我不得不顏色設定爲窗口中的每個申請的全部背景,並畫垂直線,這是設置在底部,並具有窗口 的寬度爲我的代碼,見我的交...我有編輯它 – user1565467 2012-08-10 14:00:27
是有可能的窗口的背景設置爲 顏色,並在太行一個選項? 與網格的想法是不是一個好主意,我認爲^^ – user1565467 2012-08-10 14:05:58