如何制作Storyboard.TargetProperty=“Width”
从100到全屏以适应所有屏幕?
我想将它设置为全屏,而不是500。
<Window.Triggers>
<EventTrigger RoutedEvent="Window.Loaded" >
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Duration="00:00:02" Storyboard.TargetProperty="Width" From="500" To="100" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Window.Triggers>
而不是500使用
{Binding Source={x:Static SystemParameters.FullPrimaryScreenWidth}}