--- /dev/null
+/*
+ * Copyright (c) 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;
+using Xamarin.Forms.Xaml;
+
+namespace TVHome.Controls
+{
+
+ /// <summary>
+ /// A custom control for displaying nine patch image
+ /// </summary>
+ [XamlCompilation(XamlCompilationOptions.Compile)]
+ public partial class NinePatchImage : Image
+ {
+ /// <summary>
+ /// Identifies the BorderLeft bindable property
+ /// </summary>
+ public static readonly BindableProperty BorderLeftProperty = BindableProperty.Create("BorderLeft", typeof(int), typeof(NinePatchImage), default(int));
+
+ /// <summary>
+ /// Gets or sets left border of NinePatchImage
+ /// </summary>
+ public int BorderLeft
+ {
+ get { return (int)GetValue(BorderLeftProperty); }
+ set { SetValue(BorderLeftProperty, value); }
+ }
+
+ /// <summary>
+ /// Identifies the BorderRight bindable property
+ /// </summary>
+ public static readonly BindableProperty BorderRightProperty = BindableProperty.Create("BorderRight", typeof(int), typeof(NinePatchImage), default(int));
+
+ /// <summary>
+ /// Gets or sets right border of NinePatchImage
+ /// </summary>
+ public int BorderRight
+ {
+ get { return (int)GetValue(BorderRightProperty); }
+ set { SetValue(BorderRightProperty, value); }
+ }
+
+ /// <summary>
+ /// Identifies the BorderTop bindable property
+ /// </summary>
+ public static readonly BindableProperty BorderTopProperty = BindableProperty.Create("BorderTop", typeof(int), typeof(NinePatchImage), default(int));
+
+ /// <summary>
+ /// Gets or sets top border of NinePatchImage
+ /// </summary>
+ public int BorderTop
+ {
+ get { return (int)GetValue(BorderTopProperty); }
+ set { SetValue(BorderTopProperty, value); }
+ }
+
+ /// <summary>
+ /// Identifies the BorderBottom bindable property
+ /// </summary>
+ public static readonly BindableProperty BorderBottomProperty = BindableProperty.Create("BorderBottom", typeof(int), typeof(NinePatchImage), default(int));
+
+ /// <summary>
+ /// Gets or sets bottom border of NinePatchImage
+ /// </summary>
+ public int BorderBottom
+ {
+ get { return (int)GetValue(BorderBottomProperty); }
+ set { SetValue(BorderBottomProperty, value); }
+ }
+
+ /// <summary>
+ /// A constructor
+ /// </summary>
+ public NinePatchImage()
+ {
+ InitializeComponent();
+ }
+ }
+}
RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=1}"
RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=1}"
Source="{Binding ScreenshotPath}" />
- <Image x:Name="ThumbnailGradient"
+ <Controls:NinePatchImage x:Name="ThumbnailGradient"
RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Height, Factor=1}"
RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=1}"
+ Aspect="Fill"
+ BorderTop="89"
+ BorderBottom="89"
+ BorderLeft="4"
+ BorderRight="4"
Source="ic_tizen_list_thumbnail_gradient_normal.9.png" />
<Image x:Name="ThumbnailIcon"
RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToView, ElementName=ButtonBox, Property=Width, Factor=0.043}"
<Compile Include="Controls\MainPanelButton.xaml.cs">
<DependentUpon>MainPanelButton.xaml</DependentUpon>
</Compile>
+ <Compile Include="Controls\NinePatchImage.xaml.cs">
+ <DependentUpon>NinePatchImage.xaml</DependentUpon>
+ </Compile>
<Compile Include="Controls\PanelButton.cs" />
<Compile Include="Controls\SubPanelAllAppsButton.xaml.cs">
<DependentUpon>SubPanelAllAppsButton.xaml</DependentUpon>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="Controls\NinePatchImage.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ </ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
<Import Project="..\..\packages\Xamarin.Forms.2.3.4.214-pre5\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets" Condition="Exists('..\..\packages\Xamarin.Forms.2.3.4.214-pre5\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">