2,898 questions
1
vote
2
answers
117
views
.NET MAUI [ObservableProperty] decimal shows fixed decimals in UI — need fully dynamic decimal places (0–10)
I'm building a .NET MAUI app using the CommunityToolkit.Mvvm [ObservableProperty] attribute for data binding.
Example:
[ObservableProperty]
public decimal _count;
Setting the value:
decimal count = 2;...
-1
votes
1
answer
70
views
.net MAUI System.Runtime.InteropServices.COMException when adding data to ObservableCollection
I have a class, that represents a line in a table, as:
public class TeamListModel
{
public uint TeamId {get;set;}
public string TeamName {get;set;}
public string NamesOfPlayers {get;...
1
vote
1
answer
121
views
MAUI CollectionView Selected style only works on first item
I'm using an example from Configure CollectionView item selection in my app, but the background color only changes when the first item in the observable collection is selected.
First Item selected:
...
2
votes
1
answer
129
views
MAUI ObservableCollection not triggering Converter
I have an ObservableCollection of strings:
public ObservableCollection<string> ChallengePartImageURLs { get; } = new ObservableCollection<string>();
Being populated/updated like this:
...
0
votes
1
answer
67
views
MAUI Grouped ListView Remove Item Causes Error when more than one Group item exists
I have a Grouped List in C# MAUI MVVC, destination is Andoid
public class GroupData : ObservableCollection<DetailData>
{
public string Name { get; private set; }
public GroupData(string ...
5
votes
3
answers
204
views
Is there a simpler way to have an ObservableCollection that can be modified only from within the same class?
Often I need a read-only ObservableCollection (so that it's reference or contents can be only modified from within this class). I need ObservableCollection because I will be binding to that property ...
0
votes
0
answers
101
views
Maui CollectionView<T> problems with SelectionMode=Single and rows display
I have a CollectionView<T> with 2 columns.
The SelectionMode=Single.
Problem :
The second column displays only a few colors names,
not all and after a selection no more color names !...
0
votes
1
answer
263
views
How to Efficiently Load Large JSON Data into ObservableCollection in .NET MAUI?
I'm working on a .NET MAUI application where I need to load a large volume of data from a JSON file and add it to an ObservableCollection. Currently, the application becomes unresponsive during this ...
0
votes
0
answers
102
views
Issue with Generic params Method in C# - Method Not Recognizing Multiple IList Parameters
Problem:
I have a method that uses generics and params to accept multiple IList parameters. However, when calling this method with multiple ObservableCollection parameters, one of the calls is not ...
0
votes
0
answers
63
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 ...
0
votes
1
answer
65
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 ...
1
vote
1
answer
120
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 ...
1
vote
1
answer
111
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 ...
0
votes
1
answer
369
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 ...
0
votes
0
answers
61
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 ...
0
votes
1
answer
73
views
Arrange CollectionView items consecutively
Using MVVM, I have a simple CollectionView:
<CollectionView ItemsSource="{Binding Items}" VerticalOptions="FillAndExpand">
<CollectionView.ItemTemplate>
<...
0
votes
2
answers
615
views
Is possibile to hide elementis from ObservableCollection? Net MAUI
I'm using MVVM and Ms Toolkit.
I'm showing a collection within a CollectionView, but I would like to hide deleted items (set by a flag on model).
This why I'm using a global "save" procedure ...
0
votes
0
answers
82
views
Display order in CollectionView in Xamarin Form
I want to display my collectionview in the below format:
Item0 Item3
Item1 Item4
Item2 Item5
But by default coillectionView displays in the below format:
Item0 Item1
Item2 Item3
Item4 Item5
...
-1
votes
1
answer
262
views
When deserializing JSON, How can I configure the concrete type used for properties declared as IList<T> to be ObservableCollection<T>?
I have some classes that model the structure I expect from my JSON file. For values that are an array in the JSON, the corresponding C# properties are declared to have the type IList<T> for ...
1
vote
0
answers
1k
views
Adding an Item to ObservableCollection is not updating CollectionView in .NET MAUI app
I found quite a few questions/answers about this here on SO but I'm confused about something. Here's one example: Observablecollection not updating list, when an item gets added
Shouldn't adding a new ...
0
votes
0
answers
63
views
ObservableCollection binded to another ObservableCollection does not fire CollectionChanged
I have ControlA hosting ControlB, both of them have DependencyProperty of type ObservableCollection, the nested control's (ControlB) property is binded to parent (ControlA) property, if something is ...
-2
votes
1
answer
120
views
ObservableCollection is not notifying to UI automatically in WPF
I'm trying to build my first app based on MVVM pattern.
I still didn't isolate the view from button click actions cause i got stuck on this issue with the ObservableCollection.
These are the classes:
...
0
votes
1
answer
80
views
Update WPF Datagrid when item is added to ObservableCollection
I can not figure this out to save my life.
I have a simple WPF form where I enter data in a text box, the user can click insert and it saves to the database. I also have a datagrid that is showing ...
1
vote
1
answer
227
views
PowerShell Observable Collection Event
I am trying to register the PropertyChanged event for an Observable Collection in PowerShell, but no dice. This works just fine for the CollectionChanged event.
This works:
Register-ObjectEvent -...
0
votes
1
answer
35
views
Application not being redrawn after collection changed
I'm trying to recreate the File Explorer using WPF and MVVM. I got a TreeView and ListBox, both of which work properly, as long as the only thing I do is browse through the folders. As soon as I try ...