Browse Source

Merge branch 'master' into passwordchar_affects_render

pull/1850/head
Jumar Macato 8 years ago
committed by GitHub
parent
commit
5ab32ebfbf
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      src/Avalonia.Base/AvaloniaLocator.cs
  2. 2
      src/Avalonia.Base/AvaloniaObject.cs
  3. 4
      src/Avalonia.Base/AvaloniaProperty.cs
  4. 3
      src/Avalonia.Base/Collections/AvaloniaList.cs
  5. 2
      src/Avalonia.Base/Collections/AvaloniaListConverter.cs
  6. 1
      src/Avalonia.Base/Collections/AvaloniaListExtensions.cs
  7. 4
      src/Avalonia.Base/Collections/IAvaloniaList.cs
  8. 4
      src/Avalonia.Base/Collections/IAvaloniaReadOnlyList.cs
  9. 4
      src/Avalonia.Base/Collections/NotifyCollectionChangedExtensions.cs
  10. 10
      src/Avalonia.Base/Data/BindingChainException.cs
  11. 1
      src/Avalonia.Base/Data/BindingNotification.cs
  12. 2
      src/Avalonia.Base/Data/BindingOperations.cs
  13. 6
      src/Avalonia.Base/Data/Converters/AlwaysEnabledDelegateCommand.cs
  14. 3
      src/Avalonia.Base/Data/Converters/DefaultValueConverter.cs
  15. 1
      src/Avalonia.Base/Data/Converters/IValueConverter.cs
  16. 3
      src/Avalonia.Base/Data/Converters/StringConverters.cs
  17. 2
      src/Avalonia.Base/Data/Core/AvaloniaPropertyAccessorNode.cs
  18. 3
      src/Avalonia.Base/Data/Core/EmptyExpressionNode.cs
  19. 1
      src/Avalonia.Base/Data/Core/ExpressionObserver.cs
  20. 1
      src/Avalonia.Base/Data/Core/ExpressionParseException.cs
  21. 6
      src/Avalonia.Base/Data/Core/ITransformNode.cs
  22. 2
      src/Avalonia.Base/Data/Core/IndexerExpressionNode.cs
  23. 4
      src/Avalonia.Base/Data/Core/IndexerNodeBase.cs
  24. 1
      src/Avalonia.Base/Data/Core/LogicalNotNode.cs
  25. 5
      src/Avalonia.Base/Data/Core/Parsers/ExpressionTreeParser.cs
  26. 2
      src/Avalonia.Base/Data/Core/Parsers/ExpressionVisitorNodeBuilder.cs
  27. 2
      src/Avalonia.Base/Data/Core/Plugins/AvaloniaPropertyAccessorPlugin.cs
  28. 3
      src/Avalonia.Base/Data/Core/Plugins/DataAnnotationsValidationPlugin.cs
  29. 8
      src/Avalonia.Base/Data/Core/Plugins/DataValidationBase.cs
  30. 2
      src/Avalonia.Base/Data/Core/Plugins/ExceptionValidationPlugin.cs
  31. 1
      src/Avalonia.Base/Data/Core/Plugins/IDataValidationPlugin.cs
  32. 2
      src/Avalonia.Base/Data/Core/Plugins/IndeiValidationPlugin.cs
  33. 2
      src/Avalonia.Base/Data/Core/Plugins/InpcPropertyAccessorPlugin.cs
  34. 5
      src/Avalonia.Base/Data/Core/Plugins/MethodAccessorPlugin.cs
  35. 2
      src/Avalonia.Base/Data/Core/Plugins/TaskStreamPlugin.cs
  36. 7
      src/Avalonia.Base/Data/Core/SettableNode.cs
  37. 2
      src/Avalonia.Base/Data/Core/StreamBindingExtensions.cs
  38. 2
      src/Avalonia.Base/Data/IBinding.cs
  39. 2
      src/Avalonia.Base/Logging/Logger.cs
  40. 4
      src/Avalonia.Base/Platform/IRuntimePlatform.cs
  41. 1
      src/Avalonia.Base/PriorityLevel.cs
  42. 6
      src/Avalonia.Base/PriorityValue.cs
  43. 1
      src/Avalonia.Base/PropertyMetadata.cs
  44. 7
      src/Avalonia.Base/Threading/AvaloniaSynchronizationContext.cs
  45. 2
      src/Avalonia.Base/Utilities/CharacterReader.cs
  46. 3
      src/Avalonia.Base/Utilities/DeferredSetter.cs
  47. 2
      src/Avalonia.Base/Utilities/IdentifierParser.cs
  48. 4
      src/Avalonia.Base/Utilities/MathUtilities.cs
  49. 2
      src/Avalonia.Base/Utilities/SingleOrDictionary.cs
  50. 1
      src/Avalonia.Base/Utilities/SingleOrQueue.cs
  51. 11
      src/Avalonia.Base/Utilities/TypeUtilities.cs
  52. 4
      src/Avalonia.Base/Utilities/WeakTimer.cs
  53. 6
      src/Avalonia.Base/ValueStore.cs
  54. 6
      src/Avalonia.Controls/AppBuilderBase.cs
  55. 1
      src/Avalonia.Controls/Application.cs
  56. 14
      src/Avalonia.Controls/AutoCompleteBox.cs
  57. 3
      src/Avalonia.Controls/Border.cs
  58. 6
      src/Avalonia.Controls/Calendar/Calendar.cs
  59. 3
      src/Avalonia.Controls/Calendar/CalendarBlackoutDatesCollection.cs
  60. 1
      src/Avalonia.Controls/Calendar/CalendarDateRange.cs
  61. 4
      src/Avalonia.Controls/Calendar/CalendarDayButton.cs
  62. 3
      src/Avalonia.Controls/Calendar/CalendarExtensions.cs
  63. 6
      src/Avalonia.Controls/Calendar/CalendarItem.cs
  64. 11
      src/Avalonia.Controls/Calendar/DatePicker.cs
  65. 2
      src/Avalonia.Controls/ContextMenu.cs
  66. 16
      src/Avalonia.Controls/Control.cs
  67. 1
      src/Avalonia.Controls/DataValidationErrors.cs
  68. 1
      src/Avalonia.Controls/Embedding/EmbeddableControlRoot.cs
  69. 5
      src/Avalonia.Controls/Embedding/Offscreen/OffscreenTopLevel.cs
  70. 3
      src/Avalonia.Controls/Embedding/Offscreen/OffscreenTopLevelImpl.cs
  71. 1
      src/Avalonia.Controls/Expander.cs
  72. 4
      src/Avalonia.Controls/Generators/IItemContainerGenerator.cs
  73. 4
      src/Avalonia.Controls/Generators/ITreeItemContainerGenerator.cs
  74. 2
      src/Avalonia.Controls/Generators/ItemContainerGenerator`1.cs
  75. 8
      src/Avalonia.Controls/Generators/MenuItemContainerGenerator.cs
  76. 2
      src/Avalonia.Controls/Generators/TreeContainerIndex.cs
  77. 1
      src/Avalonia.Controls/Generators/TreeItemContainerGenerator.cs
  78. 5
      src/Avalonia.Controls/GridLength.cs
  79. 16
      src/Avalonia.Controls/GridSplitter.cs
  80. 5
      src/Avalonia.Controls/HotkeyManager.cs
  81. 4
      src/Avalonia.Controls/IApplicationLifecycle.cs
  82. 5
      src/Avalonia.Controls/IControl.cs
  83. 3
      src/Avalonia.Controls/IMenu.cs
  84. 3
      src/Avalonia.Controls/IMenuElement.cs
  85. 4
      src/Avalonia.Controls/IMenuItem.cs
  86. 2
      src/Avalonia.Controls/IScrollable.cs
  87. 2
      src/Avalonia.Controls/IVirtualizingPanel.cs
  88. 2
      src/Avalonia.Controls/ItemsControl.cs
  89. 2
      src/Avalonia.Controls/Menu.cs
  90. 8
      src/Avalonia.Controls/Mixins/ContentControlMixin.cs
  91. 8
      src/Avalonia.Controls/NumericUpDown/NumericUpDown.cs
  92. 4
      src/Avalonia.Controls/Platform/ExportWindowingSubsystemAttribute.cs
  93. 5
      src/Avalonia.Controls/Platform/IMenuInteractionHandler.cs
  94. 8
      src/Avalonia.Controls/Platform/IPlatformIconLoader.cs
  95. 6
      src/Avalonia.Controls/Platform/IWindowBaseImpl.cs
  96. 6
      src/Avalonia.Controls/Platform/IWindowingPlatform.cs
  97. 7
      src/Avalonia.Controls/Platform/Surfaces/IFramebufferPlatformSurface.cs
  98. 3
      src/Avalonia.Controls/Presenters/CarouselPresenter.cs
  99. 1
      src/Avalonia.Controls/Presenters/IPresenter.cs
  100. 1
      src/Avalonia.Controls/Presenters/ItemVirtualizer.cs

1
src/Avalonia.Base/AvaloniaLocator.cs

@ -1,6 +1,5 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Reactive.Disposables;
#pragma warning disable CS1591 // Enable me later #pragma warning disable CS1591 // Enable me later

2
src/Avalonia.Base/AvaloniaObject.cs

@ -5,12 +5,10 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Linq; using System.Linq;
using System.Reactive.Disposables;
using System.Reactive.Linq; using System.Reactive.Linq;
using Avalonia.Data; using Avalonia.Data;
using Avalonia.Diagnostics; using Avalonia.Diagnostics;
using Avalonia.Logging; using Avalonia.Logging;
using Avalonia.Reactive;
using Avalonia.Threading; using Avalonia.Threading;
using Avalonia.Utilities; using Avalonia.Utilities;

4
src/Avalonia.Base/AvaloniaProperty.cs

@ -231,7 +231,7 @@ namespace Avalonia
} }
/// <summary> /// <summary>
/// Tests two <see cref="AvaloniaProperty"/>s for unequality. /// Tests two <see cref="AvaloniaProperty"/>s for inequality.
/// </summary> /// </summary>
/// <param name="a">The first property.</param> /// <param name="a">The first property.</param>
/// <param name="b">The second property.</param> /// <param name="b">The second property.</param>
@ -558,4 +558,4 @@ namespace Avalonia
public override string ToString() => "(unset)"; public override string ToString() => "(unset)";
} }
} }
} }

3
src/Avalonia.Base/Collections/AvaloniaList.cs

@ -8,7 +8,6 @@ using System.Collections.Specialized;
using System.ComponentModel; using System.ComponentModel;
using System.Linq; using System.Linq;
using Avalonia.Diagnostics; using Avalonia.Diagnostics;
using Avalonia.Platform;
namespace Avalonia.Collections namespace Avalonia.Collections
{ {
@ -551,4 +550,4 @@ namespace Avalonia.Collections
NotifyCountChanged(); NotifyCountChanged();
} }
} }
} }

2
src/Avalonia.Base/Collections/AvaloniaListConverter.cs

@ -40,4 +40,4 @@ namespace Avalonia.Collections
return result; return result;
} }
} }
} }

1
src/Avalonia.Base/Collections/AvaloniaListExtensions.cs

@ -6,7 +6,6 @@ using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.Specialized; using System.Collections.Specialized;
using System.ComponentModel; using System.ComponentModel;
using System.Linq;
using System.Reactive.Disposables; using System.Reactive.Disposables;
namespace Avalonia.Collections namespace Avalonia.Collections

4
src/Avalonia.Base/Collections/IAvaloniaList.cs

@ -6,7 +6,7 @@ using System.Collections.Generic;
namespace Avalonia.Collections namespace Avalonia.Collections
{ {
/// <summary> /// <summary>
/// A notiftying list. /// A notifying list.
/// </summary> /// </summary>
/// <typeparam name="T">The type of the items in the list.</typeparam> /// <typeparam name="T">The type of the items in the list.</typeparam>
public interface IAvaloniaList<T> : IList<T>, IAvaloniaReadOnlyList<T> public interface IAvaloniaList<T> : IList<T>, IAvaloniaReadOnlyList<T>
@ -64,4 +64,4 @@ namespace Avalonia.Collections
/// <param name="count">The number of items to remove.</param> /// <param name="count">The number of items to remove.</param>
void RemoveRange(int index, int count); void RemoveRange(int index, int count);
} }
} }

4
src/Avalonia.Base/Collections/IAvaloniaReadOnlyList.cs

@ -8,10 +8,10 @@ using System.ComponentModel;
namespace Avalonia.Collections namespace Avalonia.Collections
{ {
/// <summary> /// <summary>
/// A read-only notiftying list. /// A read-only notifying list.
/// </summary> /// </summary>
/// <typeparam name="T">The type of the items in the list.</typeparam> /// <typeparam name="T">The type of the items in the list.</typeparam>
public interface IAvaloniaReadOnlyList<out T> : IReadOnlyList<T>, INotifyCollectionChanged, INotifyPropertyChanged public interface IAvaloniaReadOnlyList<out T> : IReadOnlyList<T>, INotifyCollectionChanged, INotifyPropertyChanged
{ {
} }
} }

4
src/Avalonia.Base/Collections/NotifyCollectionChangedExtensions.cs

@ -25,7 +25,7 @@ namespace Avalonia.Collections
} }
/// <summary> /// <summary>
/// Subcribes to the CollectionChanged event using a weak subscription. /// Subscribes to the CollectionChanged event using a weak subscription.
/// </summary> /// </summary>
/// <param name="collection">The collection.</param> /// <param name="collection">The collection.</param>
/// <param name="handler"> /// <param name="handler">
@ -44,7 +44,7 @@ namespace Avalonia.Collections
} }
/// <summary> /// <summary>
/// Subcribes to the CollectionChanged event using a weak subscription. /// Subscribes to the CollectionChanged event using a weak subscription.
/// </summary> /// </summary>
/// <param name="collection">The collection.</param> /// <param name="collection">The collection.</param>
/// <param name="handler"> /// <param name="handler">

10
src/Avalonia.Base/Data/BindingChainException.cs

@ -6,7 +6,7 @@ using System;
namespace Avalonia.Data namespace Avalonia.Data
{ {
/// <summary> /// <summary>
/// An exception returned through <see cref="BindingNotification"/> signalling that a /// An exception returned through <see cref="BindingNotification"/> signaling that a
/// requested binding expression could not be evaluated because of a null in one of the links /// requested binding expression could not be evaluated because of a null in one of the links
/// of the binding chain. /// of the binding chain.
/// </summary> /// </summary>
@ -15,14 +15,14 @@ namespace Avalonia.Data
private string _message; private string _message;
/// <summary> /// <summary>
/// Initalizes a new instance of the <see cref="BindingChainException"/> class. /// Initializes a new instance of the <see cref="BindingChainException"/> class.
/// </summary> /// </summary>
public BindingChainException() public BindingChainException()
{ {
} }
/// <summary> /// <summary>
/// Initalizes a new instance of the <see cref="BindingChainException"/> class. /// Initializes a new instance of the <see cref="BindingChainException"/> class.
/// </summary> /// </summary>
/// <param name="message">The error message.</param> /// <param name="message">The error message.</param>
public BindingChainException(string message) public BindingChainException(string message)
@ -31,7 +31,7 @@ namespace Avalonia.Data
} }
/// <summary> /// <summary>
/// Initalizes a new instance of the <see cref="BindingChainException"/> class. /// Initializes a new instance of the <see cref="BindingChainException"/> class.
/// </summary> /// </summary>
/// <param name="message">The error message.</param> /// <param name="message">The error message.</param>
/// <param name="expression">The expression.</param> /// <param name="expression">The expression.</param>
@ -51,7 +51,7 @@ namespace Avalonia.Data
public string Expression { get; protected set; } public string Expression { get; protected set; }
/// <summary> /// <summary>
/// Gets the point in the expression at which the error occured. /// Gets the point in the expression at which the error occurred.
/// </summary> /// </summary>
public string ExpressionErrorPoint { get; protected set; } public string ExpressionErrorPoint { get; protected set; }

1
src/Avalonia.Base/Data/BindingNotification.cs

@ -2,7 +2,6 @@
// Licensed under the MIT license. See licence.md file in the project root for full license information. // Licensed under the MIT license. See licence.md file in the project root for full license information.
using System; using System;
using Avalonia.Logging;
namespace Avalonia.Data namespace Avalonia.Data
{ {

2
src/Avalonia.Base/Data/BindingOperations.cs

@ -20,7 +20,7 @@ namespace Avalonia.Data
/// An optional anchor from which to locate required context. When binding to objects that /// An optional anchor from which to locate required context. When binding to objects that
/// are not in the logical tree, certain types of binding need an anchor into the tree in /// are not in the logical tree, certain types of binding need an anchor into the tree in
/// order to locate named controls or resources. The <paramref name="anchor"/> parameter /// order to locate named controls or resources. The <paramref name="anchor"/> parameter
/// can be used to provice this context. /// can be used to provide this context.
/// </param> /// </param>
/// <returns>An <see cref="IDisposable"/> which can be used to cancel the binding.</returns> /// <returns>An <see cref="IDisposable"/> which can be used to cancel the binding.</returns>
public static IDisposable Apply( public static IDisposable Apply(

6
src/Avalonia.Base/Data/Converters/AlwaysEnabledDelegateCommand.cs

@ -1,10 +1,8 @@
using Avalonia.Utilities; using System;
using System;
using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using System.Reflection; using System.Reflection;
using System.Text;
using System.Windows.Input; using System.Windows.Input;
using Avalonia.Utilities;
namespace Avalonia.Data.Converters namespace Avalonia.Data.Converters
{ {

3
src/Avalonia.Base/Data/Converters/DefaultValueConverter.cs

@ -3,9 +3,8 @@
using System; using System;
using System.Globalization; using System.Globalization;
using Avalonia.Data;
using Avalonia.Utilities;
using System.Windows.Input; using System.Windows.Input;
using Avalonia.Utilities;
namespace Avalonia.Data.Converters namespace Avalonia.Data.Converters
{ {

1
src/Avalonia.Base/Data/Converters/IValueConverter.cs

@ -3,7 +3,6 @@
using System; using System;
using System.Globalization; using System.Globalization;
using Avalonia.Data;
namespace Avalonia.Data.Converters namespace Avalonia.Data.Converters
{ {

3
src/Avalonia.Base/Data/Converters/StringConverters.cs

@ -1,9 +1,6 @@
// Copyright (c) The Avalonia Project. All rights reserved. // 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. // Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using System.Globalization;
using Avalonia.Utilities;
namespace Avalonia.Data.Converters namespace Avalonia.Data.Converters
{ {

2
src/Avalonia.Base/Data/Core/AvaloniaPropertyAccessorNode.cs

@ -1,7 +1,5 @@
using System; using System;
using System.Collections.Generic;
using System.Reactive.Linq; using System.Reactive.Linq;
using System.Text;
using Avalonia.Reactive; using Avalonia.Reactive;
namespace Avalonia.Data.Core namespace Avalonia.Data.Core

3
src/Avalonia.Base/Data/Core/EmptyExpressionNode.cs

@ -1,9 +1,6 @@
// Copyright (c) The Avalonia Project. All rights reserved. // 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. // Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using System.Reactive.Linq;
namespace Avalonia.Data.Core namespace Avalonia.Data.Core
{ {
public class EmptyExpressionNode : ExpressionNode public class EmptyExpressionNode : ExpressionNode

1
src/Avalonia.Base/Data/Core/ExpressionObserver.cs

@ -6,7 +6,6 @@ using System.Collections.Generic;
using System.Linq.Expressions; using System.Linq.Expressions;
using System.Reactive; using System.Reactive;
using System.Reactive.Linq; using System.Reactive.Linq;
using Avalonia.Data;
using Avalonia.Data.Core.Parsers; using Avalonia.Data.Core.Parsers;
using Avalonia.Data.Core.Plugins; using Avalonia.Data.Core.Plugins;
using Avalonia.Reactive; using Avalonia.Reactive;

1
src/Avalonia.Base/Data/Core/ExpressionParseException.cs

@ -2,7 +2,6 @@
// Licensed under the MIT license. See licence.md file in the project root for full license information. // Licensed under the MIT license. See licence.md file in the project root for full license information.
using System; using System;
using Avalonia.Data.Core.Parsers;
namespace Avalonia.Data.Core namespace Avalonia.Data.Core
{ {

6
src/Avalonia.Base/Data/Core/ITransformNode.cs

@ -1,8 +1,4 @@
using System; namespace Avalonia.Data.Core
using System.Collections.Generic;
using System.Text;
namespace Avalonia.Data.Core
{ {
interface ITransformNode interface ITransformNode
{ {

2
src/Avalonia.Base/Data/Core/IndexerExpressionNode.cs

@ -3,8 +3,6 @@ using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Linq.Expressions; using System.Linq.Expressions;
using System.Reflection; using System.Reflection;
using System.Text;
using Avalonia.Data;
namespace Avalonia.Data.Core namespace Avalonia.Data.Core
{ {

4
src/Avalonia.Base/Data/Core/IndexerNodeBase.cs

@ -3,12 +3,8 @@ using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.Specialized; using System.Collections.Specialized;
using System.ComponentModel; using System.ComponentModel;
using System.Globalization;
using System.Linq; using System.Linq;
using System.Reactive.Linq; using System.Reactive.Linq;
using System.Reflection;
using System.Text;
using Avalonia.Data;
using Avalonia.Utilities; using Avalonia.Utilities;
namespace Avalonia.Data.Core namespace Avalonia.Data.Core

1
src/Avalonia.Base/Data/Core/LogicalNotNode.cs

@ -3,7 +3,6 @@
using System; using System;
using System.Globalization; using System.Globalization;
using Avalonia.Data;
namespace Avalonia.Data.Core namespace Avalonia.Data.Core
{ {

5
src/Avalonia.Base/Data/Core/Parsers/ExpressionTreeParser.cs

@ -1,8 +1,5 @@
using System; using System.Linq;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions; using System.Linq.Expressions;
using System.Text;
namespace Avalonia.Data.Core.Parsers namespace Avalonia.Data.Core.Parsers
{ {

2
src/Avalonia.Base/Data/Core/Parsers/ExpressionVisitorNodeBuilder.cs

@ -1,10 +1,8 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics;
using System.Linq; using System.Linq;
using System.Linq.Expressions; using System.Linq.Expressions;
using System.Reflection; using System.Reflection;
using System.Text;
namespace Avalonia.Data.Core.Parsers namespace Avalonia.Data.Core.Parsers
{ {

2
src/Avalonia.Base/Data/Core/Plugins/AvaloniaPropertyAccessorPlugin.cs

@ -2,9 +2,7 @@
// Licensed under the MIT license. See licence.md file in the project root for full license information. // Licensed under the MIT license. See licence.md file in the project root for full license information.
using System; using System;
using System.Linq;
using System.Reactive.Linq; using System.Reactive.Linq;
using Avalonia.Data;
namespace Avalonia.Data.Core.Plugins namespace Avalonia.Data.Core.Plugins
{ {

3
src/Avalonia.Base/Data/Core/Plugins/DataAnnotationsValidationPlugin.cs

@ -6,7 +6,6 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using Avalonia.Data;
namespace Avalonia.Data.Core.Plugins namespace Avalonia.Data.Core.Plugins
{ {
@ -31,7 +30,7 @@ namespace Avalonia.Data.Core.Plugins
return new Accessor(reference, name, inner); return new Accessor(reference, name, inner);
} }
private class Accessor : DataValidatiorBase private class Accessor : DataValidationBase
{ {
private ValidationContext _context; private ValidationContext _context;

8
src/Avalonia.Base/Data/Core/Plugins/DataValidatiorBase.cs → src/Avalonia.Base/Data/Core/Plugins/DataValidationBase.cs

@ -15,15 +15,15 @@ namespace Avalonia.Data.Core.Plugins
/// and convert any values received from the inner property accessor into /// and convert any values received from the inner property accessor into
/// <see cref="BindingNotification"/>s. /// <see cref="BindingNotification"/>s.
/// </remarks> /// </remarks>
public abstract class DataValidatiorBase : PropertyAccessorBase, IObserver<object> public abstract class DataValidationBase : PropertyAccessorBase, IObserver<object>
{ {
private readonly IPropertyAccessor _inner; private readonly IPropertyAccessor _inner;
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="DataValidatiorBase"/> class. /// Initializes a new instance of the <see cref="DataValidationBase"/> class.
/// </summary> /// </summary>
/// <param name="inner">The inner property accessor.</param> /// <param name="inner">The inner property accessor.</param>
protected DataValidatiorBase(IPropertyAccessor inner) protected DataValidationBase(IPropertyAccessor inner)
{ {
_inner = inner; _inner = inner;
} }
@ -77,4 +77,4 @@ namespace Avalonia.Data.Core.Plugins
PublishValue(notification); PublishValue(notification);
} }
} }
} }

2
src/Avalonia.Base/Data/Core/Plugins/ExceptionValidationPlugin.cs

@ -20,7 +20,7 @@ namespace Avalonia.Data.Core.Plugins
return new Validator(reference, name, inner); return new Validator(reference, name, inner);
} }
private class Validator : DataValidatiorBase private class Validator : DataValidationBase
{ {
public Validator(WeakReference reference, string name, IPropertyAccessor inner) public Validator(WeakReference reference, string name, IPropertyAccessor inner)
: base(inner) : base(inner)

1
src/Avalonia.Base/Data/Core/Plugins/IDataValidationPlugin.cs

@ -2,7 +2,6 @@
// Licensed under the MIT license. See licence.md file in the project root for full license information. // Licensed under the MIT license. See licence.md file in the project root for full license information.
using System; using System;
using Avalonia.Data;
namespace Avalonia.Data.Core.Plugins namespace Avalonia.Data.Core.Plugins
{ {

2
src/Avalonia.Base/Data/Core/Plugins/IndeiValidationPlugin.cs

@ -23,7 +23,7 @@ namespace Avalonia.Data.Core.Plugins
return new Validator(reference, name, accessor); return new Validator(reference, name, accessor);
} }
private class Validator : DataValidatiorBase, IWeakSubscriber<DataErrorsChangedEventArgs> private class Validator : DataValidationBase, IWeakSubscriber<DataErrorsChangedEventArgs>
{ {
WeakReference _reference; WeakReference _reference;
string _name; string _name;

2
src/Avalonia.Base/Data/Core/Plugins/InpcPropertyAccessorPlugin.cs

@ -6,8 +6,6 @@ using System.ComponentModel;
using System.Linq; using System.Linq;
using System.Reactive.Linq; using System.Reactive.Linq;
using System.Reflection; using System.Reflection;
using Avalonia.Data;
using Avalonia.Logging;
using Avalonia.Utilities; using Avalonia.Utilities;
namespace Avalonia.Data.Core.Plugins namespace Avalonia.Data.Core.Plugins

5
src/Avalonia.Base/Data/Core/Plugins/MethodAccessorPlugin.cs

@ -1,9 +1,6 @@
using System; using System;
using System.Collections.Generic;
using System.Text;
using Avalonia.Data;
using System.Reflection;
using System.Linq; using System.Linq;
using System.Reflection;
namespace Avalonia.Data.Core.Plugins namespace Avalonia.Data.Core.Plugins
{ {

2
src/Avalonia.Base/Data/Core/Plugins/TaskStreamPlugin.cs

@ -2,12 +2,10 @@
// Licensed under the MIT license. See licence.md file in the project root for full license information. // Licensed under the MIT license. See licence.md file in the project root for full license information.
using System; using System;
using System.Reactive.Concurrency;
using System.Reactive.Linq; using System.Reactive.Linq;
using System.Reactive.Subjects; using System.Reactive.Subjects;
using System.Reflection; using System.Reflection;
using System.Threading.Tasks; using System.Threading.Tasks;
using Avalonia.Data;
namespace Avalonia.Data.Core.Plugins namespace Avalonia.Data.Core.Plugins
{ {

7
src/Avalonia.Base/Data/Core/SettableNode.cs

@ -1,9 +1,4 @@
using Avalonia.Data; using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Avalonia.Data.Core namespace Avalonia.Data.Core
{ {

2
src/Avalonia.Base/Data/Core/StreamBindingExtensions.cs

@ -1,6 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Avalonia namespace Avalonia

2
src/Avalonia.Base/Data/IBinding.cs

@ -17,7 +17,7 @@ namespace Avalonia.Data
/// An optional anchor from which to locate required context. When binding to objects that /// An optional anchor from which to locate required context. When binding to objects that
/// are not in the logical tree, certain types of binding need an anchor into the tree in /// are not in the logical tree, certain types of binding need an anchor into the tree in
/// order to locate named controls or resources. The <paramref name="anchor"/> parameter /// order to locate named controls or resources. The <paramref name="anchor"/> parameter
/// can be used to provice this context. /// can be used to provide this context.
/// </param> /// </param>
/// <param name="enableDataValidation">Whether data validation should be enabled.</param> /// <param name="enableDataValidation">Whether data validation should be enabled.</param>
/// <returns> /// <returns>

2
src/Avalonia.Base/Logging/Logger.cs

@ -11,7 +11,7 @@ namespace Avalonia.Logging
public static class Logger public static class Logger
{ {
/// <summary> /// <summary>
/// Gets or sets the application-defined sink that recieves the messages. /// Gets or sets the application-defined sink that receives the messages.
/// </summary> /// </summary>
public static ILogSink Sink { get; set; } public static ILogSink Sink { get; set; }

4
src/Avalonia.Base/Platform/IRuntimePlatform.cs

@ -1,9 +1,5 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection; using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace Avalonia.Platform namespace Avalonia.Platform
{ {

1
src/Avalonia.Base/PriorityLevel.cs

@ -5,7 +5,6 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Reactive.Disposables; using System.Reactive.Disposables;
using Avalonia.Data; using Avalonia.Data;
using Avalonia.Logging;
namespace Avalonia namespace Avalonia
{ {

6
src/Avalonia.Base/PriorityValue.cs

@ -12,12 +12,12 @@ using Avalonia.Utilities;
namespace Avalonia namespace Avalonia
{ {
/// <summary> /// <summary>
/// Maintains a list of prioritised bindings together with a current value. /// Maintains a list of prioritized bindings together with a current value.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// Bindings, in the form of <see cref="IObservable{Object}"/>s are added to the object using /// Bindings, in the form of <see cref="IObservable{Object}"/>s are added to the object using
/// the <see cref="Add"/> method. With the observable is passed a priority, where lower values /// the <see cref="Add"/> method. With the observable is passed a priority, where lower values
/// represent higher priorites. The current <see cref="Value"/> is selected from the highest /// represent higher priorities. The current <see cref="Value"/> is selected from the highest
/// priority binding that doesn't return <see cref="AvaloniaProperty.UnsetValue"/>. Where there /// priority binding that doesn't return <see cref="AvaloniaProperty.UnsetValue"/>. Where there
/// are multiple bindings registered with the same priority, the most recently added binding /// are multiple bindings registered with the same priority, the most recently added binding
/// has a higher priority. Each time the value changes, the /// has a higher priority. Each time the value changes, the
@ -236,7 +236,7 @@ namespace Avalonia
} }
/// <summary> /// <summary>
/// Updates the current <see cref="Value"/> and notifies all subscibers. /// Updates the current <see cref="Value"/> and notifies all subscribers.
/// </summary> /// </summary>
/// <param name="value">The value to set.</param> /// <param name="value">The value to set.</param>
/// <param name="priority">The priority level that the value came from.</param> /// <param name="priority">The priority level that the value came from.</param>

1
src/Avalonia.Base/PropertyMetadata.cs

@ -1,7 +1,6 @@
// Copyright (c) The Avalonia Project. All rights reserved. // 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. // Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using Avalonia.Data; using Avalonia.Data;
namespace Avalonia namespace Avalonia

7
src/Avalonia.Base/Threading/AvaloniaSynchronizationContext.cs

@ -1,11 +1,6 @@
// Copyright (c) The Avalonia Project. All rights reserved. // 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. // Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading; using System.Threading;
namespace Avalonia.Threading namespace Avalonia.Threading
@ -48,4 +43,4 @@ namespace Avalonia.Threading
Dispatcher.UIThread.InvokeAsync(() => d(state), DispatcherPriority.Send).Wait(); Dispatcher.UIThread.InvokeAsync(() => d(state), DispatcherPriority.Send).Wait();
} }
} }
} }

2
src/Avalonia.Base/Utilities/CharacterReader.cs

@ -2,8 +2,6 @@
// Licensed under the MIT license. See licence.md file in the project root for full license information. // Licensed under the MIT license. See licence.md file in the project root for full license information.
using System; using System;
using System.Globalization;
using System.Text;
namespace Avalonia.Utilities namespace Avalonia.Utilities
{ {

3
src/Avalonia.Base/Utilities/DeferredSetter.cs

@ -1,8 +1,5 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Reactive.Disposables;
using System.Runtime.CompilerServices;
using System.Text;
namespace Avalonia.Utilities namespace Avalonia.Utilities
{ {

2
src/Avalonia.Base/Utilities/IdentifierParser.cs

@ -2,9 +2,7 @@
// Licensed under the MIT license. See licence.md file in the project root for full license information. // Licensed under the MIT license. See licence.md file in the project root for full license information.
using System; using System;
using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using System.Text;
namespace Avalonia.Utilities namespace Avalonia.Utilities
{ {

4
src/Avalonia.Base/Utilities/MathUtilities.cs

@ -1,10 +1,6 @@
// Copyright (c) The Avalonia Project. All rights reserved. // 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. // Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
namespace Avalonia.Utilities namespace Avalonia.Utilities
{ {

2
src/Avalonia.Base/Utilities/SingleOrDictionary.cs

@ -2,8 +2,6 @@
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Avalonia.Utilities namespace Avalonia.Utilities
{ {

1
src/Avalonia.Base/Utilities/SingleOrQueue.cs

@ -1,6 +1,5 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text;
namespace Avalonia.Utilities namespace Avalonia.Utilities
{ {

11
src/Avalonia.Base/Utilities/TypeUtilities.cs

@ -2,7 +2,6 @@
// Licensed under the MIT license. See licence.md file in the project root for full license information. // Licensed under the MIT license. See licence.md file in the project root for full license information.
using System; using System;
using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
@ -103,8 +102,8 @@ namespace Avalonia.Utilities
/// <param name="to">The type to cast to.</param> /// <param name="to">The type to cast to.</param>
/// <param name="value">The value to cast.</param> /// <param name="value">The value to cast.</param>
/// <param name="culture">The culture to use.</param> /// <param name="culture">The culture to use.</param>
/// <param name="result">If sucessful, contains the cast value.</param> /// <param name="result">If successful, contains the cast value.</param>
/// <returns>True if the cast was sucessful, otherwise false.</returns> /// <returns>True if the cast was successful, otherwise false.</returns>
public static bool TryConvert(Type to, object value, CultureInfo culture, out object result) public static bool TryConvert(Type to, object value, CultureInfo culture, out object result)
{ {
if (value == null) if (value == null)
@ -208,8 +207,8 @@ namespace Avalonia.Utilities
/// </summary> /// </summary>
/// <param name="to">The type to cast to.</param> /// <param name="to">The type to cast to.</param>
/// <param name="value">The value to cast.</param> /// <param name="value">The value to cast.</param>
/// <param name="result">If sucessful, contains the cast value.</param> /// <param name="result">If successful, contains the cast value.</param>
/// <returns>True if the cast was sucessful, otherwise false.</returns> /// <returns>True if the cast was successful, otherwise false.</returns>
public static bool TryConvertImplicit(Type to, object value, out object result) public static bool TryConvertImplicit(Type to, object value, out object result)
{ {
if (value == null) if (value == null)
@ -315,7 +314,7 @@ namespace Avalonia.Utilities
/// Determines if a type is numeric. Nullable numeric types are considered numeric. /// Determines if a type is numeric. Nullable numeric types are considered numeric.
/// </summary> /// </summary>
/// <returns> /// <returns>
/// True if the type is numberic; otherwise false. /// True if the type is numeric; otherwise false.
/// </returns> /// </returns>
/// <remarks> /// <remarks>
/// Boolean is not considered numeric. /// Boolean is not considered numeric.

4
src/Avalonia.Base/Utilities/WeakTimer.cs

@ -1,8 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Avalonia.Threading; using Avalonia.Threading;
namespace Avalonia.Utilities namespace Avalonia.Utilities

6
src/Avalonia.Base/ValueStore.cs

@ -168,14 +168,14 @@ namespace Avalonia
return value; return value;
} }
private DeferredSetter<object> _defferedSetter; private DeferredSetter<object> _deferredSetter;
public DeferredSetter<object> Setter public DeferredSetter<object> Setter
{ {
get get
{ {
return _defferedSetter ?? return _deferredSetter ??
(_defferedSetter = new DeferredSetter<object>()); (_deferredSetter = new DeferredSetter<object>());
} }
} }
} }

6
src/Avalonia.Controls/AppBuilderBase.cs

@ -57,14 +57,14 @@ namespace Avalonia.Controls
public Action<TAppBuilder> AfterSetupCallback { get; private set; } = builder => { }; public Action<TAppBuilder> AfterSetupCallback { get; private set; } = builder => { };
/// <summary> /// <summary>
/// Gets or sets a method to call before Startis called on the <see cref="Application"/>. /// Gets or sets a method to call before Start is called on the <see cref="Application"/>.
/// </summary> /// </summary>
public Action<TAppBuilder> BeforeStartCallback { get; private set; } = builder => { }; public Action<TAppBuilder> BeforeStartCallback { get; private set; } = builder => { };
protected AppBuilderBase(IRuntimePlatform platform, Action<TAppBuilder> platformSevices) protected AppBuilderBase(IRuntimePlatform platform, Action<TAppBuilder> platformServices)
{ {
RuntimePlatform = platform; RuntimePlatform = platform;
RuntimePlatformServicesInitializer = () => platformSevices((TAppBuilder)this); RuntimePlatformServicesInitializer = () => platformServices((TAppBuilder)this);
} }
/// <summary> /// <summary>

1
src/Avalonia.Controls/Application.cs

@ -9,7 +9,6 @@ using Avalonia.Controls.Templates;
using Avalonia.Input; using Avalonia.Input;
using Avalonia.Input.Platform; using Avalonia.Input.Platform;
using Avalonia.Input.Raw; using Avalonia.Input.Raw;
using Avalonia.Layout;
using Avalonia.Platform; using Avalonia.Platform;
using Avalonia.Styling; using Avalonia.Styling;
using Avalonia.Threading; using Avalonia.Threading;

14
src/Avalonia.Controls/AutoCompleteBox.cs

@ -352,8 +352,8 @@ namespace Avalonia.Controls
private Func<string, CancellationToken, Task<IEnumerable<object>>> _asyncPopulator; private Func<string, CancellationToken, Task<IEnumerable<object>>> _asyncPopulator;
private CancellationTokenSource _populationCancellationTokenSource; private CancellationTokenSource _populationCancellationTokenSource;
private bool _itemTemplateIsFromValueMemeberBinding = true; private bool _itemTemplateIsFromValueMemberBinding = true;
private bool _settingItemTemplateFromValueMemeberBinding; private bool _settingItemTemplateFromValueMemberBinding;
private object _selectedItem; private object _selectedItem;
private bool _isDropDownOpen; private bool _isDropDownOpen;
@ -788,12 +788,12 @@ namespace Avalonia.Controls
private void OnItemTemplatePropertyChanged(AvaloniaPropertyChangedEventArgs e) private void OnItemTemplatePropertyChanged(AvaloniaPropertyChangedEventArgs e)
{ {
if (!_settingItemTemplateFromValueMemeberBinding) if (!_settingItemTemplateFromValueMemberBinding)
_itemTemplateIsFromValueMemeberBinding = false; _itemTemplateIsFromValueMemberBinding = false;
} }
private void OnValueMemberBindingChanged(IBinding value) private void OnValueMemberBindingChanged(IBinding value)
{ {
if(_itemTemplateIsFromValueMemeberBinding) if(_itemTemplateIsFromValueMemberBinding)
{ {
var template = var template =
new FuncDataTemplate( new FuncDataTemplate(
@ -805,9 +805,9 @@ namespace Avalonia.Controls
return control; return control;
}); });
_settingItemTemplateFromValueMemeberBinding = true; _settingItemTemplateFromValueMemberBinding = true;
ItemTemplate = template; ItemTemplate = template;
_settingItemTemplateFromValueMemeberBinding = false; _settingItemTemplateFromValueMemberBinding = false;
} }
} }

3
src/Avalonia.Controls/Border.cs

@ -1,7 +1,6 @@
// Copyright (c) The Avalonia Project. All rights reserved. // 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. // Licensed under the MIT license. See licence.md file in the project root for full license information.
using Avalonia;
using Avalonia.Controls.Utils; using Avalonia.Controls.Utils;
using Avalonia.Layout; using Avalonia.Layout;
using Avalonia.Media; using Avalonia.Media;
@ -115,4 +114,4 @@ namespace Avalonia.Controls
return LayoutHelper.ArrangeChild(Child, finalSize, Padding, BorderThickness); return LayoutHelper.ArrangeChild(Child, finalSize, Padding, BorderThickness);
} }
} }
} }

6
src/Avalonia.Controls/Calendar/Calendar.cs

@ -3,14 +3,14 @@
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details. // Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved. // All other rights reserved.
using System;
using System.Collections.ObjectModel;
using System.Diagnostics;
using Avalonia.Controls.Primitives; using Avalonia.Controls.Primitives;
using Avalonia.Data; using Avalonia.Data;
using Avalonia.Input; using Avalonia.Input;
using Avalonia.Interactivity; using Avalonia.Interactivity;
using Avalonia.Media; using Avalonia.Media;
using System;
using System.Collections.ObjectModel;
using System.Diagnostics;
namespace Avalonia.Controls namespace Avalonia.Controls
{ {

3
src/Avalonia.Controls/Calendar/CalendarBlackoutDatesCollection.cs

@ -3,11 +3,10 @@
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details. // Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved. // All other rights reserved.
using Avalonia.Threading;
using System; using System;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.Linq; using System.Linq;
using System.Threading; using Avalonia.Threading;
namespace Avalonia.Controls.Primitives namespace Avalonia.Controls.Primitives
{ {

1
src/Avalonia.Controls/Calendar/CalendarDateRange.cs

@ -4,7 +4,6 @@
// All other rights reserved. // All other rights reserved.
using System; using System;
using System.Diagnostics;
namespace Avalonia.Controls namespace Avalonia.Controls
{ {

4
src/Avalonia.Controls/Calendar/CalendarDayButton.cs

@ -3,11 +3,9 @@
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details. // Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved. // All other rights reserved.
using Avalonia.Input;
using System; using System;
using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using System.Text; using Avalonia.Input;
namespace Avalonia.Controls.Primitives namespace Avalonia.Controls.Primitives
{ {

3
src/Avalonia.Controls/Calendar/CalendarExtensions.cs

@ -3,10 +3,7 @@
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details. // Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved. // All other rights reserved.
using System;
using System.Collections.Generic;
using Avalonia.Input; using Avalonia.Input;
using System.Diagnostics;
namespace Avalonia.Controls.Primitives namespace Avalonia.Controls.Primitives
{ {

6
src/Avalonia.Controls/Calendar/CalendarItem.cs

@ -3,13 +3,13 @@
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details. // Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved. // All other rights reserved.
using System;
using System.Diagnostics;
using System.Globalization;
using Avalonia.Data; using Avalonia.Data;
using Avalonia.Input; using Avalonia.Input;
using Avalonia.Interactivity; using Avalonia.Interactivity;
using Avalonia.Media; using Avalonia.Media;
using System;
using System.Diagnostics;
using System.Globalization;
namespace Avalonia.Controls.Primitives namespace Avalonia.Controls.Primitives
{ {

11
src/Avalonia.Controls/Calendar/DatePicker.cs

@ -3,15 +3,14 @@
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details. // Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved. // All other rights reserved.
using Avalonia.Controls.Primitives;
using Avalonia.Data;
using Avalonia.Input;
using Avalonia.Interactivity;
using Avalonia.Media;
using System; using System;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.Diagnostics; using System.Diagnostics;
using System.Globalization; using System.Globalization;
using Avalonia.Controls.Primitives;
using Avalonia.Data;
using Avalonia.Input;
using Avalonia.Interactivity;
namespace Avalonia.Controls namespace Avalonia.Controls
{ {
@ -1083,7 +1082,7 @@ namespace Avalonia.Controls
else else
{ {
// If parse error: TextBox should have the latest valid // If parse error: TextBox should have the latest valid
// selecteddate value: // SelectedDate value:
if (SelectedDate != null) if (SelectedDate != null)
{ {
string newtext = this.DateTimeToString(SelectedDate.Value); string newtext = this.DateTimeToString(SelectedDate.Value);

2
src/Avalonia.Controls/ContextMenu.cs

@ -34,7 +34,7 @@ namespace Avalonia.Controls
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="ContextMenu"/> class. /// Initializes a new instance of the <see cref="ContextMenu"/> class.
/// </summary> /// </summary>
/// <param name="interactionHandler">The menu iteraction handler.</param> /// <param name="interactionHandler">The menu interaction handler.</param>
public ContextMenu(IMenuInteractionHandler interactionHandler) public ContextMenu(IMenuInteractionHandler interactionHandler)
{ {
Contract.Requires<ArgumentNullException>(interactionHandler != null); Contract.Requires<ArgumentNullException>(interactionHandler != null);

16
src/Avalonia.Controls/Control.cs

@ -1,22 +1,10 @@
// Copyright (c) The Avalonia Project. All rights reserved. // 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. // Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Reactive;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using Avalonia.Collections;
using Avalonia.Controls.Primitives; using Avalonia.Controls.Primitives;
using Avalonia.Controls.Templates; using Avalonia.Controls.Templates;
using Avalonia.Data;
using Avalonia.Diagnostics;
using Avalonia.Input; using Avalonia.Input;
using Avalonia.Interactivity; using Avalonia.Interactivity;
using Avalonia.Logging;
using Avalonia.LogicalTree;
using Avalonia.Rendering; using Avalonia.Rendering;
using Avalonia.Styling; using Avalonia.Styling;
using Avalonia.VisualTree; using Avalonia.VisualTree;
@ -134,9 +122,9 @@ namespace Avalonia.Controls
} }
/// <summary> /// <summary>
/// Gets the element that recieves the focus adorner. /// Gets the element that receives the focus adorner.
/// </summary> /// </summary>
/// <returns>The control that recieves the focus adorner.</returns> /// <returns>The control that receives the focus adorner.</returns>
protected virtual IControl GetTemplateFocusTarget() protected virtual IControl GetTemplateFocusTarget()
{ {
return this; return this;

1
src/Avalonia.Controls/DataValidationErrors.cs

@ -5,7 +5,6 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reactive.Linq; using System.Reactive.Linq;
using Avalonia.Controls.Primitives;
using Avalonia.Controls.Templates; using Avalonia.Controls.Templates;
using Avalonia.Data; using Avalonia.Data;

1
src/Avalonia.Controls/Embedding/EmbeddableControlRoot.cs

@ -1,7 +1,6 @@
using System; using System;
using Avalonia.Controls.Platform; using Avalonia.Controls.Platform;
using Avalonia.Input; using Avalonia.Input;
using Avalonia.Layout;
using Avalonia.Platform; using Avalonia.Platform;
using Avalonia.Styling; using Avalonia.Styling;
using JetBrains.Annotations; using JetBrains.Annotations;

5
src/Avalonia.Controls/Embedding/Offscreen/OffscreenTopLevel.cs

@ -1,9 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Avalonia.Layout;
using Avalonia.Styling; using Avalonia.Styling;
namespace Avalonia.Controls.Embedding.Offscreen namespace Avalonia.Controls.Embedding.Offscreen

3
src/Avalonia.Controls/Embedding/Offscreen/OffscreenTopLevelImpl.cs

@ -1,8 +1,5 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Avalonia.Input; using Avalonia.Input;
using Avalonia.Input.Raw; using Avalonia.Input.Raw;
using Avalonia.Platform; using Avalonia.Platform;

1
src/Avalonia.Controls/Expander.cs

@ -1,6 +1,5 @@
using Avalonia.Animation; using Avalonia.Animation;
using Avalonia.Controls.Primitives; using Avalonia.Controls.Primitives;
using Avalonia.VisualTree;
namespace Avalonia.Controls namespace Avalonia.Controls
{ {

4
src/Avalonia.Controls/Generators/IItemContainerGenerator.cs

@ -28,7 +28,7 @@ namespace Avalonia.Controls.Generators
Type ContainerType { get; } Type ContainerType { get; }
/// <summary> /// <summary>
/// Signalled whenever new containers are materialized. /// Signaled whenever new containers are materialized.
/// </summary> /// </summary>
event EventHandler<ItemContainerEventArgs> Materialized; event EventHandler<ItemContainerEventArgs> Materialized;
@ -110,4 +110,4 @@ namespace Avalonia.Controls.Generators
/// <returns>The index of the container, or -1 if not found.</returns> /// <returns>The index of the container, or -1 if not found.</returns>
int IndexFromContainer(IControl container); int IndexFromContainer(IControl container);
} }
} }

4
src/Avalonia.Controls/Generators/ITreeItemContainerGenerator.cs

@ -1,8 +1,6 @@
// Copyright (c) The Avalonia Project. All rights reserved. // 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. // Licensed under the MIT license. See licence.md file in the project root for full license information.
using System.Collections.Generic;
namespace Avalonia.Controls.Generators namespace Avalonia.Controls.Generators
{ {
/// <summary> /// <summary>
@ -15,4 +13,4 @@ namespace Avalonia.Controls.Generators
/// </summary> /// </summary>
TreeContainerIndex Index { get; } TreeContainerIndex Index { get; }
} }
} }

2
src/Avalonia.Controls/Generators/ItemContainerGenerator`1.cs

