2

使用代码,我可以通过将 UI 元素的背景属性设置为默认值nothing,即

myControl.Background = Nothing

但是我如何在 XAML 中做到这一点?特别是,我在情节提要中这样做:

<Storyboard>
    <ColorAnimation 
        Storyboard.TargetProperty="(Background).(SolidColorBrush.Color)" 
        Duration="00:00:02.00" 
        To="DEFAULT_COLOR_HERE" />
</Storyboard>
4

1 回答 1

2

试一试

<Storyboard>
    <ColorAnimation 
        Storyboard.TargetProperty="(Background).(SolidColorBrush.Color)" 
        Duration="00:00:02.00" 
        To="{x:Null}" />
</Storyboard>
于 2009-11-07T00:28:40.097 回答