Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

Force update of custom categoryeditor

$
0
0

Hello,

I have the following problem: I have some controls which have two dependencyproperties which are somehow connected. When one property has an value the other have null (which property gets the value is a bit complicated so I don't mention it).

For achieving this I have written a custom categoryeditor, which uses an usercontrol to do this. This usercontrol is added dynamicaly as often as the above mentioned dependencyproperty pairs appears in this control. This process is made in the overriden funtion "public override bool ConsumesProperty(PropertyEntry property)". This is as far as I know the only position where I get the properties of this category (is this right?)

This works fine. Everytime I click on a control of mine the function ConsumesProperty is called and I can collect the properties which needed to be shown in a special way. The only problem is when I switch from one of my controls to another of mine (both have different properties for showing in the category editor). Then only the ctor and the virtual function "public override string TargetCategory" getting called but not ConsumesProperty. ConsumesProperty is only called when I switch  from a control which does not have this category to a control which have this category in the designer.

Is there a way to raise an event or something (best place for me would be in the ctor of the CategoryEditor) that would result in ComsumesProperty getting called?

Or is there a different approach which can help me?

Regards

Sebastian

 

P.S. I am using WPF and Visual Studio 2010


Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>