@ -2,8 +2,6 @@
// Licensed under the MIT license. See licence.md file in the project root for full license information. // Licensed under the MIT license. See licence.md file in the project root for full license information.
using System; using System;
using System.Linq.Expressions;
using System.Reflection;
using Avalonia.Controls.Templates; using Avalonia.Controls.Templates;
using Avalonia.Data; using Avalonia.Data;

8
src/Avalonia.Controls/Generators/MenuItemContainerGenerator.cs

@ -1,10 +1,4 @@
using System; namespace Avalonia.Controls.Generators
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Avalonia.Controls.Generators
{ {
public class MenuItemContainerGenerator : ItemContainerGenerator<MenuItem> public class MenuItemContainerGenerator : ItemContainerGenerator<MenuItem>
{ {

2
src/Avalonia.Controls/Generators/TreeContainerIndex.cs

@ -22,7 +22,7 @@ namespace Avalonia.Controls.Generators
private readonly Dictionary<IControl, object> _containerToItem = new Dictionary<IControl, object>(); private readonly Dictionary<IControl, object> _containerToItem = new Dictionary<IControl, object>();
/// <summary> /// <summary>
/// Signalled whenever new containers are materialized. /// Signaled whenever new containers are materialized.
/// </summary> /// </summary>
public event EventHandler<ItemContainerEventArgs> Materialized; public event EventHandler<ItemContainerEventArgs> Materialized;

1
src/Avalonia.Controls/Generators/TreeItemContainerGenerator.cs

@ -3,7 +3,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using Avalonia.Controls.Templates; using Avalonia.Controls.Templates;
using Avalonia.Data; using Avalonia.Data;

5
src/Avalonia.Controls/GridLength.cs

@ -1,11 +1,10 @@
// Copyright (c) The Avalonia Project. All rights reserved. // 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. // Licensed under the MIT license. See licence.md file in the project root for full license information.
using Avalonia.Utilities;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using System.Linq; using Avalonia.Utilities;
namespace Avalonia.Controls namespace Avalonia.Controls
{ {
@ -218,4 +217,4 @@ namespace Avalonia.Controls
} }
} }
} }
} }

