Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
b3eae45
Fix iOS Custom Entitlements File Not Respected in Single Project Temp…
Copilot Aug 4, 2025
18b6bab
WIP (#27052)
MartyIX Aug 4, 2025
579d8c3
[android] improve performance of `ImageHandler.PlatformArrange()` (#2…
jonathanpeppers Aug 7, 2025
6ef0c41
Removed the default span styling from the template (#28818)
kubaflo Aug 7, 2025
83c199a
Fix Stepper control fails to reach maximum value when increment excee…
SuthiYuvaraj Aug 7, 2025
aa44460
Requesting permissions using RequestAsync while the app is in the bac…
kubaflo Aug 7, 2025
903879f
Fixed Picker Items are not Displaying on macOS platform (#27535)
NanthiniMahalingam Aug 7, 2025
1b9b3e1
[iOS] Fixed warning Invalid Color (#30876)
SubhikshaSf4851 Aug 11, 2025
c70347c
[iOS] PullToRefresh activity indicator improvements - fix (#20824)
kubaflo Aug 11, 2025
636b6f9
[Android] Toolbar overflow menu icon color (#25627)
kubaflo Aug 11, 2025
7ed452d
[create-pull-request] automated change (#31094)
github-actions[bot] Aug 11, 2025
cc8f9ec
[Android] Input controls should not change keyboard visibility - UITe…
kubaflo Aug 11, 2025
485fa7a
[Android] Top bar item colors - fix (#26964)
kubaflo Aug 12, 2025
dbb952a
[Android] Gradient background with ImageButton (#26297)
kubaflo Aug 12, 2025
84464ab
[Android] BackgroundColor for GraphicsView (#26320)
kubaflo Aug 12, 2025
6daf53e
MacOS picker dialog improvement (#27525)
kubaflo Aug 12, 2025
4a0e4a5
[Windows] Fix for TabbedPage more menu items color. (#26876)
Tamilarasan-Paranthaman Aug 12, 2025
755fc15
[iOS] Thumb image improvements (#27516)
kubaflo Aug 12, 2025
9eae633
Add support to dismiss the prompt with enter on keyboard (#27419)
pictos Aug 12, 2025
f00775a
Fix CarouselView layout constraint issues on Mac Catalyst (#30714)
Copilot Aug 13, 2025
35b335d
[create-pull-request] automated change (#31138)
github-actions[bot] Aug 13, 2025
b4d9c8c
[iOS] Changing IsGrouped on runtime with CollectionViewHandler2 does …
kubaflo Aug 14, 2025
0530ec0
Optimize JS escaping (#27528)
symbiogenesis Aug 15, 2025
d26ccba
Changing shape background color with dataTrigger (#25544)
kubaflo Aug 15, 2025
51845e1
Fix GraphicsView scaling after canvas.ResetState on Android (#31183)
kubaflo Aug 15, 2025
0fb06e7
Issue #21837 - UITest (#22213)
kubaflo Aug 15, 2025
8ad5b39
[iOS/Mac] Fixed the Border Rendering issues in CollectionViewHandler2…
Ahamed-Ali Aug 15, 2025
7578864
Remove redundant canvas scaling in Android view
kubaflo Aug 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions eng/BannedSymbols.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
M:Microsoft.Extensions.DependencyInjection.Extensions.ServiceCollectionDescriptorExtensions.TryAddSingleton`2(Microsoft.Extensions.DependencyInjection.IServiceCollection);Use a Factory method to create the service instead
M:Android.Content.Res.ColorStateList.#ctor(System.Int32[][],System.Int32[]);Use Microsoft.Maui.PlatformInterop.Get*ColorStateList() Java methods instead
M:Android.Widget.ImageView.GetScaleType();Use PlatformInterop.IsImageViewCenterCrop instead (or add a new method)
P:Microsoft.Maui.MauiWinUIApplication.Services;Use the IPlatformApplication.Current.Services instead
P:Microsoft.Maui.MauiWinUIApplication.Application;Use the IPlatformApplication.Current.Application instead
P:Microsoft.UI.Xaml.Window.AppWindow;This API doesn't have null safety. Use GetAppWindow() and make sure to account for the possibility that GetAppWindow() might be null.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ static void OnLayoutChange(object sender, global::Android.Views.View.LayoutChang
{
if (sender is IVisualElementRenderer renderer && renderer.View is ImageView imageView)
#pragma warning disable CS0618 // Obsolete
AViewCompat.SetClipBounds(imageView, imageView.GetScaleType() == AScaleType.CenterCrop ? new ARect(0, 0, e.Right - e.Left, e.Bottom - e.Top) : null);
AViewCompat.SetClipBounds(imageView, PlatformInterop.IsImageViewCenterCrop(imageView) ? new ARect(0, 0, e.Right - e.Left, e.Bottom - e.Top) : null);
#pragma warning restore CS0618 // Obsolete

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,6 @@
</Setter>
</Style>

<Style TargetType="Span">
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}" />
</Style>

<Style TargetType="Label" x:Key="Headline">
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource MidnightBlue}, Dark={StaticResource White}}" />
<Setter Property="FontSize" Value="32" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@

<PropertyGroup Condition=" '$(SingleProject)' == 'true' and '$([MSBuild]::GetTargetPlatformIdentifier($(TargetFramework)))' == 'ios' ">
<IPhoneResourcePrefix>$(iOSProjectFolder)Resources</IPhoneResourcePrefix>
<CodesignEntitlements Condition=" Exists('$(iOSProjectFolder)Entitlements.plist') ">$(iOSProjectFolder)Entitlements.plist</CodesignEntitlements>
<CodesignEntitlements Condition=" '$(CodesignEntitlements)' == '' and Exists('$(iOSProjectFolder)Entitlements.plist') ">$(iOSProjectFolder)Entitlements.plist</CodesignEntitlements>
<_SingleProjectiOSExcludes>$(iOSProjectFolder)/**/.*/**</_SingleProjectiOSExcludes>
</PropertyGroup>

<PropertyGroup Condition=" '$(SingleProject)' == 'true' and '$([MSBuild]::GetTargetPlatformIdentifier($(TargetFramework)))' == 'maccatalyst' ">
<IPhoneResourcePrefix>$(MacCatalystProjectFolder)Resources</IPhoneResourcePrefix>
<CodesignEntitlements Condition=" Exists('$(MacCatalystProjectFolder)Entitlements.plist') ">$(MacCatalystProjectFolder)Entitlements.plist</CodesignEntitlements>
<CodesignEntitlements Condition=" '$(CodesignEntitlements)' == '' and Exists('$(MacCatalystProjectFolder)Entitlements.plist') ">$(MacCatalystProjectFolder)Entitlements.plist</CodesignEntitlements>
<_SingleProjectMacCatalystExcludes>$(MacCatalystProjectFolder)/**/.*/**</_SingleProjectMacCatalystExcludes>
</PropertyGroup>

Expand Down
19 changes: 17 additions & 2 deletions src/Controls/src/Core/Handlers/Items/CarouselViewHandler.iOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,22 @@ public static void MapLoop(CarouselViewHandler handler, CarouselView carouselVie
(handler.Controller as CarouselViewController)?.UpdateLoop();
}

public override Size GetDesiredSize(double widthConstraint, double heightConstraint) =>
this.GetDesiredSizeFromHandler(widthConstraint, heightConstraint);
public override Size GetDesiredSize(double widthConstraint, double heightConstraint)
{
var size = this.GetDesiredSizeFromHandler(widthConstraint, heightConstraint);

// Clamp size to constraints to prevent exceeding them on Mac Catalyst
if (!double.IsInfinity(widthConstraint) && size.Width > widthConstraint)
{
size.Width = widthConstraint;
}

if (!double.IsInfinity(heightConstraint) && size.Height > heightConstraint)
{
size.Height = heightConstraint;
}

return size;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ protected override void ScrollToRequested(object sender, ScrollToRequestEventArg
public static void MapIsGrouped(CollectionViewHandler2 handler, GroupableItemsView itemsView)
{
handler.Controller?.UpdateItemsSource();
handler.UpdateLayout();
}

bool WillNeedScrollAdjustment(ScrollToRequestEventArgs args)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ void ApplyChanges(NavigationPage navigationPage)
}

Color GetBarTextColor() => _currentNavigationPage?.BarTextColor;
Color GetIconColor() => (_currentPage != null) ? NavigationPage.GetIconColor(_currentPage) : null;
Color GetIconColor() => NavigationPage.GetIconColor(_currentPage) ?? NavigationPage.GetIconColor(_currentNavigationPage);

string GetTitle()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ async void OnPromptRequested(Page sender, PromptArguments arguments)
Input = arguments.InitialValue ?? string.Empty,
Placeholder = arguments.Placeholder ?? string.Empty,
MaxLength = arguments.MaxLength >= 0 ? arguments.MaxLength : 0,
InputScope = arguments.Keyboard.ToInputScope()
InputScope = arguments.Keyboard.ToInputScope(),
DefaultButton = ContentDialogButton.Primary
};

if (arguments.Cancel != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@ public static class TextViewExtensions
{
public static void UpdateText(this TextView textView, Label label)
{
string text = TextTransformUtilites.GetTransformedText(label.Text, label.TextTransform);
switch (label.TextType)
{
case TextType.Text:
if (label.FormattedText != null)
textView.TextFormatted = label.ToSpannableString();
else
textView.Text = TextTransformUtilites.GetTransformedText(label.Text, label.TextTransform);
textView.Text = text;
break;
case TextType.Html:
textView.UpdateTextHtml(label);
textView.UpdateTextHtml(text);
break;
}
}
Expand Down
6 changes: 6 additions & 0 deletions src/Controls/src/Core/Platform/Android/TabbedPageManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -890,6 +890,12 @@ void SetIconColorFilter(Page page, TabLayout.Tab tab, bool selected)

icon.Mutate();
icon.SetState(_stateSet);

// The FontImageSource has its own color, so we don't need to apply the tint list.
if (page.IconImageSource is not FontImageSource)
{
_tabLayout.TabIconTint = colors;
}
ADrawableCompat.SetTintList(icon, colors);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ public static void SetAutomationPropertiesAutomationId(this FrameworkElement Con
_defaultAutomationPropertiesName = currentValue = (string)Control.GetValue(NativeAutomationProperties.NameProperty);
}

#pragma warning disable CS0618 // Type or member is obsolete
var elemValue = (string)Element.GetValue(AutomationProperties.NameProperty);
#pragma warning restore CS0618 // Type or member is obsolete

var elemValue = (string)Element.GetValue(SemanticProperties.DescriptionProperty);
string newValue = !string.IsNullOrWhiteSpace(elemValue) ? elemValue : _defaultAutomationPropertiesName;

if (currentValue is null || currentValue != newValue)
Expand Down Expand Up @@ -88,10 +85,7 @@ public static void SetAutomationPropertiesAutomationId(this FrameworkElement Con
_defaultAutomationPropertiesHelpText = currentValue = (string)Control.GetValue(NativeAutomationProperties.HelpTextProperty);
}

#pragma warning disable CS0618 // Type or member is obsolete
var elemValue = (string)Element.GetValue(AutomationProperties.HelpTextProperty);
#pragma warning restore CS0618 // Type or member is obsolete

var elemValue = (string)Element.GetValue(SemanticProperties.HintProperty);
string newValue = !string.IsNullOrWhiteSpace(elemValue) ? elemValue : _defaultAutomationPropertiesHelpText;

if (currentValue is null || newValue != currentValue)
Expand Down Expand Up @@ -123,9 +117,8 @@ public static void SetAutomationPropertiesAutomationId(this FrameworkElement Con
{
_defaultAutomationPropertiesLabeledBy = currentValue = (UIElement)Control.GetValue(NativeAutomationProperties.LabeledByProperty);
}
#pragma warning disable CS0618 // Type or member is obsolete
var elemValue = (VisualElement)Element.GetValue(AutomationProperties.LabeledByProperty);
#pragma warning restore CS0618 // Type or member is obsolete

var elemValue = (VisualElement)Element.GetValue(SemanticProperties.DescriptionProperty);
FrameworkElement? nativeElement = null;

if (mauiContext != null)
Expand All @@ -137,9 +130,7 @@ public static void SetAutomationPropertiesAutomationId(this FrameworkElement Con

if (currentValue is null || newValue != currentValue)
{
#pragma warning disable CS0618 // Type or member is obsolete
Control.SetValue(AutomationProperties.LabeledByProperty, newValue);
#pragma warning restore CS0618 // Type or member is obsolete
Control.SetValue(SemanticProperties.DescriptionProperty, newValue);
}

return _defaultAutomationPropertiesLabeledBy;
Expand All @@ -161,22 +152,10 @@ public static void SetBackButtonTitle(this PageControl Control, Element? Element

static string ConcatenateNameAndHint(Element Element)
{
string separator;

#pragma warning disable CS0618 // Type or member is obsolete
var name = (string)Element.GetValue(AutomationProperties.NameProperty);

var hint = (string)Element.GetValue(AutomationProperties.HelpTextProperty);
#pragma warning restore CS0618 // Type or member is obsolete
var name = (string)Element.GetValue(SemanticProperties.DescriptionProperty);
var hint = (string)Element.GetValue(SemanticProperties.HintProperty);

if (string.IsNullOrWhiteSpace(name) || string.IsNullOrWhiteSpace(hint))
{
separator = "";
}
else
{
separator = ". ";
}
string separator = string.IsNullOrWhiteSpace(name) || string.IsNullOrWhiteSpace(hint) ? "" : ". ";

return string.Join(separator, name, hint);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ static void DetermineTruncatedTextWrapping(TextBlock textBlock) =>

public static void UpdateText(this TextBlock platformControl, Label label)
{
string text = TextTransformUtilites.GetTransformedText(label.Text, label.TextTransform);

switch (label.TextType)
{
case TextType.Html:
platformControl.UpdateTextHtml(label);
platformControl.UpdateTextHtml(label, text);
break;

default:
Expand All @@ -39,7 +41,7 @@ public static void UpdateText(this TextBlock platformControl, Label label)
{
platformControl.TextHighlighters.Clear();
}
platformControl.Text = TextTransformUtilites.GetTransformedText(label.Text, label.TextTransform);
platformControl.Text = text;
}
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
<DataTemplate x:Key="TabBarNavigationViewMenuItem">
<NavigationViewItem
x:Name="navViewItem"
Content="{Binding Content}"
Foreground="{Binding TitleColor}"
Content="{Binding Content}"
Background="{Binding Background}"
IsSelected="{Binding IsSelected, Mode=TwoWay}"
MenuItemsSource="{Binding MenuItemsSource}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ public static class LabelExtensions
{
public static void UpdateText(this UILabel platformLabel, Label label)
{
var text = TextTransformUtilites.GetTransformedText(label.Text, label.TextTransform);

switch (label.TextType)
{
case TextType.Html:
Expand All @@ -21,7 +23,7 @@ public static void UpdateText(this UILabel platformLabel, Label label)
// will be just disappear once we switch.
CoreFoundation.DispatchQueue.MainQueue.DispatchAsync(() =>
{
platformLabel.UpdateTextHtml(label);
platformLabel.UpdateTextHtml(text);

if (label.Handler is LabelHandler labelHandler)
Label.MapFormatting(labelHandler, label);
Expand All @@ -42,7 +44,7 @@ public static void UpdateText(this UILabel platformLabel, Label label)
platformLabel.AttributedText = null;
}

platformLabel.Text = TextTransformUtilites.GetTransformedText(label.Text, label.TextTransform);
platformLabel.Text = text;
}
break;
}
Expand Down
41 changes: 2 additions & 39 deletions src/Controls/src/Core/WebView/WebView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
using System.ComponentModel;
using System.Diagnostics;
using System.Net;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Microsoft.Maui.Controls.Internals;

using Microsoft.Maui.Devices;
using Microsoft.Maui.Handlers;

namespace Microsoft.Maui.Controls
{
Expand Down Expand Up @@ -125,7 +125,7 @@ public async Task<string> EvaluateJavaScriptAsync(string script)
// Make all the platforms mimic Android's implementation, which is by far the most complete.
if (DeviceInfo.Platform != DevicePlatform.Android)
{
script = EscapeJsString(script);
script = WebViewHelper.EscapeJsString(script);

if (DeviceInfo.Platform != DevicePlatform.WinUI)
{
Expand Down Expand Up @@ -290,43 +290,6 @@ public IPlatformElementConfiguration<T, WebView> On<T>() where T : IConfigPlatfo
return _platformConfigurationRegistry.Value.On<T>();
}

private static string EscapeJsString(string js)
{
if (js == null)
return null;

if (js.IndexOf("'", StringComparison.Ordinal) == -1)
return js;

//get every quote in the string along with all the backslashes preceding it
var singleQuotes = Regex.Matches(js, @"(\\*?)'");

var uniqueMatches = new List<string>();

for (var i = 0; i < singleQuotes.Count; i++)
{
var matchedString = singleQuotes[i].Value;
if (!uniqueMatches.Contains(matchedString))
{
uniqueMatches.Add(matchedString);
}
}

uniqueMatches.Sort((x, y) => y.Length.CompareTo(x.Length));

//escape all quotes from the script as well as add additional escaping to all quotes that were already escaped
for (var i = 0; i < uniqueMatches.Count; i++)
{
var match = uniqueMatches[i];
var numberOfBackslashes = match.Length - 1;
var slashesToAdd = (numberOfBackslashes * 2) + 1;
var replacementStr = "'".PadLeft(slashesToAdd + 1, '\\');
js = Regex.Replace(js, @"(?<=[^\\])" + Regex.Escape(match), replacementStr);
}

return js;
}

/// <inheritdoc/>
IWebViewSource IWebView.Source => Source;

Expand Down
Loading