WPF4 не может найти раскадровку из кода - PullRequest
1 голос
/ 04 февраля 2011

по какой-то причине я не могу получить доступ к своему раскадровке из кода.

<Window x:Class="test.Overlay"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Overlay" Height="300" Width="300" WindowState="Maximized">
<Window.Resources>
    <Storyboard x:Key="lightFadeToBlack">
        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="lightRec">
            <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="1"/>
        </DoubleAnimationUsingKeyFrames>
    </Storyboard>
    <Storyboard x:Key="lightFadeToMovie">
        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="lightRec">
            <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="0"/>
        </DoubleAnimationUsingKeyFrames>
    </Storyboard>
</Window.Resources>

...

Я должен иметь возможность запустить его с помощью c #, используя lightFadeToBlack.Begin ();но lightFadeToBlack не может быть найден.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...