summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuslan Zakharov <r.zakharov@samsung.com>2017-10-25 11:19:36 +0300
committerRuslan Zakharov <r.zakharov@samsung.com>2017-10-25 11:19:36 +0300
commit3e7a84e8a98d8cbb8b06957cc331ebc24968346e (patch)
treed8d596785b4e99167503131640ae07c481cac67a
parentfac86e4c976e95cdb3d24f2efd2546c44d17d9c3 (diff)
downloadphone-contacts-3e7a84e8a98d8cbb8b06957cc331ebc24968346e.tar.gz
phone-contacts-3e7a84e8a98d8cbb8b06957cc331ebc24968346e.tar.bz2
phone-contacts-3e7a84e8a98d8cbb8b06957cc331ebc24968346e.zip
Added tizen-utility-kit subtree
Change-Id: Id82a661ca758ccf0027e982abe2be1ba1b0df5a5
-rw-r--r--tizen-utility-kit/.gitignore9
-rw-r--r--tizen-utility-kit/Tizen.UtilityKit.sln22
-rw-r--r--tizen-utility-kit/Tizen.UtilityKit/Controls/ExtendedContentView.xaml26
-rw-r--r--tizen-utility-kit/Tizen.UtilityKit/Controls/ExtendedContentView.xaml.cs98
-rw-r--r--tizen-utility-kit/Tizen.UtilityKit/Controls/ExtendedEntry.xaml22
-rw-r--r--tizen-utility-kit/Tizen.UtilityKit/Controls/ExtendedEntry.xaml.cs64
-rw-r--r--tizen-utility-kit/Tizen.UtilityKit/Controls/ExtendedImage.xaml22
-rw-r--r--tizen-utility-kit/Tizen.UtilityKit/Controls/ExtendedImage.xaml.cs47
-rw-r--r--tizen-utility-kit/Tizen.UtilityKit/Controls/Renderers/ExtendedEntryRenderer.cs86
-rw-r--r--tizen-utility-kit/Tizen.UtilityKit/Controls/Renderers/ExtendedImageRenderer.cs65
-rw-r--r--tizen-utility-kit/Tizen.UtilityKit/Library.cs34
-rw-r--r--tizen-utility-kit/Tizen.UtilityKit/MVVM/BaseModel.cs41
-rw-r--r--tizen-utility-kit/Tizen.UtilityKit/Properties/AssemblyInfo.cs35
-rw-r--r--tizen-utility-kit/Tizen.UtilityKit/Tizen.UtilityKit.Tizen.csproj111
-rw-r--r--tizen-utility-kit/Tizen.UtilityKit/Tizen.UtilityKit.Tizen.project.json28
15 files changed, 710 insertions, 0 deletions
diff --git a/tizen-utility-kit/.gitignore b/tizen-utility-kit/.gitignore
new file mode 100644
index 0000000..577c86c
--- /dev/null
+++ b/tizen-utility-kit/.gitignore
@@ -0,0 +1,9 @@
+*.lock.json
+*.nuget.props
+*.nuget.targets
+*.suo
+.vs
+bin
+Debug
+obj
+Release \ No newline at end of file
diff --git a/tizen-utility-kit/Tizen.UtilityKit.sln b/tizen-utility-kit/Tizen.UtilityKit.sln
new file mode 100644
index 0000000..34ae313
--- /dev/null
+++ b/tizen-utility-kit/Tizen.UtilityKit.sln
@@ -0,0 +1,22 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.26430.13
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tizen.UtilityKit.Tizen", "Tizen.UtilityKit\Tizen.UtilityKit.Tizen.csproj", "{0AF835E7-407D-4AC4-BFC8-EE6D66988800}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {0AF835E7-407D-4AC4-BFC8-EE6D66988800}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0AF835E7-407D-4AC4-BFC8-EE6D66988800}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0AF835E7-407D-4AC4-BFC8-EE6D66988800}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0AF835E7-407D-4AC4-BFC8-EE6D66988800}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/tizen-utility-kit/Tizen.UtilityKit/Controls/ExtendedContentView.xaml b/tizen-utility-kit/Tizen.UtilityKit/Controls/ExtendedContentView.xaml
new file mode 100644
index 0000000..ca0a3e4
--- /dev/null
+++ b/tizen-utility-kit/Tizen.UtilityKit/Controls/ExtendedContentView.xaml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+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.
+-->
+
+<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="Tizen.UtilityKit.Controls.ExtendedContentView"
+ xmlns:Extension="clr-namespace:Tizen.Xamarin.Forms.Extension;assembly=Tizen.Xamarin.Forms.Extension">
+
+ <ContentView.GestureRecognizers>
+ <Extension:LongTapGestureRecognizer TapStarted="OnTap" />
+ </ContentView.GestureRecognizers>
+</ContentView> \ No newline at end of file
diff --git a/tizen-utility-kit/Tizen.UtilityKit/Controls/ExtendedContentView.xaml.cs b/tizen-utility-kit/Tizen.UtilityKit/Controls/ExtendedContentView.xaml.cs
new file mode 100644
index 0000000..d002bc4
--- /dev/null
+++ b/tizen-utility-kit/Tizen.UtilityKit/Controls/ExtendedContentView.xaml.cs
@@ -0,0 +1,98 @@
+/*
+ * 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 Tizen.UtilityKit.Controls
+{
+ /// <summary>
+ /// Extension of Xamarin ContentView, with support:
+ /// Command pattern
+ /// </summary>
+ public partial class ExtendedContentView : ContentView
+ {
+ public ExtendedContentView()
+ {
+ InitializeComponent();
+ }
+
+ /// <summary>
+ /// Gets or sets the command to invoke when this control is tapped
+ /// </summary>
+ public static readonly BindableProperty CommandProperty = BindableProperty.Create(
+ "Command",
+ typeof(Command),
+ typeof(ExtendedContentView),
+ null,
+ propertyChanged: OnCommandChanged);
+
+ public Command Command
+ {
+ get { return (Command)GetValue(CommandProperty); }
+ set { SetValue(CommandProperty, value); }
+ }
+
+ /// <summary>
+ /// Gets or sets the parameter to pass to the Command property
+ /// </summary>
+ public static readonly BindableProperty CommandParameterProperty = BindableProperty.Create(
+ "CommandParameter",
+ typeof(string),
+ typeof(ExtendedContentView),
+ string.Empty);
+
+ public string CommandParameter
+ {
+ get { return (string)GetValue(CommandParameterProperty); }
+ set { SetValue(CommandParameterProperty, value); }
+ }
+
+ protected virtual void OnTap(object sender, EventArgs e)
+ {
+ if (Command != null && Command.CanExecute(CommandParameter))
+ {
+ Command.Execute(CommandParameter);
+ }
+ }
+
+ private static void OnCommandChanged(BindableObject bindable, object oldValue, object newValue)
+ {
+ if (bindable is ExtendedContentView self)
+ {
+ if (oldValue is Command oldCommand)
+ {
+ oldCommand.CanExecuteChanged -= OnCommandCanExecuteChanged;
+ }
+
+ if (newValue is Command newCommand)
+ {
+ self.IsEnabled = newCommand.CanExecute(self.CommandParameter);
+
+ newCommand.CanExecuteChanged += OnCommandCanExecuteChanged;
+ }
+ }
+ }
+
+ private static void OnCommandCanExecuteChanged(object sender, EventArgs e)
+ {
+ if (sender is ExtendedContentView self)
+ {
+ self.IsEnabled = self.Command.CanExecute(self.CommandParameter);
+ }
+ }
+ }
+}
diff --git a/tizen-utility-kit/Tizen.UtilityKit/Controls/ExtendedEntry.xaml b/tizen-utility-kit/Tizen.UtilityKit/Controls/ExtendedEntry.xaml
new file mode 100644
index 0000000..98d6e36
--- /dev/null
+++ b/tizen-utility-kit/Tizen.UtilityKit/Controls/ExtendedEntry.xaml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+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.
+-->
+
+<Entry xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="Tizen.UtilityKit.Controls.ExtendedEntry">
+
+</Entry> \ No newline at end of file
diff --git a/tizen-utility-kit/Tizen.UtilityKit/Controls/ExtendedEntry.xaml.cs b/tizen-utility-kit/Tizen.UtilityKit/Controls/ExtendedEntry.xaml.cs
new file mode 100644
index 0000000..b2ec5d9
--- /dev/null
+++ b/tizen-utility-kit/Tizen.UtilityKit/Controls/ExtendedEntry.xaml.cs
@@ -0,0 +1,64 @@
+/*
+ * 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;
+using Native = Xamarin.Forms.Platform.Tizen.Native;
+
+namespace Tizen.UtilityKit.Controls
+{
+ /// <summary>
+ /// Extension of Xamarin Entry, with support:
+ /// Keyboard type
+ /// Cursor position
+ /// </summary>
+ public partial class ExtendedEntry : Entry
+ {
+ public ExtendedEntry()
+ {
+ InitializeComponent();
+ }
+
+ /// <summary>
+ /// Gets or sets the keyboard type
+ /// </summary>
+ public static readonly BindableProperty KeyboardTypeProperty = BindableProperty.Create(
+ "KeyboardType",
+ typeof(Native.Keyboard),
+ typeof(ExtendedEntry),
+ Native.Keyboard.Normal);
+
+ public Native.Keyboard KeyboardType
+ {
+ get { return (Native.Keyboard)GetValue(KeyboardTypeProperty); }
+ set { SetValue(KeyboardTypeProperty, value); }
+ }
+
+ /// <summary>
+ /// Gets or sets the cursor position
+ /// </summary>
+ public static readonly BindableProperty CursorPositionProperty = BindableProperty.Create(
+ "CursorPosition",
+ typeof(int),
+ typeof(ExtendedEntry),
+ 0);
+
+ public int CursorPosition
+ {
+ get { return (int)GetValue(CursorPositionProperty); }
+ set { SetValue(CursorPositionProperty, value); }
+ }
+ }
+}
diff --git a/tizen-utility-kit/Tizen.UtilityKit/Controls/ExtendedImage.xaml b/tizen-utility-kit/Tizen.UtilityKit/Controls/ExtendedImage.xaml
new file mode 100644
index 0000000..21374e4
--- /dev/null
+++ b/tizen-utility-kit/Tizen.UtilityKit/Controls/ExtendedImage.xaml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+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.
+-->
+
+<Image xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ x:Class="Tizen.UtilityKit.Controls.ExtendedImage">
+
+</Image> \ No newline at end of file
diff --git a/tizen-utility-kit/Tizen.UtilityKit/Controls/ExtendedImage.xaml.cs b/tizen-utility-kit/Tizen.UtilityKit/Controls/ExtendedImage.xaml.cs
new file mode 100644
index 0000000..21cc69b
--- /dev/null
+++ b/tizen-utility-kit/Tizen.UtilityKit/Controls/ExtendedImage.xaml.cs
@@ -0,0 +1,47 @@
+/*
+ * 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 Tizen.UtilityKit.Controls
+{
+ /// <summary>
+ /// Extension of Xamarin Image, with support:
+ /// Color blending
+ /// </summary>
+ public partial class ExtendedImage : Image
+ {
+ public ExtendedImage()
+ {
+ InitializeComponent();
+ }
+
+ /// <summary>
+ /// Gets or sets the color for blending
+ /// </summary>
+ public static readonly BindableProperty BlendingColorProperty = BindableProperty.Create(
+ "BlendingColor",
+ typeof(Color),
+ typeof(ExtendedImage),
+ Color.Transparent);
+
+ public Color BlendingColor
+ {
+ get { return (Color)GetValue(BlendingColorProperty); }
+ set { SetValue(BlendingColorProperty, value); }
+ }
+ }
+}
diff --git a/tizen-utility-kit/Tizen.UtilityKit/Controls/Renderers/ExtendedEntryRenderer.cs b/tizen-utility-kit/Tizen.UtilityKit/Controls/Renderers/ExtendedEntryRenderer.cs
new file mode 100644
index 0000000..c7c3664
--- /dev/null
+++ b/tizen-utility-kit/Tizen.UtilityKit/Controls/Renderers/ExtendedEntryRenderer.cs
@@ -0,0 +1,86 @@
+/*
+ * 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 System.ComponentModel;
+using Tizen.UtilityKit.Controls;
+using Tizen.UtilityKit.Controls.Renderers;
+using Xamarin.Forms;
+using Xamarin.Forms.Platform.Tizen;
+using Native = Xamarin.Forms.Platform.Tizen.Native;
+
+[assembly: ExportRenderer(typeof(ExtendedEntry), typeof(ExtendedEntryRenderer))]
+namespace Tizen.UtilityKit.Controls.Renderers
+{
+ /// <summary>
+ /// A renderer for ExtendedEntry
+ /// </summary>
+ public class ExtendedEntryRenderer : EntryRenderer
+ {
+ private ExtendedEntry xamarinEntry = null;
+ private Native.Entry nativeEntry = null;
+
+ protected override void Dispose(bool disposing)
+ {
+ if (nativeEntry != null)
+ {
+ nativeEntry.CursorChanged -= OnCursorChanged;
+ nativeEntry = null;
+ }
+
+ base.Dispose(disposing);
+ }
+
+ /// <summary cref="EntryRenderer.OnElementChanged(ElementChangedEventArgs{Entry})" />
+ protected override void OnElementChanged(ElementChangedEventArgs<Entry> e)
+ {
+ base.OnElementChanged(e);
+
+ if (xamarinEntry == null)
+ {
+ xamarinEntry = (ExtendedEntry)Element;
+ }
+
+ if (nativeEntry == null)
+ {
+ nativeEntry = Control;
+ nativeEntry.Keyboard = xamarinEntry.KeyboardType;
+ nativeEntry.CursorChanged += OnCursorChanged;
+ }
+ }
+
+ /// <summary cref="EntryRenderer.OnElementPropertyChanged(object, PropertyChangedEventArgs)" />
+ protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
+ {
+ base.OnElementPropertyChanged(sender, e);
+
+ // TODO: This is not working, seems a bug - http://suprem.sec.samsung.net/jira/browse/TCAPI-2528
+ /*
+ if (e.PropertyName == ExtendedEntry.KeyboardTypeProperty.PropertyName)
+ {
+ nativeEntry.Keyboard = xamarinEntry.KeyboardType;
+ }
+ */
+
+ nativeEntry.Keyboard = xamarinEntry.KeyboardType;
+ }
+
+ private void OnCursorChanged(object sender, EventArgs e)
+ {
+ xamarinEntry.CursorPosition = nativeEntry.CursorPosition;
+ }
+ }
+}
diff --git a/tizen-utility-kit/Tizen.UtilityKit/Controls/Renderers/ExtendedImageRenderer.cs b/tizen-utility-kit/Tizen.UtilityKit/Controls/Renderers/ExtendedImageRenderer.cs
new file mode 100644
index 0000000..41105e8
--- /dev/null
+++ b/tizen-utility-kit/Tizen.UtilityKit/Controls/Renderers/ExtendedImageRenderer.cs
@@ -0,0 +1,65 @@
+/*
+ * 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.ComponentModel;
+using Tizen.UtilityKit.Controls;
+using Tizen.UtilityKit.Controls.Renderers;
+using Xamarin.Forms;
+using Xamarin.Forms.Platform.Tizen;
+
+[assembly: ExportRenderer(typeof(ExtendedImage), typeof(ExtendedImageRenderer))]
+namespace Tizen.UtilityKit.Controls.Renderers
+{
+ /// <summary>
+ /// A renderer for ExtendedImage
+ /// </summary>
+ public class ExtendedImageRenderer : ImageRenderer
+ {
+ /// <summary cref="ImageRenderer.OnElementChanged(ElementChangedEventArgs{Image})" />
+ protected override void OnElementChanged(ElementChangedEventArgs<Image> e)
+ {
+ base.OnElementChanged(e);
+
+ if (Control == null || Element == null)
+ {
+ return;
+ }
+
+ ApplyBlendingColor();
+ }
+
+ /// <summary cref="ImageRenderer.OnElementPropertyChanged(object, PropertyChangedEventArgs)" />
+ protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
+ {
+ base.OnElementPropertyChanged(sender, e);
+
+ // TODO: This is not working, seems a bug - http://suprem.sec.samsung.net/jira/browse/TCAPI-2528
+ /*
+ if (e.PropertyName == ExtendedImage.BlendingColorProperty.PropertyName)
+ {
+ ApplyBlendingColor();
+ }
+ */
+
+ ApplyBlendingColor();
+ }
+
+ private void ApplyBlendingColor()
+ {
+ Control.Color = ((ExtendedImage)Element).BlendingColor.ToNative();
+ }
+ }
+}
diff --git a/tizen-utility-kit/Tizen.UtilityKit/Library.cs b/tizen-utility-kit/Tizen.UtilityKit/Library.cs
new file mode 100644
index 0000000..6514468
--- /dev/null
+++ b/tizen-utility-kit/Tizen.UtilityKit/Library.cs
@@ -0,0 +1,34 @@
+/*
+ * 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 Tizen.Xamarin.Forms.Extension.Renderer;
+
+namespace Tizen.UtilityKit
+{
+ /// <summary>
+ /// Start point of Tizen Utility Kit
+ /// </summary>
+ public static class Library
+ {
+ /// <summary>
+ /// Initializes dependent libraries
+ /// </summary>
+ public static void Initialize()
+ {
+ TizenFormsExtension.Init();
+ }
+ }
+}
diff --git a/tizen-utility-kit/Tizen.UtilityKit/MVVM/BaseModel.cs b/tizen-utility-kit/Tizen.UtilityKit/MVVM/BaseModel.cs
new file mode 100644
index 0000000..821884a
--- /dev/null
+++ b/tizen-utility-kit/Tizen.UtilityKit/MVVM/BaseModel.cs
@@ -0,0 +1,41 @@
+/*
+ * 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.ComponentModel;
+using System.Runtime.CompilerServices;
+
+namespace Tizen.UtilityKit.MVVM
+{
+ /// <summary>
+ /// Base class for ViewModels or Models, implements INotifyPropertyChanged interface
+ /// </summary>
+ public abstract class BaseModel : INotifyPropertyChanged
+ {
+ /// <summary>
+ /// Property changed event
+ /// </summary>
+ public event PropertyChangedEventHandler PropertyChanged = delegate { };
+
+ /// <summary>
+ /// Raises PropertyChanged event
+ /// </summary>
+ /// <param name="propertyName">Changed property name</param>
+ protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
+ {
+ PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+}
diff --git a/tizen-utility-kit/Tizen.UtilityKit/Properties/AssemblyInfo.cs b/tizen-utility-kit/Tizen.UtilityKit/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..0886f10
--- /dev/null
+++ b/tizen-utility-kit/Tizen.UtilityKit/Properties/AssemblyInfo.cs
@@ -0,0 +1,35 @@
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Tizen.UtilityKit")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Samsung Electronics Co., Ltd")]
+[assembly: AssemblyProduct("Tizen.UtilityKit")]
+[assembly: AssemblyCopyright("Copyright © 2017 Samsung Electronics Co., Ltd")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("0AF835E7-407D-4AC4-BFC8-EE6D66988800")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/tizen-utility-kit/Tizen.UtilityKit/Tizen.UtilityKit.Tizen.csproj b/tizen-utility-kit/Tizen.UtilityKit/Tizen.UtilityKit.Tizen.csproj
new file mode 100644
index 0000000..1b42d6a
--- /dev/null
+++ b/tizen-utility-kit/Tizen.UtilityKit/Tizen.UtilityKit.Tizen.csproj
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectTypeGuids>{2F98DAC9-6F16-457B-AED7-D43CAC379341};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <ProjectGuid>{0AF835E7-407D-4AC4-BFC8-EE6D66988800}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Tizen.UtilityKit</RootNamespace>
+ <AssemblyName>Tizen.UtilityKit</AssemblyName>
+ <FileAlignment>512</FileAlignment>
+ <DefaultLanguage>en-US</DefaultLanguage>
+ </PropertyGroup>
+ <PropertyGroup>
+ <TargetFrameworkIdentifier>.NETCoreApp</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
+ <NuGetTargetMoniker>.NETCoreApp,Version=v2.0</NuGetTargetMoniker>
+ <BaseNuGetRuntimeIdentifier>tizen.4.0.0-armel</BaseNuGetRuntimeIdentifier>
+ <NoStdLib>true</NoStdLib>
+ <NoWarn>$(NoWarn);1701</NoWarn>
+ <UseVSHostingProcess>false</UseVSHostingProcess>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>portable</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>portable</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+ </PropertyGroup>
+ <PropertyGroup>
+ <StartupObject />
+ </PropertyGroup>
+ <ItemGroup>
+ <None Include="Tizen.UtilityKit.Tizen.project.json" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Controls\ExtendedContentView.xaml.cs">
+ <DependentUpon>ExtendedContentView.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Controls\ExtendedEntry.xaml.cs">
+ <DependentUpon>ExtendedEntry.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Controls\ExtendedImage.xaml.cs">
+ <DependentUpon>ExtendedImage.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Controls\Renderers\ExtendedEntryRenderer.cs" />
+ <Compile Include="Controls\Renderers\ExtendedImageRenderer.cs" />
+ <Compile Include="MVVM\BaseModel.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Library.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="Controls\ExtendedContentView.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Controls\ExtendedEntry.xaml">
+ <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Controls\ExtendedImage.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.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <PropertyGroup>
+ <!-- https://github.com/dotnet/corefxlab/tree/master/samples/NetCoreSample and
+ https://docs.microsoft.com/en-us/dotnet/articles/core/tutorials/target-dotnetcore-with-msbuild
+ -->
+ <!-- We don't use any of MSBuild's resolution logic for resolving the framework, so just set these two
+ properties to any folder that exists to skip the GetReferenceAssemblyPaths task (not target) and
+ to prevent it from outputting a warning (MSB3644).
+ -->
+ <_TargetFrameworkDirectories>$(MSBuildThisFileDirectory)</_TargetFrameworkDirectories>
+ <_FullFrameworkReferenceAssemblyPaths>$(MSBuildThisFileDirectory)</_FullFrameworkReferenceAssemblyPaths>
+ <AutoUnifyAssemblyReferences>true</AutoUnifyAssemblyReferences>
+ </PropertyGroup>
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{2F98DAC9-6F16-457B-AED7-D43CAC379341}" Configuration="Debug|Any CPU">
+ <ProjectCommonFlavorCfg />
+ </FlavorProperties>
+ <FlavorProperties GUID="{2F98DAC9-6F16-457B-AED7-D43CAC379341}" Configuration="Release|Any CPU">
+ <ProjectCommonFlavorCfg />
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+</Project> \ No newline at end of file
diff --git a/tizen-utility-kit/Tizen.UtilityKit/Tizen.UtilityKit.Tizen.project.json b/tizen-utility-kit/Tizen.UtilityKit/Tizen.UtilityKit.Tizen.project.json
new file mode 100644
index 0000000..f63b6a1
--- /dev/null
+++ b/tizen-utility-kit/Tizen.UtilityKit/Tizen.UtilityKit.Tizen.project.json
@@ -0,0 +1,28 @@
+{
+ "buildOptions": {
+ "emitEntryPoint": true,
+ "debugType": "portable",
+ "platform": "AnyCPU",
+ "preserveCompilationContext": true
+ },
+ "dependencies": {
+ "Microsoft.NETCore.App": {
+ "version": "2.0.0-preview1-002111-00"
+ },
+ "Tizen.NET": "3.0.0",
+ "Tizen.Xamarin.Forms.Extension": "2.3.5-r233-006",
+ "Xamarin.Forms": "2.3.5.233-pre1",
+ "Xamarin.Forms.Platform.Tizen": "2.3.5-r233-009"
+ },
+ "runtimes": {
+ "tizen.4.0.0-armel": {}
+ },
+ "frameworks": {
+ "netcoreapp2.0": {
+ "imports": [
+ "portable-net45+wp80+win81+wpa81",
+ "netstandard1.6"
+ ]
+ }
+ }
+} \ No newline at end of file