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...
Seems like there should be an easy one-liner here:
Within my ObservableCollection derived class I binary serialize it to disk:
binFormatter.Serialize(stream, this);
How do I deserialize to my this object reference:
This does not work:
this = binFormatter.Deserialize(stream) as MyAwesomeData;
Do I need to Clear the collection and add....
So I've created a series of objects that interact with a piece of hardware over a serial port. There is a thread running monitoring the serial port, and if the state of the hardware changes it updates properties in my objects. I'm using observable collections, and INotifyPropertyChanged.
I've built a UI in WPF and it works great, show...
the web site says you can in .NET 4.0
I cant seem to do it though, what assesmbly references and xmlns' do i need
the following does not work
xmlns:coll="clr-namespace:System.Collections.ObjectModel;assembly=mscorlib"
<coll:ObservableCollection x:TypeArguments="x:Object">
<MenuItem Command="ApplicationCommands.Cut"/>
<MenuIte...
Hi there,
I've got a question about a Silverlight WCF Databinding pattern:
There are many examples about how to bind data using {Binding} expressions in XAML, how to make async calls to a WCF service, set the DataContext property of a element in the UI, how to use ObservableCollections and INotifyPropertyChanged, INotifyCollectionChang...
Hi,
I've got combo box bound to a custom collection type - its basically an overridden ObservableCollection which I've added a facility to update the underlying collection (via Unity).
I don't want to confuse the issue too much, but thats the background.
My xaml looks like this
<ComboBox ItemsSource="{Binding Manufacturers}" DisplayM...
In my code I subscribe to an event that happens on a different thread. Every time this event happens, I receive an string that is posted to the observable collection:
Dispatcher currentDispatcher = Dispatcher.CurrentDispatcher;
var SerialLog = new ObservableCollection<string>();
private void hitStation_RawCommandSent(object...
Hi All,
I have a observable collection of viewmodel objects. How can I subscribe to the Property Changed event of each view model in my collection as they are created and track which ones have been changed, so that I can updated them to my database.
...
I need to use functionality that ObservableCollection provides, in my asp.net app. My only concern is that this class is a part of WindowsBase assembly and I'm not sure if it's a good idea to include a windows assembly in a web project.
Any ideas/comments?
Thanks!
...
Hi,
If i have a ListView (called "MainList") and want to bind to elements in a collection, how is this done.
Main.Items.Add(new ObserableCollection() { "hello", "world" }
then
Why doesnt this work? Ive tried loads of other combinations of bindings as well....
Thanks
U.
...
I'm creating an WPF application using the MVVM framework, and I've adopted several features from Josh Smith's article on MVVM here...
Most importantly, I'm binding a TabControl to an ObservableCollection of ViewModels. This means that am using a tabbed MDI interface that displays a UserControl as the content of a TabItem. The issue I...
I have a control
class DragGrid : Grid
{
...
}
which inherits from the original grid and enables dragging and resizing its child elements.
I need to bind a custom DP named WorkItemsProperty to an observable collection of type WorkItem (implements INotifyPropertyChanged). Each element in the grid is bound to a collection item....
I know I am missing something obvious but I can't seem to implement ObservableCollection in my class below. IE it won't show up in intellsense. Can someone please let me know what I am missing.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using System.Collections.Object...
I have user control in which I have placed a Listview and Richtext box control.
ListView is binded to my custom collection.
Below the listview I placed a richtext box in which I want to display my custom text. The custom text is created from the custom collection.
I want to recreate the custom text whenever any thing change in my cus...
I have an ObservableCollection bound to a list box and a boolean property bound to a button. I then defined two converters, one that operates on the collection and the other operates on the boolean property. Whenever I modify the boolean property, the converter's Convert method is called, where as the same is not called if I modify the o...
Hi,
I am working on wpf propertygrid(PG) control and I want the PG to support collection type(IList, ObservableCollection etc.) properties. I am bit confused on how to keep track of selected item(of that collection) and pass that to client.
Any ideas?
If the solution makes use of the Open Source WPF PropertyGrid (http://www.codeplex.c...
I'm trying to update my Silverlight 4 UI approx every 1/2 second with new data. I've hooked into a WCF service using net.tcp binding and issuing callbacks from the server. To make sure I get the data from the service as quickly as possible I've started up my proxy on a backround worker inside of my Silverlight App.
My question is, how...
I am learning vb.net, wpf and xaml with the help of sites like this one.
The project I am currently working on is a 4 x 4 slide puzzle.
I cannot get the buttons in the grid to scramble to start a new game when calling a new game event.
Any help will be greatly appreciated.
If no answer is can be provide, a good resource to research woul...
In the model, I have:
public ObservableCollection<Item> Items { get; private set; }
In the ViewModel, I have a corresponding list of ItemViewModels. I would like this list to be two-way bound to the model's list:
public ObservableCollection<ItemViewModel> ItemViewModels ...
In the XAML, I will bind (in this case a TreeView) to the...
How do I assign a observableCollection<T> into a EntitySet<T> ?
...