-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainPage.xaml
45 lines (36 loc) · 1.77 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
33
34
35
36
37
38
39
40
41
42
43
44
<?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:mct="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
x:Class="CursorPositionTest.MainPage">
<VerticalStackLayout Spacing="12" VerticalOptions="Start">
<VerticalStackLayout.Resources>
<ResourceDictionary>
<Style TargetType="Entry">
<!--<Setter Property="BackgroundColor" Value="{StaticResource PrimaryColor}" />
<Setter Property="PlaceholderColor" Value="{StaticResource NormalLabelTextColor}" />
<Setter Property="TextColor" Value="{StaticResource DarkLabelTextColor}" />-->
</Style>
</ResourceDictionary>
</VerticalStackLayout.Resources>
<Label Margin="0,10" Text="The SetFocusOnEntryCompletedBehavior is an attached property for entries that allows the user to specify which VisualElement should gain focus after the user completes that entry." />
<Entry
x:Name="Entry1"
mct:SetFocusOnEntryCompletedBehavior.NextElement="{x:Reference Entry2}"
Placeholder="Entry 1 (Tap `Next` or `Enter` or `Return` when finished)"
ReturnType="Next" />
<Entry
x:Name="Entry2"
mct:SetFocusOnEntryCompletedBehavior.NextElement="{x:Reference Entry3}"
Text="My beautiful "
CursorPosition="13"
Placeholder="Entry 2 (Tap `Next` or `Enter` or `Return` on the keyboard when finished)"
ReturnType="Next" />
<Entry
x:Name="Entry3"
mct:SetFocusOnEntryCompletedBehavior.NextElement="{x:Reference Entry4}"
Placeholder="Entry 3 (Tap `Next` or `Enter` or `Return` on the keyboard when finished)"
ReturnType="Next" />
<Entry x:Name="Entry4" Placeholder="Entry 4 (no next entry this time)" />
</VerticalStackLayout>
</ContentPage>