16
src/Avalonia.Controls/GridSplitter.cs

@ -116,27 +116,27 @@ namespace Avalonia.Controls
_orientation = DetectOrientation(); _orientation = DetectOrientation();
int defenitionIndex; //row or col int definitionIndex; //row or col
if (_orientation == Orientation.Vertical) if (_orientation == Orientation.Vertical)
{ {
Cursor = new Cursor(StandardCursorType.SizeWestEast); Cursor = new Cursor(StandardCursorType.SizeWestEast);
_definitions = _grid.ColumnDefinitions.Cast<DefinitionBase>().ToList(); _definitions = _grid.ColumnDefinitions.Cast<DefinitionBase>().ToList();
defenitionIndex = GetValue(Grid.ColumnProperty); definitionIndex = GetValue(Grid.ColumnProperty);
PseudoClasses.Add(":vertical"); PseudoClasses.Add(":vertical");
} }
else else
{ {
Cursor = new Cursor(StandardCursorType.SizeNorthSouth); Cursor = new Cursor(StandardCursorType.SizeNorthSouth);
defenitionIndex = GetValue(Grid.RowProperty); definitionIndex = GetValue(Grid.RowProperty);
_definitions = _grid.RowDefinitions.Cast<DefinitionBase>().ToList(); _definitions = _grid.RowDefinitions.Cast<DefinitionBase>().ToList();
PseudoClasses.Add(":horizontal"); PseudoClasses.Add(":horizontal");
} }
if (defenitionIndex > 0) if (definitionIndex > 0)
_prevDefinition = _definitions[defenitionIndex - 1]; _prevDefinition = _definitions[definitionIndex - 1];
if (defenitionIndex < _definitions.Count - 1) if (definitionIndex < _definitions.Count - 1)
_nextDefinition = _definitions[defenitionIndex + 1]; _nextDefinition = _definitions[definitionIndex + 1];
} }
private Orientation DetectOrientation() private Orientation DetectOrientation()
@ -167,4 +167,4 @@ namespace Avalonia.Controls
return Orientation.Vertical; return Orientation.Vertical;
} }
} }
} }

