I'm trying to find a way to change the content of a window in WPF without having to load a new window. In most cases, the following works just fine:
dim x as new window
x.show()
me.close
Is there a way to do something like the following?
dim x as new window
me.content = x
Anonymous User
25-Sep-2013The window I used this in is being used with a barcode scanner. We have a handful of item types that can be scanned with a different set of options and displays needed for each. Since our app is written in the MVVM pattern (Or at least... MVVM-esque ;) ) I created some XAML:
I have a search function which returns a data model based on the type of item the user scans. Based on the type, the select statement returns the property user control. I use INotifyPropertyChanged along with the scan event to get the window to update.