Skip to content

Commit 0bccb63

Browse files
committed
fix: remove icon brush from renderer
1 parent 91c5efc commit 0bccb63

File tree

4 files changed

+21
-2
lines changed

4 files changed

+21
-2
lines changed

samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples.Shared/Content/NestedSamples/FluentNavigationBarSampleNestedPage1.xaml

+6
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
</Grid.RowDefinitions>
1818
<utu:NavigationBar Content="First Page"
1919
MainCommandMode="Action"
20+
AutomationProperties.AutomationId="FluentPage1NavBar"
2021
Style="{StaticResource DefaultNavigationBar}">
2122
<utu:NavigationBar.MainCommand>
2223
<AppBarButton Click="NavigateBack"
@@ -42,6 +43,11 @@
4243
<BitmapIcon UriSource="ms-appx:///Assets/AppleIcon_Small.png" />
4344
</AppBarButton.Icon>
4445
</AppBarButton>
46+
<AppBarButton Click="NavigateToNextPage"
47+
Label="Page2"
48+
AutomationProperties.AutomationId="FluentPage1NavBarPrimaryCommand3"
49+
Style="{StaticResource DefaultAppBarButtonStyle}"
50+
Icon="Favorite" />
4551
</utu:NavigationBar.PrimaryCommands>
4652
<utu:NavigationBar.SecondaryCommands>
4753
<AppBarButton Command="{Binding Secondary1CountCommand}"

samples/Uno.Toolkit.Samples/Uno.Toolkit.Samples.Shared/Content/NestedSamples/FluentNavigationBarSampleNestedPage2.xaml

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<RowDefinition Height="*" />
1515
</Grid.RowDefinitions>
1616
<utu:NavigationBar Content="Second Page"
17+
AutomationProperties.AutomationId="FluentPage2NavBar"
1718
Style="{StaticResource DefaultNavigationBar}">
1819
<utu:NavigationBar.PrimaryCommands>
1920
<AppBarButton Label="More"

src/Uno.Toolkit.UI/Controls/NavigationBar/AppBarButtonRenderer.Android.cs

-2
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@ protected override IEnumerable<IDisposable> Initialize()
9696
new[] { AppBarButton.LabelProperty },
9797
new[] { AppBarButton.IconProperty },
9898
new[] { AppBarButton.IconProperty, BitmapIcon.UriSourceProperty },
99-
new[] { AppBarButton.IconProperty, IconElement.ForegroundProperty },
100-
new[] { AppBarButton.IconProperty, IconElement.ForegroundProperty, SolidColorBrush.ColorProperty },
10199
new[] { AppBarButton.ContentProperty },
102100
new[] { AppBarButton.ContentProperty, FrameworkElement.VisibilityProperty },
103101
new[] { AppBarButton.OpacityProperty },

src/Uno.Toolkit.UITest/Controls/NavigationBar/Given_NavigationBar.cs

+14
Original file line numberDiff line numberDiff line change
@@ -107,5 +107,19 @@ public void NavBar_Page_Can_Go_Back()
107107

108108
App.WaitForNoElement("M3Page2NavBar", "Timed out waiting for no Page 2 Nav Bar");
109109
}
110+
111+
[Test]
112+
[AutoRetry]
113+
public void NavBar_AppBarButton_With_Icon_Click()
114+
{
115+
NavigateToNestedSample("FluentNavigationBarSampleNestedPage");
116+
117+
PlatformHelpers.On(
118+
iOS: () => App.Tap("FluentPage1NavBarPrimaryCommand3"),
119+
Android: () => App.Tap("FluentPage1NavBarPrimaryCommand3")
120+
);
121+
122+
App.WaitForElement("FluentPage2NavBar", "Timed out waiting for Page 2 Nav Bar");
123+
}
110124
}
111125
}

0 commit comments

Comments
 (0)