I am using attached properties to allow some design-time behaviour in the Visual Studio WPF designer i.e. design-time view-model data.
The issue I'm having is that when attached property events fire at design-time for my UserControl, the type of the DependencyObject is UserControl and not the concrete type I am expecting. At runtime the type of the DependencyObject is the concrete type as expected, e.g. BlingUserControl.
I want access to the concrete type as I need its namespace for a convention-based locater pattern.
Is there any way of getting at the concrete type at design-time?
Afraid not. Visual Studio (and Blend, for that matter) both construct an instance of UserControl rather than an instance of your control itself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With