-
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.
feat: Add support for
UIElement.ContextFlyout
- Loading branch information
1 parent
be7e372
commit 5640745
Showing
19 changed files
with
223 additions
and
95 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
2 changes: 1 addition & 1 deletion
2
...FlyoutItemTests/MenuFlyoutItem_Click.xaml → ...MenuFlyoutTests/MenuFlyoutItem_Click.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
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
26 changes: 26 additions & 0 deletions
26
...sApp/UITests.Shared/Windows_UI_Xaml_Controls/MenuFlyoutTests/UIElement_ContextFlyout.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,26 @@ | ||
<UserControl | ||
x:Class="UITests.Shared.Windows_UI_Xaml_Controls.MenuFlyoutTests.UIElement_ContextFlyout" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
mc:Ignorable="d" | ||
d:DesignHeight="300" | ||
d:DesignWidth="400"> | ||
|
||
<Grid> | ||
<Grid.RowDefinitions> | ||
<RowDefinition/> | ||
<RowDefinition/> | ||
</Grid.RowDefinitions> | ||
<Border x:Name="myBorder" Background="Red" Height="200" Width="200"> | ||
<Border.ContextFlyout> | ||
<MenuFlyout> | ||
<MenuFlyoutItem x:Name="testItem1" Text="test1" Click="OnMenuItemClick" /> | ||
<MenuFlyoutItem x:Name="testItem2" Text="test2" Click="OnMenuItemClick" /> | ||
</MenuFlyout> | ||
</Border.ContextFlyout> | ||
<TextBlock x:Name="result" Text="Right Tap me" /> | ||
</Border> | ||
</Grid> | ||
</UserControl> |
34 changes: 34 additions & 0 deletions
34
...p/UITests.Shared/Windows_UI_Xaml_Controls/MenuFlyoutTests/UIElement_ContextFlyout.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,34 @@ | ||
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; | ||
|
||
namespace UITests.Shared.Windows_UI_Xaml_Controls.MenuFlyoutTests | ||
{ | ||
[Uno.UI.Samples.Controls.SampleControlInfo("MenuFlyout")] | ||
public sealed partial class UIElement_ContextFlyout : UserControl | ||
{ | ||
public UIElement_ContextFlyout() | ||
{ | ||
this.InitializeComponent(); | ||
} | ||
|
||
public void OnMenuItemClick(object sender, object args) | ||
{ | ||
if (sender is MenuFlyoutItem item) | ||
{ | ||
result.Text = "click: " + item.Text; | ||
} | ||
} | ||
} | ||
} |
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
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
Oops, something went wrong.