Your ListBox is bound to a DataSet - and hence always reflects the state of the Dataset. That's why trying to manipulate the ListBox items directly leads to a conflict, and that's what the error...
@Arjay: Cool! :thumb: As it is good practice with WPF, a declarative / XAML-only approach is always to be considered better than any solution involving code-behind... :)
Aside from just stating that normally, and in theory, the VirtualizingStackPanel approach (or, styling an existing control that is already virtualizing) should be the way to go - but with WPF, theory...
You don't need to pass your own parameter for that - in the Click event handler you assign to the buttons, you can evaluate either the 'sender' parameter, or the event arguments' 'Source' property...
You basically have two options: Either use interop for embedding an existing WinForms control like NumericUpDown into a WPF app (discouraged, complicated, tedious, unelegant), or simply reproduce the...
Probably the easiest way to accomplish this is by setting the DataGrid's ColumnHeaderStyle to a Style that sets the FontWeight accordingly. The following code shows how you could set the Style...
Hm... But I still don't understand why you wouldn't simply handle the window's Closed event? That way, you can easily keep track of any window's state.
Just wondering... What stops you from simply using a boolean status variable for keeping track of the window's state - instead of testing IsDisposed()?
I'm not sure if I fully understand your problem... But "adding an item to another TreeView without removing it from the original" boils down to first creating a copy of the existing item, and then...
Well, this is sort of obvious, since it's exactly what your code does: It creates a new Line object on every MouseMove event. I guess what you intended is to create the new line in your MouseDown...
With WPF, you don't need a separate layout manager: It is built-in. For example, it is sufficient to place your content panes inside a WrapPanel for obtain an effect similar to the one in the Flex...
This happens because in your OnPropertyChanged() implementation, you are passing null as the source object. You should pass a reference to the changed object ('this', in this case) instead:
I was about to reply something exactly along the lines of what TheCPUWizard said... I fully agree. By now, WPF is long being productively used used in more and more large-scale projects.
Yes, sure it is possible... Starting with Silverlight 2.0, the code-behind is no longer bound to be Javascript, but can be any .NET language, including VB.net.
Okay, but - the _CrtCheckMemory() call not failing here doesn't say much. You say the index is definitely within the array bounds - are you really sure? I'd start by having a look at where and how...
Who said that? I mean, what makes you think so? There are even scenarios where managed .NET code can execute faster than native code - for example, due to just-in-time compiling for the actual target...
Hm, what exactly are you having problems with? The source code can be downloaded as a tar.gz archive from here, and everything is explained in the Getting Started docs for developers.