15 changed files with 219 additions and 114 deletions
@ -0,0 +1,31 @@ |
|||
// -----------------------------------------------------------------------
|
|||
// <copyright file="IReparentingHost.cs" company="Steven Kirk">
|
|||
// Copyright 2015 MIT Licence. See licence.md for more information.
|
|||
// </copyright>
|
|||
// -----------------------------------------------------------------------
|
|||
|
|||
namespace Perspex.Controls |
|||
{ |
|||
using Perspex.Collections; |
|||
|
|||
/// <summary>
|
|||
/// A control that can use the visual children of another control as its logical children.
|
|||
/// </summary>
|
|||
public interface IReparentingHost : ILogical |
|||
{ |
|||
/// <summary>
|
|||
/// Gets a writeable logical children collection from the host.
|
|||
/// </summary>
|
|||
new IPerspexList<ILogical> LogicalChildren { get; } |
|||
|
|||
/// <summary>
|
|||
/// Asks the control whether it wants to reparent the logical children of the specified
|
|||
/// control.
|
|||
/// </summary>
|
|||
/// <param name="control">The control.</param>
|
|||
/// <returns>
|
|||
/// True if the control wants to reparent its logical children otherwise false.
|
|||
/// </returns>
|
|||
bool WillReparentChildrenOf(IControl control); |
|||
} |
|||
} |
|||
@ -0,0 +1,25 @@ |
|||
// -----------------------------------------------------------------------
|
|||
// <copyright file="IContentPresenter.cs" company="Steven Kirk">
|
|||
// Copyright 2015 MIT Licence. See licence.md for more information.
|
|||
// </copyright>
|
|||
// -----------------------------------------------------------------------
|
|||
|
|||
namespace Perspex.Controls.Presenters |
|||
{ |
|||
/// <summary>
|
|||
/// Interface for controls that present a single item of data inside a
|
|||
/// <see cref="TemplatedControl"/> template.
|
|||
/// </summary>
|
|||
public interface IContentPresenter : IPresenter |
|||
{ |
|||
/// <summary>
|
|||
/// Gets the control displayed by the presenter.
|
|||
/// </summary>
|
|||
IControl Child { get; } |
|||
|
|||
/// <summary>
|
|||
/// Gets or sets the content to be displayed by the presenter.
|
|||
/// </summary>
|
|||
object Content { get; set; } |
|||
} |
|||
} |
|||
Loading…
Reference in new issue