5
src/Avalonia.Controls/HotkeyManager.cs

@ -1,10 +1,5 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input; using System.Windows.Input;
using Avalonia.Controls;
using Avalonia.Controls.Utils; using Avalonia.Controls.Utils;
using Avalonia.Input; using Avalonia.Input;

4
src/Avalonia.Controls/IApplicationLifecycle.cs

@ -1,8 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Avalonia.Controls namespace Avalonia.Controls
{ {

5
src/Avalonia.Controls/IControl.cs

@ -1,12 +1,9 @@
// Copyright (c) The Avalonia Project. All rights reserved. // 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. // Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using Avalonia.Controls.Templates; using Avalonia.Controls.Templates;
using Avalonia.Input; using Avalonia.Input;
using Avalonia.Layout; using Avalonia.Layout;
using Avalonia.LogicalTree;
using Avalonia.Styling;
using Avalonia.VisualTree; using Avalonia.VisualTree;
namespace Avalonia.Controls namespace Avalonia.Controls
@ -23,4 +20,4 @@ namespace Avalonia.Controls
{ {
new IControl Parent { get; } new IControl Parent { get; }
} }
} }

3
src/Avalonia.Controls/IMenu.cs

@ -1,5 +1,4 @@
using System; using Avalonia.Controls.Platform;
using Avalonia.Controls.Platform;
namespace Avalonia.Controls namespace Avalonia.Controls
{ {

3
src/Avalonia.Controls/IMenuElement.cs

@ -1,5 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using Avalonia.Input; using Avalonia.Input;
namespace Avalonia.Controls namespace Avalonia.Controls

4
src/Avalonia.Controls/IMenuItem.cs

@ -1,6 +1,4 @@
using System; namespace Avalonia.Controls
namespace Avalonia.Controls
{ {
/// <summary> /// <summary>
/// Represents a <see cref="MenuItem"/>. /// Represents a <see cref="MenuItem"/>.

2
src/Avalonia.Controls/IScrollable.cs

@ -1,8 +1,6 @@
// Copyright (c) The Avalonia Project. All rights reserved. // 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. // Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using Avalonia.VisualTree;
namespace Avalonia.Controls.Primitives namespace Avalonia.Controls.Primitives
{ {

2
src/Avalonia.Controls/IVirtualizingPanel.cs

@ -14,7 +14,7 @@ namespace Avalonia.Controls
/// Gets or sets the controller for the virtualizing panel. /// Gets or sets the controller for the virtualizing panel.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// A virtualizing controller is responsible for maintaing the controls in the virtualizing /// A virtualizing controller is responsible for maintaining the controls in the virtualizing
/// panel. This property will be set by the controller when virtualization is initialized. /// panel. This property will be set by the controller when virtualization is initialized.
/// Note that this property may remain null if the panel is added to a control that does /// Note that this property may remain null if the panel is added to a control that does
/// not act as a virtualizing controller. /// not act as a virtualizing controller.

2
src/Avalonia.Controls/ItemsControl.cs

@ -365,7 +365,7 @@ namespace Avalonia.Controls
} }
/// <summary> /// <summary>
/// Caled when the <see cref="Items"/> property changes. /// Called when the <see cref="Items"/> property changes.
/// </summary> /// </summary>
/// <param name="e">The event args.</param> /// <param name="e">The event args.</param>
protected virtual void ItemsChanged(AvaloniaPropertyChangedEventArgs e) protected virtual void ItemsChanged(AvaloniaPropertyChangedEventArgs e)

2
src/Avalonia.Controls/Menu.cs

@ -56,7 +56,7 @@ namespace Avalonia.Controls
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="Menu"/> class. /// Initializes a new instance of the <see cref="Menu"/> class.
/// </summary> /// </summary>
/// <param name="interactionHandler">The menu iteraction handler.</param> /// <param name="interactionHandler">The menu interaction handler.</param>
public Menu(IMenuInteractionHandler interactionHandler) public Menu(IMenuInteractionHandler interactionHandler)
{ {
Contract.Requires<ArgumentNullException>(interactionHandler != null); Contract.Requires<ArgumentNullException>(interactionHandler != null);

8
src/Avalonia.Controls/Mixins/ContentControlMixin.cs

@ -3,13 +3,13 @@
using System; using System;
using System.Linq; using System.Linq;
using System.Reactive.Disposables;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using Avalonia.Collections; using Avalonia.Collections;
using Avalonia.Controls.Presenters; using Avalonia.Controls.Presenters;
using Avalonia.Controls.Primitives; using Avalonia.Controls.Primitives;
using Avalonia.Interactivity; using Avalonia.Interactivity;
using Avalonia.LogicalTree; using Avalonia.LogicalTree;
using Avalonia.Styling;
namespace Avalonia.Controls.Mixins namespace Avalonia.Controls.Mixins
{ {
@ -75,6 +75,12 @@ namespace Avalonia.Controls.Mixins
null, null,
presenter.GetValue(ContentPresenter.ChildProperty)); presenter.GetValue(ContentPresenter.ChildProperty));
if (subscriptions.Value.TryGetValue(sender, out IDisposable previousSubscription))
{
subscription = new CompositeDisposable(previousSubscription, subscription);
subscriptions.Value.Remove(sender);
}
subscriptions.Value.Add(sender, subscription); subscriptions.Value.Add(sender, subscription);
} }
} }

8
src/Avalonia.Controls/NumericUpDown/NumericUpDown.cs

@ -526,7 +526,7 @@ namespace Avalonia.Controls
return result; return result;
} }
// Since the conversion from Value to text using a FormartString may not be parsable, // Since the conversion from Value to text using a FormatString may not be parsable,
// we verify that the already existing text is not the exact same value. // we verify that the already existing text is not the exact same value.
var currentValueText = ConvertValueToText(); var currentValueText = ConvertValueToText();
if (Equals(currentValueText, text)) if (Equals(currentValueText, text))
@ -571,7 +571,7 @@ namespace Avalonia.Controls
} }
/// <summary> /// <summary>
/// Called by OnSpin when the spin direction is SpinDirection.Descrease. /// Called by OnSpin when the spin direction is SpinDirection.Decrease.
/// </summary> /// </summary>
private void OnDecrement() private void OnDecrement()
{ {
@ -890,7 +890,7 @@ namespace Avalonia.Controls
if (_isTextChangedFromUI && !parsedTextIsValid) if (_isTextChangedFromUI && !parsedTextIsValid)
{ {
// Text input was made from the user and the text // Text input was made from the user and the text
// repesents an invalid value. Disable the spinner in this case. // represents an invalid value. Disable the spinner in this case.
if (Spinner != null) if (Spinner != null)
{ {
Spinner.ValidSpinDirection = ValidSpinDirections.None; Spinner.ValidSpinDirection = ValidSpinDirections.None;
@ -995,4 +995,4 @@ namespace Avalonia.Controls
return false; return false;
} }
} }
} }

