-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Title doesn't visible when set IsVisible to true of ShellContent #26966
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
530236f
Fixed ShellContent IsVisible="True" Does not display Title
KarthikRajaKalaimani 9eaf253
Fixed ShellContent IsVisible="True" Does not display Title
KarthikRajaKalaimani 68caa32
Test case added
KarthikRajaKalaimani bcee204
Removed unwanted lines
KarthikRajaKalaimani 39feed7
Modified the fix.
KarthikRajaKalaimani File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,78 @@ | ||
| using System.Collections.ObjectModel; | ||
| using System.Collections.Specialized; | ||
| using System.ComponentModel; | ||
|
|
||
| namespace Maui.Controls.Sample.Issues | ||
| { | ||
|
|
||
| [Issue(IssueTracker.Github, 19783, "ShellContent IsVisible=True Does not display Title")] | ||
| public class Issue19783 : Shell | ||
| { | ||
| public Issue19783() | ||
| { | ||
| var shellContent = new ShellContent() | ||
| { | ||
| ContentTemplate = new DataTemplate(typeof(Issue19783_WelcomePage)) | ||
| }; | ||
| var shellContent2 = new ShellContent() | ||
| { | ||
| ContentTemplate = new DataTemplate(typeof(Issue19783_ProfilePage)) | ||
| }; | ||
| this.Items.Add(new FlyoutItem() | ||
| { | ||
| Title = "Welcome Page", | ||
| Items = | ||
| { | ||
| shellContent | ||
| } | ||
| }); | ||
| this.Items.Add(new FlyoutItem() | ||
| { | ||
| Title = "Profile Page", | ||
| IsVisible = false, | ||
| Items = | ||
| { | ||
| shellContent2 | ||
| } | ||
| }); | ||
| Button button = new Button(); | ||
| button.Text = "Toggle Profile Page"; | ||
| button.AutomationId = "ToggleProfilePage"; | ||
| button.Clicked += (sender, e) => | ||
| { | ||
| this.Items[1].IsVisible = true; | ||
| }; | ||
| this.FlyoutFooter = button; | ||
| } | ||
| } | ||
|
|
||
| public class Issue19783_WelcomePage : ContentPage | ||
| { | ||
| StackLayout stackLayout; | ||
| public Issue19783_WelcomePage() | ||
| { | ||
| Title = "Welcome"; | ||
| stackLayout = new StackLayout(); | ||
| var button = new Button(); | ||
| button.Text = "click to open pane"; | ||
| button.AutomationId = "OpenPane"; | ||
| button.Clicked += (sender, e) => | ||
| { | ||
| Shell.Current.FlyoutIsPresented = true; | ||
| }; | ||
| var label = new Label { Text = "Welcome to the Shell" }; | ||
| stackLayout.Children.Add(label); | ||
| stackLayout.Children.Add(button); | ||
| Content = stackLayout; | ||
| } | ||
| } | ||
|
|
||
| public class Issue19783_ProfilePage : ContentPage | ||
| { | ||
| public Issue19783_ProfilePage() | ||
| { | ||
| Title = "Profile"; | ||
| Content = new Label { Text = "Profile" }; | ||
| } | ||
| } | ||
| } |
24 changes: 24 additions & 0 deletions
24
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue19783.cs
This file contains hidden or 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,24 @@ | ||
| using NUnit.Framework; | ||
| using UITest.Appium; | ||
| using UITest.Core; | ||
|
|
||
| namespace Microsoft.Maui.TestCases.Tests.Issues | ||
| { | ||
| public class Issue19783 : _IssuesUITest | ||
| { | ||
| public Issue19783(TestDevice device) : base(device) { } | ||
|
|
||
| public override string Issue => "ShellContent IsVisible=True Does not display Title"; | ||
|
|
||
| [Test] | ||
| [Category(UITestCategories.Shell)] | ||
| public void Issue19783Shell() | ||
| { | ||
| App.WaitForElement("click to open pane"); | ||
| App.Tap("OpenPane"); | ||
| App.WaitForElement("Toggle Profile Page"); | ||
| App.Tap("ToggleProfilePage"); | ||
| App.WaitForElement("Profile Page"); | ||
| } | ||
| } | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.