-
Notifications
You must be signed in to change notification settings - Fork 750
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 #6844 from Youssef1313/issues/6732
fix: Apply icon color correctly inside native AppBarButton
- Loading branch information
Showing
5 changed files
with
110 additions
and
5 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
47 changes: 47 additions & 0 deletions
47
...dows_UI_Xaml_Controls/CommandBar/CommandBar_Native_With_AppBarButton_With_Foreground.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,47 @@ | ||
<Page | ||
x:Class="UITests.Windows_UI_Xaml_Controls.CommandBar.CommandBar_Native_With_AppBarButton_With_Foreground" | ||
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" | ||
mc:Ignorable="d xamarin ios android" | ||
xmlns:xamarin="http://nventive.com/xamarin" | ||
xmlns:ios="http://nventive.com/ios" | ||
xmlns:android="http://nventive.com/android" | ||
|
||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> | ||
|
||
<Page.Resources> | ||
<Style x:Name="NativeCommandbarStyle" | ||
TargetType="CommandBar" | ||
xamarin:BasedOn="{StaticResource NativeDefaultCommandBar}"/> | ||
</Page.Resources> | ||
|
||
<Grid> | ||
|
||
<android:CommandBar x:Name="MyCommandBar" | ||
Style="{StaticResource NativeCommandbarStyle}" | ||
Background="Gray"> | ||
<CommandBar.PrimaryCommands> | ||
<AppBarButton Content="Hello"> | ||
<AppBarButton.Icon> | ||
<BitmapIcon x:Name="MyIcon" UriSource="ms-appx:///Assets/Icons/star_full.png" Foreground="Red"/> | ||
</AppBarButton.Icon> | ||
</AppBarButton> | ||
</CommandBar.PrimaryCommands> | ||
</android:CommandBar> | ||
|
||
<ios:CommandBar x:Name="MyCommandBar" | ||
Style="{StaticResource NativeCommandbarStyle}" | ||
Background="Gray"> | ||
<CommandBar.PrimaryCommands> | ||
<AppBarButton Content="Hello"> | ||
<AppBarButton.Icon> | ||
<BitmapIcon x:Name="MyIcon" UriSource="ms-appx:///Assets/Icons/star_full.png" Foreground="Red"/> | ||
</AppBarButton.Icon> | ||
</AppBarButton> | ||
</CommandBar.PrimaryCommands> | ||
</ios:CommandBar> | ||
</Grid> | ||
</Page> |
29 changes: 29 additions & 0 deletions
29
...s_UI_Xaml_Controls/CommandBar/CommandBar_Native_With_AppBarButton_With_Foreground.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,29 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Runtime.InteropServices.WindowsRuntime; | ||
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 Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238 | ||
|
||
namespace UITests.Windows_UI_Xaml_Controls.CommandBar | ||
{ | ||
[Sample] | ||
public sealed partial class CommandBar_Native_With_AppBarButton_With_Foreground : Page | ||
{ | ||
public CommandBar_Native_With_AppBarButton_With_Foreground() | ||
{ | ||
this.InitializeComponent(); | ||
} | ||
} | ||
} |
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