Browse Source

Spellchecks comments and members, removes unused using statements and sorts them

pull/1851/head
Miha Markič 8 years ago
parent
commit
1524cb1aba
  1. 6
      src/Avalonia.Controls/AppBuilderBase.cs
  2. 1
      src/Avalonia.Controls/Application.cs
  3. 14
      src/Avalonia.Controls/AutoCompleteBox.cs
  4. 3
      src/Avalonia.Controls/Border.cs
  5. 6
      src/Avalonia.Controls/Calendar/Calendar.cs
  6. 3
      src/Avalonia.Controls/Calendar/CalendarBlackoutDatesCollection.cs
  7. 1
      src/Avalonia.Controls/Calendar/CalendarDateRange.cs
  8. 4
      src/Avalonia.Controls/Calendar/CalendarDayButton.cs
  9. 3
      src/Avalonia.Controls/Calendar/CalendarExtensions.cs
  10. 6
      src/Avalonia.Controls/Calendar/CalendarItem.cs
  11. 11
      src/Avalonia.Controls/Calendar/DatePicker.cs
  12. 2
      src/Avalonia.Controls/ContextMenu.cs
  13. 16
      src/Avalonia.Controls/Control.cs
  14. 1
      src/Avalonia.Controls/DataValidationErrors.cs
  15. 1
      src/Avalonia.Controls/Embedding/EmbeddableControlRoot.cs
  16. 5
      src/Avalonia.Controls/Embedding/Offscreen/OffscreenTopLevel.cs
  17. 3
      src/Avalonia.Controls/Embedding/Offscreen/OffscreenTopLevelImpl.cs
  18. 1
      src/Avalonia.Controls/Expander.cs
  19. 4
      src/Avalonia.Controls/Generators/IItemContainerGenerator.cs
  20. 4
      src/Avalonia.Controls/Generators/ITreeItemContainerGenerator.cs
  21. 2
      src/Avalonia.Controls/Generators/ItemContainerGenerator`1.cs
  22. 8
      src/Avalonia.Controls/Generators/MenuItemContainerGenerator.cs
  23. 2
      src/Avalonia.Controls/Generators/TreeContainerIndex.cs
  24. 1
      src/Avalonia.Controls/Generators/TreeItemContainerGenerator.cs
  25. 5
      src/Avalonia.Controls/GridLength.cs
  26. 16
      src/Avalonia.Controls/GridSplitter.cs
  27. 5
      src/Avalonia.Controls/HotkeyManager.cs
  28. 4
      src/Avalonia.Controls/IApplicationLifecycle.cs
  29. 5
      src/Avalonia.Controls/IControl.cs
  30. 3
      src/Avalonia.Controls/IMenu.cs
  31. 3
      src/Avalonia.Controls/IMenuElement.cs
  32. 4
      src/Avalonia.Controls/IMenuItem.cs
  33. 2
      src/Avalonia.Controls/IScrollable.cs
  34. 2
      src/Avalonia.Controls/IVirtualizingPanel.cs
  35. 2
      src/Avalonia.Controls/ItemsControl.cs
  36. 2
      src/Avalonia.Controls/Menu.cs
  37. 1
      src/Avalonia.Controls/Mixins/ContentControlMixin.cs
  38. 8
      src/Avalonia.Controls/NumericUpDown/NumericUpDown.cs
  39. 4
      src/Avalonia.Controls/Platform/ExportWindowingSubsystemAttribute.cs
  40. 5
      src/Avalonia.Controls/Platform/IMenuInteractionHandler.cs
  41. 8
      src/Avalonia.Controls/Platform/IPlatformIconLoader.cs
  42. 24
      src/Avalonia.Controls/Platform/ITopLevelImpl.cs
  43. 6
      src/Avalonia.Controls/Platform/IWindowBaseImpl.cs
  44. 6
      src/Avalonia.Controls/Platform/IWindowingPlatform.cs
  45. 7
      src/Avalonia.Controls/Platform/Surfaces/IFramebufferPlatformSurface.cs
  46. 3
      src/Avalonia.Controls/Presenters/CarouselPresenter.cs
  47. 1
      src/Avalonia.Controls/Presenters/IPresenter.cs
  48. 1
      src/Avalonia.Controls/Presenters/ItemVirtualizer.cs
  49. 2
      src/Avalonia.Controls/Presenters/ItemVirtualizerSimple.cs
  50. 3
      src/Avalonia.Controls/Presenters/ScrollContentPresenter.cs
  51. 3
      src/Avalonia.Controls/Presenters/TextPresenter.cs
  52. 2
      src/Avalonia.Controls/Primitives/HeaderedItemsControl.cs
  53. 5
      src/Avalonia.Controls/Primitives/Popup.cs
  54. 3
      src/Avalonia.Controls/Primitives/PopupRoot.cs
  55. 2
      src/Avalonia.Controls/Primitives/RangeBase.cs
  56. 1
      src/Avalonia.Controls/Primitives/SelectingItemsControl.cs
  57. 1
      src/Avalonia.Controls/Primitives/Thumb.cs
  58. 4
      src/Avalonia.Controls/ProgressBar.cs
  59. 4
      src/Avalonia.Controls/Remote/RemoteServer.cs
  60. 3
      src/Avalonia.Controls/Remote/RemoteWidget.cs
  61. 7
      src/Avalonia.Controls/Remote/Server/RemoteServerTopLevelImpl.cs
  62. 5
      src/Avalonia.Controls/Separator.cs
  63. 1
      src/Avalonia.Controls/Shapes/Path.cs
  64. 1
      src/Avalonia.Controls/Shapes/Shape.cs
  65. 4
      src/Avalonia.Controls/Spinner.cs
  66. 6
      src/Avalonia.Controls/Templates/FuncDataTemplate`1.cs
  67. 4
      src/Avalonia.Controls/Templates/FuncMemberSelector.cs
  68. 2
      src/Avalonia.Controls/Templates/FuncTreeDataTemplate.cs
  69. 2
      src/Avalonia.Controls/Templates/FuncTreeDataTemplate`1.cs
  70. 1
      src/Avalonia.Controls/Templates/IDataTemplateHost.cs
  71. 4
      src/Avalonia.Controls/Templates/IMemberSelector.cs
  72. 4
      src/Avalonia.Controls/Templates/ITreeDataTemplate.cs
  73. 4
      src/Avalonia.Controls/TextBlock.cs
  74. 2
      src/Avalonia.Controls/ToolTip.cs
  75. 4
      src/Avalonia.Controls/ToolTipService.cs
  76. 4
      src/Avalonia.Controls/TopLevel.cs
  77. 3
      src/Avalonia.Controls/TreeView.cs
  78. 5
      src/Avalonia.Controls/Utils/AncestorFinder.cs
  79. 2
      src/Avalonia.Controls/Utils/GridLayout.cs
  80. 1
      src/Avalonia.Controls/Utils/IEnumerableUtils.cs
  81. 7
      src/Avalonia.Controls/Utils/SelectingItemsControlSelectionAdapter.cs
  82. 10
      src/Avalonia.Controls/Window.cs
  83. 3
      src/Avalonia.Controls/WindowBase.cs
  84. 9
      src/Avalonia.Controls/WindowIcon.cs
  85. 20
      src/Avalonia.Controls/WrapPanel.cs

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);

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

@ -9,7 +9,6 @@ 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
{ {

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
{ {

24
src/Avalonia.Controls/Platform/ITopLevelImpl.cs

@ -20,12 +20,12 @@ namespace Avalonia.Platform
public interface ITopLevelImpl : IDisposable public interface ITopLevelImpl : IDisposable
{ {
/// <summary> /// <summary>
/// Gets the client size of the toplevel. /// Gets the client size of the top level.
/// </summary> /// </summary>
Size ClientSize { get; } Size ClientSize { get; }
/// <summary> /// <summary>
/// Gets the scaling factor for the toplevel. /// Gets the scaling factor for the top level.
/// </summary> /// </summary>
double Scaling { get; } double Scaling { get; }
@ -42,38 +42,38 @@ namespace Avalonia.Platform
IEnumerable<object> Surfaces { get; } IEnumerable<object> Surfaces { get; }
/// <summary> /// <summary>
/// Gets or sets a method called when the toplevel receives input. /// Gets or sets a method called when the top level receives input.
/// </summary> /// </summary>
Action<RawInputEventArgs> Input { get; set; } Action<RawInputEventArgs> Input { get; set; }
/// <summary> /// <summary>
/// Gets or sets a method called when the toplevel requires painting. /// Gets or sets a method called when the top level requires painting.
/// </summary> /// </summary>
Action<Rect> Paint { get; set; } Action<Rect> Paint { get; set; }
/// <summary> /// <summary>
/// Gets or sets a method called when the toplevel is resized. /// Gets or sets a method called when the top level is resized.
/// </summary> /// </summary>
Action<Size> Resized { get; set; } Action<Size> Resized { get; set; }
/// <summary> /// <summary>
/// Gets or sets a method called when the toplevel's scaling changes. /// Gets or sets a method called when the top level's scaling changes.
/// </summary> /// </summary>
Action<double> ScalingChanged { get; set; } Action<double> ScalingChanged { get; set; }
/// <summary> /// <summary>
/// Creates a new renderer for the toplevel. /// Creates a new renderer for the top level.
/// </summary> /// </summary>
/// <param name="root">The toplevel.</param> /// <param name="root">The top level.</param>
IRenderer CreateRenderer(IRenderRoot root); IRenderer CreateRenderer(IRenderRoot root);
/// <summary> /// <summary>
/// Invalidates a rect on the toplevel. /// Invalidates a rect on the top level.
/// </summary> /// </summary>
void Invalidate(Rect rect); void Invalidate(Rect rect);
/// <summary> /// <summary>
/// Sets the <see cref="IInputRoot"/> for the toplevel. /// Sets the <see cref="IInputRoot"/> for the top level.
/// </summary> /// </summary>
void SetInputRoot(IInputRoot inputRoot); void SetInputRoot(IInputRoot inputRoot);
@ -92,7 +92,7 @@ namespace Avalonia.Platform
Point PointToScreen(Point point); Point PointToScreen(Point point);
/// <summary> /// <summary>
/// Sets the cursor associated with the toplevel. /// Sets the cursor associated with the top level.
/// </summary> /// </summary>
/// <param name="cursor">The cursor. Use null for default cursor</param> /// <param name="cursor">The cursor. Use null for default cursor</param>
void SetCursor(IPlatformHandle cursor); void SetCursor(IPlatformHandle cursor);
@ -103,7 +103,7 @@ namespace Avalonia.Platform
Action Closed { get; set; } Action Closed { get; set; }
/// <summary> /// <summary>
/// Gets a mouse device associated with toplevel /// Gets a mouse device associated with top level
/// </summary> /// </summary>
[CanBeNull] [CanBeNull]
IMouseDevice MouseDevice { get; } IMouseDevice MouseDevice { get; }

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
{ {

2
src/Avalonia.Controls/Presenters/ItemVirtualizerSimple.cs

@ -390,7 +390,7 @@ namespace Avalonia.Controls.Presenters
/// <param name="delta">The delta of the move.</param> /// <param name="delta">The delta of the move.</param>
/// <remarks> /// <remarks>
/// If the move is less than a page, then this method moves the containers for the items /// If the move is less than a page, then this method moves the containers for the items
/// that are still visible to the correct place, and recyles and moves the others. For /// that are still visible to the correct place, and recycles and moves the others. For
/// example: if there are 20 items and 10 containers visible and the user scrolls 5 /// example: if there are 20 items and 10 containers visible and the user scrolls 5
/// items down, then the bottom 5 containers will be moved to the top and the top 5 will /// items down, then the bottom 5 containers will be moved to the top and the top 5 will
/// be moved to the bottom and recycled to display the newly visible item. Updates /// be moved to the bottom and recycled to display the newly visible item. Updates

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

@ -7,7 +7,6 @@ using System.Reactive.Disposables;
using System.Reactive.Linq; using System.Reactive.Linq;
using Avalonia.Controls.Primitives; using Avalonia.Controls.Primitives;
using Avalonia.Input; using Avalonia.Input;
using Avalonia.Layout;
using Avalonia.VisualTree; using Avalonia.VisualTree;
namespace Avalonia.Controls.Presenters namespace Avalonia.Controls.Presenters
@ -319,4 +318,4 @@ namespace Avalonia.Controls.Presenters
} }
} }
} }
} }

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

@ -4,7 +4,6 @@
using System; using System;
using System.Reactive.Linq; using System.Reactive.Linq;
using Avalonia.Media; using Avalonia.Media;
using Avalonia.Styling;
using Avalonia.Threading; using Avalonia.Threading;
using Avalonia.VisualTree; using Avalonia.VisualTree;
@ -116,7 +115,7 @@ namespace Avalonia.Controls.Presenters
var start = Math.Min(selectionStart, selectionEnd); var start = Math.Min(selectionStart, selectionEnd);
var length = Math.Max(selectionStart, selectionEnd) - start; var length = Math.Max(selectionStart, selectionEnd) - start;
// issue #600: set constaint before any FormattedText manipulation // issue #600: set constraint before any FormattedText manipulation
// see base.Render(...) implementation // see base.Render(...) implementation
FormattedText.Constraint = Bounds.Size; FormattedText.Constraint = Bounds.Size;

2
src/Avalonia.Controls/Primitives/HeaderedItemsControl.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 System.Linq;
using Avalonia.Controls.Mixins; using Avalonia.Controls.Mixins;
using Avalonia.Controls.Presenters; using Avalonia.Controls.Presenters;

5
src/Avalonia.Controls/Primitives/Popup.cs

@ -6,11 +6,10 @@ using System.Linq;
using Avalonia.Input; using Avalonia.Input;
using Avalonia.Input.Raw; using Avalonia.Input.Raw;
using Avalonia.Interactivity; using Avalonia.Interactivity;
using Avalonia.Layout;
using Avalonia.LogicalTree; using Avalonia.LogicalTree;
using Avalonia.Metadata; using Avalonia.Metadata;
using Avalonia.Rendering;
using Avalonia.VisualTree; using Avalonia.VisualTree;
using Avalonia.Layout;
namespace Avalonia.Controls.Primitives namespace Avalonia.Controls.Primitives
{ {
@ -473,4 +472,4 @@ namespace Avalonia.Controls.Primitives
} }
} }
} }
} }

3
src/Avalonia.Controls/Primitives/PopupRoot.cs

@ -2,12 +2,9 @@
// 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 Avalonia.Controls.Platform; using Avalonia.Controls.Platform;
using Avalonia.Controls.Presenters; using Avalonia.Controls.Presenters;
using Avalonia.Interactivity; using Avalonia.Interactivity;
using Avalonia.Layout;
using Avalonia.LogicalTree;
using Avalonia.Media; using Avalonia.Media;
using Avalonia.Platform; using Avalonia.Platform;
using Avalonia.Styling; using Avalonia.Styling;

2
src/Avalonia.Controls/Primitives/RangeBase.cs

@ -130,7 +130,7 @@ namespace Avalonia.Controls.Primitives
} }
/// <summary> /// <summary>
/// Throws an exception if the double valus is NaN or Inf. /// Throws an exception if the double value is NaN or Inf.
/// </summary> /// </summary>
/// <param name="value">The value.</param> /// <param name="value">The value.</param>
/// <param name="property">The name of the property being set.</param> /// <param name="property">The name of the property being set.</param>

1
src/Avalonia.Controls/Primitives/SelectingItemsControl.cs

@ -11,7 +11,6 @@ using Avalonia.Controls.Generators;
using Avalonia.Data; using Avalonia.Data;
using Avalonia.Input; using Avalonia.Input;
using Avalonia.Interactivity; using Avalonia.Interactivity;
using Avalonia.Metadata;
using Avalonia.Styling; using Avalonia.Styling;
using Avalonia.VisualTree; using Avalonia.VisualTree;

1
src/Avalonia.Controls/Primitives/Thumb.cs

@ -4,7 +4,6 @@
using System; using System;
using Avalonia.Input; using Avalonia.Input;
using Avalonia.Interactivity; using Avalonia.Interactivity;
using Avalonia.Layout;
namespace Avalonia.Controls.Primitives namespace Avalonia.Controls.Primitives
{ {

4
src/Avalonia.Controls/ProgressBar.cs

@ -1,12 +1,8 @@
// 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;
using Avalonia.Animation;
using Avalonia.Controls.Primitives; using Avalonia.Controls.Primitives;
using Avalonia.Layout;
namespace Avalonia.Controls namespace Avalonia.Controls
{ {

4
src/Avalonia.Controls/Remote/RemoteServer.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.Controls.Embedding; using Avalonia.Controls.Embedding;
using Avalonia.Controls.Remote.Server; using Avalonia.Controls.Remote.Server;
using Avalonia.Platform; using Avalonia.Platform;

3
src/Avalonia.Controls/Remote/RemoteWidget.cs

@ -1,6 +1,5 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using Avalonia.Input;
using Avalonia.Media; using Avalonia.Media;
using Avalonia.Media.Imaging; using Avalonia.Media.Imaging;
using Avalonia.Remote.Protocol; using Avalonia.Remote.Protocol;
@ -76,4 +75,4 @@ namespace Avalonia.Controls.Remote
base.Render(context); base.Render(context);
} }
} }
} }

7
src/Avalonia.Controls/Remote/Server/RemoteServerTopLevelImpl.cs

@ -1,9 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Avalonia.Controls.Embedding.Offscreen; using Avalonia.Controls.Embedding.Offscreen;
using Avalonia.Controls.Platform.Surfaces; using Avalonia.Controls.Platform.Surfaces;
using Avalonia.Input; using Avalonia.Input;
@ -94,10 +91,10 @@ namespace Avalonia.Controls.Remote.Server
RenderIfNeeded(); RenderIfNeeded();
} }
protected virtual Size Measure(Size constaint) protected virtual Size Measure(Size constraint)
{ {
var l = (ILayoutable) InputRoot; var l = (ILayoutable) InputRoot;
l.Measure(constaint); l.Measure(constraint);
return l.DesiredSize; return l.DesiredSize;
} }

5
src/Avalonia.Controls/Separator.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 Avalonia.Controls.Primitives; using Avalonia.Controls.Primitives;
namespace Avalonia.Controls namespace Avalonia.Controls

1
src/Avalonia.Controls/Shapes/Path.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.Media; using Avalonia.Media;
namespace Avalonia.Controls.Shapes namespace Avalonia.Controls.Shapes

1
src/Avalonia.Controls/Shapes/Shape.cs

@ -4,7 +4,6 @@
using System; using System;
using System.Reflection; using System.Reflection;
using Avalonia.Collections; using Avalonia.Collections;
using Avalonia.Controls;
using Avalonia.Media; using Avalonia.Media;
namespace Avalonia.Controls.Shapes namespace Avalonia.Controls.Shapes

4
src/Avalonia.Controls/Spinner.cs

@ -1,6 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Text;
using Avalonia.Interactivity; using Avalonia.Interactivity;
namespace Avalonia.Controls namespace Avalonia.Controls
@ -54,7 +52,7 @@ namespace Avalonia.Controls
public SpinDirection Direction { get; } public SpinDirection Direction { get; }
/// <summary> /// <summary>
/// Get or set whheter the spin event originated from a mouse wheel event. /// Get or set whether the spin event originated from a mouse wheel event.
/// </summary> /// </summary>
public bool UsingMouseWheel{ get; } public bool UsingMouseWheel{ get; }

6
src/Avalonia.Controls/Templates/FuncDataTemplate`1.cs

