-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Expand file tree
/
Copy pathImageButtonControlPage.xaml
More file actions
58 lines (55 loc) · 2.92 KB
/
ImageButtonControlPage.xaml
File metadata and controls
58 lines (55 loc) · 2.92 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?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:local="clr-namespace:Maui.Controls.Sample"
x:Class="Maui.Controls.Sample.ImageButtonControlMainPage"
x:DataType="local:ImageButtonViewModel"
Title="ImageButtonControlPage">
<ContentPage.ToolbarItems>
<ToolbarItem Text="Options"
Clicked="NavigateToOptionsPage_Clicked"
AutomationId="Options"/>
</ContentPage.ToolbarItems>
<Grid RowDefinitions="*,Auto,Auto,Auto,Auto"
ColumnDefinitions="*" >
<ImageButton x:Name="TestImageButton"
Source="{Binding Source}"
Aspect="{Binding Aspect}"
BorderColor="{Binding BorderColor}"
BorderWidth="{Binding BorderWidth}"
CornerRadius="{Binding CornerRadius}"
IsEnabled="{Binding IsEnabled}"
Command="{Binding ImageCommand}"
CommandParameter="{Binding CommandParameter}"
Clicked="OnImageButtonClicked"
Pressed="OnImageButtonPressed"
Released="OnImageButtonReleased"
Padding="{Binding Padding}"
IsVisible="{Binding IsVisible}"
Shadow="{Binding Shadow}"
FlowDirection="{Binding FlowDirection}"
WidthRequest="350"
HeightRequest="450"
AutomationId="ImageButtonControl"/>
<Label Grid.Row="1"
Text="{Binding ClickTotal, StringFormat='ImageButton Clicked: {0}'}"
HorizontalOptions="Center"
FontSize="12"
IsVisible="{Binding IsButtonClicked}"/>
<Label Grid.Row="2"
Text="{Binding PressedTotal, StringFormat='ImageButton Pressed: {0}'}"
HorizontalOptions="Center"
FontSize="12"
IsVisible="{Binding IsButtonClicked}"/>
<Label Grid.Row="3"
Text="{Binding ReleasedTotal, StringFormat='ImageButton Released: {0}'}"
HorizontalOptions="Center"
FontSize="12"
IsVisible="{Binding IsButtonClicked}"/>
<Label Grid.Row="4"
Text="{Binding CommandResult}"
HorizontalOptions="Center"
FontSize="12"
IsVisible="{Binding IsButtonClicked}"/>
</Grid>
</ContentPage>