Click here to Skip to main content
15,891,567 members
Articles / Desktop Programming / WPF

WPF, SDI linked window base class or don't miss your windows

Rate me:
Please Sign up or sign in to vote.
4.50/5 (2 votes)
21 Feb 2013CPOL3 min read 18.4K   348   11  
A simple class to control open windows.
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Linked.cs" company="JAGG">
//   G-SoftSolutions.
// </copyright>
// <author>
//   JAGG
// </author>
// <summary>
//  Tracing with the information of the form.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace LinkedViewModelLibrary
{
    using System.Windows.Controls;

    /// <summary>
    /// Tracing with the information of the form.
    /// </summary>
    public class Linked : ILinked
    {
        /// <summary>
        /// Create a instance of the class.
        /// </summary>
        /// <returns>
        /// a compatible Interface object of the class.
        /// </returns>
        public static ILinked Factory()
        {
            ILinked tc = new Linked();
            return tc;
        }

        /// <summary>
        /// Gets or sets View.
        /// </summary>
        public ContentControl View { get; set; }

        /// <summary>
        /// Gets or sets ViewParent.
        /// </summary>
        public ContentControl ViewParent { get; set; }

        /// <summary>
        /// Gets or sets ViewModelParent.
        /// </summary>
        public ILinkedViewModel ViewModelParent { get; set; }

        /// <summary>
        /// Gets or sets ViewModel of the content control.
        /// </summary>
        public ILinkedViewModel ViewModel { get; set; }
    }
}

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.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Avalon Development
United States United States
Jose A. Garcia Guirado, Electronic Engineer, graduated in Havana/Cuba 1982, MCTS, MCSD.NET, MCAD.NET, MCSE. Worked in the Institute for Cybernetics and Mathematics of Academy of Science of Cuba for 8 years; since 1995 working as free software architect, developer and adviser, first in Argentina and from 2003 to 2010, in Germany as External consultant in DWS Luxembourg, AIXTRON AG and Shell Deutschland GmbH and from 2010 to 2012 in Mexico working for Twenty Century Fox, and Mexico Stock Exchange (BMV). From 2013 to now in USA, Florida, First in FAME Inc. and now as Senior Software Engineer in Spirit Airlines.

Comments and Discussions