I have added a usercontrol to my project like this:
Public Sub clickAutoDrillLeft(ByVal sender as Object, ByVal e as System.Windows.RoutedEventArgs)
Dim LSliderItem as New TriplexAmpsControl
me.LeftSlider.Items.Add(LSliderItem)
End sub
The "LSliderIn" object is an items control, and the "TriplexAmpsControl" is a usercontrol that has three writeonly properties declared as integers named "AmpsPhaseA", "AmpsPhaseB", and "AmpsPhaseC".
If I instantiate the control at runtime as above, I can immediately assign a value to one of the properties like:
Public Sub clickAutoDrillLeft(ByVal sender as Object, ByVal e as System.Windows.RoutedEventArgs)
Dim LSliderItem as New TriplexAmpsControl
me.LeftSlider.Items.Add(LSliderItem)
LSliderItem.AmpsPhaseA = 50
End sub
But only within the sub routine. I don't know how to reference the control values elsewhere in the form, because if I try to call the control by its name from some other sub, the compiler tells me, naturally, that the control is not part of the project because it has not been created yet.
All I have been able to find on the subject concerns the creation of controls in code-behind, but noting on how to connect to user controls instantiated the way I have done it.