Browse Source

Updated PerspexProperties to new classes

i.e. AttachedProperty, DirectProperty or StyledProperty.
pull/387/merge
Steven Kirk 10 years ago
parent
commit
1202eaa876
  1. 8
      src/Perspex.Application/Designer/Design.cs
  2. 8
      src/Perspex.Controls/Canvas.cs
  3. 6
      src/Perspex.Controls/ColumnDefinition.cs
  4. 10
      src/Perspex.Controls/Control.cs
  5. 2
      src/Perspex.Controls/DefinitionBase.cs
  6. 4
      src/Perspex.Controls/DockPanel.cs
  7. 4
      src/Perspex.Controls/DropDown.cs
  8. 6
      src/Perspex.Controls/Expander.cs
  9. 8
      src/Perspex.Controls/Grid.cs
  10. 2
      src/Perspex.Controls/GridSplitter.cs
  11. 4
      src/Perspex.Controls/Image.cs
  12. 2
      src/Perspex.Controls/Menu.cs
  13. 2
      src/Perspex.Controls/MenuItem.cs
  14. 2
      src/Perspex.Controls/NameScope.cs
  15. 2
      src/Perspex.Controls/Panel.cs
  16. 10
      src/Perspex.Controls/Presenters/CarouselPresenter.cs
  17. 4
      src/Perspex.Controls/Presenters/ContentPresenter.cs
  18. 7
      src/Perspex.Controls/Presenters/ItemsPresenter.cs
  19. 4
      src/Perspex.Controls/Presenters/TextPresenter.cs
  20. 3
      src/Perspex.Controls/Primitives/AccessText.cs
  21. 4
      src/Perspex.Controls/Primitives/AdornerLayer.cs
  22. 2
      src/Perspex.Controls/Primitives/HeaderedItemsControl.cs
  23. 2
      src/Perspex.Controls/Primitives/HeaderedSelectingControl.cs
  24. 10
      src/Perspex.Controls/Primitives/Popup.cs
  25. 2
      src/Perspex.Controls/Primitives/TemplatedControl.cs
  26. 2
      src/Perspex.Controls/Primitives/ToggleButton.cs
  27. 12
      src/Perspex.Controls/Primitives/Track.cs
  28. 6
      src/Perspex.Controls/RowDefinition.cs
  29. 2
      src/Perspex.Controls/Shapes/Path.cs
  30. 10
      src/Perspex.Controls/Shapes/Shape.cs
  31. 4
      src/Perspex.Controls/StackPanel.cs
  32. 4
      src/Perspex.Controls/TabControl.cs
  33. 2
      src/Perspex.Controls/TabItem.cs
  34. 2
      src/Perspex.Controls/ToolTip.cs
  35. 6
      src/Perspex.Controls/TopLevel.cs
  36. 4
      src/Perspex.Controls/TreeView.cs
  37. 4
      src/Perspex.Controls/TreeViewItem.cs
  38. 6
      src/Perspex.Controls/Window.cs
  39. 2
      src/Perspex.Controls/WrapPanel.cs
  40. 2
      src/Perspex.Diagnostics/Views/ControlDetailsView.cs
  41. 4
      src/Perspex.Diagnostics/Views/GridRepeater.cs
  42. 4
      src/Perspex.Input/KeyBinding.cs
  43. 22
      src/Perspex.Layout/Layoutable.cs
  44. 2
      src/Perspex.SceneGraph/Media/Brush.cs
  45. 2
      src/Perspex.SceneGraph/Media/Geometry.cs
  46. 4
      src/Perspex.SceneGraph/Media/GradientBrush.cs
  47. 2
      src/Perspex.SceneGraph/Media/ImageBush.cs
  48. 4
      src/Perspex.SceneGraph/Media/LinearGradientBrush.cs
  49. 2
      src/Perspex.SceneGraph/Media/MatrixTransform.cs
  50. 6
      src/Perspex.SceneGraph/Media/RadialGradientBrush.cs
  51. 2
      src/Perspex.SceneGraph/Media/RotateTransform.cs
  52. 12
      src/Perspex.SceneGraph/Media/TileBrush.cs
  53. 4
      src/Perspex.SceneGraph/Media/TranslateTransform.cs
  54. 2
      src/Perspex.SceneGraph/Media/VisualBrush.cs
  55. 8
      tests/Perspex.Base.UnitTests/PerspexObjectTests_Binding.cs
  56. 2
      tests/Perspex.Base.UnitTests/PerspexObjectTests_Direct.cs
  57. 4
      tests/Perspex.Base.UnitTests/PerspexObjectTests_GetObservable.cs
  58. 2
      tests/Perspex.Base.UnitTests/PerspexObjectTests_GetSubject.cs
  59. 14
      tests/Perspex.Base.UnitTests/PerspexObjectTests_Metadata.cs
  60. 8
      tests/Perspex.Base.UnitTests/PerspexObjectTests_SetValue.cs
  61. 12
      tests/Perspex.Base.UnitTests/PerspexPropertyRegistryTests.cs
  62. 2
      tests/Perspex.Base.UnitTests/PerspexPropertyTests.cs
  63. 2
      tests/Perspex.Base.UnitTests/StyledPropertyTests.cs
  64. 2
      tests/Perspex.Controls.UnitTests/Mixins/SelectableMixinTests.cs
  65. 2
      tests/Perspex.LeakTests/ControlTests.cs
  66. 2
      tests/Perspex.Markup.UnitTests/Data/ExpressionObserverTests_PerspexProperty.cs
  67. 4
      tests/Perspex.Markup.Xaml.UnitTests/Converters/PerspexPropertyConverterTest.cs
  68. 4
      tests/Perspex.Markup.Xaml.UnitTests/Data/BindingTests.cs
  69. 4
      tests/Perspex.Markup.Xaml.UnitTests/SamplePerspexObject.cs
  70. 2
      tests/Perspex.Styling.UnitTests/ActivatedSubjectTests.cs
  71. 2
      tests/Perspex.Styling.UnitTests/StyleTests.cs

8
src/Perspex.Application/Designer/Design.cs

@ -11,7 +11,7 @@ namespace Perspex
{
public static bool IsDesignMode { get; internal set; }
public static readonly PerspexProperty<double> HeightProperty = PerspexProperty
public static readonly AttachedProperty<double> HeightProperty = PerspexProperty
.RegisterAttached<Control, double>("Height", typeof (Design));
public static void SetHeight(Control control, double value)
@ -24,8 +24,8 @@ namespace Perspex
return control.GetValue(HeightProperty);
}
public static readonly PerspexProperty<double> WidthProperty = PerspexProperty
.RegisterAttached<Control, double>("Width", typeof(Design));
public static readonly AttachedProperty<double> WidthProperty = PerspexProperty
.RegisterAttached<Control, double>("Width", typeof(Design));
public static void SetWidth(Control control, double value)
{
@ -37,7 +37,7 @@ namespace Perspex
return control.GetValue(WidthProperty);
}
public static readonly PerspexProperty<object> DataContextProperty = PerspexProperty
public static readonly AttachedProperty<object> DataContextProperty = PerspexProperty
.RegisterAttached<Control, object>("DataContext", typeof (Design));
public static void SetDataContext(Control control, object value)

8
src/Perspex.Controls/Canvas.cs

@ -20,25 +20,25 @@ namespace Perspex.Controls
/// <summary>
/// Defines the Left attached property.
/// </summary>
public static readonly PerspexProperty<double> LeftProperty =
public static readonly AttachedProperty<double> LeftProperty =
PerspexProperty.RegisterAttached<StackPanel, Control, double>("Left");
/// <summary>
/// Defines the Top attached property.
/// </summary>
public static readonly PerspexProperty<double> TopProperty =
public static readonly AttachedProperty<double> TopProperty =
PerspexProperty.RegisterAttached<StackPanel, Control, double>("Top");
/// <summary>
/// Defines the Right attached property.
/// </summary>
public static readonly PerspexProperty<double> RightProperty =
public static readonly AttachedProperty<double> RightProperty =
PerspexProperty.RegisterAttached<StackPanel, Control, double>("Right");
/// <summary>
/// Defines the Bottom attached property.
/// </summary>
public static readonly PerspexProperty<double> BottomProperty =
public static readonly AttachedProperty<double> BottomProperty =
PerspexProperty.RegisterAttached<StackPanel, Control, double>("Bottom");
/// <summary>

