C# (CSharp) Spinnaker.Sample.WinForms.ViewModels Namespace

Classes

Name Description
Customer Represents a customer in the sample application. Since we intend to use each Customer in the view, we implement INotifyPropertyChanged so that our view can bind to Customer's properties. Even though we have lots of customers in our application, each of them is its own view model. In a real application, this Customer view model might be backed by a persistent business object that is loaded and saved with a database or fetched and stored from web services. Or you might implement INotifyPropertyChanged on that real business object itself without an intermediate "view model" representation of it.
CustomersViewModel This view model is a bindable collection of Customers. It is simply responsible for loading and exposing a collection of Customers which are also view models themselves. In a real application, this view model make queries against an application's data layer to load its Customers.
RealtimeViewModel This view model demonstrates changing values in the GUI continuously. For performance reasons, it uses a GUI timer (Timer on Windows and NSTimer on Mac) rather than a background thread, but threads are also safe to use in Spinnaker.
SimpleFormViewModel This is a trivially simple view model that exposes a string property and an integer property. It is used simply to show round-tripping values from the GUI to managed code and back to the GUI.
SplashViewModel This is the root view model of the sample application. Notice that it contains several child view models of its own, all of which can be bound to in the GUI. This view model primarily manages the navigation of the sample application, exposing the concept of a "current page" that the user is on and reacting to user requests to change the current page. This concept of "pages" within the sample application is not something inherent to Spinnaker - it is simply one optional way of binding things within a GUI. Actual navigation within the GUI is accomplished by binding the visibility of sections of the GUI to this view model's "CurrentPage" property.