views:

44

answers:

1

Hi there,

I have a Silverlight 4 application.

What would cause the Constructor in my codebehind file to be called more than once?

Currently I suspect it gets called when I set the datacontext or do applytemplate.

I can see it when I debug the application and I put a breakpoint on the first line in my constructor, BUT it does not give me a stacktrace.

Thanks

A: 

Hi,

the constructor should only be called once per control instance. Is your control maybe used more than once in your app? Or maybe a page that includes the control is instantiated more than once?

Cheers, Alex

alexander.biskop