6
src/Perspex.Controls/ColumnDefinition.cs

@ -11,19 +11,19 @@ namespace Perspex.Controls
/// <summary>
/// Defines the <see cref="MaxWidth"/> property.
/// </summary>
public static readonly PerspexProperty<double> MaxWidthProperty =
public static readonly StyledProperty<double> MaxWidthProperty =
PerspexProperty.Register<ColumnDefinition, double>("MaxWidth", double.PositiveInfinity);
/// <summary>
/// Defines the <see cref="MinWidth"/> property.
/// </summary>
public static readonly PerspexProperty<double> MinWidthProperty =
public static readonly StyledProperty<double> MinWidthProperty =
PerspexProperty.Register<ColumnDefinition, double>("MinWidth");
/// <summary>
/// Defines the <see cref="Width"/> property.
/// </summary>
public static readonly PerspexProperty<GridLength> WidthProperty =
public static readonly StyledProperty<GridLength> WidthProperty =
PerspexProperty.Register<ColumnDefinition, GridLength>("Width", new GridLength(1, GridUnitType.Star));
/// <summary>

10
src/Perspex.Controls/Control.cs

@ -35,7 +35,7 @@ namespace Perspex.Controls
/// <summary>
/// Defines the <see cref="DataContext"/> property.
/// </summary>
public static readonly PerspexProperty<object> DataContextProperty =
public static readonly StyledProperty<object> DataContextProperty =
PerspexProperty.Register<Control, object>(
nameof(DataContext),
inherits: true,
@ -44,25 +44,25 @@ namespace Perspex.Controls
/// <summary>
/// Defines the <see cref="FocusAdorner"/> property.
/// </summary>
public static readonly PerspexProperty<ITemplate<IControl>> FocusAdornerProperty =
public static readonly StyledProperty<ITemplate<IControl>> FocusAdornerProperty =
PerspexProperty.Register<Control, ITemplate<IControl>>(nameof(FocusAdorner));
/// <summary>
/// Defines the <see cref="Parent"/> property.
/// </summary>
public static readonly PerspexProperty<IControl> ParentProperty =
public static readonly DirectProperty<Control, IControl> ParentProperty =
PerspexProperty.RegisterDirect<Control, IControl>(nameof(Parent), o => o.Parent);
/// <summary>
/// Defines the <see cref="Tag"/> property.
/// </summary>
public static readonly PerspexProperty<object> TagProperty =
public static readonly StyledProperty<object> TagProperty =
PerspexProperty.Register<Control, object>(nameof(Tag));
/// <summary>
/// Defines the <see cref="TemplatedParent"/> property.
/// </summary>
public static readonly PerspexProperty<ITemplatedControl> TemplatedParentProperty =
public static readonly StyledProperty<ITemplatedControl> TemplatedParentProperty =
PerspexProperty.Register<Control, ITemplatedControl>(nameof(TemplatedParent), inherits: true);
/// <summary>

2
src/Perspex.Controls/DefinitionBase.cs

@ -11,7 +11,7 @@ namespace Perspex.Controls
/// <summary>
/// Defines the <see cref="SharedSizeGroup"/> property.
/// </summary>
public static readonly PerspexProperty<string> SharedSizeGroupProperty =
public static readonly StyledProperty<string> SharedSizeGroupProperty =
PerspexProperty.Register<DefinitionBase, string>(nameof(SharedSizeGroup), inherits: true);
/// <summary>

4
src/Perspex.Controls/DockPanel.cs

@ -21,13 +21,13 @@
/// <summary>
/// Defines the Dock attached property.
/// </summary>
public static readonly PerspexProperty<Dock> DockProperty =
public static readonly AttachedProperty<Dock> DockProperty =
PerspexProperty.RegisterAttached<DockPanel, Control, Dock>("Dock");
/// <summary>
/// Defines the <see cref="LastChildFill"/> property.
/// </summary>
public static readonly PerspexProperty<bool> LastChildFillProperty =
public static readonly StyledProperty<bool> LastChildFillProperty =
PerspexProperty.Register<DockPanel, bool>(
nameof(LastChildFillProperty),
defaultValue: true);

4
src/Perspex.Controls/DropDown.cs

@ -21,7 +21,7 @@ namespace Perspex.Controls
/// <summary>
/// Defines the <see cref="IsDropDownOpen"/> property.
/// </summary>
public static readonly PerspexProperty<bool> IsDropDownOpenProperty =
public static readonly DirectProperty<DropDown, bool> IsDropDownOpenProperty =
PerspexProperty.RegisterDirect<DropDown, bool>(
nameof(IsDropDownOpen),
o => o.IsDropDownOpen,
@ -30,7 +30,7 @@ namespace Perspex.Controls
/// <summary>
/// Defines the <see cref="SelectionBoxItem"/> property.
/// </summary>
public static readonly PerspexProperty<object> SelectionBoxItemProperty =
public static readonly DirectProperty<DropDown, object> SelectionBoxItemProperty =
PerspexProperty.RegisterDirect<DropDown, object>("SelectionBoxItem", o => o.SelectionBoxItem);
private bool _isDropDownOpen;

6
src/Perspex.Controls/Expander.cs

@ -13,13 +13,13 @@ namespace Perspex.Controls
public class Expander : HeaderedContentControl
{
public static readonly PerspexProperty<bool> IsExpandedProperty =
public static readonly StyledProperty<bool> IsExpandedProperty =
PerspexProperty.Register<Expander, bool>(nameof(IsExpanded), true);
public static readonly PerspexProperty<ExpandDirection> ExpandDirectionProperty =
public static readonly StyledProperty<ExpandDirection> ExpandDirectionProperty =
PerspexProperty.Register<Expander, ExpandDirection>(nameof(ExpandDirection), ExpandDirection.Down);
public static readonly PerspexProperty<IPageTransition> ContentTransitionProperty =
public static readonly StyledProperty<IPageTransition> ContentTransitionProperty =
PerspexProperty.Register<Expander, IPageTransition>(nameof(ContentTransition));
static Expander()

8
src/Perspex.Controls/Grid.cs

@ -16,7 +16,7 @@ namespace Perspex.Controls
/// <summary>
/// Defines the Column attached property.
/// </summary>
public static readonly PerspexProperty<int> ColumnProperty =
public static readonly AttachedProperty<int> ColumnProperty =
PerspexProperty.RegisterAttached<Grid, Control, int>(
"Column",
validate: ValidateColumn);
@ -24,13 +24,13 @@ namespace Perspex.Controls
/// <summary>
/// Defines the ColumnSpan attached property.
/// </summary>
public static readonly PerspexProperty<int> ColumnSpanProperty =
public static readonly AttachedProperty<int> ColumnSpanProperty =
PerspexProperty.RegisterAttached<Grid, Control, int>("ColumnSpan", 1);
/// <summary>
/// Defines the Row attached property.
/// </summary>
public static readonly PerspexProperty<int> RowProperty =
public static readonly AttachedProperty<int> RowProperty =
PerspexProperty.RegisterAttached<Grid, Control, int>(
"Row",
validate: ValidateRow);
@ -38,7 +38,7 @@ namespace Perspex.Controls
/// <summary>
/// Defines the RowSpan attached property.
/// </summary>
public static readonly PerspexProperty<int> RowSpanProperty =
public static readonly AttachedProperty<int> RowSpanProperty =
PerspexProperty.RegisterAttached<Grid, Control, int>("RowSpan", 1);
private ColumnDefinitions _columnDefinitions;

2
src/Perspex.Controls/GridSplitter.cs

@ -23,7 +23,7 @@ namespace Perspex.Controls
/// <summary>
/// Defines the <see cref="Orientation"/> property.
/// </summary>
public static readonly PerspexProperty<Orientation> OrientationProperty =
public static readonly StyledProperty<Orientation> OrientationProperty =
PerspexProperty.Register<GridSplitter, Orientation>(nameof(Orientation));
protected Grid _grid;

4
src/Perspex.Controls/Image.cs

@ -15,13 +15,13 @@ namespace Perspex.Controls
/// <summary>
/// Defines the <see cref="Source"/> property.
/// </summary>
public static readonly PerspexProperty<Bitmap> SourceProperty =
public static readonly StyledProperty<Bitmap> SourceProperty =
PerspexProperty.Register<Image, Bitmap>(nameof(Source));
/// <summary>
/// Defines the <see cref="Stretch"/> property.
/// </summary>
public static readonly PerspexProperty<Stretch> StretchProperty =
public static readonly StyledProperty<Stretch> StretchProperty =
PerspexProperty.Register<Image, Stretch>(nameof(Stretch), Stretch.Uniform);
/// <summary>

2
src/Perspex.Controls/Menu.cs

@ -27,7 +27,7 @@ namespace Perspex.Controls
/// <summary>
/// Defines the <see cref="IsOpen"/> property.
/// </summary>
public static readonly PerspexProperty<bool> IsOpenProperty =
public static readonly DirectProperty<Menu, bool> IsOpenProperty =
PerspexProperty.RegisterDirect<Menu, bool>(
nameof(IsOpen),
o => o.IsOpen);

2
src/Perspex.Controls/MenuItem.cs

@ -51,7 +51,7 @@ namespace Perspex.Controls
/// <summary>
/// Defines the <see cref="IsSubMenuOpen"/> property.
/// </summary>
public static readonly PerspexProperty<bool> IsSubMenuOpenProperty =
public static readonly StyledProperty<bool> IsSubMenuOpenProperty =
PerspexProperty.Register<MenuItem, bool>(nameof(IsSubMenuOpen));
/// <summary>

2
src/Perspex.Controls/NameScope.cs

@ -14,7 +14,7 @@ namespace Perspex.Controls
/// <summary>
/// Defines the NameScope attached property.
/// </summary>
public static readonly PerspexProperty<INameScope> NameScopeProperty =
public static readonly AttachedProperty<INameScope> NameScopeProperty =
PerspexProperty.RegisterAttached<NameScope, Control, INameScope>("NameScope");
private readonly Dictionary<string, object> _inner = new Dictionary<string, object>();

2
src/Perspex.Controls/Panel.cs

@ -22,7 +22,7 @@ namespace Perspex.Controls
/// <summary>
/// Defines the <see cref="Background"/> property.
/// </summary>
public static readonly PerspexProperty<Brush> BackgroundProperty =
public static readonly StyledProperty<Brush> BackgroundProperty =
Border.BackgroundProperty.AddOwner<Panel>();
private readonly Controls _children = new Controls();

10
src/Perspex.Controls/Presenters/CarouselPresenter.cs

@ -22,25 +22,25 @@ namespace Perspex.Controls.Presenters
/// <summary>
/// Defines the <see cref="Items"/> property.
/// </summary>
public static readonly PerspexProperty<IEnumerable> ItemsProperty =
public static readonly DirectProperty<CarouselPresenter, IEnumerable> ItemsProperty =
ItemsControl.ItemsProperty.AddOwner<CarouselPresenter>(o => o.Items, (o, v) => o.Items = v);
/// <summary>
/// Defines the <see cref="ItemsPanel"/> property.
/// </summary>
public static readonly PerspexProperty<ITemplate<IPanel>> ItemsPanelProperty =
public static readonly StyledProperty<ITemplate<IPanel>> ItemsPanelProperty =
ItemsControl.ItemsPanelProperty.AddOwner<CarouselPresenter>();
/// <summary>
/// Defines the <see cref="MemberSelector"/> property.
/// </summary>
public static readonly PerspexProperty<IMemberSelector> MemberSelectorProperty =
public static readonly StyledProperty<IMemberSelector> MemberSelectorProperty =
ItemsControl.MemberSelectorProperty.AddOwner<CarouselPresenter>();
/// <summary>
/// Defines the <see cref="SelectedIndex"/> property.
/// </summary>
public static readonly PerspexProperty<int> SelectedIndexProperty =
public static readonly DirectProperty<CarouselPresenter, int> SelectedIndexProperty =
SelectingItemsControl.SelectedIndexProperty.AddOwner<CarouselPresenter>(
o => o.SelectedIndex,
(o, v) => o.SelectedIndex = v);
@ -48,7 +48,7 @@ namespace Perspex.Controls.Presenters
/// <summary>
/// Defines the <see cref="Transition"/> property.
/// </summary>
public static readonly PerspexProperty<IPageTransition> TransitionProperty =
public static readonly StyledProperty<IPageTransition> TransitionProperty =
Carousel.TransitionProperty.AddOwner<CarouselPresenter>();
private IEnumerable _items;

4
src/Perspex.Controls/Presenters/ContentPresenter.cs

@ -14,7 +14,7 @@ namespace Perspex.Controls.Presenters
/// <summary>
/// Defines the <see cref="Child"/> property.
/// </summary>
public static readonly PerspexProperty<IControl> ChildProperty =
public static readonly DirectProperty<ContentPresenter, IControl> ChildProperty =
PerspexProperty.RegisterDirect<ContentPresenter, IControl>(
nameof(Child),
o => o.Child);
@ -22,7 +22,7 @@ namespace Perspex.Controls.Presenters
/// <summary>
/// Defines the <see cref="Content"/> property.
/// </summary>
public static readonly PerspexProperty<object> ContentProperty =
public static readonly StyledProperty<object> ContentProperty =
ContentControl.ContentProperty.AddOwner<ContentPresenter>();
private IControl _child;

7
src/Perspex.Controls/Presenters/ItemsPresenter.cs

@ -5,7 +5,6 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using Perspex.Controls.Generators;
using Perspex.Controls.Templates;
using Perspex.Input;
@ -21,19 +20,19 @@ namespace Perspex.Controls.Presenters
/// <summary>
/// Defines the <see cref="Items"/> property.
/// </summary>
public static readonly PerspexProperty<IEnumerable> ItemsProperty =
public static readonly DirectProperty<ItemsPresenter, IEnumerable> ItemsProperty =
ItemsControl.ItemsProperty.AddOwner<ItemsPresenter>(o => o.Items, (o, v) => o.Items = v);
/// <summary>
/// Defines the <see cref="ItemsPanel"/> property.
/// </summary>
public static readonly PerspexProperty<ITemplate<IPanel>> ItemsPanelProperty =
public static readonly StyledProperty<ITemplate<IPanel>> ItemsPanelProperty =
ItemsControl.ItemsPanelProperty.AddOwner<ItemsPresenter>();
/// <summary>
/// Defines the <see cref="MemberSelector"/> property.
/// </summary>
public static readonly PerspexProperty<IMemberSelector> MemberSelectorProperty =
public static readonly StyledProperty<IMemberSelector> MemberSelectorProperty =
ItemsControl.MemberSelectorProperty.AddOwner<ItemsPresenter>();
private IEnumerable _items;

4
src/Perspex.Controls/Presenters/TextPresenter.cs

@ -15,10 +15,10 @@ namespace Perspex.Controls.Presenters
public static readonly StyledProperty<int> CaretIndexProperty =
TextBox.CaretIndexProperty.AddOwner<TextPresenter>();
public static readonly PerspexProperty<int> SelectionStartProperty =
public static readonly StyledProperty<int> SelectionStartProperty =
TextBox.SelectionStartProperty.AddOwner<TextPresenter>();
public static readonly PerspexProperty<int> SelectionEndProperty =
public static readonly StyledProperty<int> SelectionEndProperty =
TextBox.SelectionEndProperty.AddOwner<TextPresenter>();
private readonly DispatcherTimer _caretTimer;

3
src/Perspex.Controls/Primitives/AccessText.cs

@ -4,7 +4,6 @@
using System;
using Perspex.Input;
using Perspex.Media;
using Perspex.Rendering;
namespace Perspex.Controls.Primitives
{
@ -16,7 +15,7 @@ namespace Perspex.Controls.Primitives
/// <summary>
/// Defines the <see cref="ShowAccessKey"/> attached property.
/// </summary>
public static readonly PerspexProperty<bool> ShowAccessKeyProperty =
public static readonly AttachedProperty<bool> ShowAccessKeyProperty =
PerspexProperty.RegisterAttached<AccessText, Control, bool>("ShowAccessKey", inherits: true);
/// <summary>

4
src/Perspex.Controls/Primitives/AdornerLayer.cs

@ -11,10 +11,10 @@ namespace Perspex.Controls.Primitives
// TODO: Need to track position of adorned elements and move the adorner if they move.
public class AdornerLayer : Panel
{
public static PerspexProperty<Visual> AdornedElementProperty =
public static AttachedProperty<Visual> AdornedElementProperty =
PerspexProperty.RegisterAttached<AdornerLayer, Visual, Visual>("AdornedElement");
private static readonly PerspexProperty<AdornedElementInfo> s_adornedElementInfoProperty =
private static readonly AttachedProperty<AdornedElementInfo> s_adornedElementInfoProperty =
PerspexProperty.RegisterAttached<AdornerLayer, Visual, AdornedElementInfo>("AdornedElementInfo");
private readonly BoundsTracker _tracker = new BoundsTracker();

2
src/Perspex.Controls/Primitives/HeaderedItemsControl.cs

@ -16,7 +16,7 @@ namespace Perspex.Controls.Primitives
/// <summary>
/// Defines the <see cref="Header"/> property.
/// </summary>
public static readonly PerspexProperty<object> HeaderProperty =
public static readonly StyledProperty<object> HeaderProperty =
HeaderedContentControl.HeaderProperty.AddOwner<HeaderedItemsControl>();
/// <summary>

2
src/Perspex.Controls/Primitives/HeaderedSelectingControl.cs

@ -14,7 +14,7 @@ namespace Perspex.Controls.Primitives
/// <summary>
/// Defines the <see cref="Header"/> property.
/// </summary>
public static readonly PerspexProperty<object> HeaderProperty =
public static readonly StyledProperty<object> HeaderProperty =
HeaderedContentControl.HeaderProperty.AddOwner<HeaderedSelectingItemsControl>();
/// <summary>

10
src/Perspex.Controls/Primitives/Popup.cs

@ -18,13 +18,13 @@ namespace Perspex.Controls.Primitives
/// <summary>
/// Defines the <see cref="Child"/> property.
/// </summary>
public static readonly PerspexProperty<Control> ChildProperty =
public static readonly StyledProperty<Control> ChildProperty =
PerspexProperty.Register<Popup, Control>(nameof(Child));
/// <summary>
/// Defines the <see cref="IsOpen"/> property.
/// </summary>
public static readonly PerspexProperty<bool> IsOpenProperty =
public static readonly DirectProperty<Popup, bool> IsOpenProperty =
PerspexProperty.RegisterDirect<Popup, bool>(
nameof(IsOpen),
o => o.IsOpen,
@ -33,19 +33,19 @@ namespace Perspex.Controls.Primitives
/// <summary>
/// Defines the <see cref="PlacementMode"/> property.
/// </summary>
public static readonly PerspexProperty<PlacementMode> PlacementModeProperty =
public static readonly StyledProperty<PlacementMode> PlacementModeProperty =
PerspexProperty.Register<Popup, PlacementMode>(nameof(PlacementMode), defaultValue: PlacementMode.Bottom);
/// <summary>
/// Defines the <see cref="PlacementTarget"/> property.
/// </summary>
public static readonly PerspexProperty<Control> PlacementTargetProperty =
public static readonly StyledProperty<Control> PlacementTargetProperty =
PerspexProperty.Register<Popup, Control>(nameof(PlacementTarget));
/// <summary>
/// Defines the <see cref="StaysOpen"/> property.
/// </summary>
public static readonly PerspexProperty<bool> StaysOpenProperty =
public static readonly StyledProperty<bool> StaysOpenProperty =
PerspexProperty.Register<Popup, bool>(nameof(StaysOpen), true);
private bool _isOpen;

2
src/Perspex.Controls/Primitives/TemplatedControl.cs

@ -71,7 +71,7 @@ namespace Perspex.Controls.Primitives
/// <summary>
/// Defines the <see cref="Template"/> property.
/// </summary>
public static readonly PerspexProperty<IControlTemplate> TemplateProperty =
public static readonly StyledProperty<IControlTemplate> TemplateProperty =
PerspexProperty.Register<TemplatedControl, IControlTemplate>("Template");
/// <summary>

2
src/Perspex.Controls/Primitives/ToggleButton.cs

@ -8,7 +8,7 @@ namespace Perspex.Controls.Primitives
{
public class ToggleButton : Button
{
public static readonly PerspexProperty<bool> IsCheckedProperty =
public static readonly DirectProperty<ToggleButton, bool> IsCheckedProperty =
PerspexProperty.RegisterDirect<ToggleButton, bool>(
"IsChecked",
o => o.IsChecked,

12
src/Perspex.Controls/Primitives/Track.cs

@ -10,22 +10,22 @@ namespace Perspex.Controls.Primitives
{
public class Track : Control
{
public static readonly PerspexProperty<double> MinimumProperty =
public static readonly DirectProperty<Track, double> MinimumProperty =
RangeBase.MinimumProperty.AddOwner<Track>(o => o.Minimum, (o,v) => o.Minimum = v);
public static readonly PerspexProperty<double> MaximumProperty =
public static readonly DirectProperty<Track, double> MaximumProperty =
RangeBase.MaximumProperty.AddOwner<Track>(o => o.Maximum, (o, v) => o.Maximum = v);
public static readonly PerspexProperty<double> ValueProperty =
public static readonly DirectProperty<Track, double> ValueProperty =
RangeBase.ValueProperty.AddOwner<Track>(o => o.Value, (o, v) => o.Value = v);
public static readonly PerspexProperty<double> ViewportSizeProperty =
public static readonly StyledProperty<double> ViewportSizeProperty =
ScrollBar.ViewportSizeProperty.AddOwner<Track>();
public static readonly PerspexProperty<Orientation> OrientationProperty =
public static readonly StyledProperty<Orientation> OrientationProperty =
ScrollBar.OrientationProperty.AddOwner<Track>();
public static readonly PerspexProperty<Thumb> ThumbProperty =
public static readonly StyledProperty<Thumb> ThumbProperty =
PerspexProperty.Register<Track, Thumb>("Thumb");
private double _minimum;

6
src/Perspex.Controls/RowDefinition.cs

@ -11,19 +11,19 @@ namespace Perspex.Controls
/// <summary>
/// Defines the <see cref="MaxHeight"/> property.
/// </summary>
public static readonly PerspexProperty<double> MaxHeightProperty =
public static readonly StyledProperty<double> MaxHeightProperty =
PerspexProperty.Register<RowDefinition, double>("MaxHeight", double.PositiveInfinity);
/// <summary>
/// Defines the <see cref="MinHeight"/> property.
/// </summary>
public static readonly PerspexProperty<double> MinHeightProperty =
public static readonly StyledProperty<double> MinHeightProperty =
PerspexProperty.Register<RowDefinition, double>("MinHeight");
/// <summary>
/// Defines the <see cref="Height"/> property.
/// </summary>
public static readonly PerspexProperty<GridLength> HeightProperty =
public static readonly StyledProperty<GridLength> HeightProperty =
PerspexProperty.Register<RowDefinition, GridLength>("Height", new GridLength(1, GridUnitType.Star));
/// <summary>

2
src/Perspex.Controls/Shapes/Path.cs

@ -8,7 +8,7 @@ namespace Perspex.Controls.Shapes
{
public class Path : Shape
{
public static readonly PerspexProperty<Geometry> DataProperty =
public static readonly StyledProperty<Geometry> DataProperty =
PerspexProperty.Register<Path, Geometry>("Data");
public Geometry Data

10
src/Perspex.Controls/Shapes/Shape.cs

@ -10,19 +10,19 @@ namespace Perspex.Controls.Shapes
{
public abstract class Shape : Control
{
public static readonly PerspexProperty<Brush> FillProperty =
public static readonly StyledProperty<Brush> FillProperty =
PerspexProperty.Register<Shape, Brush>("Fill");
public static readonly PerspexProperty<Stretch> StretchProperty =
public static readonly StyledProperty<Stretch> StretchProperty =
PerspexProperty.Register<Shape, Stretch>("Stretch");
public static readonly PerspexProperty<Brush> StrokeProperty =
public static readonly StyledProperty<Brush> StrokeProperty =
PerspexProperty.Register<Shape, Brush>("Stroke");
public static readonly PerspexProperty<PerspexList<double>> StrokeDashArrayProperty =
public static readonly StyledProperty<PerspexList<double>> StrokeDashArrayProperty =
PerspexProperty.Register<Shape, PerspexList<double>>("StrokeDashArray");
public static readonly PerspexProperty<double> StrokeThicknessProperty =
public static readonly StyledProperty<double> StrokeThicknessProperty =
PerspexProperty.Register<Shape, double>("StrokeThickness");
private Matrix _transform = Matrix.Identity;

4
src/Perspex.Controls/StackPanel.cs

@ -30,13 +30,13 @@ namespace Perspex.Controls
/// <summary>
/// Defines the <see cref="Gap"/> property.
/// </summary>
public static readonly PerspexProperty<double> GapProperty =
public static readonly StyledProperty<double> GapProperty =
PerspexProperty.Register<StackPanel, double>(nameof(Gap));
/// <summary>
/// Defines the <see cref="Orientation"/> property.
/// </summary>
public static readonly PerspexProperty<Orientation> OrientationProperty =
public static readonly StyledProperty<Orientation> OrientationProperty =
PerspexProperty.Register<StackPanel, Orientation>(nameof(Orientation));
/// <summary>

4
src/Perspex.Controls/TabControl.cs

@ -16,7 +16,7 @@ namespace Perspex.Controls
/// <summary>
/// Defines the <see cref="Transition"/> property.
/// </summary>
public static readonly PerspexProperty<IPageTransition> TransitionProperty =
public static readonly StyledProperty<IPageTransition> TransitionProperty =
Perspex.Controls.Carousel.TransitionProperty.AddOwner<TabControl>();
/// <summary>
@ -34,7 +34,7 @@ namespace Perspex.Controls
/// <summary>
/// Defines the <see cref="TabStripPlacement"/> property.
/// </summary>
public static readonly PerspexProperty<Dock> TabStripPlacementProperty =
public static readonly StyledProperty<Dock> TabStripPlacementProperty =
PerspexProperty.Register<TabControl, Dock>(nameof(TabStripPlacement), defaultValue: Dock.Top);
/// <summary>

2
src/Perspex.Controls/TabItem.cs

@ -14,7 +14,7 @@ namespace Perspex.Controls
/// <summary>
/// Defines the <see cref="IsSelected"/> property.
/// </summary>
public static readonly PerspexProperty<bool> IsSelectedProperty =
public static readonly StyledProperty<bool> IsSelectedProperty =
ListBoxItem.IsSelectedProperty.AddOwner<TabItem>();
/// <summary>

2
src/Perspex.Controls/ToolTip.cs

@ -24,7 +24,7 @@ namespace Perspex.Controls
/// <summary>
/// Defines the ToolTip.Tip attached property.
/// </summary>
public static readonly PerspexProperty<object> TipProperty =
public static readonly AttachedProperty<object> TipProperty =
PerspexProperty.RegisterAttached<ToolTip, Control, object>("Tip");
/// <summary>

6
src/Perspex.Controls/TopLevel.cs

@ -29,19 +29,19 @@ namespace Perspex.Controls
/// <summary>
/// Defines the <see cref="ClientSize"/> property.
/// </summary>
public static readonly PerspexProperty<Size> ClientSizeProperty =
public static readonly DirectProperty<TopLevel, Size> ClientSizeProperty =
PerspexProperty.RegisterDirect<TopLevel, Size>(nameof(ClientSize), o => o.ClientSize);
/// <summary>
/// Defines the <see cref="IsActive"/> property.
/// </summary>
public static readonly PerspexProperty<bool> IsActiveProperty =
public static readonly DirectProperty<TopLevel, bool> IsActiveProperty =
PerspexProperty.RegisterDirect<TopLevel, bool>(nameof(IsActive), o => o.IsActive);
/// <summary>
/// Defines the <see cref="IInputRoot.PointerOverElement"/> property.
/// </summary>
public static readonly PerspexProperty<IInputElement> PointerOverElementProperty =
public static readonly StyledProperty<IInputElement> PointerOverElementProperty =
PerspexProperty.Register<TopLevel, IInputElement>(nameof(IInputRoot.PointerOverElement));
private readonly IRenderQueueManager _renderQueueManager;

4
src/Perspex.Controls/TreeView.cs

@ -21,7 +21,7 @@ namespace Perspex.Controls
/// <summary>
/// Defines the <see cref="AutoScrollToSelectedItem"/> property.
/// </summary>
public static readonly PerspexProperty<bool> AutoScrollToSelectedItemProperty =
public static readonly StyledProperty<bool> AutoScrollToSelectedItemProperty =
PerspexProperty.Register<TreeView, bool>(
nameof(AutoScrollToSelectedItem),
defaultValue: true);
@ -29,7 +29,7 @@ namespace Perspex.Controls
/// <summary>
/// Defines the <see cref="SelectedItem"/> property.
/// </summary>
public static readonly PerspexProperty<object> SelectedItemProperty =
public static readonly DirectProperty<TreeView, object> SelectedItemProperty =
SelectingItemsControl.SelectedItemProperty.AddOwner<TreeView>(
o => o.SelectedItem,
(o, v) => o.SelectedItem = v);

4
src/Perspex.Controls/TreeViewItem.cs

@ -19,13 +19,13 @@ namespace Perspex.Controls
/// <summary>
/// Defines the <see cref="IsExpanded"/> property.
/// </summary>
public static readonly PerspexProperty<bool> IsExpandedProperty =
public static readonly StyledProperty<bool> IsExpandedProperty =
PerspexProperty.Register<TreeViewItem, bool>("IsExpanded");
/// <summary>
/// Defines the <see cref="IsSelected"/> property.
/// </summary>
public static readonly PerspexProperty<bool> IsSelectedProperty =
public static readonly StyledProperty<bool> IsSelectedProperty =
ListBoxItem.IsSelectedProperty.AddOwner<TreeViewItem>();
private static readonly ITemplate<IPanel> DefaultPanel =

6
src/Perspex.Controls/Window.cs

@ -46,19 +46,19 @@ namespace Perspex.Controls
/// <summary>
/// Defines the <see cref="SizeToContent"/> property.
/// </summary>
public static readonly PerspexProperty<SizeToContent> SizeToContentProperty =
public static readonly StyledProperty<SizeToContent> SizeToContentProperty =
PerspexProperty.Register<Window, SizeToContent>(nameof(SizeToContent));
/// <summary>
/// Enables of disables system window decorations (title bar, buttons, etc)
/// </summary>
public static readonly PerspexProperty<bool> HasSystemDecorationsProperty =
public static readonly StyledProperty<bool> HasSystemDecorationsProperty =
PerspexProperty.Register<Window, bool>(nameof(HasSystemDecorations), true);
/// <summary>
/// Defines the <see cref="Title"/> property.
/// </summary>
public static readonly PerspexProperty<string> TitleProperty =
public static readonly StyledProperty<string> TitleProperty =
PerspexProperty.Register<Window, string>(nameof(Title), "Window");
private readonly NameScope _nameScope = new NameScope();

2
src/Perspex.Controls/WrapPanel.cs

@ -22,7 +22,7 @@ namespace Perspex.Controls
/// <summary>
/// Defines the <see cref="Orientation"/> property.
/// </summary>
public static readonly PerspexProperty<Orientation> OrientationProperty =
public static readonly StyledProperty<Orientation> OrientationProperty =
PerspexProperty.Register<WrapPanel, Orientation>(nameof(Orientation), defaultValue: Orientation.Horizontal);
/// <summary>

2
src/Perspex.Diagnostics/Views/ControlDetailsView.cs

@ -13,7 +13,7 @@ namespace Perspex.Diagnostics.Views
{
internal class ControlDetailsView : UserControl
{
private static readonly PerspexProperty<ControlDetailsViewModel> ViewModelProperty =
private static readonly StyledProperty<ControlDetailsViewModel> ViewModelProperty =
PerspexProperty.Register<ControlDetailsView, ControlDetailsViewModel>("ViewModel");
public ControlDetailsView()

4
src/Perspex.Diagnostics/Views/GridRepeater.cs

@ -10,10 +10,10 @@ namespace Perspex.Diagnostics.Views
{
internal static class GridRepeater
{
public static readonly PerspexProperty<IEnumerable> ItemsProperty =
public static readonly AttachedProperty<IEnumerable> ItemsProperty =
PerspexProperty.RegisterAttached<Grid, IEnumerable>("Items", typeof(GridRepeater));
public static readonly PerspexProperty<Func<object, IEnumerable<Control>>> TemplateProperty =
public static readonly AttachedProperty<Func<object, IEnumerable<Control>>> TemplateProperty =
PerspexProperty.RegisterAttached<Grid, Func<object, IEnumerable<Control>>>("Template", typeof(GridRepeater));
static GridRepeater()

4
src/Perspex.Input/KeyBinding.cs

@ -9,7 +9,7 @@ namespace Perspex.Input
{
public class KeyBinding : PerspexObject
{
public static readonly PerspexProperty<ICommand> CommandProperty =
public static readonly StyledProperty<ICommand> CommandProperty =
PerspexProperty.Register<KeyBinding, ICommand>("Command");
public ICommand Command
@ -18,7 +18,7 @@ namespace Perspex.Input
set { SetValue(CommandProperty, value); }
}
public static readonly PerspexProperty<KeyGesture> GestureProperty =
public static readonly StyledProperty<KeyGesture> GestureProperty =
PerspexProperty.Register<KeyBinding, KeyGesture>("Gesture");
public KeyGesture Gesture

22
src/Perspex.Layout/Layoutable.cs

@ -69,67 +69,67 @@ namespace Perspex.Layout
/// <summary>
/// Defines the <see cref="DesiredSize"/> property.
/// </summary>
public static readonly PerspexProperty<Size> DesiredSizeProperty =
public static readonly DirectProperty<Layoutable, Size> DesiredSizeProperty =
PerspexProperty.RegisterDirect<Layoutable, Size>(nameof(DesiredSize), o => o.DesiredSize);
/// <summary>
/// Defines the <see cref="Width"/> property.
/// </summary>
public static readonly PerspexProperty<double> WidthProperty =
public static readonly StyledProperty<double> WidthProperty =
PerspexProperty.Register<Layoutable, double>(nameof(Width), double.NaN);
/// <summary>
/// Defines the <see cref="Height"/> property.
/// </summary>
public static readonly PerspexProperty<double> HeightProperty =
public static readonly StyledProperty<double> HeightProperty =
PerspexProperty.Register<Layoutable, double>(nameof(Height), double.NaN);
/// <summary>
/// Defines the <see cref="MinWidth"/> property.
/// </summary>
public static readonly PerspexProperty<double> MinWidthProperty =
public static readonly StyledProperty<double> MinWidthProperty =
PerspexProperty.Register<Layoutable, double>(nameof(MinWidth));
/// <summary>
/// Defines the <see cref="MaxWidth"/> property.
/// </summary>
public static readonly PerspexProperty<double> MaxWidthProperty =
public static readonly StyledProperty<double> MaxWidthProperty =
PerspexProperty.Register<Layoutable, double>(nameof(MaxWidth), double.PositiveInfinity);
/// <summary>
/// Defines the <see cref="MinHeight"/> property.
/// </summary>
public static readonly PerspexProperty<double> MinHeightProperty =
public static readonly StyledProperty<double> MinHeightProperty =
PerspexProperty.Register<Layoutable, double>(nameof(MinHeight));
/// <summary>
/// Defines the <see cref="MaxHeight"/> property.
/// </summary>
public static readonly PerspexProperty<double> MaxHeightProperty =
public static readonly StyledProperty<double> MaxHeightProperty =
PerspexProperty.Register<Layoutable, double>(nameof(MaxHeight), double.PositiveInfinity);
/// <summary>
/// Defines the <see cref="Margin"/> property.
/// </summary>
public static readonly PerspexProperty<Thickness> MarginProperty =
public static readonly StyledProperty<Thickness> MarginProperty =
PerspexProperty.Register<Layoutable, Thickness>(nameof(Margin));
/// <summary>
/// Defines the <see cref="HorizontalAlignment"/> property.
/// </summary>
public static readonly PerspexProperty<HorizontalAlignment> HorizontalAlignmentProperty =
public static readonly StyledProperty<HorizontalAlignment> HorizontalAlignmentProperty =
PerspexProperty.Register<Layoutable, HorizontalAlignment>(nameof(HorizontalAlignment));
/// <summary>
/// Defines the <see cref="VerticalAlignment"/> property.
/// </summary>
public static readonly PerspexProperty<VerticalAlignment> VerticalAlignmentProperty =
public static readonly StyledProperty<VerticalAlignment> VerticalAlignmentProperty =
PerspexProperty.Register<Layoutable, VerticalAlignment>(nameof(VerticalAlignment));
/// <summary>
/// Defines the <see cref="UseLayoutRoundingProperty"/> property.
/// </summary>
public static readonly PerspexProperty<bool> UseLayoutRoundingProperty =
public static readonly StyledProperty<bool> UseLayoutRoundingProperty =
PerspexProperty.Register<Layoutable, bool>(nameof(UseLayoutRounding), defaultValue: true, inherits: true);
private Size? _previousMeasure;

2
src/Perspex.SceneGraph/Media/Brush.cs

@ -15,7 +15,7 @@ namespace Perspex.Media
/// <summary>
/// Defines the <see cref="Opacity"/> property.
/// </summary>
public static readonly PerspexProperty<double> OpacityProperty =
public static readonly StyledProperty<double> OpacityProperty =
PerspexProperty.Register<Brush, double>(nameof(Opacity), 1.0);
/// <summary>

2
src/Perspex.SceneGraph/Media/Geometry.cs

@ -14,7 +14,7 @@ namespace Perspex.Media
/// <summary>
/// Defines the <see cref="Transform"/> property.
/// </summary>
public static readonly PerspexProperty<Transform> TransformProperty =
public static readonly StyledProperty<Transform> TransformProperty =
PerspexProperty.Register<Geometry, Transform>("Transform");
/// <summary>

4
src/Perspex.SceneGraph/Media/GradientBrush.cs

@ -8,10 +8,10 @@ namespace Perspex.Media
{
public abstract class GradientBrush : Brush
{
public static readonly PerspexProperty<GradientSpreadMethod> SpreadMethodProperty =
public static readonly StyledProperty<GradientSpreadMethod> SpreadMethodProperty =
PerspexProperty.Register<GradientBrush, GradientSpreadMethod>(nameof(SpreadMethod));
public static readonly PerspexProperty<List<GradientStop>> GradientStopsProperty =
public static readonly StyledProperty<List<GradientStop>> GradientStopsProperty =
PerspexProperty.Register<GradientBrush, List<GradientStop>>(nameof(Opacity));
public GradientBrush()

2
src/Perspex.SceneGraph/Media/ImageBush.cs

@ -13,7 +13,7 @@ namespace Perspex.Media
/// <summary>
/// Defines the <see cref="Visual"/> property.
/// </summary>
public static readonly PerspexProperty<IBitmap> SourceProperty =
public static readonly StyledProperty<IBitmap> SourceProperty =
PerspexProperty.Register<ImageBrush, IBitmap>("Source");
/// <summary>

4
src/Perspex.SceneGraph/Media/LinearGradientBrush.cs

@ -11,7 +11,7 @@ namespace Perspex.Media
/// <summary>
/// Defines the <see cref="StartPoint"/> property.
/// </summary>
public static readonly PerspexProperty<RelativePoint> StartPointProperty =
public static readonly StyledProperty<RelativePoint> StartPointProperty =
PerspexProperty.Register<LinearGradientBrush, RelativePoint>(
nameof(StartPoint),
RelativePoint.TopLeft);
@ -19,7 +19,7 @@ namespace Perspex.Media
/// <summary>
/// Defines the <see cref="EndPoint"/> property.
/// </summary>
public static readonly PerspexProperty<RelativePoint> EndPointProperty =
public static readonly StyledProperty<RelativePoint> EndPointProperty =
PerspexProperty.Register<LinearGradientBrush, RelativePoint>(
nameof(EndPoint),
RelativePoint.BottomRight);

2
src/Perspex.SceneGraph/Media/MatrixTransform.cs

@ -13,7 +13,7 @@ namespace Perspex.Media
/// <summary>
/// Defines the <see cref="Matrix"/> property.
/// </summary>
public static readonly PerspexProperty<Matrix> MatrixProperty =
public static readonly StyledProperty<Matrix> MatrixProperty =
PerspexProperty.Register<MatrixTransform, Matrix>("Matrix", Matrix.Identity);
/// <summary>

6
src/Perspex.SceneGraph/Media/RadialGradientBrush.cs

@ -12,7 +12,7 @@ namespace Perspex.Media
/// <summary>
/// Defines the <see cref="Center"/> property.
/// </summary>
public static readonly PerspexProperty<RelativePoint> CenterProperty =
public static readonly StyledProperty<RelativePoint> CenterProperty =
PerspexProperty.Register<RadialGradientBrush, RelativePoint>(
nameof(Center),
RelativePoint.Center);
@ -20,7 +20,7 @@ namespace Perspex.Media
/// <summary>
/// Defines the <see cref="GradientOrigin"/> property.
/// </summary>
public static readonly PerspexProperty<RelativePoint> GradientOriginProperty =
public static readonly StyledProperty<RelativePoint> GradientOriginProperty =
PerspexProperty.Register<RadialGradientBrush, RelativePoint>(
nameof(GradientOrigin),
RelativePoint.Center);
@ -28,7 +28,7 @@ namespace Perspex.Media
/// <summary>
/// Defines the <see cref="Radius"/> property.
/// </summary>
public static readonly PerspexProperty<double> RadiusProperty =
public static readonly StyledProperty<double> RadiusProperty =
PerspexProperty.Register<RadialGradientBrush, double>(
nameof(Radius),
0.5);

2
src/Perspex.SceneGraph/Media/RotateTransform.cs

@ -13,7 +13,7 @@ namespace Perspex.Media
/// <summary>
/// Defines the <see cref="Angle"/> property.
/// </summary>
public static readonly PerspexProperty<double> AngleProperty =
public static readonly StyledProperty<double> AngleProperty =
PerspexProperty.Register<RotateTransform, double>("Angle");
/// <summary>

12
src/Perspex.SceneGraph/Media/TileBrush.cs

@ -42,37 +42,37 @@ namespace Perspex.Media
/// <summary>
/// Defines the <see cref="AlignmentX"/> property.
/// </summary>
public static readonly PerspexProperty<AlignmentX> AlignmentXProperty =
public static readonly StyledProperty<AlignmentX> AlignmentXProperty =
PerspexProperty.Register<TileBrush, AlignmentX>(nameof(AlignmentX), AlignmentX.Center);
/// <summary>
/// Defines the <see cref="AlignmentY"/> property.
/// </summary>
public static readonly PerspexProperty<AlignmentY> AlignmentYProperty =
public static readonly StyledProperty<AlignmentY> AlignmentYProperty =
PerspexProperty.Register<TileBrush, AlignmentY>(nameof(AlignmentY), AlignmentY.Center);
/// <summary>
/// Defines the <see cref="DestinationRect"/> property.
/// </summary>
public static readonly PerspexProperty<RelativeRect> DestinationRectProperty =
public static readonly StyledProperty<RelativeRect> DestinationRectProperty =
PerspexProperty.Register<TileBrush, RelativeRect>(nameof(DestinationRect), RelativeRect.Fill);
/// <summary>
/// Defines the <see cref="SourceRect"/> property.
/// </summary>
public static readonly PerspexProperty<RelativeRect> SourceRectProperty =
public static readonly StyledProperty<RelativeRect> SourceRectProperty =
PerspexProperty.Register<TileBrush, RelativeRect>(nameof(SourceRect), RelativeRect.Fill);
/// <summary>
/// Defines the <see cref="Stretch"/> property.
/// </summary>
public static readonly PerspexProperty<Stretch> StretchProperty =
public static readonly StyledProperty<Stretch> StretchProperty =
PerspexProperty.Register<TileBrush, Stretch>(nameof(Stretch), Stretch.Uniform);
/// <summary>
/// Defines the <see cref="TileMode"/> property.
/// </summary>
public static readonly PerspexProperty<TileMode> TileModeProperty =
public static readonly StyledProperty<TileMode> TileModeProperty =
PerspexProperty.Register<TileBrush, TileMode>(nameof(TileMode));
/// <summary>

4
src/Perspex.SceneGraph/Media/TranslateTransform.cs

@ -13,13 +13,13 @@ namespace Perspex.Media
/// <summary>
/// Defines the <see cref="X"/> property.
/// </summary>
public static readonly PerspexProperty<double> XProperty =
public static readonly StyledProperty<double> XProperty =
PerspexProperty.Register<TranslateTransform, double>("X");
/// <summary>
/// Defines the <see cref="Y"/> property.
/// </summary>
public static readonly PerspexProperty<double> YProperty =
public static readonly StyledProperty<double> YProperty =
PerspexProperty.Register<TranslateTransform, double>("Y");
/// <summary>

2
src/Perspex.SceneGraph/Media/VisualBrush.cs

@ -11,7 +11,7 @@ namespace Perspex.Media
/// <summary>
/// Defines the <see cref="Visual"/> property.
/// </summary>
public static readonly PerspexProperty<IVisual> VisualProperty =
public static readonly StyledProperty<IVisual> VisualProperty =
PerspexProperty.Register<VisualBrush, IVisual>("Visual");
/// <summary>

8
tests/Perspex.Base.UnitTests/PerspexObjectTests_Binding.cs

@ -259,19 +259,19 @@ namespace Perspex.Base.UnitTests
private class Class1 : PerspexObject
{
public static readonly PerspexProperty<string> FooProperty =
public static readonly StyledProperty<string> FooProperty =
PerspexProperty.Register<Class1, string>("Foo", "foodefault");
public static readonly PerspexProperty<string> BazProperty =
public static readonly StyledProperty<string> BazProperty =
PerspexProperty.Register<Class1, string>("Baz", "bazdefault", true);
public static readonly PerspexProperty<double> QuxProperty =
public static readonly StyledProperty<double> QuxProperty =
PerspexProperty.Register<Class1, double>("Qux", 5.6);
}
private class Class2 : Class1
{
public static readonly PerspexProperty<string> BarProperty =
public static readonly StyledProperty<string> BarProperty =
PerspexProperty.Register<Class2, string>("Bar", "bardefault");
}
}

2
tests/Perspex.Base.UnitTests/PerspexObjectTests_Direct.cs

@ -374,7 +374,7 @@ namespace Perspex.Base.UnitTests
private class Class2 : PerspexObject
{
public static readonly PerspexProperty<string> FooProperty =
public static readonly DirectProperty<Class2, string> FooProperty =
Class1.FooProperty.AddOwner<Class2>(o => o.Foo, (o, v) => o.Foo = v);
private string _foo = "initial2";

4
tests/Perspex.Base.UnitTests/PerspexObjectTests_GetObservable.cs

@ -69,13 +69,13 @@ namespace Perspex.Base.UnitTests
private class Class1 : PerspexObject
{
public static readonly PerspexProperty<string> FooProperty =
public static readonly StyledProperty<string> FooProperty =
PerspexProperty.Register<Class1, string>("Foo", "foodefault");
}
private class Class2 : Class1
{
public static readonly PerspexProperty<string> BarProperty =
public static readonly StyledProperty<string> BarProperty =
PerspexProperty.Register<Class2, string>("Bar", "bardefault");
}
}

2
tests/Perspex.Base.UnitTests/PerspexObjectTests_GetSubject.cs

@ -36,7 +36,7 @@ namespace Perspex.Base.UnitTests
private class Class1 : PerspexObject
{
public static readonly PerspexProperty<string> FooProperty =
public static readonly StyledProperty<string> FooProperty =
PerspexProperty.Register<Class1, string>("Foo", "foodefault");
public string Foo

14
tests/Perspex.Base.UnitTests/PerspexObjectTests_Metadata.cs

@ -49,31 +49,31 @@ namespace Perspex.Base.UnitTests
private class Class1 : PerspexObject
{
public static readonly PerspexProperty<string> FooProperty =
public static readonly StyledProperty<string> FooProperty =
PerspexProperty.Register<Class1, string>("Foo");
public static readonly PerspexProperty<string> BazProperty =
public static readonly StyledProperty<string> BazProperty =
PerspexProperty.Register<Class1, string>("Baz");
public static readonly PerspexProperty<int> QuxProperty =
public static readonly StyledProperty<int> QuxProperty =
PerspexProperty.Register<Class1, int>("Qux");
}
private class Class2 : Class1
{
public static readonly PerspexProperty<string> BarProperty =
public static readonly StyledProperty<string> BarProperty =
PerspexProperty.Register<Class2, string>("Bar");
public static readonly PerspexProperty<double> FlobProperty =
public static readonly StyledProperty<double> FlobProperty =
PerspexProperty.Register<Class2, double>("Flob");
public static readonly PerspexProperty<double?> FredProperty =
public static readonly StyledProperty<double?> FredProperty =
PerspexProperty.Register<Class2, double?>("Fred");
}
private class AttachedOwner
{
public static readonly PerspexProperty<string> AttachedProperty =
public static readonly AttachedProperty<string> AttachedProperty =
PerspexProperty.RegisterAttached<AttachedOwner, Class1, string>("Attached");
}
}

8
tests/Perspex.Base.UnitTests/PerspexObjectTests_SetValue.cs

@ -167,19 +167,19 @@ namespace Perspex.Base.UnitTests
private class Class1 : PerspexObject
{
public static readonly PerspexProperty<string> FooProperty =
public static readonly StyledProperty<string> FooProperty =
PerspexProperty.Register<Class1, string>("Foo", "foodefault");
}
private class Class2 : Class1
{
public static readonly PerspexProperty<string> BarProperty =
public static readonly StyledProperty<string> BarProperty =
PerspexProperty.Register<Class2, string>("Bar", "bardefault");
public static readonly PerspexProperty<double> FlobProperty =
public static readonly StyledProperty<double> FlobProperty =
PerspexProperty.Register<Class2, double>("Flob");
public static readonly PerspexProperty<double?> FredProperty =
public static readonly StyledProperty<double?> FredProperty =
PerspexProperty.Register<Class2, double?>("Fred");
public Class1 Parent

12
tests/Perspex.Base.UnitTests/PerspexPropertyRegistryTests.cs

@ -136,25 +136,25 @@ namespace Perspex.Base.UnitTests
private class Class1 : PerspexObject
{
public static readonly PerspexProperty<string> FooProperty =
public static readonly StyledProperty<string> FooProperty =
PerspexProperty.Register<Class1, string>("Foo");
public static readonly PerspexProperty<string> BazProperty =
public static readonly StyledProperty<string> BazProperty =
PerspexProperty.Register<Class1, string>("Baz");
public static readonly PerspexProperty<int> QuxProperty =
public static readonly StyledProperty<int> QuxProperty =
PerspexProperty.Register<Class1, int>("Qux");
}
private class Class2 : Class1
{
public static readonly PerspexProperty<string> BarProperty =
public static readonly StyledProperty<string> BarProperty =
PerspexProperty.Register<Class2, string>("Bar");
public static readonly PerspexProperty<double> FlobProperty =
public static readonly StyledProperty<double> FlobProperty =
PerspexProperty.Register<Class2, double>("Flob");
public static readonly PerspexProperty<double?> FredProperty =
public static readonly StyledProperty<double?> FredProperty =
PerspexProperty.Register<Class2, double?>("Fred");
}

2
tests/Perspex.Base.UnitTests/PerspexPropertyTests.cs

@ -224,7 +224,7 @@ namespace Perspex.Base.UnitTests
private class Class1 : PerspexObject
{
public static readonly PerspexProperty<string> FooProperty =
public static readonly StyledProperty<string> FooProperty =
PerspexProperty.Register<Class1, string>("Foo", "default");
}

2
tests/Perspex.Base.UnitTests/StyledPropertyTests.cs

@ -35,7 +35,7 @@ namespace Perspex.Base.UnitTests
private class Class1 : PerspexObject
{
public static readonly PerspexProperty<string> FooProperty =
public static readonly StyledProperty<string> FooProperty =
PerspexProperty.Register<Class1, string>("Foo", "default");
}

2
tests/Perspex.Controls.UnitTests/Mixins/SelectableMixinTests.cs

@ -55,7 +55,7 @@ namespace Perspex.Controls.UnitTests.Mixins
private class TestControl : Control, ISelectable
{
public static readonly PerspexProperty<bool> IsSelectedProperty =
public static readonly StyledProperty<bool> IsSelectedProperty =
PerspexProperty.Register<TestControl, bool>(nameof(IsSelected));
static TestControl()

2
tests/Perspex.LeakTests/ControlTests.cs

@ -299,7 +299,7 @@ namespace Perspex.LeakTests
private class TestTemplatedControl : TemplatedControl
{
public static readonly PerspexProperty<int> IsCanvasVisibleProperty =
public static readonly StyledProperty<int> IsCanvasVisibleProperty =
PerspexProperty.Register<TestTemplatedControl, int>("IsCanvasVisible");
public TestTemplatedControl()

2
tests/Perspex.Markup.UnitTests/Data/ExpressionObserverTests_PerspexProperty.cs

@ -43,7 +43,7 @@ namespace Perspex.Markup.UnitTests.Data
private class Class1 : PerspexObject
{
public static readonly PerspexProperty<string> FooProperty =
public static readonly StyledProperty<string> FooProperty =
PerspexProperty.Register<Class1, string>("Foo", defaultValue: "foo");
}
}

4
tests/Perspex.Markup.Xaml.UnitTests/Converters/PerspexPropertyConverterTest.cs

@ -74,7 +74,7 @@ namespace Perspex.Markup.Xaml.UnitTests.Converters
private class Class1 : PerspexObject, IStyleable
{
public static readonly PerspexProperty<string> FooProperty =
public static readonly StyledProperty<string> FooProperty =
PerspexProperty.Register<Class1, string>("Foo");
public IPerspexReadOnlyList<string> Classes
@ -102,7 +102,7 @@ namespace Perspex.Markup.Xaml.UnitTests.Converters
private class AttachedOwner
{
public static readonly PerspexProperty<string> AttachedProperty =
public static readonly AttachedProperty<string> AttachedProperty =
PerspexProperty.RegisterAttached<AttachedOwner, Class1, string>("Attached");
}
}

4
tests/Perspex.Markup.Xaml.UnitTests/Data/BindingTests.cs

@ -279,10 +279,10 @@ namespace Perspex.Markup.Xaml.UnitTests.Data
private class OldDataContextTest : Control
{
public static readonly PerspexProperty<int> FooProperty =
public static readonly StyledProperty<int> FooProperty =
PerspexProperty.Register<OldDataContextTest, int>("Foo");
public static readonly PerspexProperty<int> BarProperty =
public static readonly StyledProperty<int> BarProperty =
PerspexProperty.Register<OldDataContextTest, int>("Bar");
public OldDataContextTest()

4
tests/Perspex.Markup.Xaml.UnitTests/SamplePerspexObject.cs

@ -7,10 +7,10 @@ namespace Perspex.Markup.Xaml.UnitTests
{
internal class SamplePerspexObject : PerspexObject
{
public static readonly PerspexProperty<string> StringProperty =
public static readonly StyledProperty<string> StringProperty =
PerspexProperty.Register<PerspexObject, string>("StrProp", string.Empty);
public static readonly PerspexProperty<int> IntProperty =
public static readonly StyledProperty<int> IntProperty =
PerspexProperty.Register<PerspexObject, int>("IntProp");
public int Int

2
tests/Perspex.Styling.UnitTests/ActivatedSubjectTests.cs

@ -55,7 +55,7 @@ namespace Perspex.Styling.UnitTests
private class Class1 : PerspexObject
{
public static readonly PerspexProperty<string> FooProperty =
public static readonly StyledProperty<string> FooProperty =
PerspexProperty.Register<Class1, string>("Foo", "foodefault");
public string Foo

2
tests/Perspex.Styling.UnitTests/StyleTests.cs

@ -168,7 +168,7 @@ namespace Perspex.Styling.UnitTests
private class Class1 : Control
{
public static readonly PerspexProperty<string> FooProperty =
public static readonly StyledProperty<string> FooProperty =
PerspexProperty.Register<Class1, string>("Foo", "foodefault");
public string Foo

Loading…
Cancel
Save