How to refresh list box using MVVM?

Asked By 0 points N/A Posted on -

I’m using Project A to transfer the information from Project B. The “XAML” of Project B can be viewed through Project A.

Then, I made some updates on Project B.

I want to refresh the list box on the Project A using MVVM.

Can anyone help me on how to do that?

Answered By 0 points N/A #105962

How to refresh list box using MVVM?



There are two different ways to refresh the list box using MVVM.

The program code will be like this

Dynamically refresh:

:BoxItemContainerStyle="{DynamicResource ListBoxItemStyle1}"

ItemsSource="{Binding Authors, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"


Manually refresh:

<ListBoxx:Name="lstFruitBasketLeft"ItemsSource="{Binding FruitBasket}"

     SelectedItem="{Binding SelectedFruit, Mode=TwoWay}" Width="150">





            <TextBlockText="{Binding Name}"/>


            <TextBlockText="{Binding Quantity}"/>




These are just example. Might be little different from your program code.

You need to re organize it as your own method.

But the main themes of refresh the list box using MVVM will be remain same.

So I think this will be helpful to you.

Login/Register to Answer

Related Questions