|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input;
using ListBoxHyperlinkDemo.Domain;
using System.Collections.ObjectModel;
namespace ListBoxHyperlinkDemo.ViewModel
{
public class MainWindowViewModel : ViewModelBase
{
#region Constructor
public MainWindowViewModel()
{
// Initialize collection
this.Alerts = new ObservableCollection<Alert>();
}
#endregion
#region Command Properties
/* Commands are not created as properties in this demo,
* because hyperlinks in list boxes cannot get to them.
* Setting the ListBox.ItemsSource property binds list
* box items to a single collection property. */
#endregion
#region Bindable Properties
/// <summary>
/// Demo alerts.
/// </summary>
public ObservableCollection<Alert> Alerts { get; set; }
#endregion
}
}
|
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.
David Veeneman is a financial planner and software developer. He is the author of "The Fortune in Your Future" (McGraw-Hill 1998). His company, Foresight Systems, develops planning and financial software.