Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
915
combo issue on RibbonGroup
posted

I am having an issue with the combo box events.

When I place a combobox in a Ribbon group I cannot get it to fire any of the changed events.

Anyone else having this issue?

Here is the XAML to test this with

<Window

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

x:Class="Window1"

Title="Window1" Height="480" Width="640" xmlns:igRibbon="http://infragistics.com/Ribbon">

<Grid>

<igRibbon:XamRibbon x:Name="testRibbon">

<igRibbon:XamRibbon.Tabs>

<igRibbon:RibbonTabItem Header="Test">

<igRibbon:RibbonGroup Id="grpTest" Caption="Test Group">

<igRibbon:ComboEditorTool Id="cboTest" Caption="combo test" SelectedItemChanged="ComboEditorTool_SelectedItemChanged" ValueChanged="ComboEditorTool_ValueChanged">

 

</igRibbon:ComboEditorTool>

<igRibbon:ComboEditorTool x:Name="cboTesting" Id="cboTest1" Caption="combo test">

</igRibbon:ComboEditorTool>

<igRibbon:TextEditorTool x:Name="txtTesting" Id="txtTest" Caption="Test Textbox" TextChanged="TextEditorTool_TextChanged" >

 

</igRibbon:TextEditorTool>

</igRibbon:RibbonGroup>

</igRibbon:RibbonTabItem>

</igRibbon:XamRibbon.Tabs>

</igRibbon:XamRibbon>

</Grid>

</Window>

And here is the code behind

Imports Infragistics.Windows.Ribbon

Class Window1

Private Sub ComboEditorTool_SelectedItemChanged(ByVal sender As System.Object, ByVal e As System.Windows.RoutedPropertyChangedEventArgs(Of System.Object))

MessageBox.Show("Selected Item Changed Fired.", "It works", MessageBoxButton.OK, MessageBoxImage.Exclamation)

End Sub

Private Sub ComboEditorTool_ValueChanged(ByVal sender As System.Object, ByVal e As System.Windows.RoutedPropertyChangedEventArgs(Of System.Object))

MessageBox.Show("Value Changed Fired.", "It works", MessageBoxButton.OK, MessageBoxImage.Exclamation)

End Sub

Private Sub Window1_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded

'Add some stuff to the combobox

Dim cbo As ComboEditorTool = TryCast(testRibbon.GetToolById("cboTest"), ComboEditorTool)

If Not cbo Is Nothing Then

For i As Integer = 0 To 10

cbo.ComboBox.Items.Add("Testing " & i.ToString)

cboTesting.ComboBox.Items.Add("Testing " & i.ToString)

Next

End If

End Sub

Private Sub TextEditorTool_TextChanged(ByVal sender As System.Object, ByVal e As System.Windows.RoutedPropertyChangedEventArgs(Of System.String))

MessageBox.Show("TextEditorTool Text Changed Fired.", "It works", MessageBoxButton.OK, MessageBoxImage.Exclamation)

End Sub

'Private Sub TextEditorTool_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Input.KeyEventArgs)

' MessageBox.Show("TextEditorTool KeyDown Fired.", "It works", MessageBoxButton.OK, MessageBoxImage.Exclamation)

'End Sub

'Private Sub TextEditorTool_KeyUp(ByVal sender As System.Object, ByVal e As System.Windows.Input.KeyEventArgs)

' MessageBox.Show("TextEditorTool KeyUp Fired.", "It works", MessageBoxButton.OK, MessageBoxImage.Exclamation)

'End Sub

Private Sub cboTesting_SelectedItemChanged(ByVal sender As Object, ByVal e As System.Windows.RoutedPropertyChangedEventArgs(Of Object)) Handles cboTesting.SelectedItemChanged

MessageBox.Show("cboTesting Selected Item Changed Fired.", "It works", MessageBoxButton.OK, MessageBoxImage.Exclamation)

End Sub

Private Sub cboTesting_ValueChanged(ByVal sender As Object, ByVal e As System.Windows.RoutedPropertyChangedEventArgs(Of Object)) Handles cboTesting.ValueChanged

MessageBox.Show("cboTesting Selected Item Changed Fired.", "It works", MessageBoxButton.OK, MessageBoxImage.Exclamation)

End Sub

End Class

Parents
No Data
Reply
  • 54937
    Verified Answer
    Offline posted

    This looks like a bug. You should report the issue to the support group so you can be notified when a fix is available. When you contact them reference issue #8836. In the interim, you can get around the problem by setting the ItemsProvider property to a new ComboBoxItemsProvider and adding items to that instead. The events are raised in this case.

Children