Browse Source
Merge pull request #1396 from easiwin/t/lindexi
add some comment
pull/1421/head
Steven Kirk
9 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
10 additions and
0 deletions
-
src/Avalonia.Controls/LayoutTransformControl.cs
-
src/Avalonia.Controls/UserControl.cs
|
|
|
@ -15,6 +15,9 @@ using System.Reactive.Linq; |
|
|
|
|
|
|
|
namespace Avalonia.Controls |
|
|
|
{ |
|
|
|
/// <summary>
|
|
|
|
/// Control that implements support for transformations as if applied by LayoutTransform.
|
|
|
|
/// </summary>
|
|
|
|
public class LayoutTransformControl : ContentControl |
|
|
|
{ |
|
|
|
public static readonly AvaloniaProperty<Transform> LayoutTransformProperty = |
|
|
|
@ -26,6 +29,9 @@ namespace Avalonia.Controls |
|
|
|
.AddClassHandler<LayoutTransformControl>(x => x.OnLayoutTransformChanged); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets a graphics transformation that should apply to this element when layout is performed.
|
|
|
|
/// </summary>
|
|
|
|
public Transform LayoutTransform |
|
|
|
{ |
|
|
|
get { return GetValue(LayoutTransformProperty); } |
|
|
|
|
|
|
|
@ -6,6 +6,9 @@ using Avalonia.Styling; |
|
|
|
|
|
|
|
namespace Avalonia.Controls |
|
|
|
{ |
|
|
|
/// <summary>
|
|
|
|
/// Provides the base class for defining a new control that encapsulates related existing controls and provides its own logic.
|
|
|
|
/// </summary>
|
|
|
|
public class UserControl : ContentControl, IStyleable, INameScope |
|
|
|
{ |
|
|
|
private readonly NameScope _nameScope = new NameScope(); |
|
|
|
@ -24,6 +27,7 @@ namespace Avalonia.Controls |
|
|
|
remove { _nameScope.Unregistered -= value; } |
|
|
|
} |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
Type IStyleable.StyleKey => typeof(ContentControl); |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
|