weilitao
Topic Author
Posts: 22
Joined: 23 Feb 2016, 10:43

How to add custom code when control destroy?

19 Aug 2016, 10:56

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?
 
User avatar
sfernandez
Site Admin
Posts: 1938
Joined: 22 Dec 2011, 19:20

Re: How to add custom code when control destroy?

23 Aug 2016, 18:23

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?
 
tomczak
Posts: 30
Joined: 26 Mar 2014, 10:25

Re: How to add custom code when control destroy?

23 Aug 2016, 18:31

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?
The Unloaded event may help you ?

Who is online

Users browsing this forum: Google [Bot] and 5 guests