4
src/Avalonia.Controls/Platform/ExportWindowingSubsystemAttribute.cs

@ -1,8 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Avalonia.Platform namespace Avalonia.Platform
{ {

5
src/Avalonia.Controls/Platform/IMenuInteractionHandler.cs

@ -1,7 +1,4 @@
using System; namespace Avalonia.Controls.Platform
using Avalonia.Input;
namespace Avalonia.Controls.Platform
{ {
/// <summary> /// <summary>
/// Handles user interaction for menus. /// Handles user interaction for menus.

8
src/Avalonia.Controls/Platform/IPlatformIconLoader.cs

@ -1,10 +1,4 @@
using System; using System.IO;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Avalonia.Media.Imaging;
namespace Avalonia.Platform namespace Avalonia.Platform
{ {

6
src/Avalonia.Controls/Platform/IWindowBaseImpl.cs

@ -6,7 +6,7 @@ namespace Avalonia.Platform
public interface IWindowBaseImpl : ITopLevelImpl public interface IWindowBaseImpl : ITopLevelImpl
{ {
/// <summary> /// <summary>
/// Shows the toplevel. /// Shows the top level.
/// </summary> /// </summary>
void Show(); void Show();
@ -62,7 +62,7 @@ namespace Avalonia.Platform
Size MaxClientSize { get; } Size MaxClientSize { get; }
/// <summary> /// <summary>
/// Sets the client size of the toplevel. /// Sets the client size of the top level.
/// </summary> /// </summary>
void Resize(Size clientSize); void Resize(Size clientSize);
@ -82,4 +82,4 @@ namespace Avalonia.Platform
/// </summary> /// </summary>
IScreenImpl Screen { get; } IScreenImpl Screen { get; }
} }
} }

6
src/Avalonia.Controls/Platform/IWindowingPlatform.cs

@ -1,9 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Avalonia.Platform namespace Avalonia.Platform
{ {
public interface IWindowingPlatform public interface IWindowingPlatform

7
src/Avalonia.Controls/Platform/Surfaces/IFramebufferPlatformSurface.cs

@ -1,9 +1,4 @@
using System; using Avalonia.Platform;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Avalonia.Platform;
namespace Avalonia.Controls.Platform.Surfaces namespace Avalonia.Controls.Platform.Surfaces
{ {

3
src/Avalonia.Controls/Presenters/CarouselPresenter.cs

@ -6,7 +6,6 @@ using System.Linq;
using System.Reactive.Linq; using System.Reactive.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Avalonia.Animation; using Avalonia.Animation;
using Avalonia.Controls.Generators;
using Avalonia.Controls.Primitives; using Avalonia.Controls.Primitives;
using Avalonia.Controls.Utils; using Avalonia.Controls.Utils;
using Avalonia.Data; using Avalonia.Data;
@ -251,4 +250,4 @@ namespace Avalonia.Controls.Presenters
} }
} }
} }
} }

1
src/Avalonia.Controls/Presenters/IPresenter.cs

@ -2,7 +2,6 @@
// Licensed under the MIT license. See licence.md file in the project root for full license information. // Licensed under the MIT license. See licence.md file in the project root for full license information.
using Avalonia.Controls.Primitives; using Avalonia.Controls.Primitives;
using Avalonia.Styling;
namespace Avalonia.Controls.Presenters namespace Avalonia.Controls.Presenters
{ {

1
src/Avalonia.Controls/Presenters/ItemVirtualizer.cs

@ -8,7 +8,6 @@ using System.Reactive.Linq;
using Avalonia.Controls.Primitives; using Avalonia.Controls.Primitives;
using Avalonia.Controls.Utils; using Avalonia.Controls.Utils;
using Avalonia.Input; using Avalonia.Input;
using Avalonia.VisualTree;
namespace Avalonia.Controls.Presenters namespace Avalonia.Controls.Presenters
{ {

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save