Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7969693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:16:38+00:00 2026-06-04T07:16:38+00:00

I am having a problem with a custom ComboxBox firing events. The idea is

  • 0

I am having a problem with a custom ComboxBox firing events. The idea is to have the combobox bound to a collection of items with an Edit and Delete button in-line with each item. I can make the click event work using code-behind, but the command binding seems to do nothing.

    <ComboBox SelectedIndex="0">
                <ComboBox.ItemTemplate>
                    <DataTemplate>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="200"/>
                                <ColumnDefinition Width="auto"/>
                            </Grid.ColumnDefinitions>
                        <TextBlock Text="{Binding Name}"/>
                            <StackPanel Grid.Column="1" 
                                        Orientation="Horizontal"
                                        HorizontalAlignment="Right">
                                <Button Content="Edit" 
                                        Margin="0,0,5,0" 
                                        Command="{Binding EditConnectionCommand}"
                                        CommandParameter="{Binding ID}"/>
                                <Button Content="Delete"
                                        Command="{Binding DeleteConnectionCommand}"
                                        CommandParameter="{Binding ID}"/>
                            </StackPanel>
                        </Grid>
                    </DataTemplate>
                </ComboBox.ItemTemplate>
                <ComboBox.ItemsSource>
                    <CompositeCollection>
                        <ComboBoxItem IsEnabled="False" Visibility="Collapsed">Select a database connection...</ComboBoxItem>
                        <CollectionContainer Collection="{Binding Source={StaticResource ConnectionsBridge}}" />
                        <ComboBoxItem>...New Connection...</ComboBoxItem>
                    </CompositeCollection>
                </ComboBox.ItemsSource>
            </ComboBox>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T07:16:39+00:00Added an answer on June 4, 2026 at 7:16 am

    Your binding looks for the commands in the items, not in the ViewModel of the window.
    To change this, fix your binding like this:

    {Binding ElementName=root, Path=DataContext.EditConnectionCommand}
    

    For this to work, you need to add Name="root" to your UserControl or Window.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having a problem where my button click event is still firing even
I'm having a problem creating a new CompositeControl. Currently I have a custom control
I'm having a problem using custom components at runtime. I have this custom FlowLayoutPanel
I´m having a problem with my Android Project. I have a screen filling custom
I'm having a problem. I have a Custom UITableViewCel, the cell contains a slider
I have a custom Jabber IM client and I'm having a problem with links.
I have having a problem logging into my existing app with custom authorization. When
I'm having a problem when I try to change a UINavigationBar's back button custom
I’m having some problems with validation. I have created a custom validator called RequiredFieldRule
I'm having problem when running my Windows Forms program. In the program, I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.