-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathTMButton.xaml
More file actions
62 lines (62 loc) · 2.86 KB
/
Copy pathTMButton.xaml
File metadata and controls
62 lines (62 loc) · 2.86 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
59
60
61
62
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Trimble.Modus.Components.TMButton"
x:Name="tmButton"
xmlns:local="clr-namespace:Trimble.Modus.Components"
xmlns:constants="clr-namespace:Trimble.Modus.Components.Constant"
xmlns:converters="clr-namespace:Trimble.Modus.Components.Converters"
HorizontalOptions="Start">
<ContentView.Resources>
<ResourceDictionary>
<!--<ResourceDictionary.MergedDictionaries>
<local:TMButtonStyles></local:TMButtonStyles>
</ResourceDictionary.MergedDictionaries>-->
<converters:ImageNullOrEmptyBoolConverter x:Key="ImageNullOrEmptyBoolConverter" />
<converters:StringNotNullOrEmptyBoolConverter x:Key="StringNotNullOrEmptyBoolConverter" />
</ResourceDictionary>
</ContentView.Resources>
<Border Padding="0"
BindingContext="{x:Reference tmButton}"
x:Name="buttonFrame"
StrokeShape="RoundRectangle 4,4">
<StackLayout x:Name="buttonStackLayout"
Orientation="Horizontal"
HorizontalOptions="Fill"
VerticalOptions="Center"
Padding="0,8">
<StackLayout HorizontalOptions="CenterAndExpand"
VerticalOptions="Center"
Spacing="8"
Orientation="Horizontal">
<!--<local:TMSpinner HorizontalOptions="Center"
x:Name="loadingSpinner"
SpinnerColor="Secondary"
SpinnerType="InDeterminate"
IsVisible="{Binding IsLoading}"/>-->
<Image x:Name="leftIcon"
Source="{Binding LeftIconSource}"
IsVisible="{Binding LeftIconSource,Converter={StaticResource ImageNullOrEmptyBoolConverter}}"
HeightRequest="16"
VerticalOptions="Center"
HorizontalOptions="Center"
MaximumWidthRequest="16"/>
<Label x:Name="buttonLabel"
Text="{Binding Text}"
IsVisible="{Binding Text,Converter={StaticResource StringNotNullOrEmptyBoolConverter}}"
HeightRequest="48"
FontFamily="OpenSansSemibold"
HorizontalOptions="Center"
HorizontalTextAlignment="Center"
VerticalTextAlignment="Center" />
<Image x:Name="rightIcon"
Source="{Binding RightIconSource}"
IsVisible="{Binding RightIconSource,Converter={StaticResource ImageNullOrEmptyBoolConverter}}"
HeightRequest="16"
MaximumWidthRequest="16"
VerticalOptions="Center"
HorizontalOptions="Center" />
</StackLayout>
</StackLayout>
</Border>
</ContentView>