Skip to main content

Questions tagged [observablecollection]

ObservableCollection is a .NET collection class that sends event notifications when items are added, removed, replaced, moved, or reordered in the collection, or when the entire contents of the collection are replaced.

observablecollection
0 votes
0 answers
48 views

Change Lists/ObservableCollection in one DataGrid

I want to display a List/ObservableCollection in a DataGrid in a WPF application. At the push of a button, a different list should be displayed, but it is a list of a different data type. It works ...
Wirthi's user avatar
  • 1
1 vote
1 answer
91 views

App Crash when run on the device itself, but when it is connected to the debug mode works fine

I'm developing an app to handle an inventory for Android, when it run on the device itselft crash (i'm ussing a Samsung S 20+ and A 21S, but if it is connected to the visual studio on debug mode it ...
user23832646's user avatar
0 votes
1 answer
39 views

ObservableCollection stopped updating consistently with WPF Listbox

I am using WPF and have a Listbox that I have bound in the code behind to an ObservableCollection. It is displayed in multiple views and has worked perfectly (adding/removing, & staying in sync ...
ZadiusC's user avatar
  • 11
-2 votes
1 answer
65 views

Filtering an Observable Collection in WPF MVVM via ICollectionView [closed]

I have an observabelCollection of a data object: public ObservableCollection<GistViewModel> Gists { get => gists; set => SetProperty(ref gists, value); } Each GistViewModel has the ...
stigzler's user avatar
  • 957
0 votes
1 answer
99 views

How can I get CollectionView.SelectedItems from the ViewModel

I want to get the selected items from CollectionView in the view model. I have tried binding the SelectedItems to a property of type ObservableCollection in the view model and I set the Mode to TwoWay,...
Hossam Fares's user avatar
1 vote
1 answer
86 views

My ObservableCollection<T> in a view model file cannot be seen by other files

I have a view model class in a folder called ViewModel. The file is called PgViewMode.cs and looks like this: using CommunityToolkit.Mvvm.ComponentModel; using LockAndKeyMaui.Models; using ...
Bob Gatto's user avatar
2 votes
1 answer
66 views

What could go wrong? I removed BlockReentrancy() from ObservableCollection<T>'s OnCollectionChanged()

My current project revolves around reading, modifying and writing a byte collection. I'm observing changes to the collection by using an ObservableCollection<byte> and subscribing to its ...
toogeneric's user avatar
1 vote
1 answer
72 views

ListView Not Displaying ObservableProperty Binding from ViewModel

I am new to .NET MAUI/MVVM/SQLite, and C# for that matter. I am trying to utilize my ViewModel to bind data from my model class. I can use the model namespace as my binding property just fine, and it ...
Brett Simonds's user avatar
1 vote
3 answers
36 views

WPF binding to DataGrid works partially column headers are generated but items don't get listed

I am building an app in mvvm style and object factory as for background I am in study so pretty new. Upfront sorry cause of my study parts of the code got written in German. Problem I try to bind an ...
FlorianD's user avatar
0 votes
1 answer
147 views

MAUI: Issue with deleteing the last item from ObservableCollection

I am using an 'ObservableCollection' saving comments. When I delete a comment, I will fetch the deleted comment id and delete that comment from the 'ObservableCollection'. My Problem is if I delete ...
Matthew Pans's user avatar
0 votes
1 answer
108 views

Remove an item from a continuously updating collection in Net Maui

I have a method in a viewmodel that updates an observablecollection (Indicators) every time data is sent from the Binance Api. However, if I remove the last item from that list (pressing a button on ...
Andrei Popa's user avatar
0 votes
0 answers
50 views

How to properly bind an ObservableCollection inside an ObservableCollection to an ItemsControl (WPF)

Before I start with the explanation of the problem, I am new to WPF and I still did not grasp every concept behind the MVVM pattern. I have an ObservableCollection<Vertex>, where Vertex is a ...
DDDloae's user avatar
1 vote
1 answer
172 views

Maui windows application Label text not updating in UI

My purpose is to update ping status on UI. I am using MVVM pattern in MAUI desktop application. In MainPage.xaml.cs namespace MauiSampleApp { public partial class MainPage : ContentPage { ...
HAC's user avatar
  • 11
0 votes
1 answer
69 views

Arrange CollectionView items consecutively

Using MVVM, I have a simple CollectionView: <CollectionView ItemsSource="{Binding Items}" VerticalOptions="FillAndExpand"> <CollectionView.ItemTemplate> <...
osama alqaisi's user avatar
1 vote
1 answer
172 views

Is it possible to bind an Array in a Collectionview with ObservableCollection?

I'm new here and new as .Net Maui Developer. I work with an API and receive my data to be processed via a GET request. The data I receive consists of receipts that contain a varying number of item ...
HeisenbergsMeth's user avatar

15 30 50 per page
1
2 3 4 5
193