forked from unoplatform/uno
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix sender argument in Window events and x:Bind in Window when i…
…t's root of XAML
- Loading branch information
1 parent
c548ca3
commit 9bd9c2e
Showing
5 changed files
with
62 additions
and
6 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
13 changes: 13 additions & 0 deletions
13
src/Uno.UI.RuntimeTests/Tests/BindingTests/XBindInWindow.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,13 @@ | ||
<Window | ||
x:Class="Uno.UI.RuntimeTests.Tests.XBindInWindow" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="using:Uno.UI.RuntimeTests.Tests" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
mc:Ignorable="d"> | ||
|
||
<Grid> | ||
<Button Click="{x:Bind Click}" x:Name="MyButton" x:FieldModifier="public" /> | ||
</Grid> | ||
</Window> |
18 changes: 18 additions & 0 deletions
18
src/Uno.UI.RuntimeTests/Tests/BindingTests/XBindInWindow.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,18 @@ | ||
using Microsoft.UI.Xaml; | ||
|
||
namespace Uno.UI.RuntimeTests.Tests; | ||
|
||
public sealed partial class XBindInWindow : Window | ||
{ | ||
public int ClickCount { get; private set; } | ||
|
||
public XBindInWindow() | ||
{ | ||
this.InitializeComponent(); | ||
} | ||
|
||
public void Click(object sender, RoutedEventArgs args) | ||
{ | ||
ClickCount++; | ||
} | ||
} |
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