@ -42,7 +42,7 @@ namespace Avalonia.Controls.Templates
} }
/// <summary> /// <summary>
/// Casts a stongly typed match function to a weakly typed one. /// Casts a strongly typed match function to a weakly typed one.
/// </summary> /// </summary>
/// <param name="f">The strongly typed function.</param> /// <param name="f">The strongly typed function.</param>
/// <returns>The weakly typed function.</returns> /// <returns>The weakly typed function.</returns>
@ -52,7 +52,7 @@ namespace Avalonia.Controls.Templates
} }
/// <summary> /// <summary>
/// Casts a stongly typed build function to a weakly typed one. /// Casts a strongly typed build function to a weakly typed one.
/// </summary> /// </summary>
/// <typeparam name="TResult">The strong data type.</typeparam> /// <typeparam name="TResult">The strong data type.</typeparam>
/// <param name="f">The strongly typed function.</param> /// <param name="f">The strongly typed function.</param>
@ -62,4 +62,4 @@ namespace Avalonia.Controls.Templates
return o => f((T)o); return o => f((T)o);
} }
} }
} }

4
src/Avalonia.Controls/Templates/FuncMemberSelector.cs

@ -25,11 +25,11 @@ namespace Avalonia.Controls.Templates
/// <summary> /// <summary>
/// Selects a member of an object. /// Selects a member of an object.
/// </summary> /// </summary>
/// <param name="o">The obeject.</param> /// <param name="o">The object.</param>
/// <returns>The selected member.</returns> /// <returns>The selected member.</returns>
public object Select(object o) public object Select(object o)
{ {
return (o is TObject) ? _selector((TObject)o) : default(TMember); return (o is TObject) ? _selector((TObject)o) : default(TMember);
} }
} }
} }

2
src/Avalonia.Controls/Templates/FuncTreeDataTemplate.cs

@ -9,7 +9,7 @@ using Avalonia.Data;
namespace Avalonia.Controls.Templates namespace Avalonia.Controls.Templates
{ {
/// <summary> /// <summary>
/// A template used to build hierachical data. /// A template used to build hierarchical data.
/// </summary> /// </summary>
public class FuncTreeDataTemplate : FuncDataTemplate, ITreeDataTemplate public class FuncTreeDataTemplate : FuncDataTemplate, ITreeDataTemplate
{ {

2
src/Avalonia.Controls/Templates/FuncTreeDataTemplate`1.cs

@ -7,7 +7,7 @@ using System.Collections;
namespace Avalonia.Controls.Templates namespace Avalonia.Controls.Templates
{ {
/// <summary> /// <summary>
/// A template used to build hierachical data. /// A template used to build hierarchical data.
/// </summary> /// </summary>
/// <typeparam name="T">The type of the template's data.</typeparam> /// <typeparam name="T">The type of the template's data.</typeparam>
public class FuncTreeDataTemplate<T> : FuncTreeDataTemplate public class FuncTreeDataTemplate<T> : FuncTreeDataTemplate

1
src/Avalonia.Controls/Templates/IDataTemplateHost.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;
namespace Avalonia.Controls.Templates namespace Avalonia.Controls.Templates
{ {

4
src/Avalonia.Controls/Templates/IMemberSelector.cs

@ -11,8 +11,8 @@ namespace Avalonia.Controls.Templates
/// <summary> /// <summary>
/// Selects a member of an object. /// Selects a member of an object.
/// </summary> /// </summary>
/// <param name="o">The obeject.</param> /// <param name="o">The object.</param>
/// <returns>The selected member.</returns> /// <returns>The selected member.</returns>
object Select(object o); object Select(object o);
} }
} }

4
src/Avalonia.Controls/Templates/ITreeDataTemplate.cs

@ -6,7 +6,7 @@ using Avalonia.Data;
namespace Avalonia.Controls.Templates namespace Avalonia.Controls.Templates
{ {
/// <summary> /// <summary>
/// Interface representing a template used to build hierachical data. /// Interface representing a template used to build hierarchical data.
/// </summary> /// </summary>
public interface ITreeDataTemplate : IDataTemplate public interface ITreeDataTemplate : IDataTemplate
{ {
@ -20,4 +20,4 @@ namespace Avalonia.Controls.Templates
/// </returns> /// </returns>
InstancedBinding ItemsSelector(object item); InstancedBinding ItemsSelector(object item);
} }
} }

4
src/Avalonia.Controls/TextBlock.cs

@ -21,7 +21,7 @@ namespace Avalonia.Controls
public static readonly StyledProperty<IBrush> BackgroundProperty = public static readonly StyledProperty<IBrush> BackgroundProperty =
Border.BackgroundProperty.AddOwner<TextBlock>(); Border.BackgroundProperty.AddOwner<TextBlock>();
// TODO: Define these attached properties elswhere (e.g. on a Text class) and AddOwner // TODO: Define these attached properties elsewhere (e.g. on a Text class) and AddOwner
// them into TextBlock. // them into TextBlock.
/// <summary> /// <summary>
@ -406,4 +406,4 @@ namespace Avalonia.Controls
InvalidateMeasure(); InvalidateMeasure();
} }
} }
} }

2
src/Avalonia.Controls/ToolTip.cs

@ -55,7 +55,7 @@ namespace Avalonia.Controls
AvaloniaProperty.RegisterAttached<ToolTip, Control, int>("ShowDelay", 400); AvaloniaProperty.RegisterAttached<ToolTip, Control, int>("ShowDelay", 400);
/// <summary> /// <summary>
/// Stores the curernt <see cref="ToolTip"/> instance in the control. /// Stores the current <see cref="ToolTip"/> instance in the control.
/// </summary> /// </summary>
private static readonly AttachedProperty<ToolTip> ToolTipProperty = private static readonly AttachedProperty<ToolTip> ToolTipProperty =
AvaloniaProperty.RegisterAttached<ToolTip, Control, ToolTip>("ToolTip"); AvaloniaProperty.RegisterAttached<ToolTip, Control, ToolTip>("ToolTip");

4
src/Avalonia.Controls/ToolTipService.cs

@ -5,7 +5,7 @@ using Avalonia.Threading;
namespace Avalonia.Controls namespace Avalonia.Controls
{ {
/// <summary> /// <summary>
/// Handeles <see cref="ToolTip"/> interaction with controls. /// Handles <see cref="ToolTip"/> interaction with controls.
/// </summary> /// </summary>
internal sealed class ToolTipService internal sealed class ToolTipService
{ {
@ -95,4 +95,4 @@ namespace Avalonia.Controls
_timer = null; _timer = null;
} }
} }
} }

4
src/Avalonia.Controls/TopLevel.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.Reactive.Disposables;
using System.Reactive.Linq; using System.Reactive.Linq;
using Avalonia.Controls.Platform;
using Avalonia.Controls.Primitives; using Avalonia.Controls.Primitives;
using Avalonia.Input; using Avalonia.Input;
using Avalonia.Input.Raw; using Avalonia.Input.Raw;
@ -225,7 +223,7 @@ namespace Avalonia.Controls
protected virtual IRenderTarget CreateRenderTarget() protected virtual IRenderTarget CreateRenderTarget()
{ {
if(PlatformImpl == null) if(PlatformImpl == null)
throw new InvalidOperationException("Cann't create render target, PlatformImpl is null (might be already disposed)"); throw new InvalidOperationException("Can't create render target, PlatformImpl is null (might be already disposed)");
return _renderInterface.CreateRenderTarget(PlatformImpl.Surfaces); return _renderInterface.CreateRenderTarget(PlatformImpl.Surfaces);
} }

3
src/Avalonia.Controls/TreeView.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 System.Linq; using System.Linq;
using Avalonia.Controls.Generators; using Avalonia.Controls.Generators;
using Avalonia.Controls.Primitives; using Avalonia.Controls.Primitives;
@ -14,7 +13,7 @@ using Avalonia.VisualTree;
namespace Avalonia.Controls namespace Avalonia.Controls
{ {
/// <summary> /// <summary>
/// Displays a hierachical tree of data. /// Displays a hierarchical tree of data.
/// </summary> /// </summary>
public class TreeView : ItemsControl, ICustomKeyboardNavigation public class TreeView : ItemsControl, ICustomKeyboardNavigation
{ {

5
src/Avalonia.Controls/Utils/AncestorFinder.cs

@ -1,13 +1,10 @@
using System; using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reactive; using System.Reactive;
using System.Reactive.Disposables; using System.Reactive.Disposables;
using System.Reactive.Linq; using System.Reactive.Linq;
using System.Reactive.Subjects; using System.Reactive.Subjects;
using System.Reflection; using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace Avalonia.Controls.Utils namespace Avalonia.Controls.Utils
{ {

2
src/Avalonia.Controls/Utils/GridLayout.cs

@ -376,7 +376,7 @@ namespace Avalonia.Controls.Utils
// 1. Determine all one-span column's desired widths or row's desired heights. // 1. Determine all one-span column's desired widths or row's desired heights.
// 2. Order the multi-span conventions by its last index // 2. Order the multi-span conventions by its last index
// (Notice that the sorted data is much smaller than the source.) // (Notice that the sorted data is much smaller than the source.)
// 3. Determine each multi-span last index by calculating the maximun desired size. // 3. Determine each multi-span last index by calculating the maximum desired size.
// Before we determine the behavior of this method, we just aggregate the one-span * columns. // Before we determine the behavior of this method, we just aggregate the one-span * columns.

1
src/Avalonia.Controls/Utils/IEnumerableUtils.cs

@ -3,7 +3,6 @@
using System; using System;
using System.Collections; using System.Collections;
using System.Globalization;
using System.Linq; using System.Linq;
namespace Avalonia.Controls.Utils namespace Avalonia.Controls.Utils

7
src/Avalonia.Controls/Utils/SelectingItemsControlSelectionAdapter.cs

@ -4,15 +4,12 @@
// All other rights reserved. // All other rights reserved.
using System; using System;
using System.Collections;
using System.Linq; using System.Linq;
using System.Collections.Generic;
using System.Text;
using Avalonia.Controls.Primitives; using Avalonia.Controls.Primitives;
using Avalonia.Interactivity;
using Avalonia.Input; using Avalonia.Input;
using Avalonia.Interactivity;
using Avalonia.LogicalTree; using Avalonia.LogicalTree;
using System.Collections;
using System.Diagnostics;
namespace Avalonia.Controls.Utils namespace Avalonia.Controls.Utils
{ {

10
src/Avalonia.Controls/Window.cs

@ -86,7 +86,7 @@ namespace Avalonia.Controls
AvaloniaProperty.Register<Window, WindowIcon>(nameof(Icon)); AvaloniaProperty.Register<Window, WindowIcon>(nameof(Icon));
/// <summary> /// <summary>
/// Defines the <see cref="WindowStartupLocation"/> proeprty. /// Defines the <see cref="WindowStartupLocation"/> property.
/// </summary> /// </summary>
public static readonly DirectProperty<Window, WindowStartupLocation> WindowStartupLocationProperty = public static readonly DirectProperty<Window, WindowStartupLocation> WindowStartupLocationProperty =
AvaloniaProperty.RegisterDirect<Window, WindowStartupLocation>( AvaloniaProperty.RegisterDirect<Window, WindowStartupLocation>(
@ -100,7 +100,7 @@ namespace Avalonia.Controls
private readonly NameScope _nameScope = new NameScope(); private readonly NameScope _nameScope = new NameScope();
private object _dialogResult; private object _dialogResult;
private readonly Size _maxPlatformClientSize; private readonly Size _maxPlatformClientSize;
private WindowStartupLocation _windowStartupLoction; private WindowStartupLocation _windowStartupLocation;
/// <summary> /// <summary>
/// Initializes static members of the <see cref="Window"/> class. /// Initializes static members of the <see cref="Window"/> class.
@ -237,8 +237,8 @@ namespace Avalonia.Controls
/// </summary> /// </summary>
public WindowStartupLocation WindowStartupLocation public WindowStartupLocation WindowStartupLocation
{ {
get { return _windowStartupLoction; } get { return _windowStartupLocation; }
set { SetAndRaise(WindowStartupLocationProperty, ref _windowStartupLoction, value); } set { SetAndRaise(WindowStartupLocationProperty, ref _windowStartupLocation, value); }
} }
/// <inheritdoc/> /// <inheritdoc/>
@ -409,7 +409,7 @@ namespace Avalonia.Controls
/// The type of the result produced by the dialog. /// The type of the result produced by the dialog.
/// </typeparam> /// </typeparam>
/// <returns>. /// <returns>.
/// A task that can be used to retrive the result of the dialog when it closes. /// A task that can be used to retrieve the result of the dialog when it closes.
/// </returns> /// </returns>
public Task<TResult> ShowDialog<TResult>() public Task<TResult> ShowDialog<TResult>()
{ {

3
src/Avalonia.Controls/WindowBase.cs

@ -1,10 +1,7 @@
using System; using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reactive.Disposables; using System.Reactive.Disposables;
using System.Reactive.Linq; using System.Reactive.Linq;
using System.Text;
using System.Threading.Tasks;
using Avalonia.Controls.Primitives; using Avalonia.Controls.Primitives;
using Avalonia.Input; using Avalonia.Input;
using Avalonia.Layout; using Avalonia.Layout;

9
src/Avalonia.Controls/WindowIcon.cs

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

20
src/Avalonia.Controls/WrapPanel.cs

@ -132,7 +132,7 @@ namespace Avalonia.Controls
double accumulatedV = 0; double accumulatedV = 0;
var uvFinalSize = CreateUVSize(finalSize); var uvFinalSize = CreateUVSize(finalSize);
var lineSize = CreateUVSize(); var lineSize = CreateUVSize();
int firstChildInLineindex = 0; int firstChildInLineIndex = 0;
for (int index = 0; index < Children.Count; index++) for (int index = 0; index < Children.Count; index++)
{ {
var child = Children[index]; var child = Children[index];
@ -144,32 +144,32 @@ namespace Avalonia.Controls
} }
else // moving to next line else // moving to next line
{ {
var controlsInLine = GetContolsBetween(firstChildInLineindex, index); var controlsInLine = GetControlsBetween(firstChildInLineIndex, index);
ArrangeLine(accumulatedV, lineSize.V, controlsInLine); ArrangeLine(accumulatedV, lineSize.V, controlsInLine);
accumulatedV += lineSize.V; accumulatedV += lineSize.V;
lineSize = childSize; lineSize = childSize;
firstChildInLineindex = index; firstChildInLineIndex = index;
} }
} }
if (firstChildInLineindex < Children.Count) if (firstChildInLineIndex < Children.Count)
{ {
var controlsInLine = GetContolsBetween(firstChildInLineindex, Children.Count); var controlsInLine = GetControlsBetween(firstChildInLineIndex, Children.Count);
ArrangeLine(accumulatedV, lineSize.V, controlsInLine); ArrangeLine(accumulatedV, lineSize.V, controlsInLine);
} }
return finalSize; return finalSize;
} }
private IEnumerable<IControl> GetContolsBetween(int first, int last) private IEnumerable<IControl> GetControlsBetween(int first, int last)
{ {
return Children.Skip(first).Take(last - first); return Children.Skip(first).Take(last - first);
} }
private void ArrangeLine(double v, double lineV, IEnumerable<IControl> contols) private void ArrangeLine(double v, double lineV, IEnumerable<IControl> controls)
{ {
double u = 0; double u = 0;
bool isHorizontal = (Orientation == Orientation.Horizontal); bool isHorizontal = (Orientation == Orientation.Horizontal);
foreach (var child in contols) foreach (var child in controls)
{ {
var childSize = CreateUVSize(child.DesiredSize); var childSize = CreateUVSize(child.DesiredSize);
var x = isHorizontal ? u : v; var x = isHorizontal ? u : v;
@ -181,9 +181,9 @@ namespace Avalonia.Controls
} }
} }
/// <summary> /// <summary>
/// Used to not not write sepearate code for horizontal and vertical orientation. /// Used to not not write separate code for horizontal and vertical orientation.
/// U is direction in line. (x if orientation is horizontal) /// U is direction in line. (x if orientation is horizontal)
/// V is direction of lines. (y if orientation is horizonral) /// V is direction of lines. (y if orientation is horizontal)
/// </summary> /// </summary>
[DebuggerDisplay("U = {U} V = {V}")] [DebuggerDisplay("U = {U} V = {V}")]
private struct UVSize private struct UVSize

Loading…
Cancel
Save