-
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.
fix: Fixed incorrect generation for xaml object binding with xaml obj…
…ect properties.
- Loading branch information
Showing
6 changed files
with
263 additions
and
38 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
36 changes: 36 additions & 0 deletions
36
...indows_UI_Xaml_Data/BindingTests/Controls/Binding_Xaml_Object_With_Common_Properties.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,36 @@ | ||
<Page | ||
x:Class="Uno.UI.Tests.Windows_UI_Xaml_Data.BindingTests.Controls.Binding_Xaml_Object_With_Common_Properties" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="using:Uno.UI.Tests.Windows_UI_Xaml_Data.xBindTests.Controls" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
mc:Ignorable="d" | ||
> | ||
<Page.Resources> | ||
<local:Binding_Xaml_Object_With_Common_Properties_Return_Value_Converter x:Key="Binding_Xaml_Object_With_Common_Properties_Return_Value_Converter" /> | ||
</Page.Resources> | ||
<Grid> | ||
<TextBlock | ||
x:Name="topLevel" | ||
x:FieldModifier="public" | ||
Tag="42" | ||
> | ||
<TextBlock.Text> | ||
<Binding | ||
Path="Tag" | ||
ElementName="topLevel" | ||
Converter="{StaticResource Binding_Xaml_Object_With_Common_Properties_Return_Value_Converter}" | ||
ConverterParameter="topLevel" | ||
ConverterLanguage="topLevel" | ||
UpdateSourceTrigger="Default" | ||
TargetNullValue="TargetNullValue" | ||
FallbackValue="FallbackValue" | ||
Mode="OneWay" | ||
RelativeSource="{RelativeSource Mode=None}" | ||
Source="Source" | ||
/> | ||
</TextBlock.Text> | ||
</TextBlock> | ||
</Grid> | ||
</Page> |
44 changes: 44 additions & 0 deletions
44
...ows_UI_Xaml_Data/BindingTests/Controls/Binding_Xaml_Object_With_Common_Properties.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,44 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
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; | ||
|
||
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238 | ||
|
||
namespace Uno.UI.Tests.Windows_UI_Xaml_Data.BindingTests.Controls | ||
{ | ||
/// <summary> | ||
/// An empty page that can be used on its own or navigated to within a Frame. | ||
/// </summary> | ||
public sealed partial class Binding_Xaml_Object_With_Common_Properties : Page | ||
{ | ||
public Binding_Xaml_Object_With_Common_Properties() | ||
{ | ||
this.InitializeComponent(); | ||
} | ||
} | ||
|
||
public sealed class Binding_Xaml_Object_With_Common_Properties_Return_Value_Converter : IValueConverter | ||
{ | ||
public object Convert(object value, Type targetType, object parameter, string language) | ||
{ | ||
return value; | ||
} | ||
|
||
public object ConvertBack(object value, Type targetType, object parameter, string language) | ||
{ | ||
return value; | ||
} | ||
} | ||
} |
59 changes: 59 additions & 0 deletions
59
...s_UI_Xaml_Data/BindingTests/Controls/Binding_Xaml_Object_With_Xaml_Object_Properties.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,59 @@ | ||
<Page | ||
x:Class="Uno.UI.Tests.Windows_UI_Xaml_Data.BindingTests.Controls.Binding_Xaml_Object_With_Xaml_Object_Properties" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="using:Uno.UI.Tests.Windows_UI_Xaml_Data.xBindTests.Controls" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
mc:Ignorable="d" | ||
> | ||
<Grid> | ||
<TextBlock | ||
x:Name="topLevel" | ||
x:FieldModifier="public" | ||
Tag="42" | ||
> | ||
<TextBlock.Text> | ||
<Binding> | ||
<Binding.Path> | ||
<PropertyPath>Tag</PropertyPath> | ||
</Binding.Path> | ||
<Binding.ElementName> | ||
<x:String>topLevel</x:String> | ||
</Binding.ElementName> | ||
<Binding.Converter> | ||
<local:Binding_Xaml_Object_With_Xaml_Object_Properties_Return_Value_Converter /> | ||
</Binding.Converter> | ||
<Binding.ConverterParameter> | ||
<x:String>topLevel</x:String> | ||
</Binding.ConverterParameter> | ||
<Binding.ConverterLanguage> | ||
<x:String>topLevel</x:String> | ||
</Binding.ConverterLanguage> | ||
<Binding.UpdateSourceTrigger> | ||
<UpdateSourceTrigger>Default</UpdateSourceTrigger> | ||
</Binding.UpdateSourceTrigger> | ||
<Binding.TargetNullValue> | ||
<x:String>TargetNullValue</x:String> | ||
</Binding.TargetNullValue> | ||
<Binding.FallbackValue> | ||
<x:String>FallbackValue</x:String> | ||
</Binding.FallbackValue> | ||
<Binding.Mode> | ||
<BindingMode>OneWay</BindingMode> | ||
</Binding.Mode> | ||
<Binding.RelativeSource> | ||
<RelativeSource> | ||
<RelativeSource.Mode> | ||
<RelativeSourceMode>None</RelativeSourceMode> | ||
</RelativeSource.Mode> | ||
</RelativeSource> | ||
</Binding.RelativeSource> | ||
<Binding.Source> | ||
<x:String>Source</x:String> | ||
</Binding.Source> | ||
</Binding> | ||
</TextBlock.Text> | ||
</TextBlock> | ||
</Grid> | ||
</Page> |
44 changes: 44 additions & 0 deletions
44
...I_Xaml_Data/BindingTests/Controls/Binding_Xaml_Object_With_Xaml_Object_Properties.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,44 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
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; | ||
|
||
// The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=234238 | ||
|
||
namespace Uno.UI.Tests.Windows_UI_Xaml_Data.BindingTests.Controls | ||
{ | ||
/// <summary> | ||
/// An empty page that can be used on its own or navigated to within a Frame. | ||
/// </summary> | ||
public sealed partial class Binding_Xaml_Object_With_Xaml_Object_Properties : Page | ||
{ | ||
public Binding_Xaml_Object_With_Xaml_Object_Properties() | ||
{ | ||
this.InitializeComponent(); | ||
} | ||
} | ||
|
||
public sealed class Binding_Xaml_Object_With_Xaml_Object_Properties_Return_Value_Converter : IValueConverter | ||
{ | ||
public object Convert(object value, Type targetType, object parameter, string language) | ||
{ | ||
return value; | ||
} | ||
|
||
public object ConvertBack(object value, Type targetType, object parameter, string language) | ||
{ | ||
return value; | ||
} | ||
} | ||
} |
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