Questions tagged [itemsource]
134 questions
0
votes
0 answers
ComboBox MVVM Binding WPF
The selected item of my ComboBox only show the path of my item not the content.
How can I fix that?
Here is the code:
ViewModel
class GrundViewModel : BaseViewModel
{
private ObservableCollection _people;
public…

Tim W.
- 1
- 1
0
votes
1 answer
WPF - ItemControl with DataGrids - How can I change the background color of a row from the Model [MVVM]
I have an item control that will populate datagrids with data from an ObservableCollection TrayTypesDataGrids
private ObservableCollection trayTypesDataGrids;
public class TrayTypeDataGrid : ViewModelBase
{
private…

ehtio
- 179
- 3
- 11
0
votes
1 answer
How to have custom SubMenus in a MenuItem where an ItemSource and ItemContainer are being used?
I am writing a C# application using WFP and the MVVM pattern.
In my view, I have a TreeView and each Item in that Tree View has its own Context Menu displayed when the user right clicks. The behavior I want a SubMenu within the Context Menu's Menu…

sdub0800
- 139
- 1
- 9
0
votes
2 answers
Issue when dynamically binding to a datagrid
OK I have a weird little issue I hope someone can help me with.
To set the scene, I first of all have an object:
public class Date
{
public DateTime _WeekDate;
public ICollectionView _WeekData;
}
I have a combobox which displays a list of…

SumGuy
- 491
- 5
- 8
- 22
0
votes
1 answer
How can i add ContentPages to a Tabbedpage programatically in ViewModel in Xamarin Forms
So, I am trying to build a Xamarin Forms Application where I have a tabbedPage which has n-Amount of ContentPages included.
My TabbedPage looks like this below:

Ändres
- 3
- 1
0
votes
1 answer
AddingItemEvent not adding the item to the ItemSource c#
I created a pretty straight forward desktop application with WPF and net6.0. The application contains a DataGrid with the following XAML code:

Zuhlek
- 3
- 3
0
votes
1 answer
Trigger/Set a style for a specific Row in a datagrid
I have made a table using a DataGrid with List as its ItemsSource binding. I currently want to change the row styling of my 'Calculation Functions' tab ONLY. I want to be able to set it so that any row in 'Calculation Functions' has the Foreground…

bigboy
- 35
- 5
0
votes
1 answer
Xamarin Forms - Make custom cell bind to original listview itemsource when calling event "ItemSelected"
I have searched around and I dont think I am finding the answer to my question. I am new to xamarin so i hope I am using the correct terminology. I am experimenting with custom cells in listviews. My aim is to reuse the custom cell throughout…

Tanya
- 15
- 5
0
votes
0 answers
How do I set custom positions for user controls in an itemtemplate in WPF?
This is a follow-up question to my previous question regarding dependency properties.
I have a custom user control that acts as a Status Indicator for an HMI view (a few concentric circles that have different colours depending on some PLC state…

mooreppj
- 23
- 4
0
votes
1 answer
WPF ItemSource returns null
I have a named class
public class testClass
{
public testClass(string showCode, string urn)
{
ShowCode = showCode;
URN = urn;
}
public string ShowCode { get; set; }
public string URN { get; set; }
}
I create an…

ninety
- 3
- 3
0
votes
1 answer
Populating listview from a list
With the inspiration of an example, "Listing Colors with BoxView" given in Xamarin documenation https://learn.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/boxview , I've been trying to populate my listview in the same way. However…

Gullit
- 139
- 8
0
votes
0 answers
View is not updating when Observable Collection Updates in Xamarin Forms
I am trying to update my view from RG Pop Plugin once a new item get's added from Pop Up. Although i can see the changes in Observable Collection when i am adding a new Item but the view is not getting updated according to the Observable…

anurag
- 1
- 1
0
votes
1 answer
Filling DataGrid using nested lists and dynamic columns
I have a strange data model and I'm trying to generate dynamic columns in a datagrid and bind the items correctly.
I have a list of Row objects that I want to bind to a DataGrid and display using simple DataGridTextColumn.

Ian
- 161
- 1
- 17
0
votes
1 answer
List of DataGrid Not updating
I have a list of DataGrids. I am transferring from my list of DataTables (of selected index ) into List of DataGrids. In code, I can monitor that itemsource gets transferred Datatable but, it is not visible on the window screen.
Here is my…

Hasan Hassan
- 13
- 4
0
votes
0 answers
Itemsource is not updating (wpf,c#)
i have a problem with reading a changed Value:
Binding in XAML:
Text="{Binding Path=Infotext,Mode=TwoWay}"
i try to read a Value (its bound to a Textbox, Class is Ticket, ic_Tickets is a Itemscontrol with "Tickets") by:
string…

user3600403
- 339
- 1
- 2
- 18