-
- darthmaule2
- Posts: 95
- Joined:
ConnectEvent not being called in Noesis 2.2.2 / .NET 4.6.1 / Windows x64?
I recently noticed my breakpoint in ConnectEvent wasn't getting called, so,
I downloaded the latest tutorials from github and made only 1 change to "Buttons", which was to override ConnectEvent and set a break point when it's called:
... but ConnectEvent is never called (or at least my break point is never hit). Everything else seems to work fine in the example.
This is in Windows x64.
This was working previously, but I'm not sure when.
I downloaded the latest tutorials from github and made only 1 change to "Buttons", which was to override ConnectEvent and set a break point when it's called:
Code: Select all
namespace Buttons
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
this.Initialized += OnInitialized;
this.InitializeComponent();
}
#if NOESIS
private void InitializeComponent()
{
Noesis.GUI.LoadComponent(this, "MainWindow.xaml"); // My breakpoint here is hit
}
#endif
private void OnInitialized(object sender, EventArgs args)
{
this.DataContext = new ViewModel();
}
protected override bool ConnectEvent(object source, string eventName, string handlerName)
{
return base.ConnectEvent(source, eventName, handlerName); // I set my breakpoint here but it's not hit
}
}
}
This is in Windows x64.
This was working previously, but I'm not sure when.
-
- darthmaule2
- Posts: 95
- Joined:
Re: ConnectEvent not being called in Noesis 2.2.2 / .NET 4.6.1 / Windows x64?
ok that's not a good example... I added an event to the XAML and now ConnectEvent is getting called. But, it's still not working in my other application... I'll have to come up with a better minimal example :)
-
- darthmaule2
- Posts: 95
- Joined:
Re: ConnectEvent not being called in Noesis 2.2.2 / .NET 4.6.1 / Windows x64?
Ahh, nevermind. I was not explicitly assigning a SelectionChanged event for my ListView, which I thought was a built-in event. I must have taken that out myself at some point. It's working now.
-
-
sfernandez
Site Admin
- Posts: 2057
- Joined:
Re: ConnectEvent not being called in Noesis 2.2.2 / .NET 4.6.1 / Windows x64?
Sorry for the late answer, I was going to say that ConnectToEvent is only called if there is any event handler specified in the xaml like:
Glad you figure it out.
Code: Select all
<Button Content="Start" Click="OnStartButtonClicked"/>
Who is online
Users browsing this forum: Korbee and 1 guest