// Copyright (c) The Avalonia Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using Avalonia.Rendering;
using Avalonia.VisualTree;
namespace Avalonia
{
///
/// Holds the event arguments for the and
/// events.
///
public class VisualTreeAttachmentEventArgs : EventArgs
{
///
/// Initializes a new instance of the class.
///
/// The parent that the visual is being attached to or detached from.
/// The root visual.
public VisualTreeAttachmentEventArgs(IVisual parent, IRenderRoot root)
{
Contract.Requires(parent != null);
Contract.Requires(root != null);
Parent = parent;
Root = root;
}
///
/// Gets the parent that the visual is being attached to or detached from.
///
public IVisual Parent { get; }
///
/// Gets the root of the visual tree that the visual is being attached to or detached from.
///
public IRenderRoot Root { get; }
}
}