-
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
16 changed files
with
94 additions
and
44 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
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,12 +1,39 @@ | ||
namespace Microsoft.Maui.Handlers | ||
using System; | ||
using System.Threading.Tasks; | ||
|
||
namespace Microsoft.Maui.Handlers | ||
{ | ||
public partial class ToolbarHandler : ElementHandler<IToolbar, MauiToolbar> | ||
{ | ||
protected override MauiToolbar CreatePlatformElement() => new(); | ||
|
||
public static void MapTitle(IToolbarHandler arg1, IToolbar arg2) | ||
protected override void ConnectHandler(MauiToolbar platformView) | ||
{ | ||
platformView.IconPressed += OnIconPressed; | ||
base.ConnectHandler(platformView); | ||
} | ||
|
||
protected override void DisconnectHandler(MauiToolbar platformView) | ||
{ | ||
arg1.PlatformView.UpdateTitle(arg2); | ||
platformView.IconPressed -= OnIconPressed; | ||
base.DisconnectHandler(platformView); | ||
} | ||
|
||
public static void MapTitle(IToolbarHandler handler, IToolbar toolbar) | ||
{ | ||
handler.PlatformView.UpdateTitle(toolbar); | ||
} | ||
|
||
async void OnIconPressed(object? sender, EventArgs args) | ||
{ | ||
if (VirtualView.BackButtonVisible && VirtualView.IsVisible) | ||
{ | ||
// Delays invoking the BackButtonClicked | ||
// so the other attached events can be invoked before the pop behavior is done on a FlyoutPage. | ||
await Task.Delay(100); | ||
|
||
MauiContext?.GetPlatformWindow().GetWindow()?.BackButtonClicked(); | ||
} | ||
} | ||
} | ||
} |
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,15 @@ | ||
using Tizen.UIExtensions.NUI; | ||
|
||
namespace Microsoft.Maui.Platform | ||
{ | ||
public class MauiFlyoutView : NavigationDrawer, IToolbarContainer | ||
{ | ||
void IToolbarContainer.SetToolbar(MauiToolbar toolbar) | ||
{ | ||
if (Content is IToolbarContainer container) | ||
{ | ||
container.SetToolbar(toolbar); | ||
} | ||
} | ||
} | ||
} |
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,15 @@ | ||
using Tizen.UIExtensions.NUI; | ||
|
||
namespace Microsoft.Maui.Platform | ||
{ | ||
public class MauiTVFlyoutView : TVNavigationDrawer, IToolbarContainer | ||
{ | ||
void IToolbarContainer.SetToolbar(MauiToolbar toolbar) | ||
{ | ||
if (Content is IToolbarContainer container) | ||
{ | ||
container.SetToolbar(toolbar); | ||
} | ||
} | ||
} | ||
} |
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