itemsource

ItemSource vs Datacontext in wpf.

Can any one give me the difference between Itemsource and DataContext of Listview in WPF? With example ...

How do I insert ToolBar separators when binding ItemSource

I am binding a ToolBar to a collection of command view model objects. The objects in the collection have a property IsSeparator that when true I would like represented with a <Separator/> in the ToolBar. My basic markup looks like this: <ToolBar Grid.Row="1" ItemsSource="{Binding Path=ToolBarCommands}"> <ToolBar.ItemTemplate> ...

[C#/WPF] Combo box Item source = ObservableCollection & I need a '-None-' dummy entry at the top

I have a combo box using an observable collection as a datasource and I want a "dummy" value of "None" as the first item in the box as it controls filters against other data sources. Other databound objects also use the same observable collection so adding a "None" value directly to the datasource is not possible as I dont want, for exa...

WPF Data-Bound Datagrid Filtering / Searching

Hi guys, I have a WPF application which uses a (currently) local database to act as a binding source. Using the Visual Studio 2010 tools I have a LINQ-SQL model which acts as the Datacontext for most forms. What I have is a UserControl with a TextBox and Datagrid. The datagrid ItemSource is set upon the UserControl.Loaded event with a ...

binding combox in wpf datagrid

I have a list that I populate in the init of my viewmodel: ListOfEmployees = new List<EmployeeBO>(employeeRepository.GetEmployees(true, true)); I am trying to get a combobox in a datagrid to populate from this list. <DataGridTemplateColumn Header="U/M" MinWidth="145"> <DataGridTemplateColumn.CellEditingTemplate> <DataTemplate> ...

WPF Datagrid: Rowfilter for Lists/Collections

I recently migrated all my Datatables to List(Of), and bind it using .ItemSource. This works perfectly, but I run into a problem. Previously, I could filter the rows with SQL-like statements like this: Dim dk As DataView dk = DataGrid1.ItemsSource dk.RowFilter = "ID > 10" Now that I am using List(Of), i cannot use the rowfilter proper...