WPF Measureoverride trigger for parent for ContentPresenter

296 views Asked by At

I have a deep nested WPF control like below

Custom Control
  -> Grid
      -> Grid
          -> Border
              -> Content Presenter 

for some reason when I change the content of the content presenter, the measureoverride of the CustomControl is fired. I want to know if this is normal also how would you suppress the measureoveride to be fired. I have tried subclassing Content Presenter and overriding the framework metadata by setting the AffectsMeasure to false, but for somereason the flags are or'ed and are not set to false.

I already know the height and width and don't want the measure override to be called.

I have know way to know what is triggering the measure override.

Thanks. Any help is much appreciated.

0

There are 0 answers