views:

19

answers:

2

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

A: 
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

gkaykck
A: 

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>
Adam Kinney
i ve solved the problem, i haven't defined what i am talking about to c#, thats why it cannot see storyboards.
gkaykck