maui-linux/Xamarin.Forms.Xaml.UnitTests/XReference.xaml

37 строки
1.2 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<ContentPage
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Xamarin.Forms.Xaml.UnitTests.XReference">
<ContentPage.Resources>
<ResourceDictionary>
<Image x:Name="image" x:Key="imageKey"/>
</ResourceDictionary>
</ContentPage.Resources>
<StackLayout>
<ContentView x:Name="imageView" Content="{x:Reference image}"/>
<Button
x:Name="aButton"
Text="My Button"
Command="{Binding ButtonClickCommand}"
CommandParameter="{x:Reference aButton}"/>
<StackLayout>
<Label x:Name="label0" Text="foo" BindingContext="{x:Reference label1}"/>
<Label x:Name="label1" Text="bar" BindingContext="{x:Reference label0}"/>
<Entry x:Name="entry" Text="{Binding Text, Source={x:Reference label0}}" Placeholder="{Binding Text, Source={x:Reference label1}}"/>
</StackLayout>
<!-- <ListView x:Name="listView">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout>
<Label x:Name="foo" BindingContext="{x:Reference bar}"/>
<Label x:Name="bar" BindingContext="{x:Reference foo}"/>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>-->
</StackLayout>
</ContentPage>