using System; using System.Collections.Generic; using System.Linq; using System.Text; using Apex.MVVM; using System.Collections.ObjectModel; namespace ControlsSample { /// <summary> /// The main view model. /// </summary> public class MainViewModel : ViewModel { /// <summary> /// Initializes a new instance of the <see cref="MainViewModel"/> class. /// </summary> public MainViewModel() { Samples.Add(new Sample() { Name = "Apex Grid", View = new Samples.ApexGrid() }); Samples.Add(new Sample() { Name = "Cross Button", View = new Samples.CrossButton() }); Samples.Add(new Sample() { Name = "Padded Grid", View = new Samples.PaddedGrid() }); } /// <summary> /// The set of samples. /// </summary> private ObservableCollection<Sample> samples = new ObservableCollection<Sample>(); /// <summary> /// Gets the samples. /// </summary> public ObservableCollection<Sample> Samples { get { return samples; } } /// <summary> /// The selected sample property. /// </summary> private NotifyingProperty SelectedSampleProperty = new NotifyingProperty("SelectedSample", typeof(Sample), default(Sample)); /// <summary> /// Gets or sets the selected sample. /// </summary> /// <value> /// The selected sample. /// </value> public Sample SelectedSample { get { return (Sample)GetValue(SelectedSampleProperty); } set { SetValue(SelectedSampleProperty, value); } } } }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)