-
Notifications
You must be signed in to change notification settings - Fork 762
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Implement WinUI CommandBar and AppBar
- Loading branch information
Showing
113 changed files
with
18,195 additions
and
4,412 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
23 changes: 23 additions & 0 deletions
23
...s.Shared/Microsoft_UI_Xaml_Controls/CommandBarTests/CommandBar_Primary_And_Secondary.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,23 @@ | ||
<Page x:Class="UITests.Microsoft_UI_Xaml_Controls.CommandBarTests.CommandBar_Primary_And_Secondary" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:CommandBarTest" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:not_win="http://uno.ui/not_win" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
mc:Ignorable="d not_win" | ||
Background="Red"> | ||
|
||
<CommandBar VerticalAlignment="Center"> | ||
<CommandBar.PrimaryCommands> | ||
<AppBarButton Label="PCommand" /> | ||
<AppBarButton Label="PCommand" /> | ||
<AppBarButton Label="PCommand" /> | ||
</CommandBar.PrimaryCommands> | ||
<CommandBar.SecondaryCommands> | ||
<AppBarButton Label="SCommand" /> | ||
<AppBarButton Label="SCommand" /> | ||
<AppBarButton Label="SCommand" /> | ||
</CommandBar.SecondaryCommands> | ||
</CommandBar> | ||
</Page> |
29 changes: 29 additions & 0 deletions
29
...hared/Microsoft_UI_Xaml_Controls/CommandBarTests/CommandBar_Primary_And_Secondary.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.Microsoft_UI_Xaml_Controls.CommandBarTests | ||
{ | ||
[Sample("CommandBar")] | ||
public sealed partial class CommandBar_Primary_And_Secondary : Page | ||
{ | ||
public CommandBar_Primary_And_Secondary() | ||
{ | ||
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
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 |
---|---|---|
|
@@ -39,4 +39,4 @@ | |
Grid.Row="2" /> | ||
|
||
</Grid> | ||
</Page> | ||
</Page> |
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
81 changes: 44 additions & 37 deletions
81
...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 |
---|---|---|
@@ -1,47 +1,54 @@ | ||
<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 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}"/> | ||
TargetType="CommandBar" | ||
xamarin:BasedOn="{StaticResource NativeDefaultCommandBar}" /> | ||
</Page.Resources> | ||
|
||
<Grid> | ||
<android:Grid> | ||
<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> | ||
</CommandBar> | ||
</android: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:Grid> | ||
<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> | ||
</CommandBar> | ||
</ios:Grid> | ||
|
||
<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> |
Oops, something went wrong.