Events in C++
Hey, I want to create static events and pass Noesis::Key and I dont know how to make it
I declared
But I don't know how to fire it and how to add my method to it, please any example?
Or maybe how I can reach KeyDown/Up events if my class is inheriting NoesisApp::NotifyPropertyChangedBase?
I declared
Code: Select all
static Noesis::Delegate<Noesis::Key>& KeyDownTest;
Or maybe how I can reach KeyDown/Up events if my class is inheriting NoesisApp::NotifyPropertyChangedBase?
Re: Events in C++
Events Tutorial
Please, read carefully the tutorial to connect to any event exposed in XAML.Or maybe how I can reach KeyDown/Up events if my class is inheriting NoesisApp::NotifyPropertyChangedBase?
Re: Events in C++
Ok Thanks I understand. Now I have mindfuck. If I have class MainMenu in C++ and its connected to .xaml how and where the object is created and how I can access to him?
-
sfernandez
Site Admin
- Posts: 2991
- Joined:
Re: Events in C++
The MainMenu object is created when the xaml gets loaded, the XAML parser creates the class referenced by x:Class attribute.
You can access it from the MainMenu code-behind itself, or if it is part of another xaml, you can name the MainMenu element in that xaml and use FindName to get a reference (from the parent xaml code-behind).
You can access it from the MainMenu code-behind itself, or if it is part of another xaml, you can name the MainMenu element in that xaml and use FindName to get a reference (from the parent xaml code-behind).
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 67 guests