1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?xml version="1.0" encoding="utf-8"?>
- <ContentView xmlns="http://xamarin.com/schemas/2014/forms"
- xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
- xmlns:material="clr-namespace:XF.Material.Forms.UI;assembly=XF.Material"
- xmlns:local="clr-namespace:InABox.Mobile"
- x:Class="InABox.Mobile.MobileDateButton">
- <ContentView.Resources>
- <local:DateTimeFormatter x:Key="DateTimeFormatter" x:Name="_datetimeformatter"/>
- </ContentView.Resources>
- <ContentView.ControlTemplate>
- <ControlTemplate>
- <local:MobileCard
- x:Name="_frame"
- Padding = "{TemplateBinding Padding}"
- IsEnabled="True"
- BackgroundColor="{TemplateBinding ButtonColor}"
- BorderColor="{TemplateBinding BorderColor}"
- Clicked="_frame_OnClicked">
- <local:MobileCard.Triggers>
- <DataTrigger TargetType="local:MobileCard" Binding="{TemplateBinding IsEnabled}" Value="False">
- <Setter Property="BackgroundColor" Value="Silver" />
- </DataTrigger>
- <DataTrigger TargetType="local:MobileCard" Binding="{TemplateBinding IsEnabled}" Value="False">
- <Setter Property="BorderColor" Value="Gray" />
- </DataTrigger>
- </local:MobileCard.Triggers>
-
- <material:MaterialLabel
- x:Name="_label"
- Text="{TemplateBinding Date, Converter={StaticResource DateTimeFormatter}}"
- VerticalOptions="CenterAndExpand"
- HorizontalOptions="CenterAndExpand"
- TypeScale = "{TemplateBinding TypeScale}"
- HorizontalTextAlignment = "Center"
- TextColor="{TemplateBinding TextColor}"
- />
-
- </local:MobileCard>
- </ControlTemplate>
- </ContentView.ControlTemplate>
- </ContentView>
|