Skip to content

Commit

Permalink
Added a sample for bug #856
Browse files Browse the repository at this point in the history
  • Loading branch information
carldebilly committed Aug 9, 2019
1 parent 94087ae commit 2dbf18a
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/SamplesApp/UITests.Shared/UITests.Shared.projitems
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)Windows_UI_Xaml\Properties\DataContextProperty.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)Windows_UI_Xaml\StyleTests\Style_Inline.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
Expand Down Expand Up @@ -2438,6 +2442,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Windows_UI_Xaml\Localization\Localization_Implicit.xaml.cs">
<DependentUpon>Localization_Implicit.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)Windows_UI_Xaml\Properties\DataContextProperty.xaml.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Windows_UI_Xaml\StyleTests\Style_Inline.xaml.cs">
<DependentUpon>Style_Inline.xaml</DependentUpon>
</Compile>
Expand Down Expand Up @@ -4252,6 +4257,9 @@
<Compile Update="$(MSBuildThisFileDirectory)Windows_UI_Xaml_Controls\Button\Simple_Button_With_CanExecute_Changing.xaml.cs">
<DependentUpon>Simple_Button_With_CanExecute_Changing.xaml</DependentUpon>
</Compile>
<Compile Update="C:\src\Uno2\src\SamplesApp\UITests.Shared\Windows_UI_Xaml\Properties\DataContextProperty.xaml.cs">
<DependentUpon>DataContextProperty.xaml</DependentUpon>
</Compile>
<Compile Update="C:\src\Uno2\src\SamplesApp\UITests.Shared\Windows_UI_Xaml_Controls\Button\Button_Events.xaml.cs">
<DependentUpon>Button_Events.xaml</DependentUpon>
</Compile>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Page
x:Class="UITests.Shared.Windows_UI_Xaml.Properties.DataContextProperty"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

<Page.DataContext>
<x:String>YES It's working!</x:String>
</Page.DataContext>

<Page.Content>
<TextBlock>Is it working: <Run Text="{Binding}" /></TextBlock>
</Page.Content>

</Page>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Windows.UI.Xaml.Controls;
using Uno.UI.Samples.Controls;

namespace UITests.Shared.Windows_UI_Xaml.Properties
{
[SampleControlInfo("XAML", "DataContextProperty")]
public sealed partial class DataContextProperty : Page
{
public DataContextProperty()
{
this.InitializeComponent();
}
}
}

0 comments on commit 2dbf18a

Please sign in to comment.