diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 80716520d9..6b910fc615 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,8 +1,8 @@ --- name: Bug report -about: Create a report to help us improve +about: Create a report to help us improve Avalonia title: '' -labels: '' +labels: bug assignees: '' --- diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index bbcbbe7d61..11fc491ef1 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -2,7 +2,7 @@ name: Feature request about: Suggest an idea for this project title: '' -labels: '' +labels: enhancement assignees: '' --- diff --git a/.ncrunch/Avalonia.MicroCom.v3.ncrunchproject b/.ncrunch/Avalonia.MicroCom.v3.ncrunchproject index 319cd523ce..95a483b433 100644 --- a/.ncrunch/Avalonia.MicroCom.v3.ncrunchproject +++ b/.ncrunch/Avalonia.MicroCom.v3.ncrunchproject @@ -1,5 +1,3 @@  - - True - + \ No newline at end of file diff --git a/.ncrunch/Avalonia.Win32.v3.ncrunchproject b/.ncrunch/Avalonia.Win32.v3.ncrunchproject index e12537d535..a764f36a24 100644 --- a/.ncrunch/Avalonia.Win32.v3.ncrunchproject +++ b/.ncrunch/Avalonia.Win32.v3.ncrunchproject @@ -1,5 +1,8 @@  + + ..\..\tools\MicroComGenerator\bin\Debug\netcoreapp3.1\**.* + MissingOrIgnoredProjectReference diff --git a/.ncrunch/Direct3DInteropSample.v3.ncrunchproject b/.ncrunch/Direct3DInteropSample.v3.ncrunchproject index e12537d535..21fcdee3a6 100644 --- a/.ncrunch/Direct3DInteropSample.v3.ncrunchproject +++ b/.ncrunch/Direct3DInteropSample.v3.ncrunchproject @@ -3,6 +3,7 @@ MissingOrIgnoredProjectReference + True True \ No newline at end of file diff --git a/readme.md b/readme.md index cfa08149cb..f73bdffaeb 100644 --- a/readme.md +++ b/readme.md @@ -12,8 +12,6 @@ Avalonia is a cross-platform XAML-based UI framework providing a flexible stylin ([Xaml Control Gallery](https://github.com/AvaloniaUI/xamlcontrolsgallery)) -> **Note:** The UI theme you see in the picture above is still work-in-progress and will be available in the upcoming Avalonia 0.10.0 release. However, you can connect to our nightly build feed and install latest pre-release versions of Avalonia NuGet packages, if you are willing to help out with the development and testing. See [Using nightly build feed](https://github.com/AvaloniaUI/Avalonia/wiki/Using-nightly-build-feed) for more info. - To see the status of some of our features, please see our [Roadmap](https://github.com/AvaloniaUI/Avalonia/issues/2239). You can also see what [breaking changes](https://github.com/AvaloniaUI/Avalonia/issues/3538) we have planned and what our [past breaking changes](https://github.com/AvaloniaUI/Avalonia/wiki/Breaking-Changes) have been. [Awesome Avalonia](https://github.com/AvaloniaCommunity/awesome-avalonia) is community-curated list of awesome Avalonia UI tools, libraries, projects and resources. Go and see what people are building with Avalonia! ## 🚀 Getting Started diff --git a/src/Avalonia.Base/Data/IndexerBinding.cs b/src/Avalonia.Base/Data/IndexerBinding.cs index cc3baa4530..4d07b53dd2 100644 --- a/src/Avalonia.Base/Data/IndexerBinding.cs +++ b/src/Avalonia.Base/Data/IndexerBinding.cs @@ -1,6 +1,4 @@ -using System; - -namespace Avalonia.Data +namespace Avalonia.Data { public class IndexerBinding : IBinding { @@ -24,23 +22,7 @@ namespace Avalonia.Data object anchor = null, bool enableDataValidation = false) { - var mode = Mode == BindingMode.Default ? - targetProperty.GetMetadata(target.GetType()).DefaultBindingMode : - Mode; - - switch (mode) - { - case BindingMode.OneTime: - return InstancedBinding.OneTime(Source.GetObservable(Property)); - case BindingMode.OneWay: - return InstancedBinding.OneWay(Source.GetObservable(Property)); - case BindingMode.OneWayToSource: - return InstancedBinding.OneWayToSource(Source.GetSubject(Property)); - case BindingMode.TwoWay: - return InstancedBinding.TwoWay(Source.GetSubject(Property)); - default: - throw new NotSupportedException("Unsupported BindingMode."); - } + return new InstancedBinding(Source.GetSubject(Property), Mode, BindingPriority.LocalValue); } } } diff --git a/src/Avalonia.Controls/Primitives/LightDismissOverlayLayer.cs b/src/Avalonia.Controls/Primitives/LightDismissOverlayLayer.cs index 752eedb68a..1d655bb691 100644 --- a/src/Avalonia.Controls/Primitives/LightDismissOverlayLayer.cs +++ b/src/Avalonia.Controls/Primitives/LightDismissOverlayLayer.cs @@ -2,6 +2,7 @@ using System; using System.Linq; using Avalonia.Controls.Templates; using Avalonia.Input; +using Avalonia.Media; using Avalonia.Rendering; using Avalonia.Styling; using Avalonia.VisualTree; @@ -17,6 +18,11 @@ namespace Avalonia.Controls.Primitives { public IInputElement? InputPassThroughElement { get; set; } + static LightDismissOverlayLayer() + { + BackgroundProperty.OverrideDefaultValue(Brushes.Transparent); + } + /// /// Returns the light dismiss overlay for a specified visual. /// diff --git a/src/Avalonia.Controls/Primitives/VisualLayerManager.cs b/src/Avalonia.Controls/Primitives/VisualLayerManager.cs index d8d3450c6f..03a84e26f2 100644 --- a/src/Avalonia.Controls/Primitives/VisualLayerManager.cs +++ b/src/Avalonia.Controls/Primitives/VisualLayerManager.cs @@ -67,14 +67,11 @@ namespace Avalonia.Controls.Primitives { get { - if (IsPopup) - return null; var rv = FindLayer(); if (rv == null) { rv = new LightDismissOverlayLayer { - Background = Brushes.Transparent, IsVisible = false }; diff --git a/src/Avalonia.Controls/Slider.cs b/src/Avalonia.Controls/Slider.cs index fe4b24099f..74de33529a 100644 --- a/src/Avalonia.Controls/Slider.cs +++ b/src/Avalonia.Controls/Slider.cs @@ -11,7 +11,6 @@ using Avalonia.Utilities; namespace Avalonia.Controls { - /// /// Enum which describes how to position the ticks in a . /// @@ -84,6 +83,9 @@ namespace Avalonia.Controls private IDisposable _increaseButtonSubscription; private IDisposable _increaseButtonReleaseDispose; private IDisposable _pointerMovedDispose; + private IDisposable _trackOnKeyDownDispose; + + private const double Tolerance = 0.0001; /// /// Initializes static members of the class. @@ -95,7 +97,7 @@ namespace Avalonia.Controls Thumb.DragStartedEvent.AddClassHandler((x, e) => x.OnThumbDragStarted(e), RoutingStrategies.Bubble); Thumb.DragCompletedEvent.AddClassHandler((x, e) => x.OnThumbDragCompleted(e), RoutingStrategies.Bubble); - + ValueProperty.OverrideMetadata(new DirectPropertyMetadata(enableDataValidation: true)); } @@ -157,13 +159,14 @@ namespace Avalonia.Controls protected override void OnApplyTemplate(TemplateAppliedEventArgs e) { base.OnApplyTemplate(e); - + _decreaseButtonPressDispose?.Dispose(); _decreaseButtonReleaseDispose?.Dispose(); _increaseButtonSubscription?.Dispose(); _increaseButtonReleaseDispose?.Dispose(); _pointerMovedDispose?.Dispose(); - + _trackOnKeyDownDispose?.Dispose(); + _decreaseButton = e.NameScope.Find