--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="CallApp.Tizen.Call.Controls.FlatButton"
+ x:Name="This"
+ xmlns:callThemes="clr-namespace:CallApp.Tizen.Call.Themes"
+ xmlns:commonControls="clr-namespace:CallApp.Tizen.Common.Controls"
+ xmlns:commonInput="clr-namespace:CallApp.Tizen.Common.Input"
+ ControlTemplate="{StaticResource FlatButtonControlTemplate}"
+ ImageColor="{StaticResource FlatControlImageNormalColor}"
+ TextColor="{StaticResource FlatControlTextNormalColor}">
+
+ <ContentView.Resources>
+ <ResourceDictionary MergedWith="callThemes:FlatControlTheme">
+ <ControlTemplate x:Key="FlatButtonControlTemplate">
+ <Frame Padding="{TemplateBinding BorderThickness}" OutlineColor="{StaticResource FlatControlBorderColor}">
+ <commonControls:CustomGrid>
+ <commonControls:CustomGrid BackgroundColor="{StaticResource FlatControlBGNormalColor}">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*" />
+ <ColumnDefinition Width="158" />
+ <ColumnDefinition Width="*" />
+ </Grid.ColumnDefinitions>
+
+ <Grid.RowDefinitions>
+ <RowDefinition Height="37" />
+ <RowDefinition Height="62" />
+ <RowDefinition Height="4" />
+ <RowDefinition Height="37" />
+ <RowDefinition Height="48" />
+ </Grid.RowDefinitions>
+
+ <commonControls:CustomImage Grid.Column="1" Grid.Row="1" HorizontalOptions="Center" VerticalOptions="Center"
+ Source="{TemplateBinding Image}" BlendingColor="{TemplateBinding ImageColor}" />
+
+ <Label Grid.Column="1" Grid.Row="3" HorizontalOptions="Center" VerticalOptions="Center" FontSize="19"
+ Text="{TemplateBinding Text}" TextColor="{TemplateBinding TextColor}" />
+
+ <ContentPresenter Grid.Column="1" Grid.Row="4" />
+ </commonControls:CustomGrid>
+
+ <commonControls:CustomGrid>
+ <commonControls:CustomGrid.Triggers>
+ <Trigger TargetType="commonControls:CustomGrid" Property="commonInput:GesturesInput.IsTap" Value="True">
+ <Setter Property="BackgroundColor" Value="{StaticResource FlatControlBGPressColor}" />
+ </Trigger>
+ </commonControls:CustomGrid.Triggers>
+ </commonControls:CustomGrid>
+ </commonControls:CustomGrid>
+ </Frame>
+ </ControlTemplate>
+ </ResourceDictionary>
+ </ContentView.Resources>
+</ContentView>
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using Xamarin.Forms;
+
+namespace CallApp.Tizen.Call.Controls
+{
+ public partial class FlatButton : ContentView
+ {
+ public FlatButton()
+ {
+ InitializeComponent();
+ }
+
+ /// <summary>
+ /// Thickness of content border
+ /// </summary>
+ public static readonly BindableProperty BorderThicknessProperty = BindableProperty.Create(
+ "BorderThickness",
+ typeof(Thickness),
+ typeof(FlatButton),
+ new Thickness(0));
+
+ public Thickness BorderThickness
+ {
+ get
+ {
+ return (Thickness)GetValue(BorderThicknessProperty);
+ }
+ set
+ {
+ SetValue(BorderThicknessProperty, value);
+ }
+ }
+
+ /// <summary>
+ /// Image of content
+ /// </summary>
+ public static readonly BindableProperty ImageProperty = BindableProperty.Create(
+ "Image",
+ typeof(ImageSource),
+ typeof(FlatButton),
+ null);
+
+ public ImageSource Image
+ {
+ get
+ {
+ return (ImageSource)GetValue(ImageProperty);
+ }
+ set
+ {
+ SetValue(ImageProperty, value);
+ }
+ }
+
+ /// <summary>
+ /// Color of Image
+ /// </summary>
+ public static readonly BindableProperty ImageColorProperty = BindableProperty.Create(
+ "ImageColor",
+ typeof(Color),
+ typeof(FlatButton),
+ Color.White);
+
+ public Color ImageColor
+ {
+ get
+ {
+ return (Color)GetValue(ImageColorProperty);
+ }
+ set
+ {
+ SetValue(ImageColorProperty, value);
+ }
+ }
+
+ /// <summary>
+ /// Text of content
+ /// </summary>
+ public static readonly BindableProperty TextProperty = BindableProperty.Create(
+ "Text",
+ typeof(string),
+ typeof(FlatButton),
+ string.Empty);
+
+ public string Text
+ {
+ get
+ {
+ return (string)GetValue(TextProperty);
+ }
+ set
+ {
+ SetValue(TextProperty, value);
+ }
+ }
+
+ /// <summary>
+ /// Color of Text
+ /// </summary>
+ public static readonly BindableProperty TextColorProperty = BindableProperty.Create(
+ "TextColor",
+ typeof(Color),
+ typeof(FlatButton),
+ Color.White);
+
+ public Color TextColor
+ {
+ get
+ {
+ return (Color)GetValue(TextColorProperty);
+ }
+ set
+ {
+ SetValue(TextColorProperty, value);
+ }
+ }
+ }
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<callControls:FlatButton xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="CallApp.Tizen.Call.Controls.FlatCheckbox"
+ x:Name="This"
+ xmlns:callControls="clr-namespace:CallApp.Tizen.Call.Controls"
+ xmlns:callThemes="clr-namespace:CallApp.Tizen.Call.Themes"
+ xmlns:commonControls="clr-namespace:CallApp.Tizen.Common.Controls"
+ xmlns:extension="clr-namespace:Tizen.Xamarin.Forms.Extension;assembly=Tizen.Xamarin.Forms.Extension">
+
+ <callControls:FlatButton.Resources>
+ <ResourceDictionary MergedWith="callThemes:FlatControlTheme" />
+ </callControls:FlatButton.Resources>
+
+ <callControls:FlatButton.GestureRecognizers>
+ <extension:LongTapGestureRecognizer TapStarted="OnTapStart" />
+ </callControls:FlatButton.GestureRecognizers>
+
+ <commonControls:CustomGrid.Triggers>
+ <DataTrigger TargetType="callControls:FlatButton" Binding="{Binding IsChecked, Source={x:Reference This}}" Value="True">
+ <Setter Property="ImageColor" Value="{StaticResource FlatControlImageOnColor}" />
+ <Setter Property="TextColor" Value="{StaticResource FlatControlTextOnColor}" />
+ </DataTrigger>
+ </commonControls:CustomGrid.Triggers>
+
+ <commonControls:CustomGrid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="10" />
+ <RowDefinition Height="6" />
+ <RowDefinition Height="32" />
+ </Grid.RowDefinitions>
+
+ <commonControls:CustomGrid Grid.Row="1" BackgroundColor="{StaticResource FlatControlCheckOffColor}">
+ <commonControls:CustomGrid.Triggers>
+ <DataTrigger TargetType="commonControls:CustomGrid" Binding="{Binding IsChecked, Source={x:Reference This}}" Value="True">
+ <Setter Property="BackgroundColor" Value="{StaticResource FlatControlCheckOnColor}" />
+ </DataTrigger>
+ </commonControls:CustomGrid.Triggers>
+ </commonControls:CustomGrid>
+ </commonControls:CustomGrid>
+</callControls:FlatButton>
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using Xamarin.Forms;
+
+namespace CallApp.Tizen.Call.Controls
+{
+ public partial class FlatCheckbox : FlatButton
+ {
+ public FlatCheckbox()
+ {
+ InitializeComponent();
+ }
+
+ /// <summary>
+ /// Is checked or not
+ /// </summary>
+ public static readonly BindableProperty IsCheckedProperty = BindableProperty.Create(
+ "IsChecked",
+ typeof(bool),
+ typeof(FlatCheckbox),
+ false);
+
+ public bool IsChecked
+ {
+ get
+ {
+ return (bool)GetValue(IsCheckedProperty);
+ }
+ set
+ {
+ SetValue(IsCheckedProperty, value);
+ }
+ }
+
+ private void OnTapStart(object sender, EventArgs e)
+ {
+ IsChecked = !IsChecked;
+ }
+ }
+}
--- /dev/null
+<?xml version="1.0" encoding="utf-8" ?>
+<ResourceDictionary xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="CallApp.Tizen.Call.Themes.CallTheme">
+
+ <Color x:Key="CallBGColor">#FFF7F7F7</Color>
+
+ <Color x:Key="CallButtonCircleRejectBGColor">#4DE02222</Color>
+ <Color x:Key="CallButtonCircleRejectNormalColor">#FFD63131</Color>
+ <Color x:Key="CallButtonCircleRejectPressColor">#FFA32626</Color>
+</ResourceDictionary>
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using Xamarin.Forms;
+
+namespace CallApp.Tizen.Call.Themes
+{
+ public partial class CallTheme : ResourceDictionary
+ {
+ public CallTheme()
+ {
+ InitializeComponent();
+ }
+ }
+}
--- /dev/null
+<?xml version="1.0" encoding="utf-8" ?>
+<ResourceDictionary xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="CallApp.Tizen.Call.Themes.FlatControlTheme">
+
+ <Color x:Key="FlatControlBGNormalColor">#FFFAFAFA</Color>
+ <Color x:Key="FlatControlBGPressColor">#4C000000</Color>
+ <Color x:Key="FlatControlBorderColor">#FFD9D9D9</Color>
+ <Color x:Key="FlatControlCheckOffColor">#4C666666</Color>
+ <Color x:Key="FlatControlCheckOnColor">#FF2EB4C8</Color>
+ <Color x:Key="FlatControlImageDimColor">#4C808080</Color>
+ <Color x:Key="FlatControlImageNormalColor">#FF808080</Color>
+ <Color x:Key="FlatControlImageOnColor">#FF2EB4C8</Color>
+ <Color x:Key="FlatControlTextDimColor">#4C808080</Color>
+ <Color x:Key="FlatControlTextNormalColor">#FF808080</Color>
+ <Color x:Key="FlatControlTextOnColor">#FF2EB4C8</Color>
+</ResourceDictionary>
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright 2017 Samsung Electronics Co., Ltd
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using Xamarin.Forms;
+
+namespace CallApp.Tizen.Call.Themes
+{
+ public partial class FlatControlTheme : ResourceDictionary
+ {
+ public FlatControlTheme()
+ {
+ InitializeComponent();
+ }
+ }
+}
<Compile Include="Call\Controls\AnimatedCircleButton.xaml.cs">
<DependentUpon>AnimatedCircleButton.xaml</DependentUpon>
</Compile>
+ <Compile Include="Call\Controls\FlatButton.xaml.cs">
+ <DependentUpon>FlatButton.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Call\Controls\FlatCheckbox.xaml.cs">
+ <DependentUpon>FlatCheckbox.xaml</DependentUpon>
+ </Compile>
<Compile Include="Call\Controls\Renderers\AnimatedCircleButtonRenderer.cs" />
+ <Compile Include="Call\Themes\CallTheme.xaml.cs">
+ <DependentUpon>CallTheme.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Call\Themes\FlatControlTheme.xaml.cs">
+ <DependentUpon>FlatControlTheme.xaml</DependentUpon>
</Compile>
<Compile Include="Common\Controls\CustomGrid.xaml.cs">
<DependentUpon>CustomGrid.xaml</DependentUpon>
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
</ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="Call\Controls\FlatButton.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Call\Controls\FlatCheckbox.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="Call\Themes\CallTheme.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="Call\Themes\FlatControlTheme.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.