我是wpf的初學者,我想在下面的代碼中把我的彈出視窗的背景設定成另一種顏色。我不明白,我做錯了什么。
謝謝你:)
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"/span>
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">>
<Style TargetType="Popup"/span> x: Key="popup">。
< Setter Property="Background" Value="blue"/>
</Style>>
</ResourceDictionary>/span>
uj5u.com熱心網友回復:
彈出視窗沒有背景屬性。
也許可以在彈出式視窗里放一個網格,然后改變網格的背景。
<Popup IsOpen="True">
<Grid Background="Blue">
</Grid>/span>
</Popup>/span>
為了避免在使用新元素時出現這樣的問題,你可以依靠IntelliSense建議來查看你可以從一個元素中改變哪些屬性。它們真的很有幫助。
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/324497.html
標籤:
