-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
114 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{ | ||
"tools": { | ||
"dotnet": "9.0.100-preview.3.24204.13" | ||
"dotnet": "9.0.100-preview.4.24267.66" | ||
}, | ||
"msbuild-sdks": { | ||
"MSBuild.Sdk.Extras": "3.0.44", | ||
"Microsoft.Build.NoTargets": "3.7.0", | ||
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24225.1" | ||
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.24310.5" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using System; | ||
using Microsoft.Maui.Controls.Compatibility; | ||
|
||
namespace Microsoft.Maui.Controls | ||
{ | ||
public partial class SwipeView | ||
{ | ||
[Obsolete("Use SwipeViewHandler.Mapper instead.")] | ||
internal static IPropertyMapper<ISwipeView, ISwipeViewHandler> ControlsSwipeMapper = | ||
new ControlsMapper<SwipeView, SwipeViewHandler>(SwipeViewHandler.Mapper); | ||
|
||
internal static new void RemapForControls() | ||
{ | ||
// Adjusted the mapping to preserve SwipeView.Entry legacy behavior | ||
SwipeViewHandler.Mapper.AppendToMapping<SwipeView, ISwipeViewHandler>(nameof(Background), MapBackground); | ||
} | ||
|
||
static void MapBackground(ISwipeViewHandler handler, SwipeView swipeView) | ||
{ | ||
if (swipeView.Content is not null) | ||
{ | ||
var contentBackgroundIsNull = Brush.IsNullOrEmpty(swipeView.Content.Background); | ||
var contentBackgroundColorIsNull = swipeView.Content.BackgroundColor == null; | ||
|
||
if (contentBackgroundIsNull && contentBackgroundColorIsNull) | ||
{ | ||
if (!Brush.IsNullOrEmpty(swipeView.Background)) | ||
{ | ||
swipeView.Content.Background = swipeView.Background; | ||
} | ||
else if (swipeView.BackgroundColor != null) | ||
{ | ||
swipeView.Content.BackgroundColor = swipeView.BackgroundColor; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters