无法在混合中使用 C# 操作情节提要

发布于 2024-09-06 01:29:50 字数 144 浏览 5 评论 0原文

问题就在这里, 在 Blend 3 中,我有 12 个故事板,我可以使用 xaml 操作它们,但是当我尝试使用 c# 操作它们时,blend 似乎看不到它们。问题可能出在哪里?

确切的错误是: 名称“存在的 stroyboard 的名称”在当前上下文中不存在

Here is the problem,
in Blend 3 i have 12 storyboards, i can manipulate them with using xaml, but when i try to manipulate them with c#, blend seems cannot see them. Where could be the problem?

The exact error is :
The name 'name of the stroyboard which exists' does not exists in the current context

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

瞎闹 2024-09-13 01:29:50

您确定名称设置正确吗?

在您的 MainWindow.xaml 文件中,您有类似以下内容:

<Window.Resources>
    <Storyboard x:Key="login_fadein">
                ...
    </Storyboard >
</Windows.Resources>

Are you sure you have the names setup properly?

In your MainWindow.xaml file you have something like this:

<Window.Resources>
    <Storyboard x:Key="login_fadein">
                ...
    </Storyboard >
</Windows.Resources>
public partial class MainWindow : Window
{
        Storyboard loginin;
        Storyboard dersout;
        Storyboard sinifout;
        Storyboard konuout;
        Storyboard menus1out;
        Storyboard kmenuout;
        Storyboard soruout;
        Storyboard loginout;
        Storyboard dersin;
        Storyboard menu1in;

        Storyboard sinifsecin;
        Storyboard kmenuin;

    public MainWindow()
    {
        this.InitializeComponent();
        loginin = (Storyboard)Window.Resources["login_fadein"];
        dersout = (Storyboard)Window.Resources["derssec_fadeout"];
        sinifout = (Storyboard)Window.Resources["sinifsec_fadeout"];
        konuout = (Storyboard)Window.Resources["konu_fadeout"];
        menus1out = (Storyboard)Window.Resources["menus1_fadeout"];
        kmenuout = (Storyboard)Window.Resources["menukonu_fadeout"];
        soruout = (Storyboard)Window.Resources["soru_fadeout"];
        loginout = (Storyboard)Window.Resources["login_fadeout"];
        dersin = (Storyboard)Window.Resources["derssec_fadein"];
        menu1in = (Storyboard)Window.Resources["menus1_fadein"];
        dersout = (Storyboard)Window.Resources["derssec_fadeout"];
        sinifsecin = (Storyboard)Window.Resources["sinifsec_fadein"];
        kmenuin = (Storyboard)Window.Resources["menukonu_fadein"];
        kmenuout = (Storyboard)Window.Resources["menukonu_fadeout"];
    }

当然首先我应该定义我在说什么:D

public partial class MainWindow : Window
{
        Storyboard loginin;
        Storyboard dersout;
        Storyboard sinifout;
        Storyboard konuout;
        Storyboard menus1out;
        Storyboard kmenuout;
        Storyboard soruout;
        Storyboard loginout;
        Storyboard dersin;
        Storyboard menu1in;

        Storyboard sinifsecin;
        Storyboard kmenuin;

    public MainWindow()
    {
        this.InitializeComponent();
        loginin = (Storyboard)Window.Resources["login_fadein"];
        dersout = (Storyboard)Window.Resources["derssec_fadeout"];
        sinifout = (Storyboard)Window.Resources["sinifsec_fadeout"];
        konuout = (Storyboard)Window.Resources["konu_fadeout"];
        menus1out = (Storyboard)Window.Resources["menus1_fadeout"];
        kmenuout = (Storyboard)Window.Resources["menukonu_fadeout"];
        soruout = (Storyboard)Window.Resources["soru_fadeout"];
        loginout = (Storyboard)Window.Resources["login_fadeout"];
        dersin = (Storyboard)Window.Resources["derssec_fadein"];
        menu1in = (Storyboard)Window.Resources["menus1_fadein"];
        dersout = (Storyboard)Window.Resources["derssec_fadeout"];
        sinifsecin = (Storyboard)Window.Resources["sinifsec_fadein"];
        kmenuin = (Storyboard)Window.Resources["menukonu_fadein"];
        kmenuout = (Storyboard)Window.Resources["menukonu_fadeout"];
    }

of course first i should define what i am talking about :D

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文