using System.Windows; using Catel.Articles._03___MVVM.UI.ViewModels; using Catel.MVVM.UI; using Catel.Windows; namespace Catel.Articles._03___MVVM.Examples.ControlToViewModelWithWindow { /// <summary> /// Interaction logic for WindowWithViewModelMappings.xaml /// </summary> public partial class WindowWithViewModelMappings : DataWindow<PersonViewModel> { /// <summary> /// Initializes a new instance of the <see cref="WindowWithViewModelMappings"/> class. /// </summary> public WindowWithViewModelMappings() { // Initialize component InitializeComponent(); } /// <summary> /// Gets or sets the first name. /// </summary> /// <value>The first name.</value> [ControlToViewModel] public string FirstName { get { return (string)GetValue(FirstNameProperty); } set { SetValue(FirstNameProperty, value); } } // Using a DependencyProperty as the backing store for FirstName. This enables animation, styling, binding, etc... public static readonly DependencyProperty FirstNameProperty = DependencyProperty.Register("FirstName", typeof(string), typeof(WindowWithViewModelMappings), new UIPropertyMetadata(string.Empty)); } }
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)