Hello,
Based on your ChangeValue method, you need to update the items in the CollectionView, please move your statusColor
, isOn
property to your IPAddressModel
and add [ObservableProperty]
like following code.
public partial class IPAddressModel: ObservableObject
{
[ObservableProperty]
private string? address;
[ObservableProperty]
private string? isOn;
[ObservableProperty]
private string? statusColor;
}
After that, you can control the statusColor and isOn value for each item at the runtime. If you add the statusColor and isOn property in the ViewModel, it will change the all the items' content.
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.