Parameter set to null when using editable ComboBox value

Ribbon for WPF Forum

Posted 12 years ago by Bryan Livingston
Version: 1.0.0346
Platform: WPF Controls
Environment: Windows Vista (32-bit)
Avatar
On the ribbon sample when you go to Edit->ComboBox section and type in a value that isn't listed in the drop down combo box the value will not get sent to the command. ValueCommandParameter<>.Value will be null.

A message box with "Implement text search for '' here." will be shown, when it should include the value there.

Also it doesn't seem like the change event is getting triggered all the time. For instance if you just type in "q" an tab away from the combo box the message window will not be shown.

Here is the xaml that I am tring to get working:

<ribbon:ComboBox Width="113" ImageSourceSmall="Resources/StrokeThickness.png" Label="Width:" Command="{x:Static v:SetStrokeThicknessCommand.Command}" >
<ribbon:ComboBox.Content>
<ComboBox IsEditable="True">
<ComboBoxItem>0.0</ComboBoxItem>
<ComboBoxItem>0.5</ComboBoxItem>
<ComboBoxItem IsSelected="True">1.0</ComboBoxItem>
<ComboBoxItem>1.5</ComboBoxItem>
<ComboBoxItem>2.0</ComboBoxItem>
<ComboBoxItem>3.0</ComboBoxItem>
<ComboBoxItem>5.0</ComboBoxItem>
<ComboBoxItem>10.0</ComboBoxItem>
</ComboBox>
</ribbon:ComboBox.Content>
</ribbon:ComboBox>

I've got some predefined values but want it to be overridable with any value in the textbox.

Bryan

Comments (2)

Posted 12 years ago by Bryan Livingston
Avatar
I found another bug with it as well. If you switch between "Search item 1" to "Search item 2" (using the drop down box) then the command will be triggered twice.

Comment out "MessageBox.Show("Implement text search for '" + parameter.Value + "' here.");" and set a break point there to see it happen.
Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Thank you Bryan, all of these are now fixed for the next maintenance release.


Actipro Software Support

The latest build of this product (v2018.1 build 0675) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.