Questions tagged [itemsource]

134 questions
0
votes
1 answer

Xamarin set ItemSources to a List in a different dll

I have a project for Xamarin. I have my logic in a GameBrain.dll (a normal C# dll I share with a WPF project) and in there I have a public static List Puzzles Then I have the Xamarin forms project where I have my view that looks like…
javirs
  • 1,049
  • 26
  • 52
0
votes
0 answers

Prevent duplicates in datagrid when databound

after some testing I came with this way to handle my datagrid. dgVariedad_CellEditEnding use the function nombreVariedadDisponible(txtBoxTemporal.Text) to check if the new value already exist in List variedades and it works. The problem is…
hivegu
  • 11
  • 1
0
votes
0 answers

Pure XAML for Menu with ObservableCollection?

This is my ViewModel: public ObservableCollection Persons; class Person { public string FirstName { get; set; } public string LastName { get; set; } public DateTime DateOfBirth { get; set; } } And i want to create menu with all…
falukky
  • 1,099
  • 2
  • 14
  • 34
0
votes
1 answer

Silverlight, getting ItemSource data from data template programmatically

I've got an ItemsControl with an ItemsSource of Hours. I represent each item by a border (in the data template). Now, each of those border has an hour data, and i want to retrieve that in code behind. is it even possible? my code…
Notter
  • 588
  • 4
  • 16
0
votes
1 answer

NavigationViewMenu not considering its MenuItemsSource

Sample : link I'm developing an application that allows people to save notes, and create categories in which you can store your notes. Categories are listed in a List, and an ObservableCollection, because I had a problem, trying to serialize a List…
0
votes
1 answer

How to update a listview from viewmodel binded model observable collection to itemsource

I have a list view, which further contains textbox in datatemplate having columns Name, Address, Country. Now this listview's Itemsource is binded to observable collection of a model in my viewmodel class. I am updating the ObjModel (of…
0
votes
1 answer

Disable selection of specific item in DatagridComboBox

Background: I have a Datagrid with some Measurements and this Measurements we can Approve and Block. Now we have for this a new Type, like "Cancelled". But this Type is only needed by Server and for displaying it to Customer. But the Customer should…
Osti
  • 43
  • 6
0
votes
1 answer

uwp gridview item source not even executing

I am using the new preview sdk 16190 of creators fall update as described in BUILD 2017. I was binding a gridview in MVVM mode but it wasn't working so I simplified it to direct code behind to know the real problem and I even used a break point, it…
Muhammad Touseef
  • 4,357
  • 4
  • 31
  • 75
0
votes
1 answer

How to update list view from another class in Xamarin forms?

I have created a list view in one class and called delete method from another class. Listview getting call but not updating list view if i call from another class. But its getting update when i call inside the same class. How to solve this issue?…
Jeni
  • 527
  • 4
  • 8
0
votes
0 answers

Parameterized Query OR Control

I want to be able to use a QueryString parameter with a control parameter in an OR Clause on the ASPX page. The below works for QueryString Parameter Select * From Data1 WHERE ([Customer Name] = @C) AND ([Order Number] = @O) AND ('AD\' +…
0
votes
1 answer

TreeViewItem.ItemContainerGenerator return null after change ItemsSource

In TreeViewItem_OnExpanded event I have below codes. var expandedTreeViewItem = e.OriginalSource as TreeViewItem; var child = expandedTreeViewItem.ItemContainerGenerator.ContainerFromItem(item) as TreeViewItem; expandedTreeViewItem.ItemsSource = //…
Parham.D
  • 1,158
  • 2
  • 12
  • 31
0
votes
2 answers

How to update source of WPF ListView?

I have a WPF ListView to wich I bind my collection. Properties of the objects in this collection are changed in a background thread. I need to update ListView when properties are changed. SourceUpdated event is not fired when I change some object's…
brain_pusher
  • 1,507
  • 3
  • 21
  • 31
0
votes
2 answers

Why DisplayMemeberPath doesn't accept a standard property?

I am binding a List of object to a ComboBox. Where code behind looks like this: List myFriends = new List() { new Person("Jack", "Daniels", 8), new Person("Milla",…
Vitalij
  • 4,587
  • 9
  • 42
  • 65
0
votes
1 answer

WPF: Dynamically created line does not appear at defined position

I have a class that records the startpoint and endpoint of a line. The elements of this class are added to an Observable Collection, which serves as the ItemsSource of my ItemsControl. Here is the relevant part of the XAML:
oneManArmin
  • 606
  • 6
  • 24
0
votes
1 answer

How update a list in a foreach

I have a foreach of a List and i want to Update the list or (i don´t know wich is better) create a new one with the new values. How to do this ? My code is bigger than this because i am decrypting, but if help me with this simple, will fix the…
Mcfer
  • 194
  • 1
  • 4
  • 15
1 2 3
8 9