Binding controls to other controls and to classes
This commit is contained in:
@ -3,8 +3,13 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="AdventureWorks.MAUI.Views.UserDetailView"
|
||||
xmlns:partial="clr-namespace:AdventureWorks.MAUI.ViewsPartial"
|
||||
xmlns:converters="clr-namespace:AdventureWorks.MAUI.Converters"
|
||||
Title="User Information">
|
||||
|
||||
<ContentPage.Resources>
|
||||
<converters:InvertedBoolConverter x:Key="invertedBoolean" />
|
||||
</ContentPage.Resources>
|
||||
|
||||
<Border Style="{StaticResource Border.Page}">
|
||||
<ScrollView>
|
||||
<Grid RowDefinitions="Auto, Auto, Auto, Auto, Auto, Auto, Auto, Auto, Auto,Auto, Auto, Auto , Auto"
|
||||
@ -54,7 +59,7 @@
|
||||
</HorizontalStackLayout>
|
||||
<HorizontalStackLayout >
|
||||
<Label Text="Flex Time?"/>
|
||||
<CheckBox IsChecked="False"/>
|
||||
<CheckBox x:Name="FlexTime"/>
|
||||
</HorizontalStackLayout>
|
||||
<HorizontalStackLayout >
|
||||
<Label Text="Health Care?"/>
|
||||
@ -78,7 +83,8 @@
|
||||
Direction="Row">
|
||||
<HorizontalStackLayout>
|
||||
<Label Text="Full-Time"/>
|
||||
<RadioButton IsChecked="True"
|
||||
<RadioButton x:Name="FullTime"
|
||||
IsChecked="True"
|
||||
GroupName="EmployeeType"/>
|
||||
</HorizontalStackLayout>
|
||||
<HorizontalStackLayout>
|
||||
@ -96,7 +102,9 @@
|
||||
Grid.Row="9"/>
|
||||
<TimePicker Grid.Row="9"
|
||||
Grid.Column="1"
|
||||
Time="06:00:00"/>
|
||||
Time="06:00:00"
|
||||
BindingContext="{x:Reference FullTime}"
|
||||
IsEnabled="{Binding IsChecked, Converter={StaticResource invertedBoolean}}"/>
|
||||
|
||||
<Label Text="Phone"
|
||||
Grid.Row="10"/>
|
||||
@ -106,6 +114,8 @@
|
||||
Direction="Row">
|
||||
<HorizontalStackLayout>
|
||||
<Entry MinimumWidthRequest="120"/>
|
||||
</HorizontalStackLayout>
|
||||
<HorizontalStackLayout>
|
||||
<Picker>
|
||||
<Picker.ItemsSource>
|
||||
<x:Array Type="{x:Type x:String}">
|
||||
|
||||
Reference in New Issue
Block a user