How to make parametrizable properties in WPF user controls? -
i want refactor many similar controls differ in value of single property (besides positioning properties).
imagine have user control (let's call uc1) have label. label.content should value + ":" value passed through property user control.
i implement hand using initialized event, happens in case isn't label custom control (let's call uc2) needs property on own initialized event.
somehow uc2 initialized runs before uc1's, , throws exception because property value not set yet.
how solve this?
maybe problem cause calling initializecomponent() inside user control when shouldn't.
it may cause initialized event fired twice.
Comments
Post a Comment