Cleanup code format (#6242)
This commit is contained in:
Родитель
301f664316
Коммит
705d344ac0
|
@ -1,7 +1,7 @@
|
|||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: nuget
|
||||
directory: "/src/"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 25
|
|
@ -67,7 +67,7 @@ namespace Microsoft.AspNetCore.Components.WebView.Maui
|
|||
var defaultResult = TryGetResponseContent(uri, allowFallbackOnHostPage, out statusCode, out statusMessage, out content, out headers);
|
||||
var hotReloadedResult = StaticContentHotReloadManager.TryReplaceResponseContent(_contentRootRelativeToAppRoot, uri, ref statusCode, ref content, headers);
|
||||
return defaultResult || hotReloadedResult;
|
||||
}
|
||||
}
|
||||
|
||||
internal void SetUpMessageChannel()
|
||||
{
|
||||
|
|
|
@ -6,8 +6,8 @@ using Microsoft.Maui;
|
|||
using Microsoft.Maui.Dispatching;
|
||||
using Microsoft.Maui.Handlers;
|
||||
using static Android.Views.ViewGroup;
|
||||
using Path = System.IO.Path;
|
||||
using AWebView = Android.Webkit.WebView;
|
||||
using Path = System.IO.Path;
|
||||
|
||||
namespace Microsoft.AspNetCore.Components.WebView.Maui
|
||||
{
|
||||
|
|
|
@ -79,7 +79,7 @@ namespace Microsoft.AspNetCore.Components.WebView
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
private static (string AssemblyName, string RelativePath) GetAssemblyNameAndRelativePath(string requestAbsoluteUri, string appContentRoot)
|
||||
{
|
||||
var requestPath = new Uri(requestAbsoluteUri).AbsolutePath.Substring(1);
|
||||
|
|
|
@ -589,7 +589,7 @@ namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.iOS
|
|||
base.Dispose(disposing);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[System.Obsolete]
|
||||
public class PerformanceTrackingImage : ImageRenderer, IDrawnObservable
|
||||
{
|
||||
|
|
|
@ -612,7 +612,7 @@ namespace Microsoft.Maui.Controls.Compatibility.Platform.Android
|
|||
// we need to reset the ListView's adapter to reflect the changes on page B
|
||||
// If there header and footer are present at the reset time of the adapter
|
||||
// they will be DOUBLE added to the ViewGround (the ListView) causing indexes to be off by one.
|
||||
|
||||
|
||||
if (_realListView.IsDisposed())
|
||||
return;
|
||||
|
||||
|
|
|
@ -209,7 +209,7 @@ namespace Microsoft.Maui.Controls.Compatibility.Platform.Android
|
|||
}
|
||||
}
|
||||
|
||||
[PortHandler ("Partially ported")]
|
||||
[PortHandler("Partially ported")]
|
||||
void UpdateEnabled()
|
||||
{
|
||||
SearchBar model = Element;
|
||||
|
|
|
@ -293,7 +293,7 @@ namespace Microsoft.Maui.Controls.Compatibility.Platform.Android
|
|||
|
||||
SyncNativeCookies(url);
|
||||
}
|
||||
|
||||
|
||||
[PortHandler]
|
||||
void SyncNativeCookies(string url)
|
||||
{
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
using Microsoft.Maui.Hosting;
|
||||
using Microsoft.Maui.Controls.Hosting;
|
||||
using Microsoft.Maui.Hosting;
|
||||
|
||||
namespace Microsoft.Maui.Embedding
|
||||
{
|
||||
|
@ -14,7 +14,7 @@ namespace Microsoft.Maui.Embedding
|
|||
=> builder.UseMauiApp<Controls.Application>();
|
||||
|
||||
public static MauiAppBuilder UseMauiEmbedding<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] TApp>(this MauiAppBuilder builder, Func<IServiceProvider, Controls.Application> implementationFactory)
|
||||
where TApp : class, IApplication
|
||||
where TApp : class, IApplication
|
||||
=> builder.UseMauiApp(implementationFactory);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
#nullable enable
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
using Microsoft.Maui.Controls.Compatibility;
|
||||
using Microsoft.Maui.Controls.Shapes;
|
||||
using Microsoft.Maui.Dispatching;
|
||||
using Microsoft.Maui.Hosting;
|
||||
using Microsoft.Maui.LifecycleEvents;
|
||||
using Microsoft.Maui.Platform;
|
||||
using Microsoft.Maui.Dispatching;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
#if ANDROID
|
||||
using Microsoft.Maui.Controls.Handlers.Compatibility;
|
||||
|
|
|
@ -4,18 +4,17 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
using Foundation;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Maui.Controls.Platform;
|
||||
using ObjCRuntime;
|
||||
using UIKit;
|
||||
using Microsoft.Maui.Controls.Platform;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Microsoft.Maui.Controls.Compatibility.Platform.iOS
|
||||
{
|
||||
internal class DragAndDropDelegate : NSObject, IUIDragInteractionDelegate, IUIDropInteractionDelegate
|
||||
{
|
||||
#region UIDragInteractionDelegate
|
||||
#region UIDragInteractionDelegate
|
||||
|
||||
|
||||
[Export("dragInteraction:session:willEndWithOperation:")]
|
||||
|
@ -38,7 +37,7 @@ namespace Microsoft.Maui.Controls.Compatibility.Platform.iOS
|
|||
|
||||
return new UIDragItem[0];
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
[Export("dropInteraction:canHandleSession:")]
|
||||
[Preserve(Conditional = true)]
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
using System;
|
||||
using CoreGraphics;
|
||||
using PointF = CoreGraphics.CGPoint;
|
||||
using RectangleF = CoreGraphics.CGRect;
|
||||
using SizeF = CoreGraphics.CGSize;
|
||||
using Microsoft.Maui.Graphics;
|
||||
using ObjCRuntime;
|
||||
using UIKit;
|
||||
using PointF = CoreGraphics.CGPoint;
|
||||
using RectangleF = CoreGraphics.CGRect;
|
||||
using SizeF = CoreGraphics.CGSize;
|
||||
|
||||
namespace Microsoft.Maui.Controls.Compatibility.Platform.iOS
|
||||
{
|
||||
|
|
|
@ -274,7 +274,7 @@ namespace Microsoft.Maui.Controls.Compatibility.Platform.iOS
|
|||
}
|
||||
_tableViewController = new FormsUITableViewController(e.NewElement, _usingLargeTitles);
|
||||
SetNativeControl(_tableViewController.TableView);
|
||||
|
||||
|
||||
if (Forms.IsiOS15OrNewer)
|
||||
_tableViewController.TableView.SectionHeaderTopPadding = new nfloat(0);
|
||||
|
||||
|
|
|
@ -6,12 +6,12 @@ using Google.Android.Material.BottomNavigation;
|
|||
using Microsoft.Maui.Controls.Compatibility;
|
||||
using Microsoft.Maui.Controls.Compatibility.Platform.Android.UnitTests;
|
||||
using Microsoft.Maui.Controls.CustomAttributes;
|
||||
using Microsoft.Maui.Controls.Platform;
|
||||
using Microsoft.Maui.Graphics;
|
||||
using NUnit.Framework;
|
||||
using Microsoft.Maui.Controls.Handlers.Compatibility;
|
||||
using Microsoft.Maui.Controls.Platform;
|
||||
using Microsoft.Maui.Controls.Platform.Compatibility;
|
||||
using Microsoft.Maui.Dispatching;
|
||||
using Microsoft.Maui.Graphics;
|
||||
using NUnit.Framework;
|
||||
|
||||
[assembly: ExportRenderer(typeof(TestShell), typeof(TestShellRenderer))]
|
||||
namespace Microsoft.Maui.Controls.Compatibility.Platform.Android.UnitTests
|
||||
|
|
|
@ -47,9 +47,9 @@ namespace Microsoft.Maui.Controls.Compatibility.Maps.MacOS
|
|||
|
||||
// For the time being, we don't want ViewRenderer handling disposal of the MKMapView
|
||||
// if we're on iOS 9 or 10; during Dispose we'll be putting the MKMapView in a pool instead
|
||||
//#if MOBILE
|
||||
// protected override bool ManageNativeControlLifetime => false;
|
||||
//#endif
|
||||
//#if MOBILE
|
||||
// protected override bool ManageNativeControlLifetime => false;
|
||||
//#endif
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (_disposed)
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
using System;
|
||||
using Microsoft.Maui.Graphics;
|
||||
using Android.App;
|
||||
using Android.Runtime;
|
||||
using AndroidX.Window.Layout;
|
||||
using Android.App;
|
||||
using Microsoft.Maui.Graphics;
|
||||
using Microsoft.Maui.Platform;
|
||||
|
||||
namespace Microsoft.Maui.Foldable
|
||||
|
|
|
@ -2,13 +2,13 @@ using System;
|
|||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Android.App;
|
||||
using Android.Content.Res;
|
||||
using Android.Views;
|
||||
using AndroidX.Window.Layout;
|
||||
using Microsoft.Maui.Controls;
|
||||
using Microsoft.Maui.Graphics;
|
||||
using AView = Android.Views.View;
|
||||
using Microsoft.Maui.Platform;
|
||||
using AndroidX.Window.Layout;
|
||||
using Android.Content.Res;
|
||||
using AView = Android.Views.View;
|
||||
|
||||
namespace Microsoft.Maui.Foldable
|
||||
{
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Android.App;
|
||||
using AndroidX.Window.Layout;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Maui.Graphics;
|
||||
using Microsoft.Maui.Hosting;
|
||||
using Microsoft.Maui.LifecycleEvents;
|
||||
using Microsoft.Maui.Platform;
|
||||
using Microsoft.Maui.Graphics;
|
||||
using AndroidX.Window.Layout;
|
||||
using static Microsoft.Maui.Foldable.FoldableService;
|
||||
using Android.App;
|
||||
|
||||
namespace Microsoft.Maui.Foldable
|
||||
{
|
||||
|
|
|
@ -4,12 +4,12 @@ using System.ComponentModel;
|
|||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Threading;
|
||||
using Microsoft.Maui;
|
||||
using Microsoft.Maui.Graphics;
|
||||
using Microsoft.Maui.Controls;
|
||||
using Microsoft.Maui.Controls.Foldable;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Maui;
|
||||
using Microsoft.Maui.Controls;
|
||||
using Microsoft.Maui.Controls.Foldable;
|
||||
using Microsoft.Maui.Graphics;
|
||||
|
||||
namespace Microsoft.Maui.Foldable
|
||||
{
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace Microsoft.Maui.Foldable
|
|||
/// <summary>Whether an obscuring hinge exists or a foldable is in Flex Mode (HALF_OPEN)</summary>
|
||||
bool IsSeparating { get; set; }
|
||||
/// <summary>Coordinates of the obscured hinge area (within the WindowBounds, in pixels)</summary>
|
||||
Rect FoldingFeatureBounds { get; set; }
|
||||
Rect FoldingFeatureBounds { get; set; }
|
||||
/// <summary>Size of the screen (in pixels)</summary>
|
||||
Rect WindowBounds { get; set; }
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Maui.Graphics;
|
||||
using Microsoft.Maui;
|
||||
using Microsoft.Maui.Devices;
|
||||
using Microsoft.Maui.Controls;
|
||||
using Microsoft.Maui.Controls.Internals;
|
||||
using Microsoft.Maui.Devices;
|
||||
using Microsoft.Maui.Graphics;
|
||||
|
||||
namespace Microsoft.Maui.Foldable
|
||||
{
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace Microsoft.Maui.Controls.Foldable
|
|||
return;
|
||||
}
|
||||
|
||||
if(_info != null)
|
||||
if (_info != null)
|
||||
_info.PropertyChanged -= OnDualScreenInfoPropertyChanged;
|
||||
|
||||
_visualElement = visualElement;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
using System;
|
||||
using Microsoft.Maui.Graphics;
|
||||
using System.Threading;
|
||||
using Microsoft.Maui;
|
||||
using Microsoft.Maui.Controls;
|
||||
using Microsoft.Maui.Devices;
|
||||
using Microsoft.Maui;
|
||||
using System.Threading;
|
||||
using Microsoft.Maui.Foldable;
|
||||
using Microsoft.Maui.Graphics;
|
||||
|
||||
namespace Microsoft.Maui.Controls.Foldable
|
||||
{
|
||||
|
|
|
@ -3,11 +3,11 @@ using System.Collections.Generic;
|
|||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Maui;
|
||||
using Microsoft.Maui.Graphics;
|
||||
using Microsoft.Maui.Controls;
|
||||
using Microsoft.Maui.Foldable;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Maui.Graphics;
|
||||
|
||||
namespace Microsoft.Maui.Controls.Foldable
|
||||
{
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace Maui.Controls.Sample.Droid
|
|||
| ConfigChanges.UiMode
|
||||
| ConfigChanges.SmallestScreenSize
|
||||
| ConfigChanges.KeyboardHidden
|
||||
| ConfigChanges.Density
|
||||
| ConfigChanges.Density
|
||||
)]
|
||||
[IntentFilter(
|
||||
new[] { Microsoft.Maui.ApplicationModel.Platform.Intent.ActionAppAction },
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace Maui.Controls.Sample.Pages
|
|||
_imageSource = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void OnDynamicValueChanged(object sender, ValueChangedEventArgs args)
|
||||
{
|
||||
UpdateInfo();
|
||||
|
@ -43,7 +43,7 @@ namespace Maui.Controls.Sample.Pages
|
|||
DynamicSlider.Minimum = 4;
|
||||
UpdateInfo();
|
||||
}
|
||||
|
||||
|
||||
void OnUpdateMaximumButtonClicked(object sender, System.EventArgs e)
|
||||
{
|
||||
DynamicSlider.Maximum = 8;
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace Maui.Controls.Sample.Pages
|
|||
MenuBarItem barItem =
|
||||
MenuBarItems.FirstOrDefault(x => x.Text == "Added Menu");
|
||||
|
||||
if(barItem == null)
|
||||
if (barItem == null)
|
||||
{
|
||||
barItem = new MenuBarItem()
|
||||
{
|
||||
|
|
|
@ -83,7 +83,7 @@ namespace Maui.Controls.Sample.Pages
|
|||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void ContentPage_Unloaded(object sender, EventArgs e)
|
||||
{
|
||||
|
@ -169,6 +169,6 @@ namespace Maui.Controls.Sample.Pages
|
|||
double maxX = Math.Max(_firstPosX, _currentMousePosX);
|
||||
double maxY = Math.Max(_firstPosY, _currentMousePosY);
|
||||
return Rect.FromLTRB(minX, minY, maxX, maxY);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ namespace Maui.Controls.Sample.Pages
|
|||
|
||||
parentAnimation.Commit(this, "CustomAnimation", 16, 4000, null, (v, c) => SetIsEnabledButtonState(true, false));
|
||||
}
|
||||
|
||||
|
||||
void OnCancelAnimationButtonClicked(object sender, EventArgs e)
|
||||
{
|
||||
Microsoft.Maui.Controls.ViewExtensions.CancelAnimations(DotNetBotImage);
|
||||
|
|
|
@ -62,25 +62,25 @@ namespace Maui.Controls.Sample
|
|||
*/
|
||||
}
|
||||
|
||||
// appBuilder
|
||||
// .ConfigureMauiHandlers(handlers =>
|
||||
// {
|
||||
//#pragma warning disable CS0618 // Type or member is obsolete
|
||||
//#if __ANDROID__
|
||||
// handlers.AddCompatibilityRenderer(typeof(CustomButton),
|
||||
// typeof(Microsoft.Maui.Controls.Compatibility.Platform.Android.AppCompat.ButtonRenderer));
|
||||
//#elif __IOS__
|
||||
// handlers.AddCompatibilityRenderer(typeof(CustomButton),
|
||||
// typeof(Microsoft.Maui.Controls.Compatibility.Platform.iOS.ButtonRenderer));
|
||||
//#elif WINDOWS
|
||||
// handlers.AddCompatibilityRenderer(typeof(CustomButton),
|
||||
// typeof(Microsoft.Maui.Controls.Compatibility.Platform.UWP.ButtonRenderer));
|
||||
// #elif TIZEN
|
||||
// handlers.AddCompatibilityRenderer(typeof(CustomButton),
|
||||
// typeof(Microsoft.Maui.Controls.Compatibility.Platform.Tizen.ButtonRenderer));
|
||||
// #endif
|
||||
//#pragma warning restore CS0618 // Type or member is obsolete
|
||||
// });
|
||||
// appBuilder
|
||||
// .ConfigureMauiHandlers(handlers =>
|
||||
// {
|
||||
//#pragma warning disable CS0618 // Type or member is obsolete
|
||||
//#if __ANDROID__
|
||||
// handlers.AddCompatibilityRenderer(typeof(CustomButton),
|
||||
// typeof(Microsoft.Maui.Controls.Compatibility.Platform.Android.AppCompat.ButtonRenderer));
|
||||
//#elif __IOS__
|
||||
// handlers.AddCompatibilityRenderer(typeof(CustomButton),
|
||||
// typeof(Microsoft.Maui.Controls.Compatibility.Platform.iOS.ButtonRenderer));
|
||||
//#elif WINDOWS
|
||||
// handlers.AddCompatibilityRenderer(typeof(CustomButton),
|
||||
// typeof(Microsoft.Maui.Controls.Compatibility.Platform.UWP.ButtonRenderer));
|
||||
// #elif TIZEN
|
||||
// handlers.AddCompatibilityRenderer(typeof(CustomButton),
|
||||
// typeof(Microsoft.Maui.Controls.Compatibility.Platform.Tizen.ButtonRenderer));
|
||||
// #endif
|
||||
//#pragma warning restore CS0618 // Type or member is obsolete
|
||||
// });
|
||||
|
||||
// Use a "third party" library that brings in a massive amount of controls
|
||||
appBuilder.UseBordelessEntry();
|
||||
|
|
|
@ -26,10 +26,10 @@ namespace Maui.Controls.Sample.ViewModels
|
|||
|
||||
new SectionModel(typeof(ClipPage), "Clip",
|
||||
"Defines the outline of the contents of an element."),
|
||||
|
||||
|
||||
new SectionModel(typeof(DevicePage), "Device",
|
||||
"A number of properties and methods to help developers customize layout and functionality on a per-platform basis"),
|
||||
|
||||
|
||||
new SectionModel(typeof(DispatcherPage), "Dispatcher",
|
||||
"Managing UI thread access with dispatchers and timers."),
|
||||
|
||||
|
@ -38,7 +38,7 @@ namespace Maui.Controls.Sample.ViewModels
|
|||
|
||||
new SectionModel(typeof(FlyoutPageGallery), "FlyoutPage",
|
||||
"Demonstrates using a Flyout Page."),
|
||||
|
||||
|
||||
new SectionModel(typeof(FocusPage), "Focus Management",
|
||||
"Focus and onfocus views, detect when a view gains focus and more."),
|
||||
|
||||
|
@ -50,7 +50,7 @@ namespace Maui.Controls.Sample.ViewModels
|
|||
|
||||
new SectionModel(typeof(InputTransparentPage), "InputTransparent",
|
||||
"Manage whether a view participates in the user interaction cycle."),
|
||||
|
||||
|
||||
new SectionModel(typeof(MenuBarPage), "MenuBar",
|
||||
"Allows you to push and pop Modal Pages."),
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace Microsoft.Maui.Controls.XamlC
|
|||
return GenerateIL(module, l);
|
||||
break;
|
||||
case 4:
|
||||
if ( double.TryParse(cornerradius[0], NumberStyles.Number, CultureInfo.InvariantCulture, out tl)
|
||||
if (double.TryParse(cornerradius[0], NumberStyles.Number, CultureInfo.InvariantCulture, out tl)
|
||||
&& double.TryParse(cornerradius[1], NumberStyles.Number, CultureInfo.InvariantCulture, out tr)
|
||||
&& double.TryParse(cornerradius[2], NumberStyles.Number, CultureInfo.InvariantCulture, out bl)
|
||||
&& double.TryParse(cornerradius[3], NumberStyles.Number, CultureInfo.InvariantCulture, out br))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using System;
|
||||
using Microsoft.Maui.Devices;
|
||||
using Microsoft.Maui.ApplicationModel;
|
||||
using Microsoft.Maui.Devices;
|
||||
|
||||
namespace Microsoft.Maui.Controls
|
||||
{
|
||||
|
@ -45,7 +45,7 @@ namespace Microsoft.Maui.Controls
|
|||
{
|
||||
if (_weakTarget == null || !_weakTarget.TryGetTarget(out var target))
|
||||
return;
|
||||
|
||||
|
||||
if (dispatch)
|
||||
target.Dispatcher.DispatchIfRequired(Set);
|
||||
else
|
||||
|
|
|
@ -8,8 +8,8 @@ using System.Threading;
|
|||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Maui.Controls.Internals;
|
||||
using Microsoft.Maui.ApplicationModel;
|
||||
using Microsoft.Maui.Controls.Internals;
|
||||
using Microsoft.Maui.Graphics;
|
||||
using Microsoft.Maui.Handlers;
|
||||
|
||||
|
|
|
@ -3,12 +3,12 @@ namespace Microsoft.Maui.Controls
|
|||
/// <include file="../../docs/Microsoft.Maui.Controls/ColumnDefinitionCollection.xml" path="Type[@FullName='Microsoft.Maui.Controls.ColumnDefinitionCollection']/Docs" />
|
||||
public sealed class ColumnDefinitionCollection : DefinitionCollection<ColumnDefinition>
|
||||
{
|
||||
public ColumnDefinitionCollection() : base()
|
||||
{
|
||||
}
|
||||
public ColumnDefinitionCollection() : base()
|
||||
{
|
||||
}
|
||||
|
||||
public ColumnDefinitionCollection(params ColumnDefinition[] definitions) : base (definitions)
|
||||
{
|
||||
}
|
||||
public ColumnDefinitionCollection(params ColumnDefinition[] definitions) : base(definitions)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -302,7 +302,7 @@ namespace Microsoft.Maui.Controls.Handlers.Compatibility
|
|||
var platformView = content.ToPlatform(_mauiContext);
|
||||
AddView(platformView);
|
||||
}
|
||||
|
||||
|
||||
#region IPlatformViewHandler
|
||||
bool IViewHandler.HasContainer { get => false; set { } }
|
||||
|
||||
|
|
|
@ -617,7 +617,7 @@ namespace Microsoft.Maui.Controls.Handlers.Compatibility
|
|||
// we need to reset the ListView's adapter to reflect the changes on page B
|
||||
// If there header and footer are present at the reset time of the adapter
|
||||
// they will be DOUBLE added to the ViewGround (the ListView) causing indexes to be off by one.
|
||||
|
||||
|
||||
if (_realListView.IsDisposed())
|
||||
return;
|
||||
|
||||
|
|
|
@ -246,7 +246,7 @@ namespace Microsoft.Maui.Controls.Handlers.Compatibility
|
|||
// an additional ConditionalFocusLayout
|
||||
// We're basically faking re-use to the GetView call
|
||||
AView currentParent = null;
|
||||
if(cell.Handler?.PlatformView is AView aView)
|
||||
if (cell.Handler?.PlatformView is AView aView)
|
||||
currentParent = aView.Parent as AView;
|
||||
|
||||
AView listItem = _adapter.GetView(i, currentParent, Control);
|
||||
|
@ -440,8 +440,8 @@ namespace Microsoft.Maui.Controls.Handlers.Compatibility
|
|||
});
|
||||
}
|
||||
else
|
||||
_refresh.Refreshing = isRefreshing;
|
||||
|
||||
_refresh.Refreshing = isRefreshing;
|
||||
|
||||
// Allow to disable SwipeToRefresh layout AFTER refresh is done
|
||||
UpdateIsSwipeToRefreshEnabled();
|
||||
}
|
||||
|
|
|
@ -228,7 +228,7 @@ namespace Microsoft.Maui.Controls.Handlers.Compatibility
|
|||
}
|
||||
_tableViewController = new FormsUITableViewController(e.NewElement, _usingLargeTitles);
|
||||
SetNativeControl(_tableViewController.TableView);
|
||||
|
||||
|
||||
if (PlatformVersion.IsAtLeast(15))
|
||||
_tableViewController.TableView.SectionHeaderTopPadding = new nfloat(0);
|
||||
|
||||
|
|
|
@ -7,10 +7,10 @@ using Android.Views;
|
|||
using Android.Widget;
|
||||
using AndroidX.DrawerLayout.Widget;
|
||||
using AndroidX.Fragment.App;
|
||||
using Microsoft.Maui.ApplicationModel;
|
||||
using Microsoft.Maui.Controls.Internals;
|
||||
using Microsoft.Maui.Controls.Platform;
|
||||
using Microsoft.Maui.Controls.Platform.Compatibility;
|
||||
using Microsoft.Maui.ApplicationModel;
|
||||
using Microsoft.Maui.Graphics;
|
||||
using AColor = Android.Graphics.Color;
|
||||
using ARect = Android.Graphics.Rect;
|
||||
|
@ -276,7 +276,7 @@ namespace Microsoft.Maui.Controls.Handlers.Compatibility
|
|||
|
||||
int statusBarHeight = AndroidContext.GetStatusBarHeight();
|
||||
int navigationBarHeight = AndroidContext.GetNavigationBarHeight();
|
||||
|
||||
|
||||
// we are using the split drawable here to avoid GPU overdraw.
|
||||
// All it really is is a drawable that only draws under the statusbar/bottom bar to make sure
|
||||
// we dont draw over areas we dont need to. This has very limited benefits considering its
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
using Android.Graphics.Drawables;
|
||||
using AndroidX.AppCompat.Widget;
|
||||
using Microsoft.Maui.Controls.Handlers.Compatibility;
|
||||
using Microsoft.Maui.Graphics;
|
||||
using AToolbar = AndroidX.AppCompat.Widget.Toolbar;
|
||||
using Microsoft.Maui.Controls.Handlers.Compatibility;
|
||||
|
||||
namespace Microsoft.Maui.Controls.Platform.Compatibility
|
||||
{
|
||||
|
|
|
@ -63,7 +63,7 @@ namespace Microsoft.Maui.Controls.Platform.Compatibility
|
|||
{
|
||||
_uiSearchBar.UpdateFlowDirection(shell);
|
||||
_numericAccessoryView.UpdateFlowDirection(shell);
|
||||
|
||||
|
||||
var uiTextField = _uiSearchBar.FindDescendantView<UITextField>();
|
||||
UpdateSearchBarHorizontalTextAlignment(uiTextField, shell);
|
||||
}
|
||||
|
@ -282,7 +282,7 @@ namespace Microsoft.Maui.Controls.Platform.Compatibility
|
|||
return;
|
||||
|
||||
textField.TextAlignment = _searchHandler.HorizontalTextAlignment.ToPlatformHorizontal();
|
||||
if(view != null)
|
||||
if (view != null)
|
||||
{
|
||||
textField.TextAlignment = textField.TextAlignment.AdjustForFlowDirection(view);
|
||||
}
|
||||
|
|
|
@ -7,9 +7,9 @@ using CoreAnimation;
|
|||
using CoreGraphics;
|
||||
using Foundation;
|
||||
using Microsoft.Maui.Graphics;
|
||||
using Microsoft.Maui.Platform;
|
||||
using ObjCRuntime;
|
||||
using UIKit;
|
||||
using Microsoft.Maui.Platform;
|
||||
|
||||
namespace Microsoft.Maui.Controls.Platform.Compatibility
|
||||
{
|
||||
|
|
|
@ -91,7 +91,7 @@ namespace Microsoft.Maui.Controls.Platform.Compatibility
|
|||
|
||||
// TODO MAUI
|
||||
//if (view is SwipeView)
|
||||
//return true;
|
||||
//return true;
|
||||
|
||||
return IsSwipeView(view.Superview);
|
||||
}
|
||||
|
|
|
@ -379,7 +379,8 @@ namespace Microsoft.Maui.Controls.Handlers.Compatibility
|
|||
|
||||
void IElementHandler.SetVirtualView(Maui.IElement view)
|
||||
{
|
||||
SetElement((VisualElement)view); }
|
||||
SetElement((VisualElement)view);
|
||||
}
|
||||
|
||||
void IElementHandler.UpdateValue(string property)
|
||||
{
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace Microsoft.Maui.Controls
|
|||
|
||||
/// <include file="../../docs/Microsoft.Maui.Controls/DataTemplate.xml" path="//Member[@MemberName='.ctor'][3]/Docs" />
|
||||
public DataTemplate(
|
||||
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type type)
|
||||
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type type)
|
||||
: base(type)
|
||||
{
|
||||
_id = Interlocked.Increment(ref idCounter);
|
||||
|
|
|
@ -39,13 +39,13 @@ namespace Microsoft.Maui.Controls.Internals
|
|||
}
|
||||
|
||||
internal static object ResolveOrCreate(
|
||||
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] Type type)
|
||||
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] Type type)
|
||||
=> ResolveOrCreate(type, null, null);
|
||||
|
||||
internal static object ResolveOrCreate(
|
||||
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] Type type,
|
||||
object source,
|
||||
Type visualType,
|
||||
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] Type type,
|
||||
object source,
|
||||
Type visualType,
|
||||
params object[] args)
|
||||
{
|
||||
visualType = visualType ?? _defaultVisualType;
|
||||
|
|
|
@ -3,10 +3,10 @@ using System.ComponentModel;
|
|||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Maui.Controls.Internals;
|
||||
using Microsoft.Maui.Dispatching;
|
||||
using Microsoft.Maui.Devices;
|
||||
using Microsoft.Maui.ApplicationModel;
|
||||
using Microsoft.Maui.Controls.Internals;
|
||||
using Microsoft.Maui.Devices;
|
||||
using Microsoft.Maui.Dispatching;
|
||||
|
||||
namespace Microsoft.Maui.Controls
|
||||
{
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Maui.Devices;
|
||||
using Microsoft.Maui.ApplicationModel;
|
||||
using Microsoft.Maui.Devices;
|
||||
using Microsoft.Maui.Handlers;
|
||||
|
||||
namespace Microsoft.Maui.Controls
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{
|
||||
public partial class Editor
|
||||
{
|
||||
public static void MapText(EditorHandler handler, Editor editor)
|
||||
public static void MapText(EditorHandler handler, Editor editor)
|
||||
{
|
||||
Platform.EditTextExtensions.UpdateText(handler.PlatformView, editor);
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
namespace Microsoft.Maui.Controls
|
||||
{
|
||||
public partial class Editor
|
||||
public partial class Editor
|
||||
{
|
||||
public static IPropertyMapper<IEditor, EditorHandler> ControlsEditorMapper =
|
||||
public static IPropertyMapper<IEditor, EditorHandler> ControlsEditorMapper =
|
||||
new PropertyMapper<Editor, EditorHandler>(EditorHandler.Mapper)
|
||||
{
|
||||
[nameof(Text)] = MapText,
|
||||
[nameof(TextTransform)] = MapText,
|
||||
};
|
||||
{
|
||||
[nameof(Text)] = MapText,
|
||||
[nameof(TextTransform)] = MapText,
|
||||
};
|
||||
|
||||
internal static new void RemapForControls()
|
||||
{
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{
|
||||
public partial class Editor
|
||||
{
|
||||
public static void MapText(EditorHandler handler, Editor editor)
|
||||
public static void MapText(EditorHandler handler, Editor editor)
|
||||
{
|
||||
Platform.TextExtensions.UpdateText(handler.PlatformView, editor);
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace Microsoft.Maui.Controls
|
|||
{
|
||||
public partial class Entry
|
||||
{
|
||||
public static void MapText(EntryHandler handler, Entry entry)
|
||||
public static void MapText(EntryHandler handler, Entry entry)
|
||||
{
|
||||
Platform.EditTextExtensions.UpdateText(handler.PlatformView, entry);
|
||||
}
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
{
|
||||
public partial class Entry
|
||||
{
|
||||
public static IPropertyMapper<IEntry, EntryHandler> ControlsEntryMapper =
|
||||
public static IPropertyMapper<IEntry, EntryHandler> ControlsEntryMapper =
|
||||
new PropertyMapper<Entry, EntryHandler>(EntryHandler.Mapper)
|
||||
{
|
||||
[nameof(Text)] = MapText,
|
||||
[nameof(TextTransform)] = MapText,
|
||||
};
|
||||
{
|
||||
[nameof(Text)] = MapText,
|
||||
[nameof(TextTransform)] = MapText,
|
||||
};
|
||||
|
||||
internal static new void RemapForControls()
|
||||
{
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{
|
||||
public partial class Entry
|
||||
{
|
||||
public static void MapText(EntryHandler handler, Entry entry)
|
||||
public static void MapText(EntryHandler handler, Entry entry)
|
||||
{
|
||||
Platform.TextExtensions.UpdateText(handler.PlatformView, entry);
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace Microsoft.Maui.Controls
|
|||
|
||||
void IGraphicsView.CancelInteraction() => CancelInteraction?.Invoke(this, EventArgs.Empty);
|
||||
|
||||
void IGraphicsView.DragInteraction(PointF[] points) => DragInteraction?.Invoke(this, new TouchEventArgs(points,true));
|
||||
void IGraphicsView.DragInteraction(PointF[] points) => DragInteraction?.Invoke(this, new TouchEventArgs(points, true));
|
||||
|
||||
void IGraphicsView.EndHoverInteraction() => EndHoverInteraction?.Invoke(this, EventArgs.Empty);
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
using Microsoft.Maui.Handlers;
|
||||
using Microsoft.Maui.Controls.Platform;
|
||||
using Microsoft.Maui.Controls.Platform;
|
||||
using Microsoft.Maui.Handlers;
|
||||
|
||||
namespace Microsoft.Maui.Controls
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
using Microsoft.Maui.Handlers;
|
||||
using Microsoft.Maui.Controls.Platform;
|
||||
using Microsoft.Maui.Controls.Platform;
|
||||
using Microsoft.Maui.Handlers;
|
||||
|
||||
namespace Microsoft.Maui.Controls
|
||||
{
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{
|
||||
public partial class SearchBar
|
||||
{
|
||||
public static void MapText(SearchBarHandler handler, SearchBar searchBar)
|
||||
public static void MapText(SearchBarHandler handler, SearchBar searchBar)
|
||||
{
|
||||
Platform.SearchViewExtensions.UpdateText(handler.PlatformView, searchBar);
|
||||
}
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
{
|
||||
public partial class SearchBar
|
||||
{
|
||||
public static IPropertyMapper<ISearchBar, SearchBarHandler> ControlsSearchBarMapper =
|
||||
public static IPropertyMapper<ISearchBar, SearchBarHandler> ControlsSearchBarMapper =
|
||||
new PropertyMapper<SearchBar, SearchBarHandler>(SearchBarHandler.Mapper)
|
||||
{
|
||||
[nameof(Text)] = MapText,
|
||||
[nameof(TextTransform)] = MapText,
|
||||
};
|
||||
{
|
||||
[nameof(Text)] = MapText,
|
||||
[nameof(TextTransform)] = MapText,
|
||||
};
|
||||
|
||||
internal static new void RemapForControls()
|
||||
{
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{
|
||||
public partial class SearchBar
|
||||
{
|
||||
public static void MapText(SearchBarHandler handler, SearchBar searchBar)
|
||||
public static void MapText(SearchBarHandler handler, SearchBar searchBar)
|
||||
{
|
||||
Platform.SearchBarExtensions.UpdateText(handler.PlatformView, searchBar);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
void UpdateFromCurrentItem();
|
||||
|
||||
void UpdateFromPosition();
|
||||
|
||||
|
||||
bool IsSwipeEnabled { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,6 +28,6 @@
|
|||
|
||||
public IItemsLayout ItemsLayout { get; }
|
||||
|
||||
public void UpdateCanReorderItems();
|
||||
public void UpdateCanReorderItems();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Android.Content;
|
||||
using AndroidX.RecyclerView.Widget;
|
||||
using Android.Views;
|
||||
using AndroidX.RecyclerView.Widget;
|
||||
|
||||
namespace Microsoft.Maui.Controls.Handlers.Items
|
||||
{
|
||||
|
|
|
@ -297,7 +297,7 @@ namespace Microsoft.Maui.Controls.Handlers.Items
|
|||
}
|
||||
|
||||
protected virtual RecyclerViewScrollListener<TItemsView, TItemsViewSource> CreateScrollListener() => new(ItemsView, ItemsViewAdapter);
|
||||
|
||||
|
||||
|
||||
protected virtual void UpdateSnapBehavior()
|
||||
{
|
||||
|
|
|
@ -35,15 +35,15 @@ namespace Microsoft.Maui.Controls.Handlers.Items
|
|||
|
||||
if (Content.VirtualView.Handler is IPlatformViewHandler pvh)
|
||||
{
|
||||
var widthSpec = Context.CreateMeasureSpec(targetWidth,
|
||||
var widthSpec = Context.CreateMeasureSpec(targetWidth,
|
||||
double.IsInfinity(targetWidth) ? double.NaN : targetWidth
|
||||
, targetWidth);
|
||||
|
||||
|
||||
var heightSpec = Context.CreateMeasureSpec(targetHeight, double.IsInfinity(targetHeight) ? double.NaN : targetHeight
|
||||
, targetHeight);
|
||||
|
||||
pvh.PlatformView.Measure(widthSpec, heightSpec);
|
||||
|
||||
|
||||
SetMeasuredDimension(
|
||||
pvh.PlatformView.MeasuredWidth,
|
||||
pvh.PlatformView.MeasuredHeight);
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
using Android.Views;
|
||||
using AndroidX.RecyclerView.Widget;
|
||||
using Microsoft.Maui.Graphics;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Android.Views;
|
||||
using AndroidX.RecyclerView.Widget;
|
||||
using Microsoft.Maui.Graphics;
|
||||
using Microsoft.Maui.Handlers;
|
||||
|
||||
namespace Microsoft.Maui.Controls.Handlers.Items
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace Microsoft.Maui.Controls.Handlers
|
||||
{
|
||||
public partial class LineHandler
|
||||
public partial class LineHandler
|
||||
{
|
||||
public static void MapX1(IShapeViewHandler handler, Line line)
|
||||
{
|
||||
|
|
|
@ -3,7 +3,7 @@ using Microsoft.Maui.Controls.Shapes;
|
|||
|
||||
namespace Microsoft.Maui.Controls.Handlers
|
||||
{
|
||||
public partial class LineHandler
|
||||
public partial class LineHandler
|
||||
{
|
||||
public static void MapX1(IShapeViewHandler handler, Line line) { }
|
||||
public static void MapY1(IShapeViewHandler handler, Line line) { }
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace Microsoft.Maui.Controls.Handlers
|
||||
{
|
||||
public partial class LineHandler
|
||||
public partial class LineHandler
|
||||
{
|
||||
public static void MapX1(IShapeViewHandler handler, Line line)
|
||||
{
|
||||
|
|
|
@ -3,7 +3,7 @@ using Microsoft.Maui.Controls.Shapes;
|
|||
|
||||
namespace Microsoft.Maui.Controls.Handlers
|
||||
{
|
||||
public partial class PathHandler
|
||||
public partial class PathHandler
|
||||
{
|
||||
public static void MapShape(IShapeViewHandler handler, Path path) { }
|
||||
public static void MapData(IShapeViewHandler handler, Path path) { }
|
||||
|
|
|
@ -3,7 +3,7 @@ using Microsoft.Maui.Graphics;
|
|||
|
||||
namespace Microsoft.Maui.Controls.Handlers
|
||||
{
|
||||
public partial class PathHandler
|
||||
public partial class PathHandler
|
||||
{
|
||||
public static void MapShape(IShapeViewHandler handler, Path path)
|
||||
{
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace Microsoft.Maui.Controls.Handlers
|
|||
handler.PlatformView?.UpdateShape(polygon);
|
||||
}
|
||||
|
||||
public static void MapPoints(IShapeViewHandler handler, Polygon polygon)
|
||||
public static void MapPoints(IShapeViewHandler handler, Polygon polygon)
|
||||
{
|
||||
handler.PlatformView?.InvalidateShape(polygon);
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ using Microsoft.Maui.Graphics;
|
|||
|
||||
namespace Microsoft.Maui.Controls.Handlers
|
||||
{
|
||||
public partial class PolylineHandler
|
||||
public partial class PolylineHandler
|
||||
{
|
||||
protected override void ConnectHandler(MauiShapeView nativeView)
|
||||
{
|
||||
|
|
|
@ -33,10 +33,10 @@ namespace Microsoft.Maui.Controls.Hosting
|
|||
internal static void ResetCompatibilityCheck() =>
|
||||
_compatibilityEnabled = false;
|
||||
|
||||
internal static void UseCompatibility() =>
|
||||
internal static void UseCompatibility() =>
|
||||
_compatibilityEnabled = true;
|
||||
}
|
||||
|
||||
|
||||
public static partial class AppHostBuilderExtensions
|
||||
{
|
||||
public static MauiAppBuilder ConfigureEffects(this MauiAppBuilder builder, Action<IEffectsBuilder> configureDelegate)
|
||||
|
@ -85,7 +85,7 @@ namespace Microsoft.Maui.Controls.Hosting
|
|||
}
|
||||
|
||||
public IEffectsBuilder Add(
|
||||
Type TEffect,
|
||||
Type TEffect,
|
||||
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] Type TPlatformEffect)
|
||||
{
|
||||
RegisteredEffects.Add(TEffect, () =>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Specialized;
|
||||
using Microsoft.Maui.Controls.Internals;
|
||||
using Microsoft.Maui.Graphics;
|
||||
using Microsoft.Maui.Layouts;
|
||||
using Microsoft.Maui.Controls.Internals;
|
||||
|
||||
namespace Microsoft.Maui.Controls
|
||||
{
|
||||
|
|
|
@ -309,7 +309,7 @@ namespace Microsoft.Maui.Controls
|
|||
[nameof(IView.InputTransparent)] = MapInputTransparent,
|
||||
};
|
||||
|
||||
void UpdateDescendantInputTransparent()
|
||||
void UpdateDescendantInputTransparent()
|
||||
{
|
||||
if (!InputTransparent || !CascadeInputTransparent)
|
||||
{
|
||||
|
|
|
@ -57,7 +57,7 @@ namespace Microsoft.Maui.Controls.Compatibility
|
|||
public static readonly BindableProperty BasisProperty =
|
||||
BindableProperty.CreateAttached("Basis", typeof(FlexBasis), typeof(FlexLayout), FlexBasis.Auto,
|
||||
propertyChanged: OnBasisPropertyChanged);
|
||||
|
||||
|
||||
public FlexLayout() =>
|
||||
Hosting.CompatibilityCheck.CheckForCompatibility();
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ namespace Microsoft.Maui.Controls
|
|||
}
|
||||
}
|
||||
|
||||
public void CopyTo(TRestrict[] array, int index) => CopyTo ((Array)array, index);
|
||||
public void CopyTo(TRestrict[] array, int index) => CopyTo((Array)array, index);
|
||||
|
||||
public int Count
|
||||
{
|
||||
|
|
|
@ -178,7 +178,7 @@ namespace Microsoft.Maui.Controls.Platform
|
|||
{
|
||||
_ = window.RootViewController.PresentViewControllerAsync(alert, true);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace Microsoft.Maui.Controls.Platform
|
|||
{
|
||||
var text = TextTransformUtilites.GetTransformedText(button.Text, button.TextTransform);
|
||||
platformButton.Text = text;
|
||||
|
||||
|
||||
// Content layout depends on whether or not the text is empty; changing the text means
|
||||
// we may need to update the content layout
|
||||
platformButton.UpdateContentLayout(button);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
using Android.Widget;
|
||||
using Microsoft.Maui.Controls.Internals;
|
||||
using System;
|
||||
using System;
|
||||
using Android.Text;
|
||||
using Android.Widget;
|
||||
using Microsoft.Maui.Controls.Internals;
|
||||
|
||||
namespace Microsoft.Maui.Controls.Platform
|
||||
{
|
||||
|
|
|
@ -6,9 +6,9 @@ using System.Text;
|
|||
using System.Threading.Tasks;
|
||||
using Microsoft.Maui.Controls.Internals;
|
||||
using Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;
|
||||
using Microsoft.Maui.Platform;
|
||||
using ObjCRuntime;
|
||||
using UIKit;
|
||||
using Microsoft.Maui.Platform;
|
||||
|
||||
namespace Microsoft.Maui.Controls.Platform
|
||||
{
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace Microsoft.Maui.Controls.Platform
|
|||
_viewHandler = viewHandler;
|
||||
}
|
||||
|
||||
#region UIDragInteractionDelegate
|
||||
#region UIDragInteractionDelegate
|
||||
[Export("dragInteraction:session:willEndWithOperation:")]
|
||||
[Preserve(Conditional = true)]
|
||||
public void SessionWillEnd(UIDragInteraction interaction, IUIDragSession session, UIDropOperation operation)
|
||||
|
@ -37,7 +37,7 @@ namespace Microsoft.Maui.Controls.Platform
|
|||
{
|
||||
return HandleDragStarting((View)_viewHandler.VirtualView, _viewHandler);
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
[Export("dropInteraction:canHandleSession:")]
|
||||
[Preserve(Conditional = true)]
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using UIKit;
|
||||
using Microsoft.Maui.Controls.Internals;
|
||||
using UIKit;
|
||||
|
||||
namespace Microsoft.Maui.Controls.Platform
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Microsoft.Maui.Platform;
|
||||
using Microsoft.Maui.Controls.Internals;
|
||||
using Microsoft.Maui.Platform;
|
||||
using UIKit;
|
||||
|
||||
namespace Microsoft.Maui.Controls.Platform
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
using System;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Maui.ApplicationModel;
|
||||
using Microsoft.Maui.Controls.Internals;
|
||||
using Microsoft.Maui.Controls.Shapes;
|
||||
using Microsoft.Maui.Devices;
|
||||
using Microsoft.Maui.Graphics;
|
||||
using Microsoft.Maui.ApplicationModel;
|
||||
|
||||
namespace Microsoft.Maui.Controls
|
||||
{
|
||||
|
|
|
@ -157,8 +157,8 @@ namespace Microsoft.Maui.Controls.Internals
|
|||
if (_handlers.TryGetValue(viewType, out Dictionary<Type, (Type target, short priority)> visualRenderers))
|
||||
if (visualRenderers.TryGetValue(visualType, out (Type target, short priority) specificTypeRenderer))
|
||||
return specificTypeRenderer.target;
|
||||
//else if (visualType == _materialVisualType)
|
||||
// VisualMarker.MaterialCheck();
|
||||
//else if (visualType == _materialVisualType)
|
||||
// VisualMarker.MaterialCheck();
|
||||
|
||||
if (visualType != _defaultVisualType && visualRenderers != null)
|
||||
if (visualRenderers.TryGetValue(_defaultVisualType, out (Type target, short priority) specificTypeRenderer))
|
||||
|
|
|
@ -3,12 +3,12 @@ namespace Microsoft.Maui.Controls
|
|||
/// <include file="../../docs/Microsoft.Maui.Controls/RowDefinitionCollection.xml" path="Type[@FullName='Microsoft.Maui.Controls.RowDefinitionCollection']/Docs" />
|
||||
public sealed class RowDefinitionCollection : DefinitionCollection<RowDefinition>
|
||||
{
|
||||
public RowDefinitionCollection() : base()
|
||||
{
|
||||
}
|
||||
public RowDefinitionCollection() : base()
|
||||
{
|
||||
}
|
||||
|
||||
public RowDefinitionCollection(params RowDefinition[] definitions) : base (definitions)
|
||||
{
|
||||
}
|
||||
public RowDefinitionCollection(params RowDefinition[] definitions) : base(definitions)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ namespace Microsoft.Maui.Controls.Shapes
|
|||
|
||||
var radiusX = (float)(density * RadiusX);
|
||||
var radiusY = (float)(density * RadiusY);
|
||||
|
||||
|
||||
path.AppendEllipse(centerX - radiusX, centerY - radiusY, radiusX * 2f, radiusY * 2f);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
using Microsoft.Maui.Graphics;
|
||||
using Microsoft.Maui.Devices;
|
||||
using Microsoft.Maui.Graphics;
|
||||
|
||||
namespace Microsoft.Maui.Controls.Shapes
|
||||
{
|
||||
|
@ -102,7 +102,7 @@ namespace Microsoft.Maui.Controls.Shapes
|
|||
void AddLine(PathF path, LineSegment lineSegment, double density)
|
||||
{
|
||||
path.LineTo(
|
||||
(float)(density * lineSegment.Point.X),
|
||||
(float)(density * lineSegment.Point.X),
|
||||
(float)(density * lineSegment.Point.Y));
|
||||
}
|
||||
|
||||
|
@ -110,13 +110,13 @@ namespace Microsoft.Maui.Controls.Shapes
|
|||
{
|
||||
foreach (var p in polyLineSegment.Points)
|
||||
path.LineTo(
|
||||
(float)(density * p.X),
|
||||
(float)(density * p.X),
|
||||
(float)(density * p.Y));
|
||||
}
|
||||
|
||||
void AddBezier(PathF path, BezierSegment bezierSegment, double density)
|
||||
{
|
||||
path.CurveTo(
|
||||
path.CurveTo(
|
||||
(float)(density * bezierSegment.Point1.X), (float)(density * bezierSegment.Point1.Y),
|
||||
(float)(density * bezierSegment.Point2.X), (float)(density * bezierSegment.Point2.Y),
|
||||
(float)(density * bezierSegment.Point3.X), (float)(density * bezierSegment.Point3.Y));
|
||||
|
|
|
@ -328,11 +328,11 @@ namespace Microsoft.Maui.Controls
|
|||
var uri = ConvertToStandardFormat(shell, CreateUri(route));
|
||||
if (uri.Equals(request))
|
||||
{
|
||||
#if NETSTANDARD2_0
|
||||
#if NETSTANDARD2_0
|
||||
var replaced = originalRequest.OriginalString.Replace("//", "");
|
||||
#else
|
||||
#else
|
||||
var replaced = originalRequest.OriginalString.Replace("//", "", StringComparison.Ordinal);
|
||||
#endif
|
||||
#endif
|
||||
throw new Exception($"Global routes currently cannot be the only page on the stack, so absolute routing to global routes is not supported. For now, just navigate to: {replaced}");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using Microsoft.Maui.Graphics;
|
||||
using System.Windows.Input;
|
||||
using Microsoft.Maui.Graphics;
|
||||
|
||||
namespace Microsoft.Maui.Controls
|
||||
{
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using Microsoft.Maui.Graphics;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Microsoft.Maui.Controls
|
||||
{
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace Microsoft.Maui.Controls
|
|||
public static IVisual MatchParent { get; } = new MatchParentVisual();
|
||||
/// <include file="../../../docs/Microsoft.Maui.Controls/VisualMarker.xml" path="//Member[@MemberName='Default']/Docs" />
|
||||
public static IVisual Default { get; } = new DefaultVisual();
|
||||
|
||||
|
||||
// /// <include file="../../../docs/Microsoft.Maui.Controls/VisualMarker.xml" path="//Member[@MemberName='Material']/Docs" />
|
||||
internal static IVisual Material { get; } = new MaterialVisual();
|
||||
|
||||
|
|
|
@ -173,7 +173,7 @@ namespace Microsoft.Maui.Controls
|
|||
|
||||
/// <include file="../../../docs/Microsoft.Maui.Controls/VisualTypeConverter.xml" path="//Member[@MemberName='GetStandardValues']/Docs" />
|
||||
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
|
||||
=> new(new[] {
|
||||
=> new(new[] {
|
||||
nameof(VisualMarker.Default),
|
||||
// nameof(VisualMarker.Material)
|
||||
});
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace Microsoft.Maui.Controls.Xaml
|
|||
|
||||
/// <include file="../../../docs/Microsoft.Maui.Controls.Xaml/XamlResourceIdAttribute.xml" path="//Member[@MemberName='.ctor']/Docs" />
|
||||
public XamlResourceIdAttribute(
|
||||
string resourceId,
|
||||
string resourceId,
|
||||
string path,
|
||||
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type type)
|
||||
{
|
||||
|
|
|
@ -141,7 +141,7 @@ namespace Microsoft.Maui.Controls.Xaml
|
|||
return;
|
||||
|
||||
// Collection element, implicit content, or implicit collection element.
|
||||
if ( xpe == null
|
||||
if (xpe == null
|
||||
&& typeof(IEnumerable).IsAssignableFrom(Context.Types[parentElement])
|
||||
&& Context.Types[parentElement].GetRuntimeMethods().Any(mi => mi.Name == "Add" && mi.GetParameters().Length == 1))
|
||||
{
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
using Microsoft.Maui.Controls.Handlers;
|
||||
using Microsoft.Maui.Controls.Handlers.Items;
|
||||
using Microsoft.Maui.Controls.Shapes;
|
||||
using Microsoft.Maui.Hosting;
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
using Microsoft.Maui.Handlers;
|
||||
using Microsoft.Maui.Platform;
|
||||
using Microsoft.Maui.Dispatching;
|
||||
using Microsoft.Maui.Handlers;
|
||||
using Microsoft.Maui.Hosting;
|
||||
using Microsoft.Maui.Platform;
|
||||
|
||||
|
||||
#if ANDROID
|
||||
|
|
|
@ -70,7 +70,7 @@ namespace Microsoft.Maui.Controls.Xaml
|
|||
if (target is null)
|
||||
return;
|
||||
|
||||
if ( node.Properties.TryGetValue(new XmlName("", target), out INode targetNode)
|
||||
if (node.Properties.TryGetValue(new XmlName("", target), out INode targetNode)
|
||||
|| node.Properties.TryGetValue(new XmlName("", nameof(OnPlatformExtension.Default)), out targetNode))
|
||||
{
|
||||
if (!ApplyPropertiesVisitor.TryGetPropertyName(node, parentNode, out XmlName name))
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче