1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?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.MobileTimeButton">
- <ContentView.Resources>
- <local:TimeSpanFormatter x:Key="TimeSpanFormatter"/>
- </ContentView.Resources>
- <ContentView.ControlTemplate>
- <ControlTemplate>
- <material:MaterialCard
- x:Name="_frame"
- CornerRadius = "5"
- Elevation = "0"
- Margin = "2"
- HasShadow = "False"
- Padding = "{TemplateBinding Padding}"
- IsClickable = "True"
- IsEnabled="True"
- BackgroundColor="{TemplateBinding ButtonColor}"
- BorderColor="{TemplateBinding BorderColor}"
- Clicked="_frame_OnClicked">
-
- <material:MaterialLabel
- x:Name="_label"
- Text="{TemplateBinding Time, Converter={StaticResource TimeSpanFormatter}}"
- VerticalOptions="CenterAndExpand"
- HorizontalOptions="CenterAndExpand"
- TypeScale = "{TemplateBinding TypeScale}"
- HorizontalTextAlignment = "Center"
- TextColor="{TemplateBinding TextColor}"
- />
-
- </material:MaterialCard>
- </ControlTemplate>
- </ContentView.ControlTemplate>
- </ContentView>
|