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

  • Home
  • SEARCH
  • 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 7557945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T12:15:54+00:00 2026-05-30T12:15:54+00:00

<ItemsControl ItemsSource={Binding ExportFormat, UpdateSourceTrigger=PropertyChanged} Grid.Column=1> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <StackPanel Orientation=Horizontal/> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <ItemsControl.ItemTemplate> <DataTemplate> <Button

  • 0
<ItemsControl ItemsSource="{Binding ExportFormat, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1">
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel Orientation="Horizontal"/>
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <Button Content="{Binding}" Margin="5" Height="50" Width="70" Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, Path=DataContext.setExportFormat, UpdateSourceTrigger=PropertyChanged}" CommandParameter="{Binding}"></Button>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>

So i have that code in my xaml and the button gets filed with a list of string. Depending on what the users chooses on previous Usercontrol that item will be filed with differents items. The problem is if the user select one option at the first run the button will be filled correctly but if the user go back and select the other option the control doenst update and shows the same as before..
My english is not the best but i think i could made me understand! Any idea?!
PS: the bindind on Button is to a readOnly property so i cant define it to Mode=”TwoWay”.. i took a look on the debug and the property ExportFormat gets updates with the new items but the usercontrol still displays the first option!!

Sincerely Rui Nunes

  • 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-30T12:15:55+00:00Added an answer on May 30, 2026 at 12:15 pm

    You didn’t provide code-behind so I’m gonna take a few shots in the dark here:

    • The ExportFormatcollection is not an ObservableCollection (or more generally, doesn’t implement INotifyCollectionChanged).

    • If it actually is an ObservableCollection, you assign it directly, instead of clearing its items and adding the new ones. example:

      ExportFormat = MyNewObsCollection; //Bad

    ExportFormat.Clear();

    foreach(var newItem in myNewObsCollection)
    {
       ExportFormat.Add(newItem); //Good
    }
    

    Side note: ExportFormat should be readonly

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

Sidebar

Related Questions

I'm using MVVM. <ItemsControl ItemsSource={Binding AllIcons} Tag={Binding}> <ItemsControl.ItemTemplate> <DataTemplate> <StackPanel> <Label HorizontalAlignment=Right>x</Label> <Image Source={Binding
I'm using dataTemplate . This is the template: <ItemsControl ItemsSource={Binding RAM.Partitions}> <ItemsControl.ItemTemplate> <DataTemplate> <Grid>
I have an ItemsControl like the following <ItemsControl ItemsSource={Binding MyClass.Links} > <ItemsControl.ItemTemplate> <DataTemplate> <Grid
I'm trying to databind to this ItemsControl : <ItemsControl ItemsSource={Binding Path=Nodes, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}> <ItemsControl.ItemsPanel>
Why won't this support horizontal scrolling? <ScrollViewer> <ItemsControl ItemsSource={Binding Territories} HorizontalAlignment=Left> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <VirtualizingStackPanel
I have the following code currently: <DataTemplate DataType={x:Type vm:SectionViewModel}> <ScrollViewer> <ItemsControl ItemsSource={Binding ViewModels}> </ItemsControl>
I have tried this: <DataTemplate x:Key=RowItemTemplate> <ItemsControl ItemTemplate={StaticResource ResourceKey=BorderItemTemplate} ItemsSource=ContentPresenter.Content> </ItemsControl> </DataTemplate> and it
I'm generating a List of TextBoxes within an ItemsControl like so : <ItemsControl ItemsSource={Binding
I am trying to access a Grid inside the DataTemplate while the ItemsControl is
I am binding the ItemsSource of an ItemsControl to a Textbox and then using

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.