Note that there are some explanatory texts on larger screens.

plurals
  1. POComponentOne Combobox Interactions MVVM
    text
    copied!<p>I am working with ComponentOne WPF Controls with MVVM Pattern.</p> <p>I have the following in my ViewModel:</p> <pre><code> public ICommand ClientsEnter { get { if (this.m_ClientsEnter == null) { this.m_ClientsEnter = new DelegateCommand&lt;string&gt;(ClientsLostFocusExecute, ClientsLostFocusCanExecute); } return m_ClientsEnter; } } </code></pre> <p>And an observable collection :</p> <pre><code> public ObservableCollection&lt;Client&gt; Clients { get { return m_Clients; } set { m_Clients = value; RaisePropertyChanged("Clients"); } } </code></pre> <p>in Xaml I have Added A ComponentOne Combo Box where I can enter <code>ClientName</code> Or <code>ID</code> and press enter to fire Event to execute <code>ClientsEnter</code> Command:</p> <pre><code>&lt;Custom1:C1ComboBox Grid.Row="2" Grid.Column="1" Height="24" Name="cmbClients" HorizontalAlignment="Left" VerticalAlignment="Center" ItemsSource="{Binding Clients, Mode=OneWay}" SelectedValuePath="ClientID" DisplayMemberPath="NameE" IsEditable="True" Text="Enter Client Name Or ID" SelectedValue="{Binding Path=Filter.ClientID, Mode=TwoWay}" MinWidth="150" Margin="0,2" Width="189"&gt; &lt;i:Interaction.Triggers&gt; &lt;ei:KeyTrigger Key="Tab" FiredOn="KeyUp" ActiveOnFocus="True" SourceName="cmbClients"&gt; &lt;i:InvokeCommandAction Command="{Binding ClientsEnter, Mode=OneWay}" CommandParameter="{Binding Text,ElementName=cmbClients}" CommandName="KeyDown"/&gt; &lt;/ei:KeyTrigger&gt; &lt;/i:Interaction.Triggers&gt; &lt;/Custom1:C1ComboBox&gt; </code></pre> <p>I need to know why it doesn't work, after pressing enter the <code>clientID</code> Disappears and nothing happens. Even the <code>text="Enter Client Name Or ID"</code> doesn't appear! Any ideas?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload