Browse Source
Merge pull request #1288 from GoldyD/master
Code improvement
pull/1270/merge
Steven Kirk
9 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with
11 additions and
22 deletions
-
src/Avalonia.Controls/Calendar/Calendar.cs
-
src/Avalonia.Controls/Control.cs
-
src/Avalonia.Controls/Primitives/SelectingItemsControl.cs
-
src/Avalonia.Controls/TreeView.cs
-
src/Avalonia.Controls/VirtualizingStackPanel.cs
-
src/Avalonia.Visuals/Media/PathMarkupParser.cs
-
src/Avalonia.Visuals/Rendering/SceneGraph/SceneBuilder.cs
-
src/Markup/Avalonia.Markup/Data/Parsers/ArgumentListParser.cs
-
src/Windows/Avalonia.Direct2D1/Media/DrawingContextImpl.cs
|
|
|
@ -549,7 +549,7 @@ namespace Avalonia.Controls |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
if (addedDate.HasValue && !(SelectedDates.Count > 0 && SelectedDates[0] == addedDate.Value)) |
|
|
|
if (!(SelectedDates.Count > 0 && SelectedDates[0] == addedDate.Value)) |
|
|
|
{ |
|
|
|
foreach (DateTime item in SelectedDates) |
|
|
|
{ |
|
|
|
|
|
|
|
@ -621,7 +621,6 @@ namespace Avalonia.Controls |
|
|
|
Contract.Requires<ArgumentNullException>(property != null); |
|
|
|
Contract.Requires<ArgumentNullException>(selector != null); |
|
|
|
Contract.Requires<ArgumentNullException>(className != null); |
|
|
|
Contract.Requires<ArgumentNullException>(property != null); |
|
|
|
|
|
|
|
if (string.IsNullOrWhiteSpace(className)) |
|
|
|
{ |
|
|
|
|
|
|
|
@ -297,7 +297,7 @@ namespace Avalonia.Controls.Primitives |
|
|
|
.OfType<IControl>() |
|
|
|
.FirstOrDefault(x => x.LogicalParent == this && ItemContainerGenerator?.IndexFromContainer(x) != -1); |
|
|
|
|
|
|
|
return item as IControl; |
|
|
|
return item; |
|
|
|
} |
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
|
|
|
|
@ -176,10 +176,7 @@ namespace Avalonia.Controls |
|
|
|
|
|
|
|
SelectedItem = item; |
|
|
|
|
|
|
|
if (SelectedItem != null) |
|
|
|
{ |
|
|
|
MarkContainerSelected(container, true); |
|
|
|
} |
|
|
|
MarkContainerSelected(container, true); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -134,12 +134,14 @@ namespace Avalonia.Controls |
|
|
|
|
|
|
|
protected override IInputElement GetControlInDirection(NavigationDirection direction, IControl from) |
|
|
|
{ |
|
|
|
if (from == null) |
|
|
|
return null; |
|
|
|
|
|
|
|
var logicalScrollable = Parent as ILogicalScrollable; |
|
|
|
var fromControl = from as IControl; |
|
|
|
|
|
|
|
if (logicalScrollable?.IsLogicalScrollEnabled == true && fromControl != null) |
|
|
|
if (logicalScrollable?.IsLogicalScrollEnabled == true) |
|
|
|
{ |
|
|
|
return logicalScrollable.GetControlInDirection(direction, fromControl); |
|
|
|
return logicalScrollable.GetControlInDirection(direction, from); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
|
|
|
|
@ -320,7 +320,7 @@ namespace Avalonia.Media |
|
|
|
if (c == 'E') |
|
|
|
{ |
|
|
|
readSign = false; |
|
|
|
readExponent = c == 'E'; |
|
|
|
readExponent = true; |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
|
|
|
|
@ -192,7 +192,7 @@ namespace Avalonia.Rendering.SceneGraph |
|
|
|
UpdateLayer(node, scene.Layers[node.LayerRoot]); |
|
|
|
} |
|
|
|
} |
|
|
|
else if (!startLayer && node.LayerRoot == node.Visual && node.Parent != null) |
|
|
|
else if (node.LayerRoot == node.Visual && node.Parent != null) |
|
|
|
{ |
|
|
|
ClearLayer(scene, node); |
|
|
|
} |
|
|
|
|
|
|
|
@ -51,15 +51,7 @@ namespace Avalonia.Markup.Data.Parsers |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (!r.End) |
|
|
|
{ |
|
|
|
r.Take(); |
|
|
|
return result; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
throw new ExpressionParseException(r.Position, "Expected ']'."); |
|
|
|
} |
|
|
|
throw new ExpressionParseException(r.Position, "Expected ']'."); |
|
|
|
} |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
@ -54,7 +54,6 @@ namespace Avalonia.Direct2D1.Media |
|
|
|
_finishedCallback = finishedCallback; |
|
|
|
_directWriteFactory = directWriteFactory; |
|
|
|
_imagingFactory = imagingFactory; |
|
|
|
_swapChain = swapChain; |
|
|
|
_renderTarget.BeginDraw(); |
|
|
|
} |
|
|
|
|
|
|
|
|