|
///
/// Copyright(C) MixModes Inc. 2010
///
using System.Windows.Input;
using MixModes.Synergy.VisualFramework.Commands;
namespace MixModes.Synergy.VisualFramework.Windows
{
/// <summary>
/// Document content
/// </summary>
public class DocumentContent
{
/// <summary>
/// Initializes a new instance of the <see cref="DocumentContent"/> class.
/// </summary>
/// <param name="pane">The pane.</param>
/// <param name="closeCommand">The close command.</param>
public DocumentContent(DockPane pane, ICommand closeCommand)
{
Header = pane.Header;
Content = pane.Content;
DockPane = pane;
CloseCommand = closeCommand;
pane.Header = null;
pane.Content = null;
}
/// <summary>
/// Detaches the dock pane.
/// </summary>
public void DetachDockPane()
{
DockPane.Header = Header;
DockPane.Content = Content;
}
/// <summary>
/// Gets or sets the header.
/// </summary>
/// <value>The header.</value>
public object Header { get; private set; }
/// <summary>
/// Gets or sets the content.
/// </summary>
/// <value>The content.</value>
public object Content { get; private set; }
/// <summary>
/// Gets or sets the dock pane.
/// </summary>
/// <value>The dock pane.</value>
public DockPane DockPane { get; private set; }
/// <summary>
/// Gets or sets the close command.
/// </summary>
/// <value>The close command.</value>
public ICommand CloseCommand { get; private 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.
Ashish worked for Microsoft for a number of years in Microsoft Visual Studio (Architect edition) and Windows Live division as a developer. Before that he was a developer consultant mainly involved in distributed service development / architecture. His main interests are distributed software architecture, patterns and practices and mobile device development.
Currently Ashish serves as a Technical Lead at RIM leading next generation BlackBerry media experience and also runs his own company MixModes Inc. specializing in .NET / WPF / Silverlight technologies. You can visit MixModes at http://mixmodes.com or follow it on Twitter @MixModes
In his free time he is an avid painter, hockey player and enjoys travelling. His blog is at: http://ashishkaila.serveblog.net