How to add custom code when control destroy?
Hi,
Since I need to add some custom dispose code when the noesis control destroy. But there is no Dispose method in control class. So what is the better way to implement dispose method?
Since I need to add some custom dispose code when the noesis control destroy. But there is no Dispose method in control class. So what is the better way to implement dispose method?
-
-
sfernandez
Site Admin
- Posts: 3222
- Joined:
Re: How to add custom code when control destroy?
Hi,
We don't support the Dispose pattern directly in our controls bacause WPF controls doesn't implement it.
Maybe you can wrap your disposable code in another object owned by your controls, and free that part only.
Could this work for you?
We don't support the Dispose pattern directly in our controls bacause WPF controls doesn't implement it.
Maybe you can wrap your disposable code in another object owned by your controls, and free that part only.
Could this work for you?
Re: How to add custom code when control destroy?
The Unloaded event may help you ?Hi,
Since I need to add some custom dispose code when the noesis control destroy. But there is no Dispose method in control class. So what is the better way to implement dispose method?