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 761241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T15:48:52+00:00 2026-05-14T15:48:52+00:00

<ItemsControl Margin=0,16 ItemsSource={Binding}> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <StackPanel /> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> <DataTemplate> <StackPanel Orientation=Horizontal Margin=8,0,8,18>

  • 0
<ItemsControl Margin="0,16" ItemsSource="{Binding}">
        <ItemsControl.ItemsPanel>
            <ItemsPanelTemplate>
                <StackPanel />
            </ItemsPanelTemplate>
        </ItemsControl.ItemsPanel>

        <ItemsControl.ItemTemplate>
            <DataTemplate>
                <StackPanel Orientation="Horizontal" Margin="8,0,8,18">
                    <Image Height="6" Source="MultiSelectorTick.png" Stretch="Fill" Width="4"/>
                    <TextBlock Foreground="{Binding Path=IsSelected, Converter={StaticResource ResourceKey=selectionConverter}}" 
                        Text="{Binding DisplayName, FallbackValue=Not Specified}" Margin="4,0,0,0" FontSize="13.333" >
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="MouseLeftButtonDown">
                            <MC_Windows:ExecuteCommandAction TargetCommand="ToggleExecuted"/>
                        </i:EventTrigger>
                    </i:Interaction.Triggers>
                    </TextBlock>
                </StackPanel>
            </DataTemplate>
        </ItemsControl.ItemTemplate>
    </ItemsControl>

datasource of an ObservableCollection where filter is defined here:

private ICommand toggleExecuted;
    public ICommand ToggleExecuted
    {
        get
        {
            if (this.toggleExecuted == null)
                this.toggleExecuted = new RelayCommand(
                    e => { this.IsSelected = !this.IsSelected; });
            return toggleExecuted;
        }
    }

    public bool IsSelected
    {
        get { return this.isSelected; }
        set
        {
            this.isSelected = value;
            this.OnPropertyChanged("IsSelected");
        }
    }

When the mouseleftdown event fires it calls the command (which works I set a breakpoint). As you can see it is updating the IsSelected state. However, the interface doesn’t appear to be updating.

  • 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-05-14T15:48:52+00:00Added an answer on May 14, 2026 at 3:48 pm

    I moved the execution into the base control and it worked.

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

Sidebar

Related Questions

I have the following ItemTemplate: <ItemsControl ItemsSource={Binding Topics}> <ItemsControl.ItemTemplate> <DataTemplate> <StackPanel Orientation=Horizontal Margin=10,0> <TextBlock
Why won't this support horizontal scrolling? <ScrollViewer> <ItemsControl ItemsSource={Binding Territories} HorizontalAlignment=Left> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <VirtualizingStackPanel
<ItemsControl DockPanel.Dock=Top ItemsSource={Binding Path={x:Static vmc:clsPersonViewModel.ChildrenPath}, Mode=OneWay}> <ItemsControl.ItemTemplate> <DataTemplate DataType={x:Type vmc:clsPersonViewModel}> <TextBlock Text={Binding Path={x:Static vmc:clsPersonViewModel.TrimPath}}
I have an <ItemsControl> with a custom <DataTemplate> (and also a custom <ItemsPanelTemplate> that
I have the following structure in XAML: <Grid> <ItemsControl x:Name=Items ItemsSource={Binding Path=Pages} Grid.Row=0 Grid.Column=0>
I have a treeview with checkboxes for each item using a DataTemplate. <TreeView ItemsSource={Binding}>
can someone give the C# equivalent of this xamle code? <ListBox Width=400 Margin=10 ItemsSource={Binding
I have an ItemsControl whose ItemsSource gets bound to an ObservableCollection<Component> at run time.
I have a list of States in an ItemsControl, the DataTemplate is a CheckBox.
I have a WPF ItemsControl with a Canvas ItemPanel. Drawing from an internal source,

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.