It took some time, but I seem to have found a solution.
Now I can create a base class that already contains visual elements that need all subclasses. and they can be analyzed using XamlWriter / Reader without duplicates. hmm.
1) UserControl ( Add- > UserControl, Add- > Class )
2) InitializeControl();
3) InitializeControl() , ,
4) xamlwrite/xamlread/
, - ...
-
: .
, .
, XamlReader UIElements, InitializeComponent(), , xaml-parsed. , :/
.
- , :
if(HasContent)
Initialize();
else
Reinitialize();
Multiinitialize();
Initialize() UIElements , Reinitialize() ( control = FindName("controlName")), Multiinitialze() XamlReader.
, UserControl xaml, . , -, NullPointerExceptions. , .
. , !