From: Geunsun, Lee Date: Mon, 17 Apr 2017 01:05:34 +0000 (+0900) Subject: Fix ninepatch for RecentApps X-Git-Tag: submit/tizen/20170808.015446~108 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e6b0258ed9fe20fa1096ff5e96c500a2dada731c;p=profile%2Ftv%2Fapps%2Fdotnet%2Fhome.git Fix ninepatch for RecentApps Change-Id: I8bf40e472810fcb38d93720cd8421c62ff5635ed --- diff --git a/TVHome/TVHome/Controls/NinePatchImage.xaml b/TVHome/TVHome/Controls/NinePatchImage.xaml new file mode 100644 index 0000000..3aa8785 --- /dev/null +++ b/TVHome/TVHome/Controls/NinePatchImage.xaml @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/TVHome/TVHome/Controls/NinePatchImage.xaml.cs b/TVHome/TVHome/Controls/NinePatchImage.xaml.cs new file mode 100644 index 0000000..aea53f5 --- /dev/null +++ b/TVHome/TVHome/Controls/NinePatchImage.xaml.cs @@ -0,0 +1,93 @@ +/* + * 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 +{ + + /// + /// A custom control for displaying nine patch image + /// + [XamlCompilation(XamlCompilationOptions.Compile)] + public partial class NinePatchImage : Image + { + /// + /// Identifies the BorderLeft bindable property + /// + public static readonly BindableProperty BorderLeftProperty = BindableProperty.Create("BorderLeft", typeof(int), typeof(NinePatchImage), default(int)); + + /// + /// Gets or sets left border of NinePatchImage + /// + public int BorderLeft + { + get { return (int)GetValue(BorderLeftProperty); } + set { SetValue(BorderLeftProperty, value); } + } + + /// + /// Identifies the BorderRight bindable property + /// + public static readonly BindableProperty BorderRightProperty = BindableProperty.Create("BorderRight", typeof(int), typeof(NinePatchImage), default(int)); + + /// + /// Gets or sets right border of NinePatchImage + /// + public int BorderRight + { + get { return (int)GetValue(BorderRightProperty); } + set { SetValue(BorderRightProperty, value); } + } + + /// + /// Identifies the BorderTop bindable property + /// + public static readonly BindableProperty BorderTopProperty = BindableProperty.Create("BorderTop", typeof(int), typeof(NinePatchImage), default(int)); + + /// + /// Gets or sets top border of NinePatchImage + /// + public int BorderTop + { + get { return (int)GetValue(BorderTopProperty); } + set { SetValue(BorderTopProperty, value); } + } + + /// + /// Identifies the BorderBottom bindable property + /// + public static readonly BindableProperty BorderBottomProperty = BindableProperty.Create("BorderBottom", typeof(int), typeof(NinePatchImage), default(int)); + + /// + /// Gets or sets bottom border of NinePatchImage + /// + public int BorderBottom + { + get { return (int)GetValue(BorderBottomProperty); } + set { SetValue(BorderBottomProperty, value); } + } + + /// + /// A constructor + /// + public NinePatchImage() + { + InitializeComponent(); + } + } +} diff --git a/TVHome/TVHome/Controls/SubPanelThumbnailButton.xaml b/TVHome/TVHome/Controls/SubPanelThumbnailButton.xaml index a1c36c2..3b22242 100755 --- a/TVHome/TVHome/Controls/SubPanelThumbnailButton.xaml +++ b/TVHome/TVHome/Controls/SubPanelThumbnailButton.xaml @@ -13,9 +13,14 @@ 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}" /> - MainPanelButton.xaml + + NinePatchImage.xaml + SubPanelAllAppsButton.xaml @@ -158,6 +161,12 @@ + + + MSBuild:UpdateDesignTimeXaml + Designer + +