-
Notifications
You must be signed in to change notification settings - Fork 743
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2945 from unoplatform/mergify/bp/release/beta/2.1…
…/pr-2933 [iOS] Fix text in CommandBar title not appearing after navigation (bp #2933)
- Loading branch information
Showing
12 changed files
with
239 additions
and
4 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
24 changes: 24 additions & 0 deletions
24
...amplesApp/UITests.Shared/Windows_UI_Xaml_Controls/CommandBar/CommandBar_Native_Frame.xaml
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,24 @@ | ||
<UserControl x:Class="UITests.Windows_UI_Xaml_Controls.CommandBar.CommandBar_Native_Frame" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:UITests.Windows_UI_Xaml_Controls.CommandBar" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:xamarin="http://uno.ui/xamarin" | ||
mc:Ignorable="d xamarin" | ||
d:DesignHeight="300" | ||
d:DesignWidth="400"> | ||
|
||
<Grid> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="*" /> | ||
<RowDefinition Height="Auto" /> | ||
</Grid.RowDefinitions> | ||
<Frame x:Name="hostFrame" | ||
xamarin:Style="{StaticResource NativeDefaultFrame}" /> | ||
<Button x:Name="NavigateInitialButton" | ||
Grid.Row="1" | ||
Content="Navigate to first page" | ||
Click="Navigate_Initial" /> | ||
</Grid> | ||
</UserControl> |
35 changes: 35 additions & 0 deletions
35
...lesApp/UITests.Shared/Windows_UI_Xaml_Controls/CommandBar/CommandBar_Native_Frame.xaml.cs
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,35 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Runtime.InteropServices.WindowsRuntime; | ||
using UITests.Windows_UI_Xaml_Controls.CommandBar.Native_Frame; | ||
using Uno.UI.Samples.Controls; | ||
using Windows.Foundation; | ||
using Windows.Foundation.Collections; | ||
using Windows.UI.Xaml; | ||
using Windows.UI.Xaml.Controls; | ||
using Windows.UI.Xaml.Controls.Primitives; | ||
using Windows.UI.Xaml.Data; | ||
using Windows.UI.Xaml.Input; | ||
using Windows.UI.Xaml.Media; | ||
using Windows.UI.Xaml.Navigation; | ||
|
||
// The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236 | ||
|
||
namespace UITests.Windows_UI_Xaml_Controls.CommandBar | ||
{ | ||
[Sample] | ||
public sealed partial class CommandBar_Native_Frame : UserControl | ||
{ | ||
public CommandBar_Native_Frame() | ||
{ | ||
this.InitializeComponent(); | ||
} | ||
|
||
private void Navigate_Initial(object sender, RoutedEventArgs args) | ||
{ | ||
hostFrame.Navigate(typeof(Page_With_CommandBar_TextBlock)); | ||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
...mplesApp/UITests.Shared/Windows_UI_Xaml_Controls/CommandBar/Native_Frame/Page_Detail.xaml
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,17 @@ | ||
<Page x:Class="UITests.Windows_UI_Xaml_Controls.CommandBar.Native_Frame.Page_Detail" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:UITests.Windows_UI_Xaml_Controls.CommandBar.Native_Frame" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
mc:Ignorable="d" | ||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> | ||
|
||
<StackPanel> | ||
<CommandBar Content="Details" /> | ||
<TextBlock Text="A page providing more detail" /> | ||
<Button x:Name="NavigateBackButton" | ||
Content="Navigate back" | ||
Click="Navigate_Back" /> | ||
</StackPanel> | ||
</Page> |
33 changes: 33 additions & 0 deletions
33
...esApp/UITests.Shared/Windows_UI_Xaml_Controls/CommandBar/Native_Frame/Page_Detail.xaml.cs
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,33 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Runtime.InteropServices.WindowsRuntime; | ||
using Windows.Foundation; | ||
using Windows.Foundation.Collections; | ||
using Windows.UI.Xaml; | ||
using Windows.UI.Xaml.Controls; | ||
using Windows.UI.Xaml.Controls.Primitives; | ||
using Windows.UI.Xaml.Data; | ||
using Windows.UI.Xaml.Input; | ||
using Windows.UI.Xaml.Media; | ||
using Windows.UI.Xaml.Navigation; | ||
|
||
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238 | ||
|
||
namespace UITests.Windows_UI_Xaml_Controls.CommandBar.Native_Frame | ||
{ | ||
/// <summary> | ||
/// An empty page that can be used on its own or navigated to within a Frame. | ||
/// </summary> | ||
public sealed partial class Page_Detail : Page | ||
{ | ||
public Page_Detail() | ||
{ | ||
this.InitializeComponent(); | ||
} | ||
|
||
private void Navigate_Back(object sender, RoutedEventArgs args) => Frame.GoBack(); | ||
|
||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
...ared/Windows_UI_Xaml_Controls/CommandBar/Native_Frame/Page_With_CommandBar_TextBlock.xaml
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,37 @@ | ||
<Page x:Class="UITests.Windows_UI_Xaml_Controls.CommandBar.Native_Frame.Page_With_CommandBar_TextBlock" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:UITests.Windows_UI_Xaml_Controls.CommandBar.Native_Frame" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:xamarin="http://uno.ui/xamarin" | ||
mc:Ignorable="d xamarin" | ||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> | ||
|
||
<Grid> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="Auto" /> | ||
<RowDefinition Height="Auto" /> | ||
<!--<RowDefinition Height="Auto" />--> | ||
</Grid.RowDefinitions> | ||
<CommandBar xamarin:Style="{StaticResource NativeDefaultCommandBar}"> | ||
<CommandBar.Content> | ||
<TextBlock x:Name="CommandBarTitleText" | ||
Text="Page title" | ||
VerticalAlignment="Center" /> | ||
</CommandBar.Content> | ||
</CommandBar> | ||
<Border Grid.Row="1" | ||
Margin="40" | ||
BorderBrush="Blue" | ||
BorderThickness="2" | ||
CornerRadius="5"> | ||
<StackPanel> | ||
<TextBlock Text="This is the content of the page" /> | ||
<Button x:Name="NavigateDetailButton" | ||
Content="Navigate to details" | ||
Click="Navigate_Onward" /> | ||
</StackPanel> | ||
</Border> | ||
</Grid> | ||
</Page> |
36 changes: 36 additions & 0 deletions
36
...d/Windows_UI_Xaml_Controls/CommandBar/Native_Frame/Page_With_CommandBar_TextBlock.xaml.cs
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,36 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Runtime.InteropServices.WindowsRuntime; | ||
using Windows.Foundation; | ||
using Windows.Foundation.Collections; | ||
using Windows.UI.Xaml; | ||
using Windows.UI.Xaml.Controls; | ||
using Windows.UI.Xaml.Controls.Primitives; | ||
using Windows.UI.Xaml.Data; | ||
using Windows.UI.Xaml.Input; | ||
using Windows.UI.Xaml.Media; | ||
using Windows.UI.Xaml.Navigation; | ||
|
||
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238 | ||
|
||
namespace UITests.Windows_UI_Xaml_Controls.CommandBar.Native_Frame | ||
{ | ||
/// <summary> | ||
/// An empty page that can be used on its own or navigated to within a Frame. | ||
/// </summary> | ||
public sealed partial class Page_With_CommandBar_TextBlock : Page | ||
{ | ||
public Page_With_CommandBar_TextBlock() | ||
{ | ||
this.InitializeComponent(); | ||
} | ||
|
||
private void Navigate_Onward(object sender, RoutedEventArgs args) | ||
{ | ||
Frame.Navigate(typeof(Page_Detail)); | ||
} | ||
|
||
} | ||
} |
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