-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…1965 * Remove IPlatformInvalidate Removes: - `Device.Invalidate(VisualElement visualElement)` - `Device.PlatformInvalidator` - `IPlatformInvalidate` * Revert "Remove IPlatformInvalidate" This reverts commit b5ff83c. * Use DependencyService when needed instead * no intellisense * and this * forgot to save * :( * :)
- Loading branch information
1 parent
f54d98a
commit 6c4f1f4
Showing
12 changed files
with
66 additions
and
97 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using Microsoft.Maui.Controls.Internals; | ||
|
||
[assembly: Microsoft.Maui.Controls.Dependency(typeof(Microsoft.Maui.Controls.Compatibility.Platform.Android.PlatformInvalidate))] | ||
|
||
namespace Microsoft.Maui.Controls.Compatibility.Platform.Android | ||
{ | ||
class PlatformInvalidate : IPlatformInvalidate | ||
{ | ||
public void Invalidate(VisualElement visualElement) | ||
{ | ||
var renderer = visualElement.GetRenderer(); | ||
if (renderer == null || renderer.View.IsDisposed()) | ||
{ | ||
return; | ||
} | ||
|
||
renderer.View.Invalidate(); | ||
renderer.View.RequestLayout(); | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using Microsoft.Maui.Controls.Internals; | ||
|
||
[assembly: Microsoft.Maui.Controls.Dependency(typeof(Microsoft.Maui.Controls.Compatibility.Platform.UWP.PlatformInvalidate))] | ||
|
||
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP | ||
{ | ||
class PlatformInvalidate : IPlatformInvalidate | ||
{ | ||
public void Invalidate(VisualElement visualElement) | ||
{ | ||
var renderer = Platform.GetRenderer(visualElement); | ||
if (renderer == null) | ||
{ | ||
return; | ||
} | ||
|
||
renderer.ContainerElement.InvalidateMeasure(); | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using Microsoft.Maui.Controls.Internals; | ||
|
||
[assembly: Microsoft.Maui.Controls.Dependency(typeof(Microsoft.Maui.Controls.Compatibility.Platform.iOS.PlatformInvalidate))] | ||
|
||
namespace Microsoft.Maui.Controls.Compatibility.Platform.iOS | ||
{ | ||
class PlatformInvalidate : IPlatformInvalidate | ||
{ | ||
public void Invalidate(VisualElement visualElement) | ||
{ | ||
var renderer = Microsoft.Maui.Controls.Compatibility.Platform.iOS.Platform.GetRenderer(visualElement); | ||
|
||
if (renderer == null) | ||
{ | ||
return; | ||
} | ||
|
||
renderer.NativeView.SetNeedsLayout(); | ||
} | ||
} | ||
} |
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