Dear all,
I'm google-ing for several days now to find the answer to solve this.
I'm working on an UI, where the user could have to been able to choose the input methos for a "length" value.
Possible scenarios:
direct input:
<textBox x:Name="input1"/>
-> output=input1.text
multiplicator1:
<StackPanel><TextBox x:Name="input2" /><TextBlock Text="*N">
->output=input2.Text*dblN
Ans so on...
My first guess was to create a UserControl hosting a Combobox.
On the Window I place the combo and set the content by codebehind.
<my:CustomCombo x:Name="cb1">
codebehind
Sub New()
InitializeComponent()
With Me.cb1.ComboItems
Dim sp As New StackPanel
sp.Orientation = Orientation.Horizontal
sp.Children.Add(New TextBox With {.Text = "0", .FontSize = 8})
sp.Children.Add(New TextBlock With {.Text = "x N", .FontSize = 8})
.Add(sp)
.Add(New TextBox With {.Text = "Text2", .FontSize = 8})
End With
End Sub
I Set up a DP in the UserControl, so ComboItems holds the ItemsSource
Running this look not so bad, I have my Controls listed and can select them as well.
BUT: I cannot enter them.... (which is normal behavior of a combobox)
Can I achieve my goal on this track or am I completely false?
This is my first WPF-project, so there may be some leaks of understanding though.
Thanks in advance,
D