0
 <ListView x:Name="lvPayload" Grid.Row="1" ItemsSource="{Binding Payload}" HorizontalAlignment="Center" VerticalAlignment="Center">
                                <ListView.ItemTemplate>
                                    <DataTemplate>
                                        <TextBox Text="{Binding Value, StringFormat=0x{0:x2}, Mode=OneWay, Converter={StaticResource hexConverter}}" FontSize="15" Margin="2,1,2,1" MinWidth="25" MinHeight="20" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                                    </DataTemplate>
                                </ListView.ItemTemplate>
                                <ListView.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <WrapPanel Orientation="Horizontal" VerticalAlignment="Center"></WrapPanel>
                                    </ItemsPanelTemplate>
                                </ListView.ItemsPanel>
                            </ListView>

I have that OneWay binding mode set on the TextBox.Text property. It's clear that the collection behind will not be updated. But anyway i didn't set this as a TextBox with no reason. I still want to make some changes and i don't want them to be reflected in the original collection but elsewhere. I don't know if i can accomplish that, can someone give me a hint for this ? And after the eventual modifications, if i iterate through the Items of the list, i will get back the values from the original collection, the ones not modified and i just need the new values.

1 Answer 1

1

You're going to have to create your own custom binding for this (your own class inheriting from Binding class and overriding the set operation)

It's quite a large topic onto itself, and your implementation will vary according to the requirements you have for the set target, but that's the place to start.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.