Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
f02f0bb
check the window
tj-devel709 Feb 24, 2025
095b4c7
check each responders window
tj-devel709 Feb 24, 2025
47de72a
add snapshots 2/3
tj-devel709 Feb 25, 2025
3134062
Revert "add snapshots 2/3"
tj-devel709 Feb 25, 2025
066bec4
testing but not working yet
tj-devel709 Feb 25, 2025
d4d4b9d
testing but not working yet 2
tj-devel709 Feb 25, 2025
77e98c8
[Testing] Enabling ContextMenu UITests from Xamarin.UITests to Appium…
nivetha-nagalingam Feb 24, 2025
73a7300
[Testing] Enabling more UI Tests by removing platform specific condit…
HarishKumarSF4517 Feb 24, 2025
d5a7492
[Testing] Enabling more UI Tests by removing platform specific condit…
nivetha-nagalingam Feb 24, 2025
da4b7a5
[Testing] Fix for flaky UITests in CI that occasionally fail - 3 (#27…
NafeelaNazhir Feb 25, 2025
6eb7401
[Testing] Fix for flaky UITests in CI that occasionally fail. (#27453)
nivetha-nagalingam Feb 25, 2025
718bd86
[create-pull-request] automated change (#28021)
github-actions[bot] Feb 25, 2025
b1457a5
[ci] Publish workload VS insertion zips (#28016)
pjcollins Feb 25, 2025
eec245c
[Android] Fix crash starting the swipe on SwipeView inside Collection…
jsuarezruiz Feb 25, 2025
08be351
Applying visibility change to child controls (#20154)
kubaflo Feb 25, 2025
5113162
Fixed CheckBox enabled color is not updated properly (#26399)
NanthiniMahalingam Feb 25, 2025
3170a31
Update DEVELOPMENT.md to clarify .NET SDK version needed (#28031)
jfversluis Feb 25, 2025
19a1b9c
[ci] Remove usage on cake script (#28037)
rmarinho Feb 25, 2025
25cffa1
[ci] Update autoformat prs version (#28042)
rmarinho Feb 25, 2025
238bb61
[Testing] Enabling more UI Tests by removing platform specific condit…
LogishaSelvarajSF4525 Feb 25, 2025
04267e8
[android] move `IsDispatchRequiredImplementation()` to Java (#27936)
jonathanpeppers Feb 25, 2025
b20538c
[ci] Last move sequoia (#28029)
rmarinho Feb 25, 2025
e1e0472
remove Dispose call on ShellItemRenderer (#27890)
pictos Feb 25, 2025
1568f74
CollectionView with grouped data crashes on iOS when the groups chang…
kubaflo Feb 25, 2025
80cad35
[Testing] Feature Matrix UITest Cases for Slider Control (#27433)
NafeelaNazhir Feb 25, 2025
53860a1
[Testing] Fix flaky UITests 7 (#28000)
jsuarezruiz Feb 25, 2025
5dd7a4e
[BindingSG] Added Binding.Create support for xaml generated sources (…
jkurdek Feb 26, 2025
9892f9c
[create-pull-request] automated change (#28045)
github-actions[bot] Feb 26, 2025
d6136f7
add DebuggerTypeProxy for Shell (#27989)
pictos Feb 26, 2025
859fea5
[ci] Run provisionator devdiv (#28056)
rmarinho Feb 26, 2025
027f757
[Windows] Fixed NRE when clearing ListView after navigating back (#27…
SubhikshaSf4851 Feb 26, 2025
50a8a83
[Windows] Fix for issues caused by setting Shell.FlyoutWidth on WinUI…
Tamilarasan-Paranthaman Feb 26, 2025
a43d7e9
Revert "[ci] Run provisionator devdiv (#28056)" (#28079)
rmarinho Feb 27, 2025
ea45aba
[create-pull-request] automated change (#28068)
github-actions[bot] Feb 27, 2025
d688a31
Impl (#28040)
MartyIX Feb 27, 2025
b7c73c5
[Testing] Implement the option to change system theme on Appium (#28025)
jsuarezruiz Feb 27, 2025
b361b02
[MacCatalyst] Picker focus events (#27973)
kubaflo Feb 27, 2025
62656bd
[Testing] Resolved Shell TabBar DeviceTests CI failures on macOS (#28…
Feb 27, 2025
0000cd6
[Android] Fixed the ScrollbarVisibility issues (#27613)
Ahamed-Ali Feb 28, 2025
b136d04
Fixed FontImageSource icon color does not change in the TabbedPage wh…
NirmalKumarYuvaraj Feb 28, 2025
3abb44f
Update SkiaSharp (#26373)
mattleibow Mar 3, 2025
63df1a6
[iOS] Fixed ImageButton not honoring Padding value. (#26785)
NirmalKumarYuvaraj Mar 3, 2025
7aef510
Optimize (#28073)
MartyIX Mar 3, 2025
eda4183
IsNullOrEmpty for Paint not returning true if Color(s) are not set (#…
mos379 Mar 3, 2025
919fe78
remove testing
tj-devel709 Mar 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ csharp_style_var_for_built_in_types = true:none
csharp_style_var_when_type_is_apparent = true:none
csharp_style_var_elsewhere = false:none

# Namespace preference (prefer file-scoped namespaces)
csharp_style_namespace_declarations = file_scoped
dotnet_diagnostic.IDE0161.severity = suggestion

# use language keywords instead of BCL types
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
dotnet_style_predefined_type_for_member_access = true:suggestion
Expand Down
3 changes: 3 additions & 0 deletions .github/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
This page contains steps to build and run the .NET MAUI repository from source. If you are looking to build apps with .NET MAUI please head over to the links in the [README](https://github.com/dotnet/maui/blob/main/README.md) to get started.

## Initial setup

### Windows
- Install VS 17.12 or newer
- Follow [these steps](https://learn.microsoft.com/dotnet/maui/get-started/installation?tabs=vswin) to include MAUI
Expand All @@ -17,6 +18,8 @@ This page contains steps to build and run the .NET MAUI repository from source.
## Building the Build Tasks
Before opening the solution in Visual Studio / VS Code you **MUST** build the build tasks.

Note: the main branch is always [pinned to the latest stable release](https://github.com/dotnet/maui/blob/main/global.json) of the .NET SDK. This is regardless of said release being a long-term support (LTS) release or not. This means that you will need to have that version of the .NET SDK installed and configured on your machine in order to be able to execute the commands below and build the .NET MAUI codebase.

1. Open a command prompt/terminal/shell window
1. Navigate to the location of your cloned `dotnet/maui` repo, for example:
```shell
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dotnet-autoformat-pr-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
github.event.workflow_run.conclusion == 'success'
steps:
- name: 'Push autoformatted patch'
uses: rolfbjarne/autoformat-push@v0.2
uses: rolfbjarne/autoformat-push@v0.5
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
commentContents: 'Thank you for your pull request. We are auto-formatting your source code to follow our code guidelines.'
2 changes: 1 addition & 1 deletion .github/workflows/dotnet-autoformat-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

steps:
- name: 'Autoformat'
uses: rolfbjarne/autoformat@v0.2
uses: rolfbjarne/autoformat@v0.5
with:
script: 'dotnet format Microsoft.Maui.sln --no-restore --exclude Templates/src BlazorWebView/src/SharedSource/BlazorWebViewDeveloperTools.cs BlazorWebView/src/SharedSource/BlazorWebViewServiceCollectionExtensions.cs Graphics/src/Graphics.Win2D/W2DCanvas.cs Graphics/src/Graphics.Win2D/W2DExtensions.cs'
onlyFilesModifiedInPullRequest: true
Expand Down
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
<PropertyGroup>
<NuGetAuditMode>all</NuGetAuditMode>
<NuGetAuditLevel>moderate</NuGetAuditLevel>
<RestoreEnablePackagePruning>false</RestoreEnablePackagePruning>
</PropertyGroup>

<PropertyGroup>
Expand Down
1 change: 1 addition & 0 deletions eng/Publishing.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<PropertyGroup>
<PublishingVersion>3</PublishingVersion>
<ProducesDotNetReleaseShippingAssets>true</ProducesDotNetReleaseShippingAssets>
<PublishDependsOnTargets>$(PublishDependsOnTargets);_PublishBlobItems</PublishDependsOnTargets>
</PropertyGroup>

<ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,16 @@
- Feed URI in the nuget.config
- Native assets build and sha
-->
<_SkiaSharpVersion>2.88.8</_SkiaSharpVersion>
<_SkiaSharpExtendedVersion>2.0.0</_SkiaSharpExtendedVersion>
<_HarfBuzzSharpVersion>7.3.0.2</_HarfBuzzSharpVersion>
<_SkiaSharpNativeAssetsVersion>0.0.0-commit.7af1d0840a381c0ce7ef2877454a88dbb2949686.1086</_SkiaSharpNativeAssetsVersion>
<_SkiaSharpVersion>3.116.1</_SkiaSharpVersion>
<_SkiaSharpExtendedVersion>3.0.0-preview.13</_SkiaSharpExtendedVersion>
<_HarfBuzzSharpVersion>8.3.0.1</_HarfBuzzSharpVersion>
<_SkiaSharpNativeAssetsVersion>0.0.0-commit.e57e2a11dac4ccc72bea52939dede49816842005.1728</_SkiaSharpNativeAssetsVersion>
<MicrosoftTemplateEngineTasksVersion>7.0.120</MicrosoftTemplateEngineTasksVersion>
<MicrosoftDotNetXHarnessTestRunnersCommonVersion>9.0.0-prerelease.25113.3</MicrosoftDotNetXHarnessTestRunnersCommonVersion>
<MicrosoftDotNetXHarnessTestRunnersXunitVersion>9.0.0-prerelease.25113.3</MicrosoftDotNetXHarnessTestRunnersXunitVersion>
<MicrosoftDotNetXHarnessCLIVersion>9.0.0-prerelease.25113.3</MicrosoftDotNetXHarnessCLIVersion>
<TizenUIExtensionsVersion>0.9.2</TizenUIExtensionsVersion>
<SvgSkiaPackageVersion>1.0.0.16</SvgSkiaPackageVersion>
<SvgSkiaPackageVersion>2.0.0.4</SvgSkiaPackageVersion>
<FizzlerPackageVersion>1.3.0</FizzlerPackageVersion>
<TizenUIExtensionsVersion>0.9.0</TizenUIExtensionsVersion>
<ExCSSPackageVersion>4.2.3</ExCSSPackageVersion>
Expand Down
3 changes: 1 addition & 2 deletions eng/cake/dotnet.cake
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,6 @@ void UseLocalNuGetCacheFolder(bool reset = false)

void StartVisualStudioCodeForDotNet()
{
string workspace = "./maui.code-workspace";
if (IsCIBuild())
{
Error("This target should not run on CI.");
Expand All @@ -600,7 +599,7 @@ void StartVisualStudioCodeForDotNet()
SetDotNetEnvironmentVariables();
}

StartProcess("code", new ProcessSettings{ Arguments = workspace, EnvironmentVariables = GetDotNetEnvironmentVariables() });
StartProcess("code", new ProcessSettings{ EnvironmentVariables = GetDotNetEnvironmentVariables() });
}

void StartVisualStudioForDotNet()
Expand Down
8 changes: 3 additions & 5 deletions eng/pipelines/common/maui-templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
name: $(POOL_NAME)
vmImage: $(POOL_VIMAGE)
demands:
- macOS.Name -equals Sonoma
- macOS.Name -equals Sequoia
- macOS.Architecture -equals arm64
steps:
- template: maui-templates-steps.yml
Expand Down Expand Up @@ -157,23 +157,21 @@ jobs:
DOTNET_TOKEN: $(dotnetbuilds-internal-container-read-token)
PRIVATE_BUILD: $(PrivateBuild)

# - script: dotnet tool update Microsoft.DotNet.XHarness.CLI --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json --version "9.0.0-prerelease*" -g
# displayName: install xharness

- ${{ if eq(RunPlatform.testName, 'RunOniOS') }}:
- pwsh: ./build.ps1 -Script eng/devices/ios.cake --target=Cleanup --verbosity=diagnostic
displayName: Reset iOS simulators
# TODO: pass properly device type/version from top-level yml
env:
IOS_TEST_DEVICE: ios-simulator-64_17.2
IOS_TEST_DEVICE: ios-simulator-64_18.0

- pwsh: ./build.ps1 --target=dotnet-integration-test --filter="Category=${{ RunPlatform.testName }}" --resultsfilename="integration-run-${{ RunPlatform.testName }}" --verbosity=diagnostic
displayName: Run ${{ RunPlatform.testName }} templates run tests
continueOnError: true
# TODO: pass properly device type/version from top-level yml
${{ if eq(RunPlatform.testName, 'RunOniOS') }}:
env:
IOS_TEST_DEVICE: ios-simulator-64_17.2
IOS_TEST_DEVICE: ios-simulator-64_18.0

- ${{ if eq(RunPlatform.testName, 'RunOniOS') }}:
- pwsh: ./build.ps1 --target=Cleanup -Script eng/devices/ios.cake ---results="$(TestResultsDirectory)" ${{ parameters.cakeArgs }}
Expand Down
6 changes: 3 additions & 3 deletions eng/pipelines/device-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ parameters:
name: $(androidTestsVmPool)
vmImage: $(androidTestsVmImage)
demands:
- macOS.Name -equals Sonoma
- macOS.Name -equals Sequoia

- name: androidPoolX64
type: object
Expand All @@ -84,15 +84,15 @@ parameters:
name: $(iosDeviceTestsVmPool)
vmImage: $(iosDeviceTestsVmImage)
demands:
- macOS.Name -equals Sonoma
- macOS.Name -equals Sequoia

- name: catalystPool
type: object
default:
name: $(iosDeviceTestsVmPool)
vmImage: $(iosDeviceTestsVmImage)
demands:
- macOS.Name -equals Sonoma
- macOS.Name -equals Sequoia

- name: windowsPool
type: object
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ stages:
provisionatorChannel: ${{ parameters.provisionatorChannel }}
${{ if parameters.CompatibilityTests }}:
runCompatibilityTests: true
${{ if or(eq(parameters.UseProvisionator, true), eq(variables['internalProvisioning'],'True') ) }}:
${{ if or(parameters.UseProvisionator, eq(variables['internalProvisioning'],'true') ) }}:
skipProvisioning: false
gitHubToken: $(github--pat--vs-mobiletools-engineering-service2)
${{ else }}:
Expand Down
35 changes: 17 additions & 18 deletions src/Controls/src/BindingSourceGen/InvocationParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,32 +30,31 @@ internal Result<InterceptedMethodType> ParseInvocation(InvocationExpressionSynta

private Result<InterceptedMethodType> VerifyCorrectOverloadBindingCreate(InvocationExpressionSyntax invocation, CancellationToken t)
{
var argumentList = invocation.ArgumentList.Arguments;

var symbol = _context.SemanticModel.GetSymbolInfo(invocation.Expression).Symbol;
if ((symbol?.ContainingType?.Name != "Binding" && symbol?.ContainingType?.Name != "BindingBase")
|| symbol?.ContainingType?.ContainingNamespace.ToDisplayString() is not "Microsoft.Maui.Controls")
if (symbol is not null)
{
return Result<InterceptedMethodType>.Failure(DiagnosticsFactory.SuboptimalSetBindingOverload(invocation.GetLocation()));
// If the symbol is available, ensure it is the expected method.
if (symbol is not IMethodSymbol methodSymbol
|| methodSymbol.Name != "Create"
|| (methodSymbol.ContainingType?.Name != "Binding" && methodSymbol.ContainingType?.Name != "BindingBase")
|| methodSymbol.ContainingType?.ContainingNamespace.ToDisplayString() is not "Microsoft.Maui.Controls")
{
return Result<InterceptedMethodType>.Failure(DiagnosticsFactory.SuboptimalSetBindingOverload(invocation.GetLocation()));
}
}

if (argumentList.Count == 0)
else
{
throw new ArgumentOutOfRangeException(nameof(invocation));
}
// It is not possible to resolve the method symbol when the bindable object (the first argument or the object that the extension method
// is called on) is referenced by a field that will be generated via XamlG based on the x:Name attributes. In that case, this source generator
// cannot see the outputs of the other source generator and we have incomplete information about the method invocation and we can only work with
// the syntax tree and not the semantic model.
var argumentsList = invocation.ArgumentList.Arguments;

var firstArgument = argumentList[0].Expression;
if (firstArgument is IdentifierNameSyntax)
{
var type = _context.SemanticModel.GetTypeInfo(firstArgument, cancellationToken: t).Type;
if (type != null && type.Name == "Func")
var firstArgument = argumentsList[0].Expression; // Guaranteed to have at least one argument (checked by the caller)
if (firstArgument is not LambdaExpressionSyntax)
{
return Result<InterceptedMethodType>.Failure(DiagnosticsFactory.GetterIsNotLambda(firstArgument.GetLocation()));
}
else // String and Binding
{
return Result<InterceptedMethodType>.Failure(DiagnosticsFactory.SuboptimalSetBindingOverload(firstArgument.GetLocation()));
}
}

return Result<InterceptedMethodType>.Success(InterceptedMethodType.Create);
Expand Down
4 changes: 3 additions & 1 deletion src/Controls/src/Core/Brush/Brush.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ public static implicit operator Paint(Brush brush)
for (int i = 0; i < gradientStopCollection.Count; i++)
{
var gs = gradientStopCollection[i];
gradientStops[i] = new GraphicsGradientStop(gs.Offset, gs.Color);

if (gs is not null)
gradientStops[i] = new GraphicsGradientStop(gs.Offset, gs.Color);
}

if (gradientBrush is LinearGradientBrush linearGradientBrush)
Expand Down
32 changes: 31 additions & 1 deletion src/Controls/src/Core/CheckBox/CheckBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,37 @@ public bool IsChecked
protected internal override void ChangeVisualState()
{
if (IsEnabled && IsChecked)
VisualStateManager.GoToState(this, IsCheckedVisualState);
{
bool isCheckedStateAvailable = false;
var visualStates = VisualStateManager.GetVisualStateGroups(this);
foreach (var group in visualStates)
{
if (group.Name is not "CommonStates")
{
continue;
}

foreach (var state in group.States)
{
if (state.Name is IsCheckedVisualState)
{
isCheckedStateAvailable = true;
break;
}
}

break;
}

if (isCheckedStateAvailable)
{
VisualStateManager.GoToState(this, IsCheckedVisualState);
}
else
{
VisualStateManager.GoToState(this, VisualStateManager.CommonStates.Normal);
}
}
else
base.ChangeVisualState();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,11 @@ void OnListItemClicked(object sender, ItemClickEventArgs e)

private protected override void DisconnectHandlerCore()
{
if (Element is ITemplatedItemsView<Cell> templatedItemsView)
{
templatedItemsView.TemplatedItems.CollectionChanged -= OnCollectionChanged;
}

CleanUpResources();
base.DisconnectHandlerCore();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ void IAppearanceObserver.OnAppearanceChanged(ShellAppearance appearance)
IShellBottomNavViewAppearanceTracker _appearanceTracker;
BottomNavigationViewTracker _bottomNavigationTracker;
BottomSheetDialog _bottomSheetDialog;
bool _disposed;
bool _menuSetup;
ShellAppearance _shellAppearance;
bool _appearanceSet;
Expand Down Expand Up @@ -126,18 +125,6 @@ void Destroy()

}

protected override void Dispose(bool disposing)
{
if (_disposed)
return;

_disposed = true;
if (disposing)
Destroy();

base.Dispose(disposing);
}

// Use OnDestory become OnDestroyView may fire before events are completed.
public override void OnDestroy()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ ShellItem IShellItemRenderer.ShellItem
IShellObservableFragment _currentFragment;
ShellSection _shellSection;
Page _displayedPage;
bool _disposed;

protected ShellItemRendererBase(IShellContext shellContext)
{
Expand Down Expand Up @@ -114,19 +113,6 @@ public override void OnDestroy()
Destroy();
}

protected override void Dispose(bool disposing)
{
if (_disposed)
return;

_disposed = true;

if (disposing)
Destroy();

base.Dispose(disposing);
}

protected abstract ViewGroup GetNavigationTarget();

protected virtual IShellObservableFragment GetOrCreateFragmentForTab(ShellSection shellSection)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,7 @@ protected virtual void SwitchFragment(FragmentManager manager, AView targetView,
// Don't force the commit if this is our first load
if (previousView == null)
{
transaction
.SetReorderingAllowedEx(true);
transaction.SetReorderingAllowedEx(true);
}

transaction.CommitAllowingStateLossEx();
Expand All @@ -245,7 +244,6 @@ void OnDestroyed(object sender, EventArgs args)
{
previousView.Destroyed -= OnDestroyed;

previousView.Dispose();
previousView = null;
}

Expand Down
7 changes: 5 additions & 2 deletions src/Controls/src/Core/GradientBrush.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,11 @@ void UpdateGradientStops(GradientStopCollection oldCollection, GradientStopColle

foreach (var newStop in newCollection)
{
newStop.Parent = this;
newStop.PropertyChanged += OnGradientStopPropertyChanged;
if (newStop is not null)
{
newStop.Parent = this;
newStop.PropertyChanged += OnGradientStopPropertyChanged;
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,11 @@ void Move(NotifyCollectionChangedEventArgs args)

int GetGroupCount(int groupIndex)
{
if (groupIndex < 0 || groupIndex >= _groupSource.Count)
{
return 0;
}

switch (_groupSource[groupIndex])
{
case IList list:
Expand All @@ -334,6 +339,11 @@ int GetGroupCount(int groupIndex)

object GetGroupItemAt(int groupIndex, int index)
{
if (groupIndex < 0 || groupIndex >= _groupSource.Count)
{
return -1;
}

switch (_groupSource[groupIndex])
{
case IList list:
Expand Down
Loading
Loading