-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainPage.xaml
32 lines (27 loc) · 1.05 KB
/
MainPage.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:vm="clr-namespace:BindingProblem"
x:Class="BindingProblem.MainPage"
x:DataType="{x:Type vm:ViewModel}">
<ScrollView>
<VerticalStackLayout
Spacing="25"
Padding="30,0"
VerticalOptions="Center">
<Label
Text="{Binding Sources}"
HorizontalOptions="Center">
<Label.Triggers>
<DataTrigger TargetType="Label" Binding="{Binding Sources}" Value="">
<Setter Property="Text" Value="Field is Empty"/>
</DataTrigger>
</Label.Triggers>
</Label>
<Button
Text="Click me"
Command="{Binding NextPageCommand}}"
HorizontalOptions="Center" />
</VerticalStackLayout>
</ScrollView>
</ContentPage>