[NUI]Add xaml support for nui and nui xaml test sample (#230)
authorXianbing Teng <xb.teng@samsung.com>
Mon, 14 May 2018 01:58:58 +0000 (20:58 -0500)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Mon, 14 May 2018 01:58:58 +0000 (10:58 +0900)
500 files changed:
src/Tizen.NUI/Tizen.NUI.csproj
src/Tizen.NUI/src/internal/Size.cs
src/Tizen.NUI/src/internal/Type.cs [deleted file]
src/Tizen.NUI/src/internal/Xaml/ApplyPropertiesVisitor.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/CreateValuesVisitor.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/DesignMode.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/ExpandMarkupsVisitor.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/FillResourceDictionariesVisitor.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/HydrationContext.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/IConverterOptions.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/IDictionaryExtensions.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/IExpressionParser.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/IMarkupExtension.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/INativeValueConverterService.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/IProvideParentValues.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/IProvideValueTarget.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/IResourcesLoader.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/IRootObjectProvider.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/IValueConverterProvider.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/IValueProvider.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/IXamlTypeResolver.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/IXmlLineInfoProvider.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/MarkupExpressionParser.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/MarkupExtensionParser.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/ArrayExtension.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/BindingExtension.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/DynamicResourceExtension.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/NullExtension.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/ReferenceExtension.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/StaticExtension.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/StaticResourceExtension.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/StyleSheetExtension.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/TemplateBindingExtension.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/TypeExtension.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/NamescopingVisitor.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/PruneIgnoredNodesVisitor.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/ReflectionExtensions.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/RegisterXNamesVisitor.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/ResourcesLoader.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/RuntimeNamePropertyAttribute.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/TypeArgumentsParser.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/TypeConversionAttribute.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/TypeConversionExtensions.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/ValueConverterProvider.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/VisualStateManager.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/XamlCompilationAttribute.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/XamlFilePathAttribute.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/XamlLoader.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/XamlNode.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/XamlNodeVisitor.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/XamlParseException.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/XamlParser.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/XamlResourceIdAttribute.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/XamlServiceProvider.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/XmlLineInfo.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/XmlName.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/Xaml/XmlnsHelper.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Accelerator.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/AcceleratorTypeConverter.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/ActionSheetArguments.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/AlertArguments.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Application.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/BaseMenuItem.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/BindableObjectExtensions.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/BindablePropertyConverter.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Binding.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/BindingBaseExtensions.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/BindingExpression.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/BindingTypeConverter.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/CollectionSynchronizationCallback.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/CollectionSynchronizationContext.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/ColorTypeConverter.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Configuration.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/ContentPropertyAttribute.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/DataTemplate.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/DataTemplateExtensions.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/DataTemplateSelector.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/DependencyAttribute.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/DependencyFetchTarget.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/DependencyResolver.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/DependencyService.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Device.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/DeviceInfo.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/DeviceOrientation.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/EffectiveFlowDirection.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/EffectiveFlowDirectionExtensions.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/ElementCollection.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/ElementEventArgs.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/EnumerableExtensions.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/EventArg.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/ExportEffectAttribute.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/ExtentsTypeConverter.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/FileImageSource.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/FileImageSourceConverter.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/FlowDirection.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/GestureRecognizer.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/HandlerAttribute.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/IAppIndexingProvider.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/IAppLinkEntry.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/IAppLinks.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/IApplicationController.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/IControlTemplated.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/IElement.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/IElementConfiguration.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/IElementController.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/IExtendedTypeConverter.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/IGestureRecognizer.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/IIsolatedStorageFile.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/ILayout.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/ILayoutController.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/IMenuItemController.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/INativeBindingService.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/INavigationMenuController.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/INavigationPageController.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/IPaddingElement.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/IPageContainer.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/IPageController.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/IPlatformServices.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/IRegisterable.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/IResourceDictionary.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/IResourcesProvider.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/ISystemResourcesProvider.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/ITimer.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/IValueConverter.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/IViewContainer.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/IViewController.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/IVisualElementController.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/ImageSource.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/ImageSourceConverter.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Interactivity/AttachedCollection.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Interactivity/Behavior.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Interactivity/BindingCondition.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Interactivity/Condition.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Interactivity/DataTrigger.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Interactivity/EventTrigger.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Interactivity/IAttachedObject.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Interactivity/MultiCondition.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Interactivity/MultiTrigger.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Interactivity/PropertyCondition.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Interactivity/Trigger.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Interactivity/TriggerAction.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Interactivity/TriggerBase.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Internals/DynamicResource.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Internals/IDataTemplate.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Internals/IDeserializer.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Internals/IDynamicResourceHandler.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Internals/INameScope.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Internals/INamescopeProvider.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Internals/InvalidationTrigger.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Internals/NameScope.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Internals/ResourceLoader.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Internals/Ticker.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Internals/TypedBinding.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Internals/XmlnsDefinitionAttribute.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/InvalidNavigationException.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/InvalidationEventArgs.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Layout.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/LayoutAlignment.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/LayoutExpandFlag.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/LayoutOptions.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/LayoutOptionsConverter.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/ListStringTypeConverter.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/MenuItem.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/MessagingCenter.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/ModalEventArgs.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/ModalPoppedEventArgs.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/ModalPoppingEventArgs.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/ModalPushedEventArgs.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/ModalPushingEventArgs.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/NUIConstantExtension.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/NameScopeExtensions.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/NamedSize.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/NavigationMenu.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/NavigationModel.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/NullEffect.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/ObservableWrapper.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/OnIdiom.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/OnPlatform.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/PaddingElement.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/ParameterAttribute.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/PlatformConfigurationRegistry.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/PositionTypeConverter.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/RectangleTypeConverter.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Registrar.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/RenderWithAttribute.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/ResolutionGroupNameAttribute.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/ResourceDictionary.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/ResourcesChangedEventArgs.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/ResourcesExtensions.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/RotationTypeConverter.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/RoutingEffect.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Setter.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/SizeTypeConverter.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/Style.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/CharExtensions.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/CssReader.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/IStyle.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/IStyleSelectable.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/Selector.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/Style.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/StylePropertyAttribute.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/StyleSheet.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/StyleSheetExtensions.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/StyleSheetServiceProvider.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/TextReaderExtensions.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/SynchronizedList.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/TargetIdiom.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/TargetPlatform.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/TemplateBinding.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/TemplateUtilities.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/ThicknessTypeConverter.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/ToolbarItem.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/ToolbarItemEventArgs.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/ToolbarItemOrder.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/TrackableCollection.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/TypeConverter.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/TypeConverterAttribute.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/TypeTypeConverter.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/UriTypeConverter.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/VectorTypeConverter.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/XamlBinding/WeakEventManager.cs [new file with mode: 0755]
src/Tizen.NUI/src/public/BaseComponents/TableView.cs
src/Tizen.NUI/src/public/BaseHandle.cs
src/Tizen.NUI/src/public/Color.cs
src/Tizen.NUI/src/public/Extents.cs [changed mode: 0644->0755]
src/Tizen.NUI/src/public/FocusManager.cs
src/Tizen.NUI/src/public/Position.cs
src/Tizen.NUI/src/public/Position2D.cs
src/Tizen.NUI/src/public/Property.cs
src/Tizen.NUI/src/public/Rectangle.cs
src/Tizen.NUI/src/public/RelativeVector2.cs
src/Tizen.NUI/src/public/RelativeVector3.cs
src/Tizen.NUI/src/public/RelativeVector4.cs
src/Tizen.NUI/src/public/Rotation.cs
src/Tizen.NUI/src/public/Size2D.cs
src/Tizen.NUI/src/public/Vector2.cs
src/Tizen.NUI/src/public/Vector3.cs
src/Tizen.NUI/src/public/Vector4.cs
src/Tizen.NUI/src/public/Xaml/ViewExtensions.cs [new file with mode: 0755]
src/Tizen.NUI/src/public/XamlBinding/BindableObject.cs [new file with mode: 0755]
src/Tizen.NUI/src/public/XamlBinding/BindableProperty.cs [new file with mode: 0755]
src/Tizen.NUI/src/public/XamlBinding/BindablePropertyKey.cs [new file with mode: 0755]
src/Tizen.NUI/src/public/XamlBinding/BindingBase.cs [new file with mode: 0755]
src/Tizen.NUI/src/public/XamlBinding/BindingMode.cs [new file with mode: 0755]
src/Tizen.NUI/src/public/XamlBinding/Command.cs [new file with mode: 0755]
src/Tizen.NUI/src/public/XamlBinding/ContentPage.cs [new file with mode: 0755]
src/Tizen.NUI/src/public/XamlBinding/ControlTemplate.cs [new file with mode: 0755]
src/Tizen.NUI/src/public/XamlBinding/Effect.cs [new file with mode: 0755]
src/Tizen.NUI/src/public/XamlBinding/Element.cs [new file with mode: 0755]
src/Tizen.NUI/src/public/XamlBinding/ElementTemplate.cs [new file with mode: 0755]
src/Tizen.NUI/src/public/XamlBinding/IConfigElement.cs [new file with mode: 0755]
src/Tizen.NUI/src/public/XamlBinding/IConfigPlatform.cs [new file with mode: 0755]
src/Tizen.NUI/src/public/XamlBinding/IEffectControlProvider.cs [new file with mode: 0755]
src/Tizen.NUI/src/public/XamlBinding/INavigation.cs [new file with mode: 0755]
src/Tizen.NUI/src/public/XamlBinding/IPlatform.cs [new file with mode: 0755]
src/Tizen.NUI/src/public/XamlBinding/IPlatformElementConfiguration.cs [new file with mode: 0755]
src/Tizen.NUI/src/public/XamlBinding/NavigationEventArgs.cs [new file with mode: 0755]
src/Tizen.NUI/src/public/XamlBinding/NavigationPage.cs [new file with mode: 0755]
src/Tizen.NUI/src/public/XamlBinding/NavigationProxy.cs [new file with mode: 0755]
src/Tizen.NUI/src/public/XamlBinding/NavigationRequestedEventArgs.cs [new file with mode: 0755]
src/Tizen.NUI/src/public/XamlBinding/Page.cs [new file with mode: 0755]
src/Tizen.NUI/src/public/XamlBinding/SizeRequest.cs [new file with mode: 0755]
src/Tizen.NUI/src/public/XamlBinding/TemplatedPage.cs [new file with mode: 0755]
src/Tizen.NUI/src/public/XamlBinding/Thickness.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample.sln [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/NUIXAMLTestSample.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/NUIXAMLTestSample.csproj [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/TempTest/TempPage.xaml [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/TempTest/TempPage.xaml.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/TempTest/TempTest.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/TestAmbient/AmbientDuoPage.xaml [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/TestAmbient/AmbientDuoPage.xaml.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/TestAmbient/AmbientMonoPage.xaml [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/TestAmbient/AmbientMonoPage.xaml.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/TestAmbient/AmbientMultiPage.xaml [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/TestAmbient/AmbientMultiPage.xaml.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/TestAmbient/AmbientMultiPage2.xaml [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/TestAmbient/AmbientMultiPage2.xaml.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/TestAmbient/AmbientMultiPage3.xaml [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/TestAmbient/AmbientMultiPage3.xaml.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/TestAmbient/AmbientScreenUXControl.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/TestAmbient/BixbyFinancePage.xaml [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/TestAmbient/BixbyFinancePage.xaml.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/TestAmbient/BixbyWidgetPage.xaml [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/TestAmbient/BixbyWidgetPage.xaml.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/TestAmbient/Finance.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/TestAmbient/OOBE.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/TestAmbient/SearchPage.xaml [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/TestAmbient/SearchPage.xaml.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/TestAmbient/TestAmbient.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/TestAmbient/WeatherPage.xaml [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/TestAmbient/WeatherPage.xaml.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/TestDetailApps/AppDetailPage.xaml [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/TestDetailApps/AppDetailPage.xaml.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/TestDetailApps/TestDetailApps.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/TestMyContents/MediaHubPage.xaml [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/TestMyContents/MediaHubPage.xaml.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/TestMyContents/TestMyContents.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/UTC/TestButton/ButtonTestPage.xaml [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/UTC/TestButton/ButtonTestPage.xaml.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/UTC/TestButton/TestButton.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/UTC/TestFlexContainer/FlexContainerPage.xaml [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/UTC/TestFlexContainer/FlexContainerPage.xaml.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/UTC/TestFlexContainer/TestFlexContainer.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/UTC/TestImageView/ImageTestPage.xaml [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/UTC/TestImageView/ImageTestPage.xaml.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/UTC/TestImageView/TestImageView.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/UTC/TestScrollBar/ScrollBarTestPage.xaml [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/UTC/TestScrollBar/ScrollBarTestPage.xaml.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/UTC/TestScrollBar/TestScrollBar.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/UTC/TestSlider/SliderTestPage.xaml [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/UTC/TestSlider/SliderTestPage.xaml.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/UTC/TestSlider/TestSlider.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/UTC/TestTableView/TableTestPage.xaml [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/UTC/TestTableView/TableTestPage.xaml.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/UTC/TestTableView/TestTableView.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/UTC/TestTextEditor/TestTextEditor.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/UTC/TestTextEditor/TextEditorTestPage.xaml [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/UTC/TestTextEditor/TextEditorTestPage.xaml.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/UTC/TestTextField/TestTextField.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/UTC/TestTextField/TextFieldTestPage.xaml [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/UTC/TestTextField/TextFieldTestPage.xaml.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/UTC/TestTextLabel/TestTextLabel.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/UTC/TestTextLabel/TextLabelTestPage.xaml [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/UTC/TestTextLabel/TextLabelTestPage.xaml.cs [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/00_popup_bg.9.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/Kid1.svg [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/Mail.svg [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/World.svg [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/bg_textbox.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/bg_textbox_w.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_00.jpg [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_01.jpg [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_02.jpg [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_03.jpg [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_04.jpg [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_05.jpg [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_06.jpg [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_07.jpg [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_08.jpg [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_09.jpg [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_d_1.jpg [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_d_2.jpg [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_m_1.jpg [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_1.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_10.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_11.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_12.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_2.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_3.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_4.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_5.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_6.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_7.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_8.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_9.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_1.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_10.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_11.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_12.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_2.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_3.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_4.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_5.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_6.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_7.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_8.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_9.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_0.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_1.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_2.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_3.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_4.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_5.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_6.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_7.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_8.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_9.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_nd.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_rd.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_st.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_th.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_0.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_1.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_2.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_3.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_4.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_5.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_6.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_7.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_8.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_9.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_nd.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_rd.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_st.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_th.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/photoboard_img_bg_01.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/photoboard_img_bg_02.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/photoboard_img_bg_03.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/photoboard_img_bg_04.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/photoduo_img_bg_01_no9patch.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_0.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_1.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_2.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_3.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_4.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_5.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_6.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_7.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_8.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_9.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_0.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_1.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_2.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_3.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_4.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_5.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_6.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_7.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_8.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_9.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/application-icon-0.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/arrow.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/background-blocks.jpg [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/bixby/airbnb_icon.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/bixby/bg.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/bixby/btn_focused_bg.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/bixby/btn_normal_bg.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/bixby/card1.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/bixby/card2.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/bixby/card3.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/bixby/date_weather.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/bixby/finance_content.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/bixby/finance_icon.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/bixby/health_content.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/bixby/health_icon.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/bixby/map_icon.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/bixby/map_widget.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/bixby/map_widget1.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/bixby/time.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/bixby/traffic_content.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/c_basic_button_white_bg_normal.9.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/c_imageitem_white_bg_normal_9patch.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/dali-logo-anim.gif [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/dog-anim.gif [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/echo.gif [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/gallery-0.jpg [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/gallery-1.jpg [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/gallery-2.jpg [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/gallery-3.jpg [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/gallery-4.jpg [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/gallery-5.jpg [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/gallery-small-43.jpg [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/image-1.jpg [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/image-2.jpg [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/image-3.jpg [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/mc_bg.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/mc_folder.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/mc_folder_thumb_default.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/mc_shadow_titlebar.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/mc_title_bg.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/not_yet_sign.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/r_highlight_bg_focus_9patch.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/r_icon_xs_star.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/star-dim.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/star-highlight.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/star-mod.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/store_default_bg_01.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/weather.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/weather/1.bmp [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/weather/2.bmp [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/weather/3.bmp [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/weather/4.bmp [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/weather/bg.bmp [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/weather/current.bmp [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/weather/left.bmp [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/weather/up.bmp [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/weather_ss1.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/weather_ss2.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/weather_ss3.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb01.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb010.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb011.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb012.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb013.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb014.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb015.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb016.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb017.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb018.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb02.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb03.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb04.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb05.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb06.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb07.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb08.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb09.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/shared/res/NUIXAMLTestSample.png [new file with mode: 0755]
test/NUITestSample/NUIXAMLTestSample/tizen-manifest.xml [new file with mode: 0755]

index 6976f5f..2ef9a3c 100755 (executable)
@@ -5,6 +5,13 @@
   </PropertyGroup>
 
   <ItemGroup>
+    <PackageReference Include="Microsoft.CSharp" Version="4.3.0" />
+    <PackageReference Include="System.Reflection" Version="4.3.0" />
+    <PackageReference Include="System.Reflection.TypeExtensions" Version="4.3.0" />
+    <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="1.1.0" />
+  </ItemGroup>
+
+  <ItemGroup>
     <ProjectReference Include="..\Tizen.Applications.Common\Tizen.Applications.Common.csproj" />
     <ProjectReference Include="..\Tizen.System.SystemSettings\Tizen.System.SystemSettings.csproj" />
   </ItemGroup>
index 6218824..005f5b9 100755 (executable)
@@ -17,6 +17,7 @@
 
 using System;
 using System.ComponentModel;
+using Tizen.NUI.Binding;
 
 namespace Tizen.NUI
 {
@@ -26,6 +27,7 @@ namespace Tizen.NUI
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
     [Obsolete("Please do not use! This will be deprecated! Please use Size2D instead!")]
+    [Tizen.NUI.Binding.TypeConverter(typeof(SizeTypeConverter))]
     [EditorBrowsable(EditorBrowsableState.Never)]
     public class Size : global::System.IDisposable
     {
diff --git a/src/Tizen.NUI/src/internal/Type.cs b/src/Tizen.NUI/src/internal/Type.cs
deleted file mode 100755 (executable)
index 42184dd..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright(c) 2017 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * 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.
- *
- */
-
-namespace Tizen.NUI
-{
-    /// <summary>
-    /// An enum of Device Class types.
-    /// </summary>
-    /// <since_tizen> 3 </since_tizen>
-    public enum Type
-    {
-        /// <summary>
-        /// Not a device.
-        /// </summary>
-        /// <since_tizen> 3 </since_tizen>
-        NONE,
-        /// <summary>
-        /// The user/seat (the user themselves).
-        /// </summary>
-        /// <since_tizen> 3 </since_tizen>
-        USER,
-        /// <summary>
-        /// A regular keyboard, numberpad or attached buttons.
-        /// </summary>
-        /// <since_tizen> 3 </since_tizen>
-        KEYBOARD,
-        /// <summary>
-        /// A mouse, trackball or touchpad relative motion device.
-        /// </summary>
-        /// <since_tizen> 3 </since_tizen>
-        MOUSE,
-        /// <summary>
-        /// A touchscreen with fingers or stylus.
-        /// </summary>
-        /// <since_tizen> 3 </since_tizen>
-        TOUCH,
-        /// <summary>
-        /// A special pen device.
-        /// </summary>
-        /// <since_tizen> 3 </since_tizen>
-        PEN,
-        /// <summary>
-        /// A pointing device based on laser, infrared or similar technology.
-        /// </summary>
-        /// <since_tizen> 3 </since_tizen>
-        POINTER,
-        /// <summary>
-        /// A gamepad controller or joystick.
-        /// </summary>
-        /// <since_tizen> 3 </since_tizen>
-        GAMEPAD
-    }
-
-}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/ApplyPropertiesVisitor.cs b/src/Tizen.NUI/src/internal/Xaml/ApplyPropertiesVisitor.cs
new file mode 100755 (executable)
index 0000000..2190486
--- /dev/null
@@ -0,0 +1,701 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using System.Xml;
+using Tizen.NUI.Internals;
+using Tizen.NUI.Binding;
+using Tizen.NUI.StyleSheets;
+
+using static System.String;
+
+namespace Tizen.NUI.Xaml
+{
+       class ApplyPropertiesVisitor : IXamlNodeVisitor
+       {
+               public static readonly IList<XmlName> Skips = new List<XmlName> {
+                       XmlName.xKey,
+                       XmlName.xTypeArguments,
+                       XmlName.xArguments,
+                       XmlName.xFactoryMethod,
+                       XmlName.xName,
+                       XmlName.xDataType
+               };
+
+               public ApplyPropertiesVisitor(HydrationContext context, bool stopOnResourceDictionary = false)
+               {
+                       Context = context;
+                       StopOnResourceDictionary = stopOnResourceDictionary;
+               }
+
+               Dictionary<INode, object> Values => Context.Values;
+               HydrationContext Context { get; }
+
+               public TreeVisitingMode VisitingMode => TreeVisitingMode.BottomUp;
+               public bool StopOnDataTemplate => true;
+               public bool StopOnResourceDictionary { get; }
+               public bool VisitNodeOnDataTemplate => true;
+               public bool SkipChildren(INode node, INode parentNode) => false;
+
+               public void Visit(ValueNode node, INode parentNode)
+               {
+                       var parentElement = parentNode as IElementNode;
+                       var value = Values [node];
+                       var source = Values [parentNode];
+                       XmlName propertyName;
+
+                       if (TryGetPropertyName(node, parentNode, out propertyName)) {
+                               if (TrySetRuntimeName(propertyName, source, value, node))
+                                       return;
+                               if (Skips.Contains(propertyName))
+                                       return;
+                               if (parentElement.SkipProperties.Contains(propertyName))
+                                       return;
+                               if (propertyName.Equals(XamlParser.McUri, "Ignorable"))
+                                       return;
+                               SetPropertyValue(source, propertyName, value, Context.RootElement, node, Context, node);
+                       } else if (IsCollectionItem(node, parentNode) && parentNode is IElementNode) {
+                               // Collection element, implicit content, or implicit collection element.
+                               var contentProperty = GetContentPropertyName(Context.Types[parentElement].GetTypeInfo());
+                               if (contentProperty != null) {
+                                       var name = new XmlName(((ElementNode)parentNode).NamespaceURI, contentProperty);
+                                       if (Skips.Contains(name))
+                                               return;
+                                       if (parentElement.SkipProperties.Contains(propertyName))
+                                               return;
+                                       SetPropertyValue(source, name, value, Context.RootElement, node, Context, node);
+                               }
+                       }
+               }
+
+               public void Visit(MarkupNode node, INode parentNode)
+               {
+               }
+
+               public void Visit(ElementNode node, INode parentNode)
+               {
+                       XmlName propertyName;
+                       if (TryGetPropertyName(node, parentNode, out propertyName) && propertyName == XmlName._CreateContent) {
+                               var s0 = Values[parentNode];
+                               if (s0 is ElementTemplate) {
+                                       SetTemplate(s0 as ElementTemplate, node);
+                                       return;
+                               }
+                       }
+
+                       var parentElement = parentNode as IElementNode;
+                       propertyName = XmlName.Empty;
+
+                       //Simplify ListNodes with single elements
+                       var pList = parentNode as ListNode;
+                       if (pList != null && pList.CollectionItems.Count == 1) {
+                               propertyName = pList.XmlName;
+                               parentNode = parentNode.Parent;
+                               parentElement = parentNode as IElementNode;
+                       }
+
+                       var value = Values[node];
+
+                       if (propertyName != XmlName.Empty || TryGetPropertyName(node, parentNode, out propertyName)) {
+                               if (Skips.Contains(propertyName))
+                                       return;
+                               if (parentElement.SkipProperties.Contains(propertyName))
+                                       return;
+
+                               var source = Values[parentNode];
+                               ProvideValue(ref value, node, source, propertyName);
+                               SetPropertyValue(source, propertyName, value, Context.RootElement, node, Context, node);
+                       }
+                       else if (IsCollectionItem(node, parentNode) && parentNode is IElementNode) {
+                               var source = Values[parentNode];
+                               ProvideValue(ref value, node, source, XmlName.Empty);
+                               string contentProperty;
+                               Exception xpe = null;
+                               var xKey = node.Properties.ContainsKey(XmlName.xKey) ? ((ValueNode)node.Properties[XmlName.xKey]).Value as string : null;
+
+                               //ResourceDictionary
+                               if (xpe == null && TryAddToResourceDictionary(source as ResourceDictionary, value, xKey, node, out xpe))
+                                       return;
+
+                               // Collection element, implicit content, or implicit collection element.
+                               if (xpe == null && typeof(IEnumerable).IsAssignableFrom(Context.Types[parentElement]) && Context.Types[parentElement].GetRuntimeMethods().Any(mi => mi.Name == "Add" && mi.GetParameters().Length == 1)) {
+                                       var addMethod =
+                                               Context.Types[parentElement].GetRuntimeMethods().First(mi => mi.Name == "Add" && mi.GetParameters().Length == 1);
+
+                                       addMethod.Invoke(source, new[] { value });
+                                       return;
+                               }
+                               if (xpe == null && (contentProperty = GetContentPropertyName(Context.Types[parentElement].GetTypeInfo())) != null) {
+                                       var name = new XmlName(node.NamespaceURI, contentProperty);
+                                       if (Skips.Contains(name))
+                                               return;
+                                       if (parentElement.SkipProperties.Contains(propertyName))
+                                               return;
+
+                                       SetPropertyValue(source, name, value, Context.RootElement, node, Context, node);
+                                       return;
+                               }
+                               if (xpe == null && Context.Types[parentElement].GetRuntimeMethods().Any(mi => mi.Name == "Add" && mi.GetParameters().Length == 1))
+                               {
+                                       //if there are similar parameters in the function, this will exist issue.
+                                       var addMethod = Context.Types[parentElement].GetRuntimeMethods().First(mi => mi.Name == "Add" && mi.GetParameters().Length == 1);
+                                       if(addMethod != null) addMethod.Invoke(source, new[] { value });
+                                       return;
+                               }
+                               xpe = xpe ?? new XamlParseException($"Can not set the content of {((IElementNode)parentNode).XmlType.Name} as it doesn't have a ContentPropertyAttribute", node);
+                               if (Context.ExceptionHandler != null)
+                                       Context.ExceptionHandler(xpe);
+                               throw xpe;
+                       }
+                       else if (IsCollectionItem(node, parentNode) && parentNode is ListNode) {
+                               var source = Values[parentNode.Parent];
+                               ProvideValue(ref value, node, source, XmlName.Empty);
+                               var parentList = (ListNode)parentNode;
+                               if (Skips.Contains(parentList.XmlName))
+                                       return;
+                               Exception xpe = null;
+                               var xKey = node.Properties.ContainsKey(XmlName.xKey) ? ((ValueNode)node.Properties[XmlName.xKey]).Value as string : null;
+
+                               object _;
+                               var collection = GetPropertyValue(source, parentList.XmlName, Context, parentList, out _) as IEnumerable;
+                               if (collection == null)
+                                       xpe = new XamlParseException($"Property {parentList.XmlName.LocalName} is null or is not IEnumerable", node);
+
+                               if (xpe == null && TryAddToResourceDictionary(collection as ResourceDictionary, value, xKey, node, out xpe))
+                                       return;
+
+                               MethodInfo addMethod;
+                               if (xpe == null && (addMethod = collection.GetType().GetRuntimeMethods().First(mi => mi.Name == "Add" && mi.GetParameters().Length == 1)) != null) {
+                                       addMethod.Invoke(collection, new[] { Values[node] });
+                                       return;
+                               }
+                               xpe = xpe ?? new XamlParseException($"Value of {parentList.XmlName.LocalName} does not have a Add() method", node);
+                               if (Context.ExceptionHandler != null)
+                                       Context.ExceptionHandler(xpe);
+                               else
+                                       throw xpe;
+                       }
+               }
+
+               
+
+               public void Visit(RootNode node, INode parentNode)
+               {
+               }
+
+               public void Visit(ListNode node, INode parentNode)
+               {
+               }
+
+               public static bool TryGetPropertyName(INode node, INode parentNode, out XmlName name)
+               {
+                       name = default(XmlName);
+                       var parentElement = parentNode as IElementNode;
+                       if (parentElement == null)
+                               return false;
+                       foreach (var kvp in parentElement.Properties) {
+                               if (kvp.Value != node)
+                                       continue;
+                               name = kvp.Key;
+                               return true;
+                       }
+                       return false;
+               }
+
+               internal static bool IsCollectionItem(INode node, INode parentNode)
+               {
+                       var parentList = parentNode as IListNode;
+                       if (parentList == null)
+                               return false;
+                       return parentList.CollectionItems.Contains(node);
+               }
+
+               internal static string GetContentPropertyName(System.Reflection.TypeInfo typeInfo)
+               {
+                       while (typeInfo != null) {
+                               var propName = GetContentPropertyName(typeInfo.CustomAttributes);
+                               if (propName != null)
+                                       return propName;
+                               typeInfo = typeInfo?.BaseType?.GetTypeInfo();
+                       }
+                       return null;
+               }
+
+               void ProvideValue(ref object value, ElementNode node, object source, XmlName propertyName)
+               {
+                       var markupExtension = value as IMarkupExtension;
+                       var valueProvider = value as IValueProvider;
+
+                       if (markupExtension == null && valueProvider == null)
+                               return;
+
+                       XamlServiceProvider serviceProvider = null;
+                       if (value.GetType().GetTypeInfo().GetCustomAttribute<AcceptEmptyServiceProviderAttribute>() == null)
+                               serviceProvider = new XamlServiceProvider(node, Context);
+
+                       if (serviceProvider != null && propertyName != XmlName.Empty)
+                               ((XamlValueTargetProvider)serviceProvider.IProvideValueTarget).TargetProperty = GetTargetProperty(source, propertyName, Context, node);
+
+                       if (markupExtension != null)
+                               value = markupExtension.ProvideValue(serviceProvider);
+                       else if (valueProvider != null)
+                               value = valueProvider.ProvideValue(serviceProvider);
+               }
+
+               static string GetContentPropertyName(IEnumerable<CustomAttributeData> attributes)
+               {
+                       var contentAttribute =
+                               attributes.FirstOrDefault(cad => ContentPropertyAttribute.ContentPropertyTypes.Contains(cad.AttributeType.FullName));
+                       if (contentAttribute == null || contentAttribute.ConstructorArguments.Count != 1)
+                               return null;
+                       if (contentAttribute.ConstructorArguments [0].ArgumentType == typeof(string))
+                               return (string)contentAttribute.ConstructorArguments [0].Value;
+                       return null;
+               }
+
+               static bool GetRealNameAndType(ref Type elementType, string namespaceURI, ref string localname,
+                       HydrationContext context, IXmlLineInfo lineInfo)
+               {
+                       var dotIdx = localname.IndexOf('.');
+                       if (dotIdx > 0) {
+                               var typename = localname.Substring(0, dotIdx);
+                               localname = localname.Substring(dotIdx + 1);
+                               XamlParseException xpe;
+                               elementType = XamlParser.GetElementType(new XmlType(namespaceURI, typename, null), lineInfo,
+                                       context.RootElement.GetType().GetTypeInfo().Assembly, out xpe);
+
+                               if (xpe != null)
+                                       throw xpe;
+                               return true;
+                       }
+                       return false;
+               }
+
+               static BindableProperty GetBindableProperty(Type elementType, string localName, IXmlLineInfo lineInfo,
+                       bool throwOnError = false)
+               {
+#if NETSTANDARD1_0
+                       var bindableFieldInfo = elementType.GetFields().FirstOrDefault(fi => fi.Name == localName + "Property");
+#else
+                       var bindableFieldInfo = elementType.GetFields(BindingFlags.Static | BindingFlags.Public|BindingFlags.FlattenHierarchy).FirstOrDefault(fi => fi.Name == localName + "Property");
+#endif
+                       Exception exception = null;
+                       if (exception == null && bindableFieldInfo == null) {
+                               exception =
+                                       new XamlParseException(
+                                               Format("BindableProperty {0} not found on {1}", localName + "Property", elementType.Name), lineInfo);
+                       }
+
+                       if (exception == null)
+                               return bindableFieldInfo.GetValue(null) as BindableProperty;
+                       if (throwOnError)
+                               throw exception;
+                       return null;
+               }
+
+               static object GetTargetProperty(object xamlelement, XmlName propertyName, HydrationContext context, IXmlLineInfo lineInfo)
+               {
+                       var localName = propertyName.LocalName;
+                       //If it's an attached BP, update elementType and propertyName
+                       var bpOwnerType = xamlelement.GetType();
+                       GetRealNameAndType(ref bpOwnerType, propertyName.NamespaceURI, ref localName, context, lineInfo);
+                       var property = GetBindableProperty(bpOwnerType, localName, lineInfo, false);
+
+                       if (property != null)
+                               return property;
+                       
+                       var elementType = xamlelement.GetType();
+                       var propertyInfo = elementType.GetRuntimeProperties().FirstOrDefault(p => p.Name == localName);
+                       return propertyInfo;
+               }
+
+               public static void SetPropertyValue(object xamlelement, XmlName propertyName, object value, object rootElement, INode node, HydrationContext context, IXmlLineInfo lineInfo)
+               {
+                       var localName = propertyName.LocalName;
+                       var serviceProvider = new XamlServiceProvider(node, context);
+                       Exception xpe = null;
+                       var xKey = node is IElementNode && ((IElementNode)node).Properties.ContainsKey(XmlName.xKey) ? ((ValueNode)((IElementNode)node).Properties[XmlName.xKey]).Value as string : null;
+
+                       //If it's an attached BP, update elementType and propertyName
+                       var bpOwnerType = xamlelement.GetType();
+                       var attached = GetRealNameAndType(ref bpOwnerType, propertyName.NamespaceURI, ref localName, context, lineInfo);
+                       var property = GetBindableProperty(bpOwnerType, localName, lineInfo, false);
+
+                       //If the target is an event, connect
+                       if (xpe == null && TryConnectEvent(xamlelement, localName, attached, value, rootElement, lineInfo, out xpe))
+                               return;
+
+                       //If Value is DynamicResource and it's a BP, SetDynamicResource
+                       if (xpe == null && TrySetDynamicResource(xamlelement, property, value, lineInfo, out xpe))
+                               return;
+
+                       //If value is BindingBase, SetBinding
+                       if (xpe == null && TrySetBinding(xamlelement, property, localName, value, lineInfo, out xpe))
+                               return;
+
+                       //If it's a BindableProberty, SetValue
+                       if (xpe == null && TrySetValue(xamlelement, property, attached, value, lineInfo, serviceProvider, out xpe))
+                               return;
+
+                       //If we can assign that value to a normal property, let's do it
+                       if (xpe == null && TrySetProperty(xamlelement, localName, value, lineInfo, serviceProvider, context, out xpe))
+                               return;
+
+                       //If it's an already initialized property, add to it
+                       if (xpe == null && TryAddToProperty(xamlelement, propertyName, value, xKey, lineInfo, serviceProvider, context, out xpe))
+                               return;
+
+                       xpe = xpe ?? new XamlParseException($"Cannot assign property \"{localName}\": Property does not exist, or is not assignable, or mismatching type between value and property", lineInfo);
+                       if (context.ExceptionHandler != null)
+                               context.ExceptionHandler(xpe);
+                       else
+                               throw xpe;
+               }
+
+               public static object GetPropertyValue(object xamlElement, XmlName propertyName, HydrationContext context, IXmlLineInfo lineInfo, out object targetProperty)
+               {
+                       var localName = propertyName.LocalName;
+                       Exception xpe = null;
+                       object value;
+                       targetProperty = null;
+
+                       //If it's an attached BP, update elementType and propertyName
+                       var bpOwnerType = xamlElement.GetType();
+                       var attached = GetRealNameAndType(ref bpOwnerType, propertyName.NamespaceURI, ref localName, context, lineInfo);
+                       var property = GetBindableProperty(bpOwnerType, localName, lineInfo, false);
+
+                       //If it's a BindableProberty, GetValue
+                       if (xpe == null && TryGetValue(xamlElement, property, attached, out value, lineInfo, out xpe, out targetProperty))
+                               return value;
+
+                       //If it's a normal property, get it
+                       if (xpe == null && TryGetProperty(xamlElement, localName, out value, lineInfo, context, out xpe, out targetProperty))
+                               return value;
+
+                       xpe = xpe ?? new XamlParseException($"Property {localName} is not found or does not have an accessible getter", lineInfo);
+                       if (context.ExceptionHandler != null)
+                               context.ExceptionHandler(xpe);
+                       else
+                               throw xpe;
+
+                       return null;
+               }
+
+               static bool TryConnectEvent(object element, string localName, bool attached, object value, object rootElement, IXmlLineInfo lineInfo, out Exception exception)
+               {
+                       exception = null;
+
+                       if (attached)
+                               return false;
+
+                       var elementType = element.GetType();
+                       var eventInfo = elementType.GetRuntimeEvent(localName);
+                       var stringValue = value as string;
+
+                       if (eventInfo == null || IsNullOrEmpty(stringValue))
+                               return false;
+
+                       var methodInfo = rootElement.GetType().GetRuntimeMethods().FirstOrDefault(mi => mi.Name == (string)value);
+                       if (methodInfo == null) {
+                               exception = new XamlParseException($"No method {value} found on type {rootElement.GetType()}", lineInfo);
+                               return false;
+                       }
+
+                       try {
+                               eventInfo.AddEventHandler(element, methodInfo.CreateDelegate(eventInfo.EventHandlerType, rootElement));
+                               return true;
+                       } catch (ArgumentException ae) {
+                               exception = new XamlParseException($"Method {stringValue} does not have the correct signature", lineInfo, ae);
+                       }
+                       return false;
+               }
+
+               static bool TrySetDynamicResource(object element, BindableProperty property, object value, IXmlLineInfo lineInfo, out Exception exception)
+               {
+                       exception = null;
+
+                       var elementType = element.GetType();
+                       var dynamicResource = value as DynamicResource;
+                       var bindable = element as BindableObject;
+
+                       if (dynamicResource == null || property == null)
+                               return false;
+
+                       if (bindable == null) {
+                               exception = new XamlParseException($"{elementType.Name} is not a BindableObject", lineInfo);
+                               return false;
+                       }
+
+                       bindable.SetDynamicResource(property, dynamicResource.Key);
+                       return true;
+               }
+
+               static bool TrySetBinding(object element, BindableProperty property, string localName, object value, IXmlLineInfo lineInfo, out Exception exception)
+               {
+                       exception = null;
+
+                       var elementType = element.GetType();
+                       var binding = value.ConvertTo(typeof(BindingBase),pinfoRetriever:null,serviceProvider:null) as BindingBase;
+                       var bindable = element as BindableObject;
+                       var nativeBindingService = DependencyService.Get<INativeBindingService>();
+
+                       if (binding == null)
+                               return false;
+
+                       if (bindable != null && property != null) {
+                               bindable.SetBinding(property, binding);
+                               return true;
+                       }
+
+                       if (nativeBindingService != null && property != null && nativeBindingService.TrySetBinding(element, property, binding))
+                               return true;
+
+                       if (nativeBindingService != null && nativeBindingService.TrySetBinding(element, localName, binding))
+                               return true;
+
+                       if (property != null)
+                               exception = new XamlParseException($"{elementType.Name} is not a BindableObject or does not support native bindings", lineInfo);
+
+                       return false;
+               }
+
+               static bool TrySetValue(object element, BindableProperty property, bool attached, object value, IXmlLineInfo lineInfo, XamlServiceProvider serviceProvider, out Exception exception)
+               {
+                       exception = null;
+
+                       var elementType = element.GetType();
+                       var bindable = element as BindableObject;
+                       var nativeBindingService = DependencyService.Get<INativeBindingService>();
+
+                       if (property == null)
+                               return false;
+
+                       if (serviceProvider != null && serviceProvider.IProvideValueTarget != null)
+                               ((XamlValueTargetProvider)serviceProvider.IProvideValueTarget).TargetProperty = property;
+
+                       Func<MemberInfo> minforetriever;
+                       if (attached)
+                               minforetriever = () => property.DeclaringType.GetRuntimeMethod("Get" + property.PropertyName, new [] { typeof(BindableObject) });
+                       else
+                               minforetriever = () => property.DeclaringType.GetRuntimeProperty(property.PropertyName);
+                       var convertedValue = value.ConvertTo(property.ReturnType, minforetriever, serviceProvider);
+
+                       if (bindable != null) {
+                               //SetValue doesn't throw on mismatching type, so check before to get a chance to try the property setting or the collection adding
+                               var nullable = property.ReturnTypeInfo.IsGenericType &&
+                                                          property.ReturnTypeInfo.GetGenericTypeDefinition() == typeof(Nullable<>);
+                               if ((convertedValue == null && (!property.ReturnTypeInfo.IsValueType || nullable)) ||
+                                       (property.ReturnType.IsInstanceOfType(convertedValue))) {
+                                       bindable.SetValue(property, convertedValue);
+                                       return true;
+                               }
+
+                               // This might be a collection; see if we can add to it
+                               return TryAddValue(bindable, property, value, serviceProvider);
+                       }
+
+                       if (nativeBindingService != null && nativeBindingService.TrySetValue(element, property, convertedValue))
+                               return true;
+
+                       exception = new XamlParseException($"{elementType.Name} is not a BindableObject or does not support setting native BindableProperties", lineInfo);
+                       return false;
+               }
+
+               static bool TryGetValue(object element, BindableProperty property, bool attached, out object value, IXmlLineInfo lineInfo, out Exception exception, out object targetProperty)
+               {
+                       exception = null;
+                       value = null;
+                       targetProperty = property;
+                       var elementType = element.GetType();
+                       var bindable = element as BindableObject;
+
+                       if (property == null)
+                               return false;
+
+                       if (bindable == null)
+                               return false;
+
+                       value = bindable.GetValue(property);
+                       return true;
+               }
+
+               static bool TrySetProperty(object element, string localName, object value, IXmlLineInfo lineInfo, XamlServiceProvider serviceProvider, HydrationContext context, out Exception exception)
+               {
+                       exception = null;
+
+                       var elementType = element.GetType();
+                       var propertyInfo = elementType.GetRuntimeProperties().FirstOrDefault(p => p.Name == localName);
+                       MethodInfo setter;
+                       if (propertyInfo == null || !propertyInfo.CanWrite || (setter = propertyInfo.SetMethod) == null)
+                               return false;
+
+                       if (!IsVisibleFrom(setter, context.RootElement))
+                               return false;
+
+                       if (serviceProvider != null && serviceProvider.IProvideValueTarget != null)
+                               ((XamlValueTargetProvider)serviceProvider.IProvideValueTarget).TargetProperty = propertyInfo;
+
+                       object convertedValue = value.ConvertTo(propertyInfo.PropertyType, () => propertyInfo, serviceProvider);
+                       if (convertedValue != null && !propertyInfo.PropertyType.IsInstanceOfType(convertedValue))
+                               return false;
+
+                       setter.Invoke(element, new object [] { convertedValue });
+                       return true;
+               }
+
+               static bool TryGetProperty(object element, string localName, out object value, IXmlLineInfo lineInfo, HydrationContext context, out Exception exception, out object targetProperty)
+               {
+                       exception = null;
+                       value = null;
+                       var elementType = element.GetType();
+                       PropertyInfo propertyInfo = null;
+                       try {
+                               propertyInfo = elementType.GetRuntimeProperty(localName);
+                       } catch (AmbiguousMatchException) {
+                               // Get most derived instance of property
+                               foreach (var property in elementType.GetRuntimeProperties().Where(prop => prop.Name == localName)) {
+                                       if (propertyInfo == null || propertyInfo.DeclaringType.IsAssignableFrom(property.DeclaringType))
+                                               propertyInfo = property;
+                               }
+                       }
+                       MethodInfo getter;
+                       targetProperty = propertyInfo;
+                       if (propertyInfo == null || !propertyInfo.CanRead || (getter = propertyInfo.GetMethod) == null)
+                               return false;
+
+                       if (!IsVisibleFrom(getter, context.RootElement))
+                               return false;
+
+                       value = getter.Invoke(element, new object[] { });
+                       return true;
+               }
+
+               static bool IsVisibleFrom(MethodInfo method, object rootElement)
+               {
+                       if (method.IsPublic)
+                               return true;
+                       if (method.IsPrivate && method.DeclaringType == rootElement.GetType())
+                               return true;
+                       if ((method.IsAssembly || method.IsFamilyOrAssembly) && method.DeclaringType.AssemblyQualifiedName == rootElement.GetType().AssemblyQualifiedName)
+                               return true;
+                       if (method.IsFamily && method.DeclaringType.IsAssignableFrom(rootElement.GetType()))
+                               return true;
+                       return false;
+               }
+
+               static bool TryAddToProperty(object element, XmlName propertyName, object value, string xKey, IXmlLineInfo lineInfo, XamlServiceProvider serviceProvider, HydrationContext context, out Exception exception)
+               {
+                       exception = null;
+
+                       object targetProperty;
+                       var collection = GetPropertyValue(element, propertyName, context, lineInfo, out targetProperty) as IEnumerable;
+
+                       if (collection == null)
+                               return false;
+
+                       if (exception == null && TryAddToResourceDictionary(collection as ResourceDictionary, value, xKey, lineInfo, out exception))
+                               return true;
+
+                       if (exception != null)
+                               return false;
+
+                       var addMethod = collection.GetType().GetRuntimeMethods().First(mi => mi.Name == "Add" && mi.GetParameters().Length == 1);
+                       if (addMethod == null)
+                               return false;
+
+                       if (serviceProvider != null)
+                               ((XamlValueTargetProvider)serviceProvider.IProvideValueTarget).TargetProperty = targetProperty;
+
+                       addMethod.Invoke(collection, new [] { value.ConvertTo(addMethod.GetParameters() [0].ParameterType, (Func<TypeConverter>)null, serviceProvider) });
+                       return true;
+               }
+
+               static bool TryAddToResourceDictionary(ResourceDictionary resourceDictionary, object value, string xKey, IXmlLineInfo lineInfo, out Exception exception)
+               {
+                       exception = null;
+
+                       if (resourceDictionary == null)
+                               return false;
+
+                       if (xKey != null)
+                               resourceDictionary.Add(xKey, value);
+                       else if (value is Tizen.NUI.Binding.Style)
+                               resourceDictionary.Add((Tizen.NUI.Binding.Style)value);
+                       else if (value is ResourceDictionary)
+                               resourceDictionary.Add((ResourceDictionary)value);
+                       else if (value is StyleSheets.StyleSheet)
+                               resourceDictionary.Add((StyleSheets.StyleSheet)value);
+                       else {
+                               exception = new XamlParseException("resources in ResourceDictionary require a x:Key attribute", lineInfo);
+                               return false;
+                       }
+                       return true;
+               }
+
+               void SetTemplate(ElementTemplate dt, INode node)
+               {
+#pragma warning disable 0612
+                       ((IDataTemplate)dt).LoadTemplate = () => {
+#pragma warning restore 0612
+                               var cnode = node.Clone();
+                               var context = new HydrationContext { ParentContext = Context, RootElement = Context.RootElement };
+                               cnode.Accept(new XamlNodeVisitor((n, parent) => n.Parent = parent), node.Parent); //set parents for {StaticResource}
+                               cnode.Accept(new ExpandMarkupsVisitor(context), null);
+                               cnode.Accept(new NamescopingVisitor(context), null);
+                               cnode.Accept(new CreateValuesVisitor(context), null);
+                               cnode.Accept(new RegisterXNamesVisitor(context), null);
+                               cnode.Accept(new FillResourceDictionariesVisitor(context), null);
+                               cnode.Accept(new ApplyPropertiesVisitor(context, true), null);
+                               return context.Values [cnode];
+                       };
+               }
+
+               static bool TryAddValue(BindableObject bindable, BindableProperty property, object value, XamlServiceProvider serviceProvider)
+               {
+                       if(property?.ReturnTypeInfo?.GenericTypeArguments == null){
+                               return false;
+                       }
+
+                       if(property.ReturnType == null){
+                               return false;
+                       }
+
+                       if (property.ReturnTypeInfo.GenericTypeArguments.Length != 1 ||
+                               !property.ReturnTypeInfo.GenericTypeArguments[0].IsInstanceOfType(value))
+                               return false;
+
+                       // This might be a collection we can add to; see if we can find an Add method
+                       var addMethod = GetAllRuntimeMethods(property.ReturnType)
+                               .FirstOrDefault(mi => mi.Name == "Add" && mi.GetParameters().Length == 1);
+                       if (addMethod == null)
+                               return false;
+
+                       // If there's an add method, get the collection
+                       var collection = bindable.GetValue(property);
+                       
+                       // And add the new value to it
+                       addMethod.Invoke(collection, new[] { value.ConvertTo(addMethod.GetParameters()[0].ParameterType, (Func<TypeConverter>)null, serviceProvider) });
+                       return true;
+               }
+
+               static IEnumerable<MethodInfo> GetAllRuntimeMethods(Type type)
+               {
+                       return type.GetRuntimeMethods()
+                               .Concat(type.GetTypeInfo().ImplementedInterfaces.SelectMany(t => t.GetRuntimeMethods()));
+               }
+
+               bool TrySetRuntimeName(XmlName propertyName, object source, object value, ValueNode node)
+               {
+                       if (propertyName != XmlName.xName)
+                               return false;
+
+                       var runTimeName = source.GetType().GetTypeInfo().GetCustomAttribute<RuntimeNamePropertyAttribute>();
+                       if (runTimeName == null)
+                               return false;
+
+                       SetPropertyValue(source, new XmlName("", runTimeName.Name), value, Context.RootElement, node, Context, node);
+                       return true;
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/Xaml/CreateValuesVisitor.cs b/src/Tizen.NUI/src/internal/Xaml/CreateValuesVisitor.cs
new file mode 100755 (executable)
index 0000000..4db5ce2
--- /dev/null
@@ -0,0 +1,387 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Reflection;
+using System.Xml;
+using Tizen.NUI.Internals;
+using Tizen.NUI.Binding;
+
+
+namespace Tizen.NUI.Xaml
+{
+       class CreateValuesVisitor : IXamlNodeVisitor
+       {
+               public CreateValuesVisitor(HydrationContext context)
+               {
+                       Context = context;
+               }
+
+               Dictionary<INode, object> Values
+               {
+                       get { return Context.Values; }
+               }
+
+               HydrationContext Context { get; }
+
+               public TreeVisitingMode VisitingMode => TreeVisitingMode.BottomUp;
+               public bool StopOnDataTemplate => true;
+               public bool StopOnResourceDictionary => false;
+               public bool VisitNodeOnDataTemplate => false;
+               public bool SkipChildren(INode node, INode parentNode) => false;
+
+               public void Visit(ValueNode node, INode parentNode)
+               {
+                       Values[node] = node.Value;
+               }
+
+               public void Visit(MarkupNode node, INode parentNode)
+               {
+               }
+
+               public void Visit(ElementNode node, INode parentNode)
+               {
+                       object value = null;
+
+                       XamlParseException xpe;
+                       var type = XamlParser.GetElementType(node.XmlType, node, Context.RootElement?.GetType().GetTypeInfo().Assembly,
+                               out xpe);
+                       if (xpe != null)
+                               throw xpe;
+
+                       Context.Types[node] = type;
+                       string ctorargname;
+                       if (IsXaml2009LanguagePrimitive(node))
+                               value = CreateLanguagePrimitive(type, node);
+                       else if (node.Properties.ContainsKey(XmlName.xArguments) || node.Properties.ContainsKey(XmlName.xFactoryMethod))
+                               value = CreateFromFactory(type, node);
+                       else if (
+                               type.GetTypeInfo()
+                                       .DeclaredConstructors.Any(
+                                               ci =>
+                                                       ci.IsPublic && ci.GetParameters().Length != 0 &&
+                                                       ci.GetParameters().All(pi => pi.CustomAttributes.Any(attr => attr.AttributeType == typeof (ParameterAttribute)))) &&
+                               ValidateCtorArguments(type, node, out ctorargname))
+                               value = CreateFromParameterizedConstructor(type, node);
+                       else if (!type.GetTypeInfo().DeclaredConstructors.Any(ci => ci.IsPublic && ci.GetParameters().Length == 0) &&
+                                !ValidateCtorArguments(type, node, out ctorargname))
+                       {
+                               throw new XamlParseException($"The Property {ctorargname} is required to create a {type.FullName} object.", node);
+                       }
+                       else
+                       {
+                               //this is a trick as the DataTemplate parameterless ctor is internal, and we can't CreateInstance(..., false) on WP7
+                               try
+                               {
+                                       if (type == typeof (DataTemplate))
+                                               value = new DataTemplate();
+                                       if (type == typeof (ControlTemplate))
+                                               value = new ControlTemplate();
+                                       if (value == null && node.CollectionItems.Any() && node.CollectionItems.First() is ValueNode)
+                                       {
+                                               var serviceProvider = new XamlServiceProvider(node, Context);
+                                               var converted = ((ValueNode)node.CollectionItems.First()).Value.ConvertTo(type, () => type.GetTypeInfo(),
+                                                       serviceProvider);
+                                               if (converted != null && converted.GetType() == type)
+                                                       value = converted;
+                                       }
+                                       if (value == null)
+                                               value = Activator.CreateInstance(type);
+                               }
+                               catch (TargetInvocationException e)
+                               {
+                                       if (e.InnerException is XamlParseException || e.InnerException is XmlException)
+                                               throw e.InnerException;
+                                       throw;
+                               }
+                       }
+
+                       Values[node] = value;
+
+                       var markup = value as IMarkupExtension;
+                       if (markup != null && (value is TypeExtension || value is StaticExtension || value is ArrayExtension))
+                       {
+                               var serviceProvider = new XamlServiceProvider(node, Context);
+
+                               var visitor = new ApplyPropertiesVisitor(Context);
+                               foreach (var cnode in node.Properties.Values.ToList())
+                                       cnode.Accept(visitor, node);
+                               foreach (var cnode in node.CollectionItems)
+                                       cnode.Accept(visitor, node);
+
+                               value = markup.ProvideValue(serviceProvider);
+
+                               INode xKey;
+                               if (!node.Properties.TryGetValue(XmlName.xKey, out xKey))
+                                       xKey = null;
+                               
+                               node.Properties.Clear();
+                               node.CollectionItems.Clear();
+
+                               if (xKey != null)
+                                       node.Properties.Add(XmlName.xKey, xKey);
+
+                               Values[node] = value;
+                       }
+
+                       if (value is BindableObject)
+                               NameScope.SetNameScope(value as BindableObject, node.Namescope);
+               }
+
+               public void Visit(RootNode node, INode parentNode)
+               {
+                       var rnode = (XamlLoader.RuntimeRootNode)node;
+                       Values[node] = rnode.Root;
+                       Context.Types[node] = rnode.Root.GetType();
+                       var bindableRoot = rnode.Root as BindableObject;
+                       if (bindableRoot != null)
+                               NameScope.SetNameScope(bindableRoot, node.Namescope);
+               }
+
+               public void Visit(ListNode node, INode parentNode)
+               {
+                       //this is a gross hack to keep ListNode alive. ListNode must go in favor of Properties
+                       XmlName name;
+                       if (ApplyPropertiesVisitor.TryGetPropertyName(node, parentNode, out name))
+                               node.XmlName = name;
+               }
+
+               bool ValidateCtorArguments(Type nodeType, IElementNode node, out string missingArgName)
+               {
+                       missingArgName = null;
+                       var ctorInfo =
+                               nodeType.GetTypeInfo()
+                                       .DeclaredConstructors.FirstOrDefault(
+                                               ci =>
+                                                       ci.GetParameters().Length != 0 && ci.IsPublic &&
+                                                       ci.GetParameters().All(pi => pi.CustomAttributes.Any(attr => attr.AttributeType == typeof (ParameterAttribute))));
+                       if (ctorInfo == null)
+                               return true;
+                       foreach (var parameter in ctorInfo.GetParameters())
+                       {
+                // Modify the namespace
+                               var propname =
+                                       parameter.CustomAttributes.First(ca => ca.AttributeType.FullName == "Tizen.NUI.Binding.ParameterAttribute")
+                                               .ConstructorArguments.First()
+                                               .Value as string;
+                               if (!node.Properties.ContainsKey(new XmlName("", propname)))
+                               {
+                                       missingArgName = propname;
+                                       return false;
+                               }
+                       }
+
+                       return true;
+               }
+
+               public object CreateFromParameterizedConstructor(Type nodeType, IElementNode node)
+               {
+                       var ctorInfo =
+                               nodeType.GetTypeInfo()
+                                       .DeclaredConstructors.FirstOrDefault(
+                                               ci =>
+                                                       ci.GetParameters().Length != 0 && ci.IsPublic &&
+                                                       ci.GetParameters().All(pi => pi.CustomAttributes.Any(attr => attr.AttributeType == typeof (ParameterAttribute))));
+                       object[] arguments = CreateArgumentsArray(node, ctorInfo);
+                       return ctorInfo.Invoke(arguments);
+               }
+
+               public object CreateFromFactory(Type nodeType, IElementNode node)
+               {
+                       object[] arguments = CreateArgumentsArray(node);
+
+                       if (!node.Properties.ContainsKey(XmlName.xFactoryMethod))
+                       {
+                               //non-default ctor
+                               return Activator.CreateInstance(nodeType, arguments);
+                       }
+
+                       var factoryMethod = ((string)((ValueNode)node.Properties[XmlName.xFactoryMethod]).Value);
+                       Type[] types = arguments == null ? new Type[0] : arguments.Select(a => a.GetType()).ToArray();
+                       Func<MethodInfo, bool> isMatch = m => {
+                               if (m.Name != factoryMethod)
+                                       return false;
+                               var p = m.GetParameters();
+                               if (p.Length != types.Length)
+                                       return false;
+                               if (!m.IsStatic)
+                                       return false;
+                               for (var i = 0; i < p.Length; i++) {
+                                       if ((p [i].ParameterType.IsAssignableFrom(types [i])))
+                                               continue;
+                                       var op_impl =  p[i].ParameterType.GetImplicitConversionOperator(fromType: types[i], toType: p[i].ParameterType)
+                                                               ?? types[i].GetImplicitConversionOperator(fromType: types[i], toType: p[i].ParameterType);
+
+                                       if (op_impl == null)
+                                               return false;
+                                       arguments [i] = op_impl.Invoke(null, new [] { arguments [i]});
+                               }
+                               return true;
+                       };
+                       var mi = nodeType.GetRuntimeMethods().FirstOrDefault(isMatch);
+                       if (mi == null)
+                               throw new MissingMemberException($"No static method found for {nodeType.FullName}::{factoryMethod} ({string.Join(", ", types.Select(t => t.FullName))})");
+                       return mi.Invoke(null, arguments);
+               }
+
+               public object[] CreateArgumentsArray(IElementNode enode)
+               {
+                       if (!enode.Properties.ContainsKey(XmlName.xArguments))
+                               return null;
+                       var node = enode.Properties[XmlName.xArguments];
+                       var elementNode = node as ElementNode;
+                       if (elementNode != null)
+                       {
+                               var array = new object[1];
+                               array[0] = Values[elementNode];
+                               return array;
+                       }
+
+                       var listnode = node as ListNode;
+                       if (listnode != null)
+                       {
+                               var array = new object[listnode.CollectionItems.Count];
+                               for (var i = 0; i < listnode.CollectionItems.Count; i++)
+                                       array[i] = Values[(ElementNode)listnode.CollectionItems[i]];
+                               return array;
+                       }
+                       return null;
+               }
+
+               public object[] CreateArgumentsArray(IElementNode enode, ConstructorInfo ctorInfo)
+               {
+                       var n = ctorInfo.GetParameters().Length;
+                       var array = new object[n];
+                       for (var i = 0; i < n; i++)
+                       {
+                               var parameter = ctorInfo.GetParameters()[i];
+                               var propname =
+                                       parameter.CustomAttributes.First(attr => attr.AttributeType == typeof (ParameterAttribute))
+                                               .ConstructorArguments.First()
+                                               .Value as string;
+                               var name = new XmlName("", propname);
+                               INode node;
+                               if (!enode.Properties.TryGetValue(name, out node))
+                               {
+                                       throw new XamlParseException(
+                                               String.Format("The Property {0} is required to create a {1} object.", propname, ctorInfo.DeclaringType.FullName),
+                                               enode as IXmlLineInfo);
+                               }
+                               if (!enode.SkipProperties.Contains(name))
+                                       enode.SkipProperties.Add(name);
+                               var value = Context.Values[node];
+                               var serviceProvider = new XamlServiceProvider(enode, Context);
+                               var convertedValue = value.ConvertTo(parameter.ParameterType, () => parameter, serviceProvider);
+                               array[i] = convertedValue;
+                       }
+
+                       return array;
+               }
+
+               static bool IsXaml2009LanguagePrimitive(IElementNode node)
+               {
+                       return node.NamespaceURI == XamlParser.X2009Uri;
+               }
+
+               static object CreateLanguagePrimitive(Type nodeType, IElementNode node)
+               {
+                       object value = null;
+                       if (nodeType == typeof (string))
+                               value = String.Empty;
+                       else if (nodeType == typeof (Uri))
+                               value = null;
+                       else
+                               value = Activator.CreateInstance(nodeType);
+
+                       if (node.CollectionItems.Count == 1 && node.CollectionItems[0] is ValueNode &&
+                           ((ValueNode)node.CollectionItems[0]).Value is string)
+                       {
+                               var valuestring = ((ValueNode)node.CollectionItems[0]).Value as string;
+
+                               if (nodeType == typeof(SByte)) {
+                                       sbyte retval;
+                                       if (sbyte.TryParse(valuestring, NumberStyles.Number, CultureInfo.InvariantCulture, out retval))
+                                               return retval;
+                               }
+                               if (nodeType == typeof(Int16)) {
+                                       short retval;
+                                       if (short.TryParse(valuestring, NumberStyles.Number, CultureInfo.InvariantCulture, out retval))
+                                               return retval;
+                               }
+                               if (nodeType == typeof(Int32)) {
+                                       int retval;
+                                       if (int.TryParse(valuestring, NumberStyles.Number, CultureInfo.InvariantCulture, out retval))
+                                               return retval;
+                               }
+                               if (nodeType == typeof(Int64)) {
+                                       long retval;
+                                       if (long.TryParse(valuestring, NumberStyles.Number, CultureInfo.InvariantCulture, out retval))
+                                               return retval;
+                               }
+                               if (nodeType == typeof(Byte)) {
+                                       byte retval;
+                                       if (byte.TryParse(valuestring, NumberStyles.Number, CultureInfo.InvariantCulture, out retval))
+                                               return retval;
+                               }
+                               if (nodeType == typeof(UInt16)) {
+                                       ushort retval;
+                                       if (ushort.TryParse(valuestring, NumberStyles.Number, CultureInfo.InvariantCulture, out retval))
+                                               return retval;
+                               }
+                               if (nodeType == typeof(UInt32)) {
+                                       uint retval;
+                                       if (uint.TryParse(valuestring, NumberStyles.Number, CultureInfo.InvariantCulture, out retval))
+                                               return retval;
+                               }
+                               if (nodeType == typeof(UInt64)) {
+                                       ulong retval;
+                                       if (ulong.TryParse(valuestring, NumberStyles.Number, CultureInfo.InvariantCulture, out retval))
+                                               return retval;
+                               }
+                               if (nodeType == typeof(Single)) {
+                                       float retval;
+                                       if (float.TryParse(valuestring, NumberStyles.Number, CultureInfo.InvariantCulture, out retval))
+                                               return retval;
+                               }
+                               if (nodeType == typeof(Double)) {
+                                       double retval;
+                                       if (double.TryParse(valuestring, NumberStyles.Number, CultureInfo.InvariantCulture, out retval))
+                                               return retval;
+                               }
+                               if (nodeType == typeof (Boolean))
+                               {
+                                       bool outbool;
+                                       if (bool.TryParse(valuestring, out outbool))
+                                               return outbool;
+                               }
+                               if (nodeType == typeof(TimeSpan)) {
+                                       TimeSpan retval;
+                                       if (TimeSpan.TryParse(valuestring, CultureInfo.InvariantCulture, out retval))
+                                               return retval;
+                               }
+                               if (nodeType == typeof (char))
+                               {
+                                       char retval;
+                                       if (char.TryParse(valuestring, out retval))
+                                               return retval;
+                               }
+                               if (nodeType == typeof (string))
+                                       return valuestring;
+                               if (nodeType == typeof (decimal))
+                               {
+                                       decimal retval;
+                                       if (decimal.TryParse(valuestring, NumberStyles.Number, CultureInfo.InvariantCulture, out retval))
+                                               return retval;
+                               }
+
+                               else if (nodeType == typeof (Uri))
+                               {
+                                       Uri retval;
+                                       if (Uri.TryCreate(valuestring, UriKind.RelativeOrAbsolute, out retval))
+                                               return retval;
+                               }
+                       }
+                       return value;
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/Xaml/DesignMode.cs b/src/Tizen.NUI/src/internal/Xaml/DesignMode.cs
new file mode 100755 (executable)
index 0000000..b9e7417
--- /dev/null
@@ -0,0 +1,7 @@
+namespace Tizen.NUI.Xaml
+{
+       internal static class DesignMode
+       {
+               public static bool IsDesignModeEnabled { get; internal set; }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/ExpandMarkupsVisitor.cs b/src/Tizen.NUI/src/internal/Xaml/ExpandMarkupsVisitor.cs
new file mode 100755 (executable)
index 0000000..70d28cf
--- /dev/null
@@ -0,0 +1,196 @@
+using System;
+using System.Collections.Generic;
+using System.Xml;
+using Tizen.NUI.Internals;
+
+namespace Tizen.NUI.Xaml
+{
+       class ExpandMarkupsVisitor : IXamlNodeVisitor
+       {
+               public ExpandMarkupsVisitor(HydrationContext context)
+               {
+                       Context = context;
+               }
+
+               public static readonly IList<XmlName> Skips = new List<XmlName>
+               {
+                       XmlName.xKey,
+                       XmlName.xTypeArguments,
+                       XmlName.xFactoryMethod,
+                       XmlName.xName,
+                       XmlName.xDataType
+               };
+
+               Dictionary<INode, object> Values
+               {
+                       get { return Context.Values; }
+               }
+
+               HydrationContext Context { get; }
+
+               public TreeVisitingMode VisitingMode => TreeVisitingMode.BottomUp;
+               public bool StopOnDataTemplate => false;
+               public bool StopOnResourceDictionary => false;
+               public bool VisitNodeOnDataTemplate => true;
+               public bool SkipChildren(INode node, INode parentNode) => false;
+
+               public void Visit(ValueNode node, INode parentNode)
+               {
+               }
+
+               public void Visit(MarkupNode markupnode, INode parentNode)
+               {
+                       var parentElement = parentNode as IElementNode;
+                       XmlName propertyName;
+                       if (!ApplyPropertiesVisitor.TryGetPropertyName(markupnode, parentNode, out propertyName))
+                               return;
+                       if (Skips.Contains(propertyName))
+                               return;
+                       if (parentElement.SkipProperties.Contains(propertyName))
+                               return;
+
+                       var markupString = markupnode.MarkupString;
+                       var node =
+                               ParseExpression(ref markupString, markupnode.NamespaceResolver, markupnode, markupnode, parentNode) as IElementNode;
+                       if (node != null)
+                       {
+                               ((IElementNode)parentNode).Properties[propertyName] = node;
+                               node.Parent = parentNode;
+                       }
+               }
+
+               public void Visit(ElementNode node, INode parentNode)
+               {
+               }
+
+               public void Visit(RootNode node, INode parentNode)
+               {
+               }
+
+               public void Visit(ListNode node, INode parentNode)
+               {
+               }
+
+               INode ParseExpression(ref string expression, IXmlNamespaceResolver nsResolver, IXmlLineInfo xmlLineInfo, INode node,
+                       INode parentNode)
+               {
+                       if (expression.StartsWith("{}", StringComparison.Ordinal))
+                               return new ValueNode(expression.Substring(2), null);
+
+                       if (expression[expression.Length - 1] != '}')
+                               throw new Exception("Expression must end with '}'");
+
+                       int len;
+                       string match;
+                       if (!MarkupExpressionParser.MatchMarkup(out match, expression, out len))
+                               throw new Exception();
+                       expression = expression.Substring(len).TrimStart();
+                       if (expression.Length == 0)
+                               throw new Exception("Expression did not end in '}'");
+
+                       var serviceProvider = new XamlServiceProvider(node, Context);
+                       serviceProvider.Add(typeof (IXmlNamespaceResolver), nsResolver);
+
+                       return new MarkupExpansionParser().Parse(match, ref expression, serviceProvider);
+               }
+
+               public class MarkupExpansionParser : MarkupExpressionParser, IExpressionParser<INode>
+               {
+                       IElementNode node;
+
+                       object IExpressionParser.Parse(string match, ref string remaining, IServiceProvider serviceProvider)
+                       {
+                               return Parse(match, ref remaining, serviceProvider);
+                       }
+
+                       public INode Parse(string match, ref string remaining, IServiceProvider serviceProvider)
+                       {
+                               var nsResolver = serviceProvider.GetService(typeof (IXmlNamespaceResolver)) as IXmlNamespaceResolver;
+                               if (nsResolver == null)
+                                       throw new ArgumentException();
+                               IXmlLineInfo xmlLineInfo = null;
+                               var xmlLineInfoProvider = serviceProvider.GetService(typeof (IXmlLineInfoProvider)) as IXmlLineInfoProvider;
+                               if (xmlLineInfoProvider != null)
+                                       xmlLineInfo = xmlLineInfoProvider.XmlLineInfo;
+
+                               var split = match.Split(':');
+                               if (split.Length > 2)
+                                       throw new ArgumentException();
+
+                               string prefix; //, name;
+                               if (split.Length == 2)
+                               {
+                                       prefix = split[0];
+                                       //                                      name = split [1];
+                               }
+                               else
+                               {
+                                       prefix = "";
+                                       //                                      name = split [0];
+                               }
+
+                               Type type;
+                               var typeResolver = serviceProvider.GetService(typeof (IXamlTypeResolver)) as IXamlTypeResolver;
+                               if (typeResolver == null)
+                                       type = null;
+                // Add Binding and StaticResource support, The ordinal code can't find BindingExtension for Binding
+                //else if (match == "Binding")
+                //{
+                //    type = typeof(BindingExtension);
+                //}
+                //else if (match == "StaticResource")
+                //{
+                //    type = typeof(StaticResourceExtension);
+                //}
+                               else
+                               {
+                                       //The order of lookup is to look for the Extension-suffixed class name first and then look for the class name without the Extension suffix.
+                                       if (!typeResolver.TryResolve(match + "Extension", out type) && !typeResolver.TryResolve(match, out type))
+                                       {
+                                               var lineInfoProvider = serviceProvider.GetService(typeof (IXmlLineInfoProvider)) as IXmlLineInfoProvider;
+                                               var lineInfo = (lineInfoProvider != null) ? lineInfoProvider.XmlLineInfo : new XmlLineInfo();
+                                               throw new XamlParseException(String.Format("MarkupExtension not found for {0}", match), lineInfo);
+                                       }
+                               }
+
+                               var namespaceuri = nsResolver.LookupNamespace(prefix) ?? "";
+                               var xmltype = new XmlType(namespaceuri, type.Name, null);
+
+                               if (type == null)
+                                       throw new NotSupportedException();
+
+                               node = xmlLineInfo == null
+                                       ? new ElementNode(xmltype, null, nsResolver)
+                                       : new ElementNode(xmltype, null, nsResolver, xmlLineInfo.LineNumber, xmlLineInfo.LinePosition);
+
+                               if (remaining.StartsWith("}", StringComparison.Ordinal))
+                               {
+                                       remaining = remaining.Substring(1);
+                                       return node;
+                               }
+
+                               char next;
+                               string piece;
+                               while ((piece = GetNextPiece(ref remaining, out next)) != null)
+                                       HandleProperty(piece, serviceProvider, ref remaining, next != '=');
+
+                               return node;
+                       }
+
+                       protected override void SetPropertyValue(string prop, string strValue, object value, IServiceProvider serviceProvider)
+                       {
+                               var nsResolver = serviceProvider.GetService(typeof (IXmlNamespaceResolver)) as IXmlNamespaceResolver;
+
+                               var childnode = value as INode ?? new ValueNode(strValue, nsResolver);
+                               childnode.Parent = node;
+                               if (prop != null)
+                               {
+                                       var name = new XmlName(node.NamespaceURI, prop);
+                                       node.Properties[name] = childnode;
+                               }
+                               else //ContentProperty
+                                       node.CollectionItems.Add(childnode);
+                       }
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/FillResourceDictionariesVisitor.cs b/src/Tizen.NUI/src/internal/Xaml/FillResourceDictionariesVisitor.cs
new file mode 100755 (executable)
index 0000000..78fd529
--- /dev/null
@@ -0,0 +1,86 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Reflection;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.Xaml
+{
+       class FillResourceDictionariesVisitor : IXamlNodeVisitor
+       {
+               public FillResourceDictionariesVisitor(HydrationContext context)
+               {
+                       Context = context;
+               }
+
+               HydrationContext Context { get; }
+               Dictionary<INode, object> Values => Context.Values;
+
+               public TreeVisitingMode VisitingMode => TreeVisitingMode.TopDown;
+               public bool StopOnDataTemplate => true;
+               public bool StopOnResourceDictionary => false;
+               public bool VisitNodeOnDataTemplate => false;
+
+               public void Visit(ValueNode node, INode parentNode)
+               {
+                       if (!typeof(ResourceDictionary).IsAssignableFrom(Context.Types[((IElementNode)parentNode)]))
+                               return;
+
+                       node.Accept(new ApplyPropertiesVisitor(Context, stopOnResourceDictionary: false), parentNode);
+               }
+
+               public void Visit(MarkupNode node, INode parentNode)
+               {
+               }
+
+               public void Visit(ElementNode node, INode parentNode)
+               {
+                       var value = Values[node];
+                       XmlName propertyName;
+                       //Set RD to VE
+                       if (typeof(ResourceDictionary).IsAssignableFrom(Context.Types[node]) && ApplyPropertiesVisitor.TryGetPropertyName(node, parentNode, out propertyName)) {
+                               if ((propertyName.LocalName == "Resources" ||
+                                        propertyName.LocalName.EndsWith(".Resources", StringComparison.Ordinal)) && value is ResourceDictionary) {
+                                       var source = Values[parentNode];
+                                       ApplyPropertiesVisitor.SetPropertyValue(source, propertyName, value, Context.RootElement, node, Context, node);
+                                       return;
+                               }
+                       }
+
+                       //Only proceed further if the node is a keyless RD
+                       if (   parentNode is IElementNode
+                               && typeof(ResourceDictionary).IsAssignableFrom(Context.Types[((IElementNode)parentNode)])
+                               && !((IElementNode)parentNode).Properties.ContainsKey(XmlName.xKey))
+                               node.Accept(new ApplyPropertiesVisitor(Context, stopOnResourceDictionary: false), parentNode);
+                       else if (   parentNode is ListNode
+                                        && typeof(ResourceDictionary).IsAssignableFrom(Context.Types[((IElementNode)parentNode.Parent)])
+                                        && !((IElementNode)parentNode.Parent).Properties.ContainsKey(XmlName.xKey))
+                               node.Accept(new ApplyPropertiesVisitor(Context, stopOnResourceDictionary: false), parentNode);
+               }
+
+               public void Visit(RootNode node, INode parentNode)
+               {
+               }
+
+               public void Visit(ListNode node, INode parentNode)
+               {
+               }
+
+               public bool SkipChildren(INode node, INode parentNode)
+               {
+                       var enode = node as ElementNode;
+                       if (enode is null)
+                               return false;
+                       if (   parentNode is IElementNode
+                           && typeof(ResourceDictionary).IsAssignableFrom(Context.Types[((IElementNode)parentNode)])
+                           && !((IElementNode)parentNode).Properties.ContainsKey(XmlName.xKey))
+                               return true;
+                       if (   parentNode is ListNode
+                               && typeof(ResourceDictionary).IsAssignableFrom(Context.Types[((IElementNode)parentNode.Parent)])
+                               && !((IElementNode)parentNode.Parent).Properties.ContainsKey(XmlName.xKey))
+                               return true;
+                       return false;
+               }
+
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/HydrationContext.cs b/src/Tizen.NUI/src/internal/Xaml/HydrationContext.cs
new file mode 100755 (executable)
index 0000000..505beda
--- /dev/null
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Xaml
+{
+       class HydrationContext
+       {
+               public HydrationContext()
+               {
+                       Values = new Dictionary<INode, object>();
+                       Types = new Dictionary<IElementNode, Type>();
+               }
+
+               public Dictionary<INode, object> Values { get; }
+               public Dictionary<IElementNode, Type> Types { get; }
+               public HydrationContext ParentContext { get; set; }
+               public Action<Exception> ExceptionHandler { get; set; }
+               public object RootElement { get; set; }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/Xaml/IConverterOptions.cs b/src/Tizen.NUI/src/internal/Xaml/IConverterOptions.cs
new file mode 100755 (executable)
index 0000000..08399ad
--- /dev/null
@@ -0,0 +1,7 @@
+namespace Tizen.NUI.Xaml
+{
+       interface IConverterOptions
+       {
+               bool IgnoreCase { get; }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/IDictionaryExtensions.cs b/src/Tizen.NUI/src/internal/Xaml/IDictionaryExtensions.cs
new file mode 100755 (executable)
index 0000000..52b3701
--- /dev/null
@@ -0,0 +1,14 @@
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Xaml
+{
+       internal static class IDictionaryExtensions
+       {
+               public static void AddRange<TKey, TValue>(this IDictionary<TKey, TValue> dictionary,
+                       IEnumerable<KeyValuePair<TKey, TValue>> collection)
+               {
+                       foreach (var kvp in collection)
+                               dictionary.Add(kvp);
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/IExpressionParser.cs b/src/Tizen.NUI/src/internal/Xaml/IExpressionParser.cs
new file mode 100755 (executable)
index 0000000..d7bf738
--- /dev/null
@@ -0,0 +1,15 @@
+using System;
+
+namespace Tizen.NUI.Xaml
+{
+       internal interface IExpressionParser
+       {
+               object Parse(string match, ref string expression, IServiceProvider serviceProvider);
+       }
+
+       internal interface IExpressionParser<out T> : IExpressionParser
+               where T : class
+       {
+               new T Parse(string match, ref string expression, IServiceProvider serviceProvider);
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/IMarkupExtension.cs b/src/Tizen.NUI/src/internal/Xaml/IMarkupExtension.cs
new file mode 100755 (executable)
index 0000000..e6f9541
--- /dev/null
@@ -0,0 +1,19 @@
+using System;
+
+namespace Tizen.NUI.Xaml
+{
+       internal interface IMarkupExtension<out T> : IMarkupExtension
+       {
+               new T ProvideValue(IServiceProvider serviceProvider);
+       }
+
+       internal interface IMarkupExtension
+       {
+               object ProvideValue(IServiceProvider serviceProvider);
+       }
+
+       [AttributeUsage(AttributeTargets.Class, Inherited = false)]
+       internal sealed class AcceptEmptyServiceProviderAttribute : Attribute
+       {
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/INativeValueConverterService.cs b/src/Tizen.NUI/src/internal/Xaml/INativeValueConverterService.cs
new file mode 100755 (executable)
index 0000000..f6ad31c
--- /dev/null
@@ -0,0 +1,9 @@
+using System;
+
+namespace Tizen.NUI.Xaml.Internals
+{
+       internal interface INativeValueConverterService
+       {
+               bool ConvertTo(object value, Type toType, out object nativeValue);
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/IProvideParentValues.cs b/src/Tizen.NUI/src/internal/Xaml/IProvideParentValues.cs
new file mode 100755 (executable)
index 0000000..7d37a0f
--- /dev/null
@@ -0,0 +1,9 @@
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Xaml
+{
+       internal interface IProvideParentValues : IProvideValueTarget
+       {
+               IEnumerable<object> ParentObjects { get; }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/IProvideValueTarget.cs b/src/Tizen.NUI/src/internal/Xaml/IProvideValueTarget.cs
new file mode 100755 (executable)
index 0000000..7a8eef0
--- /dev/null
@@ -0,0 +1,8 @@
+namespace Tizen.NUI.Xaml
+{
+       internal interface IProvideValueTarget
+       {
+               object TargetObject { get; }
+               object TargetProperty { get; }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/IResourcesLoader.cs b/src/Tizen.NUI/src/internal/Xaml/IResourcesLoader.cs
new file mode 100755 (executable)
index 0000000..ffa7599
--- /dev/null
@@ -0,0 +1,13 @@
+using System;
+using System.Reflection;
+using System.Xml;
+using System.IO;
+
+namespace Tizen.NUI
+{
+       interface IResourcesLoader
+       {
+               T CreateFromResource<T>(string resourcePath, Assembly assembly, IXmlLineInfo lineInfo) where T : new();
+               string GetResource(string resourcePath, Assembly assembly, IXmlLineInfo lineInfo);
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/IRootObjectProvider.cs b/src/Tizen.NUI/src/internal/Xaml/IRootObjectProvider.cs
new file mode 100755 (executable)
index 0000000..f2f3854
--- /dev/null
@@ -0,0 +1,7 @@
+namespace Tizen.NUI.Xaml
+{
+       internal interface IRootObjectProvider
+       {
+               object RootObject { get; }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/IValueConverterProvider.cs b/src/Tizen.NUI/src/internal/Xaml/IValueConverterProvider.cs
new file mode 100755 (executable)
index 0000000..35bb384
--- /dev/null
@@ -0,0 +1,10 @@
+using System;
+using System.Reflection;
+
+namespace Tizen.NUI.Xaml
+{
+       interface IValueConverterProvider
+       {
+               object Convert(object value, Type toType, Func<MemberInfo> minfoRetriever, IServiceProvider serviceProvider);
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/IValueProvider.cs b/src/Tizen.NUI/src/internal/Xaml/IValueProvider.cs
new file mode 100755 (executable)
index 0000000..3cbc408
--- /dev/null
@@ -0,0 +1,9 @@
+using System;
+
+namespace Tizen.NUI.Xaml
+{
+       internal interface IValueProvider
+       {
+               object ProvideValue(IServiceProvider serviceProvider);
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/IXamlTypeResolver.cs b/src/Tizen.NUI/src/internal/Xaml/IXamlTypeResolver.cs
new file mode 100755 (executable)
index 0000000..e1fef0a
--- /dev/null
@@ -0,0 +1,10 @@
+using System;
+
+namespace Tizen.NUI.Xaml
+{
+       internal interface IXamlTypeResolver
+       {
+               Type Resolve(string qualifiedTypeName, IServiceProvider serviceProvider = null);
+               bool TryResolve(string qualifiedTypeName, out Type type);
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/IXmlLineInfoProvider.cs b/src/Tizen.NUI/src/internal/Xaml/IXmlLineInfoProvider.cs
new file mode 100755 (executable)
index 0000000..7dea999
--- /dev/null
@@ -0,0 +1,9 @@
+using System.Xml;
+
+namespace Tizen.NUI.Xaml
+{
+       internal interface IXmlLineInfoProvider
+       {
+               IXmlLineInfo XmlLineInfo { get; }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/MarkupExpressionParser.cs b/src/Tizen.NUI/src/internal/Xaml/MarkupExpressionParser.cs
new file mode 100755 (executable)
index 0000000..9c086e4
--- /dev/null
@@ -0,0 +1,229 @@
+//
+// MarkupExpressionParser.cs
+//
+// This code is partly salvaged from moonlight. Following licence apply.
+//
+//
+// Author(s):
+//   Moonlight List (moonlight-list@lists.ximian.com)
+//   Stephane Delcroix (stephane@mi8.be)
+//
+// Copyright 2009 Novell, Inc.
+// Copyright 2013 Xamarin, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Text;
+
+namespace Tizen.NUI.Xaml
+{
+       abstract class MarkupExpressionParser
+       {
+               public object ParseExpression(ref string expression, IServiceProvider serviceProvider)
+               {
+                       if (serviceProvider == null)
+                               throw new ArgumentNullException(nameof(serviceProvider));
+                       if (expression.StartsWith("{}", StringComparison.Ordinal))
+                               return expression.Substring(2);
+
+                       if (expression[expression.Length - 1] != '}')
+                               throw new Exception("Expression must end with '}'");
+
+                       int len;
+                       string match;
+                       if (!MatchMarkup(out match, expression, out len))
+                               return false;
+                       expression = expression.Substring(len).TrimStart();
+                       if (expression.Length == 0)
+                               throw new Exception("Expression did not end in '}'");
+
+                       var parser = Activator.CreateInstance(GetType()) as IExpressionParser;
+                       return parser.Parse(match, ref expression, serviceProvider);
+               }
+
+               internal static bool MatchMarkup(out string match, string expression, out int end)
+               {
+                       if (expression.Length < 2)
+                       {
+                               end = 1;
+                               match = null;
+                               return false;
+                       }
+
+                       if (expression[0] != '{')
+                       {
+                               end = 2;
+                               match = null;
+                               return false;
+                       }
+
+                       int i;
+                       bool found = false;
+                       for (i = 1; i < expression.Length; i++)
+                       {
+                               if (expression[i] == ' ')
+                                       continue;
+                               found = true;
+                               break;
+                       }
+
+                       if (!found)
+                       {
+                               end = 3;
+                               match = null;
+                               return false;
+                       }
+
+                       int c;
+                       for (c = 0; c + i < expression.Length; c++)
+                       {
+                               if (expression[i + c] == ' ' || expression[i + c] == '}')
+                                       break;
+                       }
+
+                       if (i + c == expression.Length)
+                       {
+                               end = 6;
+                               match = null;
+                               return false;
+                       }
+
+                       end = i + c;
+                       match = expression.Substring(i, c);
+                       return true;
+               }
+
+               protected void HandleProperty(string prop, IServiceProvider serviceProvider, ref string remaining, bool isImplicit)
+               {
+                       char next;
+                       object value = null;
+                       string str_value;
+
+                       if (isImplicit)
+                       {
+                               SetPropertyValue(null, prop, null, serviceProvider);
+                               return;
+                       }
+                       remaining = remaining.TrimStart();
+                       if (remaining.StartsWith("{", StringComparison.Ordinal))
+                       {
+                               value = ParseExpression(ref remaining, serviceProvider);
+                               remaining = remaining.TrimStart();
+
+                               if (remaining.Length > 0 && remaining[0] == ',')
+                                       remaining = remaining.Substring(1);
+                               else if (remaining.Length > 0 && remaining[0] == '}')
+                                       remaining = remaining.Substring(1);
+
+                               str_value = value as string;
+                       }
+                       else
+                               str_value = GetNextPiece(ref remaining, out next);
+
+                       SetPropertyValue(prop, str_value, value, serviceProvider);
+               }
+
+               protected abstract void SetPropertyValue(string prop, string strValue, object value, IServiceProvider serviceProvider);
+
+               protected string GetNextPiece(ref string remaining, out char next)
+               {
+                       bool inString = false;
+                       int end = 0;
+                       char stringTerminator = '\0';
+                       remaining = remaining.TrimStart();
+                       if (remaining.Length == 0)
+                       {
+                               next = Char.MaxValue;
+                               return null;
+                       }
+
+                       var piece = new StringBuilder();
+                       // If we're inside a quoted string we append all chars to our piece until we hit the ending quote.
+                       while (end < remaining.Length &&
+                              (inString || (remaining[end] != '}' && remaining[end] != ',' && remaining[end] != '=')))
+                       {
+                               if (inString)
+                               {
+                                       if (remaining[end] == stringTerminator)
+                                       {
+                                               inString = false;
+                                               end ++;
+                                               break;
+                                       }
+                               }
+                               else
+                               {
+                                       if (remaining[end] == '\'' || remaining[end] == '"')
+                                       {
+                                               inString = true;
+                                               stringTerminator = remaining[end];
+                                               end ++;
+                                               continue;
+                                       }
+                               }
+
+                               // If this is an escape char, consume it and append the next char to our piece.
+                               if (remaining[end] == '\\')
+                               {
+                                       end ++;
+                                       if (end == remaining.Length)
+                                               break;
+                               }
+                               piece.Append(remaining[end]);
+                               end++;
+                       }
+
+                       if (inString && end == remaining.Length)
+                               throw new Exception("Unterminated quoted string");
+
+                       if (end == remaining.Length && !remaining.EndsWith("}", StringComparison.Ordinal))
+                               throw new Exception("Expression did not end with '}'");
+
+                       if (end == 0)
+                       {
+                               next = Char.MaxValue;
+                               return null;
+                       }
+
+                       next = remaining[end];
+                       remaining = remaining.Substring(end + 1);
+
+                       // Whitespace is trimmed from the end of the piece before stripping
+                       // quote chars from the start/end of the string. 
+                       while (piece.Length > 0 && char.IsWhiteSpace(piece[piece.Length - 1]))
+                               piece.Length --;
+
+                       if (piece.Length >= 2)
+                       {
+                               char first = piece[0];
+                               char last = piece[piece.Length - 1];
+                               if ((first == '\'' && last == '\'') || (first == '"' && last == '"'))
+                               {
+                                       piece.Remove(piece.Length - 1, 1);
+                                       piece.Remove(0, 1);
+                               }
+                       }
+
+                       return piece.ToString();
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/MarkupExtensionParser.cs b/src/Tizen.NUI/src/internal/Xaml/MarkupExtensionParser.cs
new file mode 100755 (executable)
index 0000000..16ad97d
--- /dev/null
@@ -0,0 +1,81 @@
+using System;
+using System.Reflection;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.Xaml
+{
+       internal sealed class MarkupExtensionParser : MarkupExpressionParser, IExpressionParser<object>
+       {
+               IMarkupExtension markupExtension;
+
+               public object Parse(string match, ref string remaining, IServiceProvider serviceProvider)
+               {
+                       var typeResolver = serviceProvider.GetService(typeof (IXamlTypeResolver)) as IXamlTypeResolver;
+
+                       //shortcut for Binding and StaticResource, to avoid too many reflection calls.
+                       if (match == "Binding")
+                               markupExtension = new BindingExtension();
+                       else if (match == "TemplateBinding")
+                               markupExtension = new TemplateBindingExtension();
+                       else if (match == "StaticResource")
+                               markupExtension = new StaticResourceExtension();
+                       else
+                       {
+                               if (typeResolver == null)
+                                       return null;
+                               Type type;
+
+                               //The order of lookup is to look for the Extension-suffixed class name first and then look for the class name without the Extension suffix.
+                               if (!typeResolver.TryResolve(match + "Extension", out type) && !typeResolver.TryResolve(match, out type))
+                               {
+                                       var lineInfoProvider = serviceProvider.GetService(typeof (IXmlLineInfoProvider)) as IXmlLineInfoProvider;
+                                       var lineInfo = (lineInfoProvider != null) ? lineInfoProvider.XmlLineInfo : new XmlLineInfo();
+                                       throw new XamlParseException(String.Format("MarkupExtension not found for {0}", match), lineInfo);
+                               }
+                               markupExtension = Activator.CreateInstance(type) as IMarkupExtension;
+                       }
+
+                       if (markupExtension == null)
+                       {
+                               var lineInfoProvider = serviceProvider.GetService(typeof (IXmlLineInfoProvider)) as IXmlLineInfoProvider;
+                               var lineInfo = (lineInfoProvider != null) ? lineInfoProvider.XmlLineInfo : new XmlLineInfo();
+                               throw new XamlParseException(String.Format("Missing public default constructor for MarkupExtension {0}", match),
+                                       lineInfo);
+                       }
+
+                       char next;
+                       if (remaining == "}")
+                               return markupExtension.ProvideValue(serviceProvider);
+
+                       string piece;
+                       while ((piece = GetNextPiece(ref remaining, out next)) != null)
+                               HandleProperty(piece, serviceProvider, ref remaining, next != '=');
+
+                       return markupExtension.ProvideValue(serviceProvider);
+               }
+
+               protected override void SetPropertyValue(string prop, string strValue, object value, IServiceProvider serviceProvider)
+               {
+                       MethodInfo setter;
+                       if (prop == null)
+                       {
+                               //implicit property
+                               var t = markupExtension.GetType();
+                               prop = ApplyPropertiesVisitor.GetContentPropertyName(t.GetTypeInfo());
+                               if (prop == null)
+                                       return;
+                               setter = t.GetRuntimeProperty(prop).SetMethod;
+                       }
+                       else
+                               setter = markupExtension.GetType().GetRuntimeProperty(prop).SetMethod;
+
+                       if (value == null && strValue != null)
+                       {
+                               value = strValue.ConvertTo(markupExtension.GetType().GetRuntimeProperty(prop).PropertyType,
+                                       (Func<TypeConverter>)null, serviceProvider);
+                       }
+
+                       setter.Invoke(markupExtension, new[] { value });
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/ArrayExtension.cs b/src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/ArrayExtension.cs
new file mode 100755 (executable)
index 0000000..b290f44
--- /dev/null
@@ -0,0 +1,41 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.Xaml
+{
+       [ContentProperty("Items")]
+       [AcceptEmptyServiceProvider]
+       internal class ArrayExtension : IMarkupExtension<Array>
+       {
+               public ArrayExtension()
+               {
+                       Items = new List<object>();
+               }
+
+               public IList Items { get; }
+
+               public Type Type { get; set; }
+
+               public Array ProvideValue(IServiceProvider serviceProvider)
+               {
+                       if (Type == null)
+                               throw new InvalidOperationException("Type argument mandatory for x:Array extension");
+
+                       if (Items == null)
+                               return null;
+
+                       var array = Array.CreateInstance(Type, Items.Count);
+                       for (var i = 0; i < Items.Count; i++)
+                               ((IList)array)[i] = Items[i];
+
+                       return array;
+               }
+
+               object IMarkupExtension.ProvideValue(IServiceProvider serviceProvider)
+               {
+                       return (this as IMarkupExtension<Array>).ProvideValue(serviceProvider);
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/BindingExtension.cs b/src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/BindingExtension.cs
new file mode 100755 (executable)
index 0000000..04f0c59
--- /dev/null
@@ -0,0 +1,52 @@
+using System;
+using Tizen.NUI.Internals;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.Xaml
+{
+       [ContentProperty("Path")]
+       [AcceptEmptyServiceProvider]
+       internal sealed class BindingExtension : IMarkupExtension<BindingBase>
+       {
+               public BindingExtension()
+               {
+                       Mode = BindingMode.Default;
+                       Path = Tizen.NUI.Binding.Binding.SelfPath;
+               }
+
+               public string Path { get; set; }
+
+               public BindingMode Mode { get; set; }
+
+               public IValueConverter Converter { get; set; }
+
+               public object ConverterParameter { get; set; }
+
+               public string StringFormat { get; set; }
+
+               public object Source { get; set; }
+
+               public string UpdateSourceEventName { get; set; }
+
+               public TypedBindingBase TypedBinding { get; set; }
+
+               BindingBase IMarkupExtension<BindingBase>.ProvideValue(IServiceProvider serviceProvider)
+               {
+                       if (TypedBinding == null)
+                               return new Tizen.NUI.Binding.Binding(Path, Mode, Converter, ConverterParameter, StringFormat, Source) { UpdateSourceEventName = UpdateSourceEventName };
+
+                       TypedBinding.Mode = Mode;
+                       TypedBinding.Converter = Converter;
+                       TypedBinding.ConverterParameter = ConverterParameter;
+                       TypedBinding.StringFormat = StringFormat;
+                       TypedBinding.Source = Source;
+                       TypedBinding.UpdateSourceEventName = UpdateSourceEventName;
+                       return TypedBinding;
+               }
+
+               object IMarkupExtension.ProvideValue(IServiceProvider serviceProvider)
+               {
+                       return (this as IMarkupExtension<BindingBase>).ProvideValue(serviceProvider);
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/DynamicResourceExtension.cs b/src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/DynamicResourceExtension.cs
new file mode 100755 (executable)
index 0000000..6edb0af
--- /dev/null
@@ -0,0 +1,28 @@
+using System;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Internals;
+
+namespace Tizen.NUI.Xaml
+{
+       [ContentProperty("Key")]
+       internal sealed class DynamicResourceExtension : IMarkupExtension<DynamicResource>
+       {
+               public string Key { get; set; }
+
+               public object ProvideValue(IServiceProvider serviceProvider)
+               {
+                       return ((IMarkupExtension<DynamicResource>)this).ProvideValue(serviceProvider);
+               }
+
+               DynamicResource IMarkupExtension<DynamicResource>.ProvideValue(IServiceProvider serviceProvider)
+               {
+                       if (Key == null)
+                       {
+                               var lineInfoProvider = serviceProvider.GetService(typeof (IXmlLineInfoProvider)) as IXmlLineInfoProvider;
+                               var lineInfo = (lineInfoProvider != null) ? lineInfoProvider.XmlLineInfo : new XmlLineInfo();
+                               throw new XamlParseException("DynamicResource markup require a Key", lineInfo);
+                       }
+                       return new DynamicResource(Key);
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/NullExtension.cs b/src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/NullExtension.cs
new file mode 100755 (executable)
index 0000000..40aedbd
--- /dev/null
@@ -0,0 +1,14 @@
+using System;
+
+namespace Tizen.NUI.Xaml
+{
+       // [ProvideCompiled("Tizen.NUI.Build.Tasks.NullExtension")]
+       [AcceptEmptyServiceProvider]
+       internal class NullExtension : IMarkupExtension
+       {
+               public object ProvideValue(IServiceProvider serviceProvider)
+               {
+                       return null;
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/ReferenceExtension.cs b/src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/ReferenceExtension.cs
new file mode 100755 (executable)
index 0000000..a888997
--- /dev/null
@@ -0,0 +1,42 @@
+using System;
+using Tizen.NUI.Internals;
+using Tizen.NUI.Xaml.Internals;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.Xaml
+{
+       [ContentProperty("Name")]
+       internal class ReferenceExtension : IMarkupExtension
+       {
+               public string Name { get; set; }
+
+               public object ProvideValue(IServiceProvider serviceProvider)
+               {
+                       if (serviceProvider == null)
+                               throw new ArgumentNullException(nameof(serviceProvider));
+                       var valueProvider = serviceProvider.GetService(typeof (IProvideValueTarget)) as IProvideParentValues;
+                       if (valueProvider == null)
+                               throw new ArgumentException("serviceProvider does not provide an IProvideValueTarget");
+                       var namescopeprovider = serviceProvider.GetService(typeof (INameScopeProvider)) as INameScopeProvider;
+                       if (namescopeprovider != null && namescopeprovider.NameScope != null)
+                       {
+                               var value = namescopeprovider.NameScope.FindByName(Name);
+                               if (value != null)
+                                       return value;
+                       }
+
+                       foreach (var target in valueProvider.ParentObjects)
+                       {
+                               var ns = target as INameScope;
+                               if (ns == null)
+                                       continue;
+                               var value = ns.FindByName(Name);
+                               if (value != null)
+                                       return value;
+                       }
+
+                       var lineInfo = (serviceProvider?.GetService(typeof(IXmlLineInfoProvider)) as IXmlLineInfoProvider)?.XmlLineInfo ?? new XmlLineInfo();
+                       throw new XamlParseException($"Can not find the object referenced by `{Name}`", lineInfo);
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/StaticExtension.cs b/src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/StaticExtension.cs
new file mode 100755 (executable)
index 0000000..58eb49d
--- /dev/null
@@ -0,0 +1,52 @@
+using System;
+using System.Linq;
+using System.Reflection;
+using System.Xml;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.Xaml
+{
+       [ContentProperty(nameof(Member))]
+       // [ProvideCompiled("Tizen.NUI.Build.Tasks.StaticExtension")]
+       internal class StaticExtension : IMarkupExtension
+       {
+               public string Member { get; set; }
+
+               public object ProvideValue(IServiceProvider serviceProvider)
+               {
+                       IXmlLineInfoProvider lineInfoProvider;
+                       IXmlLineInfo lineInfo;
+
+                       if (serviceProvider == null)
+                               throw new ArgumentNullException(nameof(serviceProvider));
+                       var typeResolver = serviceProvider.GetService(typeof (IXamlTypeResolver)) as IXamlTypeResolver;
+                       if (typeResolver == null)
+                               throw new ArgumentException("No IXamlTypeResolver in IServiceProvider");
+
+                       if (string.IsNullOrEmpty(Member) || !Member.Contains("."))
+                       {
+                               lineInfoProvider = serviceProvider.GetService(typeof (IXmlLineInfoProvider)) as IXmlLineInfoProvider;
+                               lineInfo = (lineInfoProvider != null) ? lineInfoProvider.XmlLineInfo : new XmlLineInfo();
+                               throw new XamlParseException("Syntax for x:Static is [Member=][prefix:]typeName.staticMemberName", lineInfo);
+                       }
+
+                       var dotIdx = Member.LastIndexOf('.');
+                       var typename = Member.Substring(0, dotIdx);
+                       var membername = Member.Substring(dotIdx + 1);
+
+                       var type = typeResolver.Resolve(typename, serviceProvider);
+
+                       var pinfo = type.GetRuntimeProperties().FirstOrDefault(pi => pi.Name == membername && pi.GetMethod.IsStatic);
+                       if (pinfo != null)
+                               return pinfo.GetMethod.Invoke(null, new object[] { });
+
+                       var finfo = type.GetRuntimeFields().FirstOrDefault(fi => fi.Name == membername && fi.IsStatic);
+                       if (finfo != null)
+                               return finfo.GetValue(null);
+
+                       lineInfoProvider = serviceProvider.GetService(typeof (IXmlLineInfoProvider)) as IXmlLineInfoProvider;
+                       lineInfo = (lineInfoProvider != null) ? lineInfoProvider.XmlLineInfo : new XmlLineInfo();
+                       throw new XamlParseException($"No static member found for {Member}", lineInfo);
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/StaticResourceExtension.cs b/src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/StaticResourceExtension.cs
new file mode 100755 (executable)
index 0000000..5c4384c
--- /dev/null
@@ -0,0 +1,91 @@
+using System;
+using System.Xml;
+using System.Reflection;
+using System.Linq;
+using Tizen.NUI.Binding;
+
+
+namespace Tizen.NUI.Xaml
+{
+       [ContentProperty("Key")]
+       internal sealed class StaticResourceExtension : IMarkupExtension
+       {
+               public string Key { get; set; }
+
+               public object ProvideValue(IServiceProvider serviceProvider)
+               {
+                       if (serviceProvider == null)
+                               throw new ArgumentNullException(nameof(serviceProvider));
+                       if (Key == null) {
+                               var lineInfoProvider = serviceProvider.GetService(typeof(IXmlLineInfoProvider)) as IXmlLineInfoProvider;
+                               var lineInfo = (lineInfoProvider != null) ? lineInfoProvider.XmlLineInfo : new XmlLineInfo();
+                               throw new XamlParseException("you must specify a key in {StaticResource}", lineInfo);
+                       }
+                       var valueProvider = serviceProvider.GetService(typeof(IProvideValueTarget)) as IProvideParentValues;
+                       if (valueProvider == null)
+                               throw new ArgumentException();
+                       var xmlLineInfoProvider = serviceProvider.GetService(typeof(IXmlLineInfoProvider)) as IXmlLineInfoProvider;
+                       var xmlLineInfo = xmlLineInfoProvider != null ? xmlLineInfoProvider.XmlLineInfo : null;
+                       object resource = null;
+
+                       foreach (var p in valueProvider.ParentObjects) {
+                               var irp = p as IResourcesProvider;
+                               var resDict = irp != null && irp.IsResourcesCreated ? irp.Resources : p as ResourceDictionary;
+                               if (resDict == null)
+                                       continue;
+                               if (resDict.TryGetValue(Key, out resource))
+                                       break;
+                       }
+                       resource = resource ?? GetApplicationLevelResource(Key, xmlLineInfo);
+
+                       var bp = valueProvider.TargetProperty as BindableProperty;
+                       var pi = valueProvider.TargetProperty as PropertyInfo;
+                       var propertyType = bp?.ReturnType ?? pi?.PropertyType;
+                       if (propertyType == null) {
+                               if (resource.GetType().GetTypeInfo().IsGenericType && (resource.GetType().GetGenericTypeDefinition() == typeof(OnPlatform<>) || resource.GetType().GetGenericTypeDefinition() == typeof(OnIdiom<>))) {
+                                       // This is only there to support our backward compat story with pre 2.3.3 compiled Xaml project who was not providing TargetProperty
+                                       var method = resource.GetType().GetRuntimeMethod("op_Implicit", new[] { resource.GetType() });
+                                       resource = method.Invoke(null, new[] { resource });
+                               }
+                               return resource;
+                       }
+                       if (propertyType.IsAssignableFrom(resource.GetType()))
+                               return resource;
+                       var implicit_op =  resource.GetType().GetImplicitConversionOperator(fromType: resource.GetType(), toType: propertyType)
+                                                       ?? propertyType.GetImplicitConversionOperator(fromType: resource.GetType(), toType: propertyType);
+                       if (implicit_op != null)
+                               return implicit_op.Invoke(resource, new [] { resource });
+
+                       //Special case for https://bugzilla.xamarin.com/show_bug.cgi?id=59818
+                       //On OnPlatform, check for an opImplicit from the targetType
+                       if (   Device.Flags != null
+                               && Device.Flags.Contains("xamlDoubleImplicitOpHack")
+                               && resource.GetType().GetTypeInfo().IsGenericType
+                               && (resource.GetType().GetGenericTypeDefinition() == typeof(OnPlatform<>))) {
+                               var tType = resource.GetType().GenericTypeArguments[0];
+                               var opImplicit = tType.GetImplicitConversionOperator(fromType: tType, toType: propertyType)
+                                                               ?? propertyType.GetImplicitConversionOperator(fromType: tType, toType: propertyType);
+
+                               if (opImplicit != null) {
+                                       //convert the OnPlatform<T> to T
+                                       var opPlatformImplicitConversionOperator = resource.GetType().GetImplicitConversionOperator(fromType: resource.GetType(), toType: tType);
+                                       resource = opPlatformImplicitConversionOperator.Invoke(null, new[] { resource });
+
+                                       //and convert to toType
+                                       resource = opImplicit.Invoke(null, new[] { resource });
+                                       return resource;
+                               }
+                       }
+
+                       return resource;
+               }
+
+               internal object GetApplicationLevelResource(string key, IXmlLineInfo xmlLineInfo)
+               {
+                       object resource = null;
+                       // if (Application.Current == null || !((IResourcesProvider)Application.Current).IsResourcesCreated || !Application.Current.Resources.TryGetValue(Key, out resource))
+                               // throw new XamlParseException($"StaticResource not found for key {Key}", xmlLineInfo);
+                       return resource;
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/StyleSheetExtension.cs b/src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/StyleSheetExtension.cs
new file mode 100755 (executable)
index 0000000..3eb1301
--- /dev/null
@@ -0,0 +1,49 @@
+using System;
+using System.Xml;
+using Tizen.NUI.StyleSheets;
+using System.Reflection;
+using System.IO;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.Xaml
+{
+       [ContentProperty(nameof(Style))]
+       // [ProvideCompiled("Tizen.NUI.Core.XamlC.StyleSheetProvider")]
+       internal sealed class StyleSheetExtension : IValueProvider
+       {
+               public string Style { get; set; }
+               public Uri Source { get; set; }
+
+               object IValueProvider.ProvideValue(IServiceProvider serviceProvider)
+               {
+                       IXmlLineInfo lineInfo;
+
+                       if (!string.IsNullOrEmpty(Style) && Source != null) {
+                               lineInfo = (serviceProvider.GetService(typeof(IXmlLineInfoProvider)) as IXmlLineInfoProvider)?.XmlLineInfo;
+                               throw new XamlParseException($"StyleSheet can not have both a Source and a content", lineInfo);
+                       }
+
+                       if (Source != null) {
+                               lineInfo = (serviceProvider.GetService(typeof(IXmlLineInfoProvider)) as IXmlLineInfoProvider)?.XmlLineInfo;
+                               if (Source.IsAbsoluteUri)
+                                       throw new XamlParseException($"Source only accepts Relative URIs", lineInfo);
+
+                               var rootObjectType = (serviceProvider.GetService(typeof(IRootObjectProvider)) as IRootObjectProvider)?.RootObject.GetType();
+                               if (rootObjectType == null)
+                                       return null;
+                               var rootTargetPath = XamlResourceIdAttribute.GetPathForType(rootObjectType);
+                               var resourcePath = ResourceDictionary.RDSourceTypeConverter.GetResourcePath(Source, rootTargetPath);
+                               var resString = DependencyService.Get<IResourcesLoader>().GetResource(resourcePath, rootObjectType.GetTypeInfo().Assembly, lineInfo);
+                               return StyleSheet.FromString(resString);
+                       }
+
+                       if (!string.IsNullOrEmpty(Style)) {
+                               using (var reader = new StringReader(Style))
+                                       return StyleSheet.FromReader(reader);
+                       }
+
+                       lineInfo = (serviceProvider.GetService(typeof(IXmlLineInfoProvider)) as IXmlLineInfoProvider)?.XmlLineInfo;
+                       throw new XamlParseException($"StyleSheet require either a Source or a content", lineInfo);
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/TemplateBindingExtension.cs b/src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/TemplateBindingExtension.cs
new file mode 100755 (executable)
index 0000000..2f32486
--- /dev/null
@@ -0,0 +1,36 @@
+using System;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.Xaml
+{
+       [ContentProperty("Path")]
+       [AcceptEmptyServiceProvider]
+       internal sealed class TemplateBindingExtension : IMarkupExtension<BindingBase>
+       {
+               internal TemplateBindingExtension()
+               {
+                       Mode = BindingMode.Default;
+                       Path = Tizen.NUI.Binding.Binding.SelfPath;
+               }
+
+               public string Path { get; set; }
+
+               public BindingMode Mode { get; set; }
+
+               public IValueConverter Converter { get; set; }
+
+               public object ConverterParameter { get; set; }
+
+               public string StringFormat { get; set; }
+
+               BindingBase IMarkupExtension<BindingBase>.ProvideValue(IServiceProvider serviceProvider)
+               {
+                       return new TemplateBinding(Path, Mode, Converter, ConverterParameter, StringFormat);
+               }
+
+               object IMarkupExtension.ProvideValue(IServiceProvider serviceProvider)
+               {
+                       return (this as IMarkupExtension<BindingBase>).ProvideValue(serviceProvider);
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/TypeExtension.cs b/src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/TypeExtension.cs
new file mode 100755 (executable)
index 0000000..805f862
--- /dev/null
@@ -0,0 +1,30 @@
+using System;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.Xaml
+{
+       [ContentProperty(nameof(TypeName))]
+       // [ProvideCompiled("Tizen.NUI.Build.Tasks.TypeExtension")]
+       internal class TypeExtension : IMarkupExtension<Type>
+       {
+               public string TypeName { get; set; }
+
+               public Type ProvideValue(IServiceProvider serviceProvider)
+               {
+                       if (string.IsNullOrEmpty(TypeName))
+                               throw new InvalidOperationException("TypeName isn't set.");
+                       if (serviceProvider == null)
+                               throw new ArgumentNullException(nameof(serviceProvider));
+                       var typeResolver = serviceProvider.GetService(typeof (IXamlTypeResolver)) as IXamlTypeResolver;
+                       if (typeResolver == null)
+                               throw new ArgumentException("No IXamlTypeResolver in IServiceProvider");
+
+                       return typeResolver.Resolve(TypeName, serviceProvider);
+               }
+
+               object IMarkupExtension.ProvideValue(IServiceProvider serviceProvider)
+               {
+                       return (this as IMarkupExtension<Type>).ProvideValue(serviceProvider);
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/NamescopingVisitor.cs b/src/Tizen.NUI/src/internal/Xaml/NamescopingVisitor.cs
new file mode 100755 (executable)
index 0000000..5edbfc6
--- /dev/null
@@ -0,0 +1,75 @@
+using System.Collections.Generic;
+using Tizen.NUI.Internals;
+
+namespace Tizen.NUI.Xaml
+{
+       internal class NamescopingVisitor : IXamlNodeVisitor
+       {
+               readonly Dictionary<INode, INameScope> scopes = new Dictionary<INode, INameScope>();
+
+               public NamescopingVisitor(HydrationContext context)
+               {
+                       Values = context.Values;
+               }
+
+               Dictionary<INode, object> Values { get; set; }
+
+               public TreeVisitingMode VisitingMode => TreeVisitingMode.TopDown;
+               public bool StopOnDataTemplate => false;
+               public bool StopOnResourceDictionary => false;
+               public bool VisitNodeOnDataTemplate => true;
+               public bool SkipChildren(INode node, INode parentNode) => false;
+
+               public void Visit(ValueNode node, INode parentNode)
+               {
+                       scopes[node] = scopes[parentNode];
+               }
+
+               public void Visit(MarkupNode node, INode parentNode)
+               {
+                       scopes[node] = scopes[parentNode];
+               }
+
+               public void Visit(ElementNode node, INode parentNode)
+               {
+                       var ns = parentNode == null || IsDataTemplate(node, parentNode) || IsStyle(node, parentNode) || IsVisualStateGroupList(node)
+                               ? new NameScope()
+                               : scopes[parentNode];
+                       node.Namescope = ns;
+                       scopes[node] = ns;
+               }
+
+               public void Visit(RootNode node, INode parentNode)
+               {
+                       var ns = new NameScope();
+                       node.Namescope = ns;
+                       scopes[node] = ns;
+               }
+
+               public void Visit(ListNode node, INode parentNode)
+               {
+                       scopes[node] = scopes[parentNode];
+               }
+
+               static bool IsDataTemplate(INode node, INode parentNode)
+               {
+                       var parentElement = parentNode as IElementNode;
+                       INode createContent;
+                       if (parentElement != null && parentElement.Properties.TryGetValue(XmlName._CreateContent, out createContent) &&
+                           createContent == node)
+                               return true;
+                       return false;
+               }
+
+               static bool IsStyle(INode node, INode parentNode)
+               {
+                       var pnode = parentNode as ElementNode;
+                       return pnode != null && pnode.XmlType.Name == "Style";
+               }
+
+               static bool IsVisualStateGroupList(ElementNode node)
+               {
+                       return node != null  && node.XmlType.Name == "VisualStateGroup" && node.Parent is IListNode;
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/PruneIgnoredNodesVisitor.cs b/src/Tizen.NUI/src/internal/Xaml/PruneIgnoredNodesVisitor.cs
new file mode 100755 (executable)
index 0000000..43a421e
--- /dev/null
@@ -0,0 +1,78 @@
+using System.Collections.Generic;
+using System.Linq;
+
+namespace Tizen.NUI.Xaml
+{
+       class PruneIgnoredNodesVisitor : IXamlNodeVisitor
+       {
+               public TreeVisitingMode VisitingMode => TreeVisitingMode.TopDown;
+               public bool StopOnDataTemplate => false;
+               public bool StopOnResourceDictionary => false;
+               public bool VisitNodeOnDataTemplate => true;
+               public bool SkipChildren(INode node, INode parentNode) => false;
+
+               public void Visit(ElementNode node, INode parentNode)
+               {
+                       foreach (var propertyKvp in node.Properties)
+                       {
+                               var propertyName = propertyKvp.Key;
+                               var propertyValue = (propertyKvp.Value as ValueNode)?.Value as string;
+                               if (propertyValue == null)
+                                       continue;
+                               if (!propertyName.Equals(XamlParser.McUri, "Ignorable"))
+                                       continue;
+                               (parentNode.IgnorablePrefixes ?? (parentNode.IgnorablePrefixes = new List<string>())).AddRange(propertyValue.Split(','));
+                       }
+
+                       foreach (var propertyKvp in node.Properties.ToList())
+                       {
+                               // skip d:foo="bar"
+                               var prefix = node.NamespaceResolver.LookupPrefix(propertyKvp.Key.NamespaceURI);
+                               if (node.SkipPrefix(prefix))
+                                       node.Properties.Remove(propertyKvp.Key);
+                               var propNs = (propertyKvp.Value as IElementNode)?.NamespaceURI ?? "";
+                               var propPrefix = node.NamespaceResolver.LookupPrefix(propNs);
+                               if (node.SkipPrefix(propPrefix))
+                                       node.Properties.Remove(propertyKvp.Key);
+                       }
+
+                       foreach (var prop in node.CollectionItems.ToList())
+                       {
+                               var propNs = (prop as IElementNode)?.NamespaceURI ?? "";
+                               var propPrefix = node.NamespaceResolver.LookupPrefix(propNs);
+                               if (node.SkipPrefix(propPrefix))
+                                       node.CollectionItems.Remove(prop);
+                       }
+
+                       if (node.SkipPrefix(node.NamespaceResolver.LookupPrefix(node.NamespaceURI)))
+                       {
+                               node.Properties.Clear();
+                               node.CollectionItems.Clear();
+                       }
+               }
+
+               public void Visit(RootNode node, INode parentNode)
+               {
+                       Visit((ElementNode)node, node);
+               }
+
+               public void Visit(MarkupNode node, INode parentNode)
+               {
+               }
+
+               public void Visit(ListNode node, INode parentNode)
+               {
+                       foreach (var prop in node.CollectionItems.ToList())
+                       {
+                               var propNs = (prop as IElementNode)?.NamespaceURI ?? "";
+                               var propPrefix = node.NamespaceResolver.LookupPrefix(propNs);
+                               if (node.SkipPrefix(propPrefix))
+                                       node.CollectionItems.Remove(prop);
+                       }
+               }
+
+               public void Visit(ValueNode node, INode parentNode)
+               {
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/ReflectionExtensions.cs b/src/Tizen.NUI/src/internal/Xaml/ReflectionExtensions.cs
new file mode 100755 (executable)
index 0000000..4484cc4
--- /dev/null
@@ -0,0 +1,70 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Reflection;
+
+namespace Tizen.NUI.Internals
+{
+       [EditorBrowsable(EditorBrowsableState.Never)]
+       internal static class ReflectionExtensions
+       {
+               public static FieldInfo GetField(this Type type, Func<FieldInfo, bool> predicate)
+               {
+                       return GetFields(type).FirstOrDefault(predicate);
+               }
+
+               public static FieldInfo GetField(this Type type, string name)
+               {
+                       return type.GetField(fi => fi.Name == name);
+               }
+
+               public static IEnumerable<FieldInfo> GetFields(this Type type)
+               {
+                       return GetParts(type, i => i.DeclaredFields);
+               }
+
+               public static IEnumerable<PropertyInfo> GetProperties(this Type type)
+               {
+                       return GetParts(type, ti => ti.DeclaredProperties);
+               }
+
+               public static PropertyInfo GetProperty(this Type type, string name)
+               {
+                       Type t = type;
+                       while (t != null)
+                       {
+                               System.Reflection.TypeInfo ti = t.GetTypeInfo();
+                               PropertyInfo property = ti.GetDeclaredProperty(name);
+                               if (property != null)
+                                       return property;
+
+                               t = ti.BaseType;
+                       }
+
+                       return null;
+               }
+
+               public static bool IsAssignableFrom(this Type self, Type c)
+               {
+                       return self.GetTypeInfo().IsAssignableFrom(c.GetTypeInfo());
+               }
+
+               public static bool IsInstanceOfType(this Type self, object o)
+               {
+                       return self.GetTypeInfo().IsAssignableFrom(o.GetType().GetTypeInfo());
+               }
+
+               static IEnumerable<T> GetParts<T>(Type type, Func<System.Reflection.TypeInfo, IEnumerable<T>> selector)
+               {
+                       Type t = type;
+                       while (t != null)
+                       {
+                               System.Reflection.TypeInfo ti = t.GetTypeInfo();
+                               foreach (T f in selector(ti))
+                                       yield return f;
+                               t = ti.BaseType;
+                       }
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/RegisterXNamesVisitor.cs b/src/Tizen.NUI/src/internal/Xaml/RegisterXNamesVisitor.cs
new file mode 100755 (executable)
index 0000000..e86f93d
--- /dev/null
@@ -0,0 +1,66 @@
+using System;
+using System.Collections.Generic;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.Xaml
+{
+       class RegisterXNamesVisitor : IXamlNodeVisitor
+       {
+               public RegisterXNamesVisitor(HydrationContext context)
+               {
+                       Values = context.Values;
+               }
+
+               Dictionary<INode, object> Values { get; }
+
+               public TreeVisitingMode VisitingMode => TreeVisitingMode.TopDown;
+               public bool StopOnDataTemplate => true;
+               public bool StopOnResourceDictionary => false;
+               public bool VisitNodeOnDataTemplate => false;
+               public bool SkipChildren(INode node, INode parentNode) => false;
+
+               public void Visit(ValueNode node, INode parentNode)
+               {
+                       if (!IsXNameProperty(node, parentNode))
+                               return;
+                       try
+                       {
+                               ((IElementNode)parentNode).Namescope.RegisterName((string)node.Value, Values[parentNode]);
+                       }
+                       catch (ArgumentException ae)
+                       {
+                               if (ae.ParamName != "name")
+                                       throw ae;
+                               throw new XamlParseException($"An element with the name \"{(string)node.Value}\" already exists in this NameScope", node);
+                       }
+                       var element = Values[parentNode] as Element;
+                       if (element != null)
+                               element.StyleId = element.StyleId ?? (string)node.Value;
+               }
+
+               public void Visit(MarkupNode node, INode parentNode)
+               {
+               }
+
+               public void Visit(ElementNode node, INode parentNode)
+               {
+               }
+
+               public void Visit(RootNode node, INode parentNode)
+               {
+               }
+
+               public void Visit(ListNode node, INode parentNode)
+               {
+               }
+
+               static bool IsXNameProperty(ValueNode node, INode parentNode)
+               {
+                       var parentElement = parentNode as IElementNode;
+                       INode xNameNode;
+                       if (parentElement != null && parentElement.Properties.TryGetValue(XmlName.xName, out xNameNode) && xNameNode == node)
+                               return true;
+                       return false;
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/ResourcesLoader.cs b/src/Tizen.NUI/src/internal/Xaml/ResourcesLoader.cs
new file mode 100755 (executable)
index 0000000..03a4a40
--- /dev/null
@@ -0,0 +1,55 @@
+using System;
+using System.IO;
+using System.Reflection;
+using Tizen.NUI;
+using System.Xml;
+using Tizen.NUI.Internals;
+
+// [assembly:Dependency(typeof(Tizen.NUI.Xaml.ResourcesLoader))]
+namespace Tizen.NUI.Xaml
+{
+       class ResourcesLoader : IResourcesLoader
+       {
+               public T CreateFromResource<T>(string resourcePath, Assembly assembly, IXmlLineInfo lineInfo) where T: new()
+               {
+                       var alternateResource = ResourceLoader.ResourceProvider?.Invoke(assembly.GetName(), resourcePath);
+                       if (alternateResource != null) {
+                               var rd = new T();
+                               rd.LoadFromXaml(alternateResource);
+                               return rd;
+                       }
+
+                       var resourceId = XamlResourceIdAttribute.GetResourceIdForPath(assembly, resourcePath);
+                       if (resourceId == null)
+                               throw new XamlParseException($"Resource '{resourcePath}' not found.", lineInfo);
+
+                       using (var stream = assembly.GetManifestResourceStream(resourceId)) {
+                               if (stream == null)
+                                       throw new XamlParseException($"No resource found for '{resourceId}'.", lineInfo);
+                               using (var reader = new StreamReader(stream)) {
+                                       var rd = new T();
+                                       rd.LoadFromXaml(reader.ReadToEnd());
+                                       return rd;
+                               }
+                       }
+               }
+
+               public string GetResource(string resourcePath, Assembly assembly, IXmlLineInfo lineInfo)
+               {
+                       var alternateResource = ResourceLoader.ResourceProvider?.Invoke(assembly.GetName(), resourcePath);
+                       if (alternateResource != null)
+                               return alternateResource;
+
+                       var resourceId = XamlResourceIdAttribute.GetResourceIdForPath(assembly, resourcePath);
+                       if (resourceId == null)
+                               throw new XamlParseException($"Resource '{resourcePath}' not found.", lineInfo);
+
+                       using (var stream = assembly.GetManifestResourceStream(resourceId)) {
+                               if (stream == null)
+                                       throw new XamlParseException($"No resource found for '{resourceId}'.", lineInfo);
+                               using (var reader = new StreamReader(stream))
+                                       return reader.ReadToEnd();
+                       }
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/RuntimeNamePropertyAttribute.cs b/src/Tizen.NUI/src/internal/Xaml/RuntimeNamePropertyAttribute.cs
new file mode 100755 (executable)
index 0000000..08a7c64
--- /dev/null
@@ -0,0 +1,15 @@
+using System;
+
+namespace Tizen.NUI.Xaml
+{
+       [AttributeUsage(AttributeTargets.Class)]
+       internal sealed class RuntimeNamePropertyAttribute : Attribute
+       {
+               public RuntimeNamePropertyAttribute(string name)
+               {
+                       Name = name;
+               }
+
+               public string Name { get; }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/TypeArgumentsParser.cs b/src/Tizen.NUI/src/internal/Xaml/TypeArgumentsParser.cs
new file mode 100755 (executable)
index 0000000..0c10eb4
--- /dev/null
@@ -0,0 +1,70 @@
+using System.Collections.Generic;
+using System.Xml;
+
+namespace Tizen.NUI.Xaml
+{
+       static class TypeArgumentsParser
+       {
+               public static IList<XmlType> ParseExpression(string expression, IXmlNamespaceResolver resolver, IXmlLineInfo lineInfo)
+               {
+                       var typeList = new List<XmlType>();
+                       while (!string.IsNullOrWhiteSpace(expression))
+                       {
+                               var match = expression;
+                               typeList.Add(Parse(match, ref expression, resolver, lineInfo));
+                       }
+                       return typeList;
+               }
+
+               static XmlType Parse(string match, ref string remaining, IXmlNamespaceResolver resolver, IXmlLineInfo lineinfo)
+               {
+                       remaining = null;
+                       int parensCount = 0;
+                       int pos = 0;
+                       bool isGeneric = false;
+
+                       for (pos = 0; pos < match.Length; pos++)
+                       {
+                               if (match[pos] == '(')
+                               {
+                                       parensCount++;
+                                       isGeneric = true;
+                               }
+                               else if (match[pos] == ')')
+                                       parensCount--;
+                               else if (match[pos] == ',' && parensCount == 0)
+                               {
+                                       remaining = match.Substring(pos + 1);
+                                       break;
+                               }
+                       }
+                       var type = match.Substring(0, pos).Trim();
+
+                       IList<XmlType> typeArguments = null;
+                       if (isGeneric)
+                       {
+                               typeArguments = ParseExpression(
+                                       type.Substring(type.IndexOf('(') + 1, type.LastIndexOf(')') - type.IndexOf('(') - 1), resolver, lineinfo);
+                               type = type.Substring(0, type.IndexOf('('));
+                       }
+
+                       var split = type.Split(':');
+                       if (split.Length > 2)
+                               return null;
+
+                       string prefix, name;
+                       if (split.Length == 2) {
+                               prefix = split [0];
+                               name = split [1];
+                       } else {
+                               prefix = "";
+                               name = split [0];
+                       }
+
+                       var namespaceuri = resolver.LookupNamespace(prefix);
+                       if (namespaceuri == null)
+                               throw new XamlParseException($"No xmlns declaration for prefix '{prefix}'.", lineinfo, null);
+                       return new XmlType(namespaceuri, name, typeArguments);
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/TypeConversionAttribute.cs b/src/Tizen.NUI/src/internal/Xaml/TypeConversionAttribute.cs
new file mode 100755 (executable)
index 0000000..c4b90eb
--- /dev/null
@@ -0,0 +1,15 @@
+using System;
+
+namespace Tizen.NUI.Xaml
+{
+       [System.AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = false)]
+       internal sealed class TypeConversionAttribute : Attribute
+       {
+               public Type TargetType { get; private set; }
+
+               public TypeConversionAttribute(Type targetType)
+               {
+                       TargetType = targetType;
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/TypeConversionExtensions.cs b/src/Tizen.NUI/src/internal/Xaml/TypeConversionExtensions.cs
new file mode 100755 (executable)
index 0000000..1d67898
--- /dev/null
@@ -0,0 +1,213 @@
+//
+// TypeConversionExtensions.cs
+//
+// Author:
+//       Stephane Delcroix <stephane@mi8.be>
+//
+// Copyright (c) 2013 Mobile Inception
+// Copyright (c) 2014 Xamarin, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Reflection;
+// using Tizen.NUI.Internals;
+using Tizen.NUI.Xaml.Internals;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.Xaml
+{
+       static class TypeConversionExtensions
+       {
+               internal static object ConvertTo(this object value, Type toType, Func<ParameterInfo> pinfoRetriever,
+                       IServiceProvider serviceProvider)
+               {
+                       Func<TypeConverter> getConverter = () =>
+                       {
+                               ParameterInfo pInfo;
+                               if (pinfoRetriever == null || (pInfo = pinfoRetriever()) == null)
+                                       return null;
+
+                               var converterTypeName = pInfo.CustomAttributes.GetTypeConverterTypeName();
+                               if (converterTypeName == null)
+                                       return null;
+                               var convertertype = Type.GetType(converterTypeName);
+                               return (TypeConverter)Activator.CreateInstance(convertertype);
+                       };
+
+                       return ConvertTo(value, toType, getConverter, serviceProvider);
+               }
+
+               internal static object ConvertTo(this object value, Type toType, Func<MemberInfo> minfoRetriever,
+                       IServiceProvider serviceProvider)
+               {
+                       Func<object> getConverter = () =>
+                       {
+                               MemberInfo memberInfo;
+
+                               var converterTypeName = toType.GetTypeInfo().CustomAttributes.GetTypeConverterTypeName();
+                               if (minfoRetriever != null && (memberInfo = minfoRetriever()) != null)
+                                       converterTypeName = memberInfo.CustomAttributes.GetTypeConverterTypeName() ?? converterTypeName;
+                               if (converterTypeName == null)
+                                       return null;
+
+                               var convertertype = Type.GetType(converterTypeName);
+                               return Activator.CreateInstance(convertertype);
+                       };
+
+                       return ConvertTo(value, toType, getConverter, serviceProvider);
+               }
+
+               static string GetTypeConverterTypeName(this IEnumerable<CustomAttributeData> attributes)
+               {
+                       var converterAttribute =
+                               attributes.FirstOrDefault(cad => TypeConverterAttribute.TypeConvertersType.Contains(cad.AttributeType.FullName));
+                       if (converterAttribute == null)
+                               return null;
+                       if (converterAttribute.ConstructorArguments[0].ArgumentType == typeof (string))
+                               return (string)converterAttribute.ConstructorArguments[0].Value;
+                       if (converterAttribute.ConstructorArguments[0].ArgumentType == typeof (Type))
+                               return ((Type)converterAttribute.ConstructorArguments[0].Value).AssemblyQualifiedName;
+                       return null;
+               }
+
+               //Don't change the name or the signature of this, it's used by XamlC
+               public static object ConvertTo(this object value, Type toType, Type convertertype, IServiceProvider serviceProvider)
+               {
+                       if (convertertype == null)
+                               return value.ConvertTo(toType, (Func<object>)null, serviceProvider);
+                       Func<object> getConverter = () => Activator.CreateInstance(convertertype);
+                       ;
+                       return value.ConvertTo(toType, getConverter, serviceProvider);
+               }
+
+               internal static object ConvertTo(this object value, Type toType, Func<object> getConverter,
+                       IServiceProvider serviceProvider)
+               {
+                       if (value == null)
+                               return null;
+
+                       var str = value as string;
+                       if (str != null)
+                       {
+                               //If there's a [TypeConverter], use it
+                               object converter = getConverter?.Invoke();
+                               var xfTypeConverter = converter as TypeConverter;
+                               var xfExtendedTypeConverter = xfTypeConverter as IExtendedTypeConverter;
+                               if (xfExtendedTypeConverter != null)
+                                       return value = xfExtendedTypeConverter.ConvertFromInvariantString(str, serviceProvider);
+                               if (xfTypeConverter != null)
+                                       return value = xfTypeConverter.ConvertFromInvariantString(str);
+                               var converterType = converter?.GetType();
+                               if (converterType != null)
+                               {
+                                       var convertFromStringInvariant = converterType.GetRuntimeMethod("ConvertFromInvariantString",
+                                               new[] { typeof (string) });
+                                       if (convertFromStringInvariant != null)
+                                               return value = convertFromStringInvariant.Invoke(converter, new object[] { str });
+                               }
+                               var ignoreCase = (serviceProvider?.GetService(typeof(IConverterOptions)) as IConverterOptions)?.IgnoreCase ?? false;
+
+                               //If the type is nullable, as the value is not null, it's safe to assume we want the built-in conversion
+                               if (toType.GetTypeInfo().IsGenericType && toType.GetGenericTypeDefinition() == typeof (Nullable<>))
+                                       toType = Nullable.GetUnderlyingType(toType);
+
+                               //Obvious Built-in conversions
+                               if (toType.GetTypeInfo().IsEnum)
+                                       return Enum.Parse(toType, str, ignoreCase);
+                               if (toType == typeof(SByte))
+                                       return SByte.Parse(str, CultureInfo.InvariantCulture);
+                               if (toType == typeof(Int16))
+                                       return Int16.Parse(str, CultureInfo.InvariantCulture);
+                               if (toType == typeof(Int32))
+                                       return Int32.Parse(str, CultureInfo.InvariantCulture);
+                               if (toType == typeof(Int64))
+                                       return Int64.Parse(str, CultureInfo.InvariantCulture);
+                               if (toType == typeof(Byte))
+                                       return Byte.Parse(str, CultureInfo.InvariantCulture);
+                               if (toType == typeof(UInt16))
+                                       return UInt16.Parse(str, CultureInfo.InvariantCulture);
+                               if (toType == typeof(UInt32))
+                                       return UInt32.Parse(str, CultureInfo.InvariantCulture);
+                               if (toType == typeof(UInt64))
+                                       return UInt64.Parse(str, CultureInfo.InvariantCulture);
+                               if (toType == typeof (Single))
+                                       return Single.Parse(str, CultureInfo.InvariantCulture);
+                               if (toType == typeof (Double))
+                                       return Double.Parse(str, CultureInfo.InvariantCulture);
+                               if (toType == typeof (Boolean))
+                                       return Boolean.Parse(str);
+                               if (toType == typeof (TimeSpan))
+                                       return TimeSpan.Parse(str, CultureInfo.InvariantCulture);
+                               if (toType == typeof (DateTime))
+                                       return DateTime.Parse(str, CultureInfo.InvariantCulture);
+                               if (toType == typeof(Char)) {
+                                       char c = '\0';
+                                       Char.TryParse(str, out c);
+                                       return c;
+                               }
+                               if (toType == typeof (String) && str.StartsWith("{}", StringComparison.Ordinal))
+                                       return str.Substring(2);
+                               if (toType == typeof (String))
+                                       return value;
+                               if (toType == typeof(Decimal))
+                                       return Decimal.Parse(str, CultureInfo.InvariantCulture);
+                       }
+
+                       //if the value is not assignable and there's an implicit conversion, convert
+                       if (value != null && !toType.IsAssignableFrom(value.GetType())) {
+                               var opImplicit =   value.GetType().GetImplicitConversionOperator(fromType: value.GetType(), toType: toType)
+                                                               ?? toType.GetImplicitConversionOperator(fromType: value.GetType(), toType: toType);
+
+                               if (opImplicit != null) {
+                                       value = opImplicit.Invoke(null, new[] { value });
+                                       return value;
+                               }
+                       }
+
+                       var nativeValueConverterService = DependencyService.Get<INativeValueConverterService>();
+
+                       object nativeValue = null;
+                       if (nativeValueConverterService != null && nativeValueConverterService.ConvertTo(value, toType, out nativeValue))
+                               return nativeValue;
+
+                       return value;
+               }
+
+               internal static MethodInfo GetImplicitConversionOperator(this Type onType, Type fromType, Type toType)
+               {
+#if NETSTANDARD1_0
+                       var mi = onType.GetRuntimeMethod("op_Implicit", new[] { fromType });
+#else
+                       var bindingFlags = BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy;
+                       var mi = onType.GetMethod("op_Implicit", bindingFlags, null, new[] { fromType }, null);
+#endif
+                       if (mi == null) return null;
+                       if (!mi.IsSpecialName) return null;
+                       if (!mi.IsPublic) return null;
+                       if (!mi.IsStatic) return null;
+                       if (!toType.IsAssignableFrom(mi.ReturnType)) return null;
+
+                       return mi;
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/ValueConverterProvider.cs b/src/Tizen.NUI/src/internal/Xaml/ValueConverterProvider.cs
new file mode 100755 (executable)
index 0000000..d1ca0f6
--- /dev/null
@@ -0,0 +1,17 @@
+using System;
+using System.Reflection;
+
+using Tizen.NUI;
+using Tizen.NUI.Xaml;
+
+// [assembly:Dependency(typeof(ValueConverterProvider))]
+namespace Tizen.NUI.Xaml
+{
+       class ValueConverterProvider : IValueConverterProvider
+       {
+               public object Convert(object value, Type toType, Func<MemberInfo> minfoRetriever, IServiceProvider serviceProvider)
+               {
+                       return value.ConvertTo(toType, minfoRetriever, serviceProvider);
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/Xaml/VisualStateManager.cs b/src/Tizen.NUI/src/internal/Xaml/VisualStateManager.cs
new file mode 100755 (executable)
index 0000000..ded4128
--- /dev/null
@@ -0,0 +1,362 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using Tizen.NUI;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.Xaml
+{
+       internal static class VisualStateManager
+       {
+               internal class CommonStates
+               {
+                       public const string Normal = "Normal";
+                       public const string Disabled = "Disabled";
+                       public const string Focused = "Focused";
+               }
+
+               public static readonly BindableProperty VisualStateGroupsProperty =
+                       BindableProperty.CreateAttached("VisualStateGroups", typeof(VisualStateGroupList), typeof(/*VisualElement*/BaseHandle), 
+                               defaultValue: null, propertyChanged: VisualStateGroupsPropertyChanged, 
+                               defaultValueCreator: bindable => new VisualStateGroupList());
+
+               static void VisualStateGroupsPropertyChanged(BindableObject bindable, object oldValue, object newValue)
+               {
+                       GoToState((/*VisualElement*/BaseHandle)bindable, CommonStates.Normal);
+               }
+
+               public static IList<VisualStateGroup> GetVisualStateGroups(/*VisualElement*/BaseHandle visualElement)
+               {
+                       return (IList<VisualStateGroup>)visualElement.GetValue(VisualStateGroupsProperty);
+               }
+
+               public static void SetVisualStateGroups(/*VisualElement*/BaseHandle visualElement, VisualStateGroupList value)
+               {
+                       visualElement.SetValue(VisualStateGroupsProperty, value);
+               }
+
+               public static bool GoToState(/*VisualElement*/BaseHandle visualElement, string name)
+               {
+                       if (!visualElement.IsSet(VisualStateGroupsProperty))
+                       {
+                               return false;
+                       }
+
+                       var groups = (IList<VisualStateGroup>)visualElement.GetValue(VisualStateGroupsProperty);
+
+                       foreach (VisualStateGroup group in groups)
+                       {
+                               if (group.CurrentState?.Name == name)
+                               {
+                                       // We're already in the target state; nothing else to do
+                                       return true;
+                               }
+
+                               // See if this group contains the new state
+                               var target = group.GetState(name);
+                               if (target == null)
+                               {
+                                       continue;
+                               }
+
+                               // If we've got a new state to transition to, unapply the setters from the current state
+                               if (group.CurrentState != null)
+                               {
+                                       foreach (Setter setter in group.CurrentState.Setters)
+                                       {
+                                               setter.UnApply(visualElement);
+                                       }
+                               }
+
+                               // Update the current state
+                               group.CurrentState = target;
+
+                               // Apply the setters from the new state
+                               foreach (Setter setter in target.Setters)
+                               {
+                                       setter.Apply(visualElement);
+                               }
+
+                               return true;
+                       }
+
+                       return false;
+               }
+
+               public static bool HasVisualStateGroups(this /*VisualElement*/BaseHandle element)
+               {
+                       return element.IsSet(VisualStateGroupsProperty);
+               }
+       }
+
+       internal class VisualStateGroupList : IList<VisualStateGroup>
+       {
+               readonly IList<VisualStateGroup> _internalList;
+
+               void Validate(IList<VisualStateGroup> groups)
+               { 
+                       // If we have 1 group, no need to worry about duplicate group names
+                       if (groups.Count > 1)
+                       {
+                               if (groups.GroupBy(vsg => vsg.Name).Any(g => g.Count() > 1))
+                               {
+                                       throw new InvalidOperationException("VisualStateGroup Names must be unique");
+                               }
+                       }
+
+                       // State names must be unique within this group list, so pull in all 
+                       // the states in all the groups, group them by name, and see if we have
+                       // and duplicates
+                       if (groups.SelectMany(group => group.States)
+                               .GroupBy(state => state.Name)
+                               .Any(g => g.Count() > 1))
+                       {
+                               throw new InvalidOperationException("VisualState Names must be unique");
+                       }
+               }
+
+               public VisualStateGroupList() 
+               {
+                       _internalList = new WatchAddList<VisualStateGroup>(Validate);
+               }
+
+               void ValidateOnStatesChanged(object sender, EventArgs eventArgs)
+               {
+                       Validate(_internalList);
+               }
+
+               public IEnumerator<VisualStateGroup> GetEnumerator()
+               {
+                       return _internalList.GetEnumerator();
+               }
+
+               IEnumerator IEnumerable.GetEnumerator()
+               {
+                       return ((IEnumerable)_internalList).GetEnumerator();
+               }
+
+               public void Add(VisualStateGroup item)
+               {
+                       _internalList.Add(item);
+                       item.StatesChanged += ValidateOnStatesChanged;
+               }
+
+               public void Clear()
+               {
+                       foreach (var group in _internalList)
+                       {
+                               group.StatesChanged -= ValidateOnStatesChanged;
+                       }
+
+                       _internalList.Clear();
+               }
+
+               public bool Contains(VisualStateGroup item)
+               {
+                       return _internalList.Contains(item);
+               }
+
+               public void CopyTo(VisualStateGroup[] array, int arrayIndex)
+               {
+                       _internalList.CopyTo(array, arrayIndex);
+               }
+
+               public bool Remove(VisualStateGroup item)
+               {
+                       item.StatesChanged -= ValidateOnStatesChanged;
+                       return _internalList.Remove(item);
+               }
+
+               public int Count => _internalList.Count;
+
+               public bool IsReadOnly => false;
+
+               public int IndexOf(VisualStateGroup item)
+               {
+                       return _internalList.IndexOf(item);
+               }
+
+               public void Insert(int index, VisualStateGroup item)
+               {
+                       item.StatesChanged += ValidateOnStatesChanged;
+                       _internalList.Insert(index, item);
+               }
+
+               public void RemoveAt(int index)
+               {
+                       _internalList[index].StatesChanged -= ValidateOnStatesChanged;
+                       _internalList.RemoveAt(index);
+               }
+
+               public VisualStateGroup this[int index]
+               {
+                       get => _internalList[index];
+                       set => _internalList[index] = value;
+               }
+       }
+
+       [RuntimeNameProperty(nameof(Name))]
+       [ContentProperty(nameof(States))]
+       internal sealed class VisualStateGroup 
+       {
+               public VisualStateGroup()
+               {
+                       States = new WatchAddList<VisualState>(OnStatesChanged);
+               }
+
+               public Type TargetType { get; set; }
+               public string Name { get; set; }
+               public IList<VisualState> States { get; }
+               public VisualState CurrentState { get; internal set; }
+
+               internal VisualState GetState(string name)
+               {
+                       foreach (VisualState state in States)
+                       {
+                               if (string.CompareOrdinal(state.Name, name) == 0)
+                               {
+                                       return state;
+                               }
+                       }
+
+                       return null;
+               }
+
+               internal VisualStateGroup Clone()
+               {
+                       var clone =  new VisualStateGroup {TargetType = TargetType, Name = Name, CurrentState = CurrentState};
+                       foreach (VisualState state in States)
+                       {
+                               clone.States.Add(state.Clone());
+                       }
+
+                       return clone;
+               }
+
+               internal event EventHandler StatesChanged;
+
+               void OnStatesChanged(IList<VisualState> list)
+               {
+                       if (list.Any(state => string.IsNullOrEmpty(state.Name)))
+                       {
+                               throw new InvalidOperationException("State names may not be null or empty");
+                       }
+
+                       StatesChanged?.Invoke(this, EventArgs.Empty);
+               }
+       }
+
+       [RuntimeNameProperty(nameof(Name))]
+       internal sealed class VisualState 
+       {
+               public VisualState()
+               {
+                       Setters = new ObservableCollection<Setter>();
+               }
+
+               public string Name { get; set; }
+               public IList<Setter> Setters { get;}
+               public Type TargetType { get; set; }
+
+               internal VisualState Clone()
+               {
+                       var clone = new VisualState { Name = Name, TargetType = TargetType };
+                       foreach (var setter in Setters)
+                       {
+                               clone.Setters.Add(setter);
+                       }
+
+                       return clone;
+               }
+       }
+
+       internal static class VisualStateGroupListExtensions
+       {
+               internal static IList<VisualStateGroup> Clone(this IList<VisualStateGroup> groups)
+               {
+                       var actual = new VisualStateGroupList();
+                       foreach (var group in groups)
+                       {
+                               actual.Add(group.Clone());
+                       }
+
+                       return actual;
+               }
+       }
+
+       internal class WatchAddList<T> : IList<T>
+       {
+               readonly Action<List<T>> _onAdd;
+               readonly List<T> _internalList;
+
+               public WatchAddList(Action<List<T>> onAdd)
+               {
+                       _onAdd = onAdd;
+                       _internalList = new List<T>();
+               }
+
+               public IEnumerator<T> GetEnumerator()
+               {
+                       return _internalList.GetEnumerator();
+               }
+
+               IEnumerator IEnumerable.GetEnumerator()
+               {
+                       return ((IEnumerable)_internalList).GetEnumerator();
+               }
+
+               public void Add(T item)
+               {
+                       _internalList.Add(item);
+                       _onAdd(_internalList);
+               }
+
+               public void Clear()
+               {
+                       _internalList.Clear();
+               }
+
+               public bool Contains(T item)
+               {
+                       return _internalList.Contains(item);
+               }
+
+               public void CopyTo(T[] array, int arrayIndex)
+               {
+                       _internalList.CopyTo(array, arrayIndex);
+               }
+
+               public bool Remove(T item)
+               {
+                       return _internalList.Remove(item);
+               }
+
+               public int Count => _internalList.Count;
+
+               public bool IsReadOnly => false;
+
+               public int IndexOf(T item)
+               {
+                       return _internalList.IndexOf(item);
+               }
+
+               public void Insert(int index, T item)
+               {
+                       _internalList.Insert(index, item);
+                       _onAdd(_internalList);
+               }
+
+               public void RemoveAt(int index)
+               {
+                       _internalList.RemoveAt(index);
+               }
+
+               public T this[int index]
+               {
+                       get => _internalList[index];
+                       set => _internalList[index] = value;
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/Xaml/XamlCompilationAttribute.cs b/src/Tizen.NUI/src/internal/Xaml/XamlCompilationAttribute.cs
new file mode 100755 (executable)
index 0000000..97c06d4
--- /dev/null
@@ -0,0 +1,42 @@
+using System;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+namespace Tizen.NUI.Xaml
+{
+       [Flags]
+       internal enum XamlCompilationOptions
+       {
+               Skip = 1 << 0,
+               Compile = 1 << 1
+       }
+
+       [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class, Inherited = false)]
+       internal sealed class XamlCompilationAttribute : Attribute
+       {
+               public XamlCompilationAttribute(XamlCompilationOptions xamlCompilationOptions)
+               {
+                       XamlCompilationOptions = xamlCompilationOptions;
+               }
+
+               public XamlCompilationOptions XamlCompilationOptions { get; set; }
+       }
+
+       static class XamlCExtensions
+       {
+               public static bool IsCompiled(this Type type)
+               {
+                       var attr = type.GetTypeInfo().GetCustomAttribute<XamlCompilationAttribute>();
+                       if (attr != null)
+                               return attr.XamlCompilationOptions == XamlCompilationOptions.Compile;
+                       attr = type.GetTypeInfo().Module.GetCustomAttribute<XamlCompilationAttribute>();
+                       if (attr != null)
+                               return attr.XamlCompilationOptions == XamlCompilationOptions.Compile;
+                       attr = type.GetTypeInfo().Assembly.GetCustomAttribute<XamlCompilationAttribute>();
+                       if (attr != null)
+                               return attr.XamlCompilationOptions == XamlCompilationOptions.Compile;
+
+                       return false;
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/XamlFilePathAttribute.cs b/src/Tizen.NUI/src/internal/Xaml/XamlFilePathAttribute.cs
new file mode 100755 (executable)
index 0000000..fd19c58
--- /dev/null
@@ -0,0 +1,13 @@
+using System;
+using System.Runtime.CompilerServices;
+
+namespace Tizen.NUI.Xaml
+{
+       [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
+       internal sealed class XamlFilePathAttribute : Attribute
+       {
+               public XamlFilePathAttribute([CallerFilePath] string filePath = "")
+               {
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/XamlLoader.cs b/src/Tizen.NUI/src/internal/Xaml/XamlLoader.cs
new file mode 100755 (executable)
index 0000000..bf8e116
--- /dev/null
@@ -0,0 +1,290 @@
+//
+// XamlLoader.cs
+//
+// Author:
+//       Stephane Delcroix <stephane@mi8.be>
+//
+// Copyright (c) 2013 Mobile Inception
+// Copyright (c) 2013-2014 Xamarin, Inc
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Reflection;
+using System.Text.RegularExpressions;
+using System.Xml;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Internals;
+
+namespace Tizen.NUI.Xaml.Internals
+{
+       [Obsolete ("Replaced by ResourceLoader")]
+       internal static class XamlLoader
+       {
+               static Func<Type, string> xamlFileProvider;
+
+               public static Func<Type, string> XamlFileProvider {
+                       get { return xamlFileProvider; }
+                       internal set {
+                               xamlFileProvider = value;
+                               Tizen.NUI.Xaml.DesignMode.IsDesignModeEnabled = true;
+                               //¯\_(ツ)_/¯ the previewer forgot to set that bool
+                               DoNotThrowOnExceptions = value != null;
+                       }
+               }
+
+               internal static bool DoNotThrowOnExceptions { get; set; }
+       }
+}
+
+namespace Tizen.NUI.Xaml
+{
+       static class XamlLoader
+       {
+               public static void Load(object view, Type callingType)
+               {
+                       var xaml = GetXamlForType(callingType);
+                       if (string.IsNullOrEmpty(xaml))
+                               throw new XamlParseException(string.Format("No embeddedresource found for {0}", callingType), new XmlLineInfo());
+                       Console.WriteLine("============= Got xaml text is {0} ===========", xaml);
+                       Load(view, xaml);
+               }
+
+               public static void Load(object view, string xaml)
+               {
+                       using (var textReader = new StringReader(xaml))
+                       using (var reader = XmlReader.Create(textReader))
+                       {
+                               while (reader.Read())
+                               {
+                                       //Skip until element
+                                       if (reader.NodeType == XmlNodeType.Whitespace)
+                                               continue;
+                                       if (reader.NodeType == XmlNodeType.XmlDeclaration)
+                                               continue;
+                                       if (reader.NodeType != XmlNodeType.Element) {
+                                               Debug.WriteLine("Unhandled node {0} {1} {2}", reader.NodeType, reader.Name, reader.Value);
+                                               continue;
+                                       }
+
+                                       var rootnode = new RuntimeRootNode (new XmlType (reader.NamespaceURI, reader.Name, null), view, (IXmlNamespaceResolver)reader);
+                                       XamlParser.ParseXaml (rootnode, reader);
+                                       Visit (rootnode, new HydrationContext {
+                                               RootElement = view,
+#pragma warning disable 0618
+                                               ExceptionHandler = ResourceLoader.ExceptionHandler ?? (Internals.XamlLoader.DoNotThrowOnExceptions ? e => { }: (Action<Exception>)null)
+#pragma warning restore 0618
+                                       });
+                                       break;
+                               }
+                       }
+               }
+
+               [Obsolete ("Use the XamlFileProvider to provide xaml files. We will remove this when Cycle 8 hits Stable.")]
+               public static object Create (string xaml, bool doNotThrow = false)
+               {
+                       object inflatedView = null;
+                       using (var textreader = new StringReader(xaml))
+                       using (var reader = XmlReader.Create (textreader)) {
+                               while (reader.Read ()) {
+                                       //Skip until element
+                                       if (reader.NodeType == XmlNodeType.Whitespace)
+                                               continue;
+                                       if (reader.NodeType == XmlNodeType.XmlDeclaration)
+                                               continue;
+                                       if (reader.NodeType != XmlNodeType.Element) {
+                                               Debug.WriteLine("Unhandled node {0} {1} {2}", reader.NodeType, reader.Name, reader.Value);
+                                               continue;
+                                       }
+
+                                       var rootnode = new RuntimeRootNode (new XmlType (reader.NamespaceURI, reader.Name, null), null, (IXmlNamespaceResolver)reader);
+                                       XamlParser.ParseXaml (rootnode, reader);
+                                       var visitorContext = new HydrationContext {
+                                               ExceptionHandler = doNotThrow ? e => { } : (Action<Exception>)null,
+                                       };
+                                       var cvv = new CreateValuesVisitor (visitorContext);
+                                       cvv.Visit ((ElementNode)rootnode, null);
+                                       inflatedView = rootnode.Root = visitorContext.Values [rootnode];
+                                       visitorContext.RootElement = inflatedView as BindableObject;
+
+                                       Visit (rootnode, visitorContext);
+                                       break;
+                               }
+                       }
+                       return inflatedView;
+               }
+
+               static void Visit (RootNode rootnode, HydrationContext visitorContext)
+               {
+                       rootnode.Accept (new XamlNodeVisitor ((node, parent) => node.Parent = parent), null); //set parents for {StaticResource}
+                       rootnode.Accept (new ExpandMarkupsVisitor (visitorContext), null);
+                       rootnode.Accept (new PruneIgnoredNodesVisitor(), null);
+                       rootnode.Accept (new NamescopingVisitor (visitorContext), null); //set namescopes for {x:Reference}
+                       rootnode.Accept (new CreateValuesVisitor (visitorContext), null);
+                       rootnode.Accept (new RegisterXNamesVisitor (visitorContext), null);
+                       rootnode.Accept (new FillResourceDictionariesVisitor (visitorContext), null);
+                       rootnode.Accept (new ApplyPropertiesVisitor (visitorContext, true), null);
+               }
+
+               static string GetXamlForType(Type type)
+               {
+                       //the Previewer might want to provide it's own xaml for this... let them do that
+                       //the check at the end is preferred (using ResourceLoader). keep this until all the previewers are updated
+
+                       string xaml;
+#pragma warning disable 0618
+                       if (ResourceLoader.ResourceProvider == null && (xaml = Internals.XamlLoader.XamlFileProvider?.Invoke(type)) != null)
+                               return xaml;
+#pragma warning restore 0618
+
+                       var assembly = type.GetTypeInfo().Assembly;
+                       var resourceId = XamlResourceIdAttribute.GetResourceIdForType(type);
+
+                       if (resourceId == null)
+                               return LegacyGetXamlForType(type);
+
+                       using (var stream = assembly.GetManifestResourceStream(resourceId)) {
+                               if (stream != null)
+                                       using (var reader = new StreamReader(stream))
+                                               xaml = reader.ReadToEnd();
+                               else
+                                       xaml = null;
+                       }
+
+                       var alternateXaml = ResourceLoader.ResourceProvider?.Invoke(assembly.GetName(), XamlResourceIdAttribute.GetPathForType(type));
+                       return alternateXaml ?? xaml;
+               }
+
+               //if the assembly was generated using a version of XamlG that doesn't outputs XamlResourceIdAttributes, we still need to find the resource, and load it
+               static readonly Dictionary<Type, string> XamlResources = new Dictionary<Type, string>();                
+               static string LegacyGetXamlForType(Type type)
+               {
+                       var assembly = type.GetTypeInfo().Assembly;
+
+                       string resourceId;
+                       if (XamlResources.TryGetValue(type, out resourceId)) {
+                               var result = ReadResourceAsXaml(type, assembly, resourceId);
+                               if (result != null)
+                                       return result;
+                       }
+
+                       var likelyResourceName = type.Name + ".xaml";
+                       var resourceNames = assembly.GetManifestResourceNames();
+                       string resourceName = null;
+
+                       // first pass, pray to find it because the user named it correctly
+
+                       foreach (var resource in resourceNames) {
+                               if (ResourceMatchesFilename(assembly, resource, likelyResourceName)) {
+                                       resourceName = resource;
+                                       var xaml = ReadResourceAsXaml(type, assembly, resource);
+                                       if (xaml != null)
+                                               return xaml;
+                               }
+                       }
+
+                       // okay maybe they at least named it .xaml
+
+                       foreach (var resource in resourceNames) {
+                               if (!resource.EndsWith(".xaml", StringComparison.OrdinalIgnoreCase))
+                                       continue;
+
+                               resourceName = resource;
+                               var xaml = ReadResourceAsXaml(type, assembly, resource);
+                               if (xaml != null)
+                                       return xaml;
+                       }
+
+                       foreach (var resource in resourceNames) {
+                               if (resource.EndsWith(".xaml", StringComparison.OrdinalIgnoreCase))
+                                       continue;
+
+                               resourceName = resource;
+                               var xaml = ReadResourceAsXaml(type, assembly, resource, true);
+                               if (xaml != null)
+                                       return xaml;
+                       }
+
+                       return null;
+               }
+
+               //legacy...
+               static bool ResourceMatchesFilename(Assembly assembly, string resource, string filename)
+               {
+                       try {
+                               var info = assembly.GetManifestResourceInfo(resource);
+
+                               if (!string.IsNullOrEmpty(info.FileName) &&
+                                       string.Compare(info.FileName, filename, StringComparison.OrdinalIgnoreCase) == 0)
+                                       return true;
+                       }
+                       catch (PlatformNotSupportedException) {
+                               // Because Win10 + .NET Native
+                       }
+
+                       if (resource.EndsWith("." + filename, StringComparison.OrdinalIgnoreCase) ||
+                               string.Compare(resource, filename, StringComparison.OrdinalIgnoreCase) == 0)
+                               return true;
+
+                       return false;
+               }
+
+               //part of the legacy as well...
+               static string ReadResourceAsXaml(Type type, Assembly assembly, string likelyTargetName, bool validate = false)
+               {
+                       using (var stream = assembly.GetManifestResourceStream(likelyTargetName))
+                       using (var reader = new StreamReader(stream)) {
+                               if (validate) {
+                                       // terrible validation of XML. Unfortunately it will probably work most of the time since comments
+                                       // also start with a <. We can't bring in any real deps.
+
+                                       var firstNonWhitespace = (char)reader.Read();
+                                       while (char.IsWhiteSpace(firstNonWhitespace))
+                                               firstNonWhitespace = (char)reader.Read();
+
+                                       if (firstNonWhitespace != '<')
+                                               return null;
+
+                                       stream.Seek(0, SeekOrigin.Begin);
+                               }
+
+                               var xaml = reader.ReadToEnd();
+
+                               var pattern = String.Format("x:Class *= *\"{0}\"", type.FullName);
+                               var regex = new Regex(pattern, RegexOptions.ECMAScript);
+                               if (regex.IsMatch(xaml) || xaml.Contains(String.Format("x:Class=\"{0}\"", type.FullName)))
+                                       return xaml;
+                       }
+                       return null;
+               }
+
+               public class RuntimeRootNode : RootNode
+               {
+                       public RuntimeRootNode(XmlType xmlType, object root, IXmlNamespaceResolver resolver) : base (xmlType, resolver)
+                       {
+                               Root = root;
+                       }
+
+                       public object Root { get; internal set; }
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/XamlNode.cs b/src/Tizen.NUI/src/internal/Xaml/XamlNode.cs
new file mode 100755 (executable)
index 0000000..2013caa
--- /dev/null
@@ -0,0 +1,259 @@
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Xml;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Internals;
+
+namespace Tizen.NUI.Xaml
+{
+       interface INode
+       {
+               List<string> IgnorablePrefixes { get; set; }
+
+               IXmlNamespaceResolver NamespaceResolver { get; }
+
+               INode Parent { get; set; }
+
+               void Accept(IXamlNodeVisitor visitor, INode parentNode);
+               INode Clone();
+       }
+
+       interface IValueNode : INode
+       {
+       }
+
+       interface IElementNode : INode, IListNode
+       {
+               Dictionary<XmlName, INode> Properties { get; }
+               List<XmlName> SkipProperties { get; }
+               INameScope Namescope { get; }
+               XmlType XmlType { get; }
+               string NamespaceURI { get; }
+       }
+
+       interface IListNode : INode
+       {
+               List<INode> CollectionItems { get; }
+       }
+
+       [DebuggerDisplay("{NamespaceUri}:{Name}")]
+       class XmlType
+       {
+               public XmlType(string namespaceUri, string name, IList<XmlType> typeArguments)
+               {
+                       NamespaceUri = namespaceUri;
+                       Name = name;
+                       TypeArguments = typeArguments;
+               }
+
+               public string NamespaceUri { get; }
+               public string Name { get; }
+               public IList<XmlType> TypeArguments { get; }
+       }
+
+       abstract class BaseNode : IXmlLineInfo, INode
+       {
+               protected BaseNode(IXmlNamespaceResolver namespaceResolver, int linenumber = -1, int lineposition = -1)
+               {
+                       NamespaceResolver = namespaceResolver;
+                       LineNumber = linenumber;
+                       LinePosition = lineposition;
+               }
+
+               public IXmlNamespaceResolver NamespaceResolver { get; }
+               public INode Parent { get; set; }
+               public List<string> IgnorablePrefixes { get; set; }
+               public int LineNumber { get; set; }
+               public int LinePosition { get; set; }
+
+               public bool HasLineInfo() => LineNumber >= 0 && LinePosition >= 0;
+
+               public abstract void Accept(IXamlNodeVisitor visitor, INode parentNode);
+               public abstract INode Clone();
+       }
+
+       [DebuggerDisplay("{Value}")]
+       class ValueNode : BaseNode, IValueNode
+       {
+               public ValueNode(object value, IXmlNamespaceResolver namespaceResolver, int linenumber = -1, int lineposition = -1)
+                       : base(namespaceResolver, linenumber, lineposition)
+               {
+                       Value = value;
+               }
+
+               public object Value { get; set; }
+
+               public override void Accept(IXamlNodeVisitor visitor, INode parentNode)
+               {
+                       visitor.Visit(this, parentNode);
+               }
+
+               public override INode Clone() => new ValueNode(Value, NamespaceResolver, LineNumber, LinePosition) {
+                       IgnorablePrefixes = IgnorablePrefixes
+               };
+       }
+
+       [DebuggerDisplay("{MarkupString}")]
+       class MarkupNode : BaseNode, IValueNode
+       {
+               public MarkupNode(string markupString, IXmlNamespaceResolver namespaceResolver, int linenumber = -1, int lineposition = -1)
+                       : base(namespaceResolver, linenumber, lineposition)
+               {
+                       MarkupString = markupString;
+               }
+
+               public string MarkupString { get; }
+
+               public override void Accept(IXamlNodeVisitor visitor, INode parentNode)
+               {
+                       visitor.Visit(this, parentNode);
+               }
+
+               public override INode Clone() => new MarkupNode(MarkupString, NamespaceResolver, LineNumber, LinePosition) {
+                       IgnorablePrefixes = IgnorablePrefixes
+               };
+       }
+
+       [DebuggerDisplay("{XmlType.Name}")]
+       class ElementNode : BaseNode, IValueNode, IElementNode
+       {
+               public ElementNode(XmlType type, string namespaceURI, IXmlNamespaceResolver namespaceResolver, int linenumber = -1,
+                       int lineposition = -1)
+                       : base(namespaceResolver, linenumber, lineposition)
+               {
+                       Properties = new Dictionary<XmlName, INode>();
+                       SkipProperties = new List<XmlName>();
+                       CollectionItems = new List<INode>();
+                       XmlType = type;
+                       NamespaceURI = namespaceURI;
+               }
+
+               public Dictionary<XmlName, INode> Properties { get; }
+               public List<XmlName> SkipProperties { get; }
+               public List<INode> CollectionItems { get; }
+               public XmlType XmlType { get; }
+               public string NamespaceURI { get; }
+               public INameScope Namescope { get; set; }
+
+               public override void Accept(IXamlNodeVisitor visitor, INode parentNode)
+               {
+                       if (!SkipVisitNode(visitor, parentNode) && visitor.VisitingMode == TreeVisitingMode.TopDown)
+                               visitor.Visit(this, parentNode);
+
+                       if (!SkipChildren(visitor, this, parentNode)) {
+                               foreach (var node in Properties.Values.ToList())
+                                       node.Accept(visitor, this);
+                               foreach (var node in CollectionItems)
+                                       node.Accept(visitor, this);
+                       }
+
+                       if (!SkipVisitNode(visitor, parentNode) && visitor.VisitingMode == TreeVisitingMode.BottomUp)
+                               visitor.Visit(this, parentNode);
+
+               }
+
+               bool IsDataTemplate(INode parentNode)
+               {
+                       var parentElement = parentNode as IElementNode;
+                       INode createContent;
+                       if (parentElement != null &&
+                               parentElement.Properties.TryGetValue(XmlName._CreateContent, out createContent) &&
+                               createContent == this)
+                               return true;
+                       return false;
+               }
+
+               bool IsResourceDictionary() => XmlType.Name == "ResourceDictionary";
+
+               protected bool SkipChildren(IXamlNodeVisitor visitor, INode node, INode parentNode) =>
+                          (visitor.StopOnDataTemplate && IsDataTemplate(parentNode))
+                       || (visitor.StopOnResourceDictionary && IsResourceDictionary())
+                       || visitor.SkipChildren(node, parentNode);
+
+               protected bool SkipVisitNode(IXamlNodeVisitor visitor, INode parentNode) =>
+                       !visitor.VisitNodeOnDataTemplate && IsDataTemplate(parentNode);
+
+               public override INode Clone()
+               {
+                       var clone = new ElementNode(XmlType, NamespaceURI, NamespaceResolver, LineNumber, LinePosition) {
+                               IgnorablePrefixes = IgnorablePrefixes
+                       };
+                       foreach (var kvp in Properties)
+                               clone.Properties.Add(kvp.Key, kvp.Value.Clone());
+                       foreach (var p in SkipProperties)
+                               clone.SkipProperties.Add(p);
+                       foreach (var p in CollectionItems)
+                               clone.CollectionItems.Add(p.Clone());
+                       return clone;
+               }
+       }
+
+       abstract class RootNode : ElementNode
+       {
+               protected RootNode(XmlType xmlType, IXmlNamespaceResolver nsResolver) : base(xmlType, xmlType.NamespaceUri, nsResolver)
+               {
+               }
+
+               public override void Accept(IXamlNodeVisitor visitor, INode parentNode)
+               {
+                       if (!SkipVisitNode(visitor, parentNode) && visitor.VisitingMode == TreeVisitingMode.TopDown)
+                               visitor.Visit(this, parentNode);
+
+                       if (!SkipChildren(visitor, this, parentNode)) {
+                               foreach (var node in Properties.Values.ToList())
+                                       node.Accept(visitor, this);
+                               foreach (var node in CollectionItems)
+                                       node.Accept(visitor, this);
+                       }
+
+                       if (!SkipVisitNode(visitor, parentNode) && visitor.VisitingMode == TreeVisitingMode.BottomUp)
+                               visitor.Visit(this, parentNode);
+               }
+       }
+
+       class ListNode : BaseNode, IListNode, IValueNode
+       {
+               public ListNode(IList<INode> nodes, IXmlNamespaceResolver namespaceResolver, int linenumber = -1, int lineposition = -1)
+                       : base(namespaceResolver, linenumber, lineposition)
+               {
+                       CollectionItems = nodes.ToList();
+               }
+
+               public XmlName XmlName { get; set; }
+               public List<INode> CollectionItems { get; set; }
+
+               public override void Accept(IXamlNodeVisitor visitor, INode parentNode)
+               {
+                       if (visitor.VisitingMode == TreeVisitingMode.TopDown)
+                               visitor.Visit(this, parentNode);
+                       foreach (var node in CollectionItems)
+                               node.Accept(visitor, this);
+                       if (visitor.VisitingMode == TreeVisitingMode.BottomUp)
+                               visitor.Visit(this, parentNode);
+               }
+
+               public override INode Clone()
+               {
+                       var items = new List<INode>();
+                       foreach (var p in CollectionItems)
+                               items.Add(p.Clone());
+                       return new ListNode(items, NamespaceResolver, LineNumber, LinePosition) {
+                               IgnorablePrefixes = IgnorablePrefixes
+                       };
+               }
+       }
+
+       static class INodeExtensions
+       {
+               public static bool SkipPrefix(this INode node, string prefix)
+               {
+                       do {
+                               if (node.IgnorablePrefixes != null && node.IgnorablePrefixes.Contains(prefix))
+                                       return true;
+                               node = node.Parent;
+                       } while (node != null);
+                       return false;
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/XamlNodeVisitor.cs b/src/Tizen.NUI/src/internal/Xaml/XamlNodeVisitor.cs
new file mode 100755 (executable)
index 0000000..e42facf
--- /dev/null
@@ -0,0 +1,49 @@
+using System;
+
+namespace Tizen.NUI.Xaml
+{
+       interface IXamlNodeVisitor
+       {
+               TreeVisitingMode VisitingMode { get; }
+               bool StopOnDataTemplate { get; }
+               bool VisitNodeOnDataTemplate { get; }
+               bool StopOnResourceDictionary { get; }
+
+               void Visit(ValueNode node, INode parentNode);
+               void Visit(MarkupNode node, INode parentNode);
+               void Visit(ElementNode node, INode parentNode);
+               void Visit(RootNode node, INode parentNode);
+               void Visit(ListNode node, INode parentNode);
+               bool SkipChildren(INode node, INode parentNode);
+       }
+
+       enum TreeVisitingMode {
+               TopDown,
+               BottomUp
+       }
+
+       class XamlNodeVisitor : IXamlNodeVisitor
+       {
+               readonly Action<INode, INode> action;
+
+               public XamlNodeVisitor(Action<INode, INode> action, TreeVisitingMode visitingMode = TreeVisitingMode.TopDown, bool stopOnDataTemplate = false, bool visitNodeOnDataTemplate = true)
+               {
+                       this.action = action;
+                       VisitingMode = visitingMode;
+                       StopOnDataTemplate = stopOnDataTemplate;
+                       VisitNodeOnDataTemplate = visitNodeOnDataTemplate;
+               }
+
+               public TreeVisitingMode VisitingMode { get; }
+               public bool StopOnDataTemplate { get; }
+               public bool StopOnResourceDictionary { get; }
+               public bool VisitNodeOnDataTemplate { get; }
+
+               public void Visit(ValueNode node, INode parentNode) => action(node, parentNode);
+               public void Visit(MarkupNode node, INode parentNode) => action(node, parentNode);
+               public void Visit(ElementNode node, INode parentNode) => action(node, parentNode);
+               public void Visit(RootNode node, INode parentNode) => action(node, parentNode);
+               public void Visit(ListNode node, INode parentNode) => action(node, parentNode);
+               public bool SkipChildren(INode node, INode parentNode) => false;
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/XamlParseException.cs b/src/Tizen.NUI/src/internal/Xaml/XamlParseException.cs
new file mode 100755 (executable)
index 0000000..69ced70
--- /dev/null
@@ -0,0 +1,30 @@
+using System;
+using System.Xml;
+
+namespace Tizen.NUI.Xaml
+{
+       internal class XamlParseException : Exception
+       {
+               readonly string _unformattedMessage;
+
+               public XamlParseException(string message, IXmlLineInfo xmlInfo, Exception innerException = null) : base(FormatMessage(message, xmlInfo), innerException)
+               {
+                       _unformattedMessage = message;
+                       XmlInfo = xmlInfo;
+               }
+
+               public IXmlLineInfo XmlInfo { get; private set; }
+
+               internal string UnformattedMessage
+               {
+                       get { return _unformattedMessage ?? Message; }
+               }
+
+               static string FormatMessage(string message, IXmlLineInfo xmlinfo)
+               {
+                       if (xmlinfo == null || !xmlinfo.HasLineInfo())
+                               return message;
+                       return string.Format("Position {0}:{1}. {2}", xmlinfo.LineNumber, xmlinfo.LinePosition, message);
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/XamlParser.cs b/src/Tizen.NUI/src/internal/Xaml/XamlParser.cs
new file mode 100755 (executable)
index 0000000..38d78b8
--- /dev/null
@@ -0,0 +1,453 @@
+//
+// XamlParser.cs
+//
+// Author:
+//       Stephane Delcroix <stephane@mi8.be>
+//
+// Copyright (c) 2013 Mobile Inception
+// Copyright (c) 2013-2014 Xamarin, Inc
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Reflection;
+using System.Xml;
+using Tizen.NUI.Binding;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.UIComponents;
+using Tizen.NUI.Internals;
+
+namespace Tizen.NUI.Xaml
+{
+       static class XamlParser
+       {
+               public const string XFUri = "http://xamarin.com/schemas/2014/forms";
+               public const string NUI2018Uri = "http://tizen.org/Tizen.NUI/2018/XAML";
+               public const string X2006Uri = "http://schemas.microsoft.com/winfx/2006/xaml";
+               public const string X2009Uri = "http://schemas.microsoft.com/winfx/2009/xaml";
+               public const string McUri = "http://schemas.openxmlformats.org/markup-compatibility/2006";
+
+               public static void ParseXaml(RootNode rootNode, XmlReader reader)
+               {
+                       IList<KeyValuePair<string, string>> xmlns;
+                       var attributes = ParseXamlAttributes(reader, out xmlns);
+                       var prefixes = PrefixesToIgnore(xmlns);
+                       (rootNode.IgnorablePrefixes ?? (rootNode.IgnorablePrefixes=new List<string>())).AddRange(prefixes);
+                       rootNode.Properties.AddRange(attributes);
+                       ParseXamlElementFor(rootNode, reader);
+               }
+
+               static void ParseXamlElementFor(IElementNode node, XmlReader reader)
+               {
+                       Debug.Assert(reader.NodeType == XmlNodeType.Element);
+
+                       var elementName = reader.Name;
+                       var isEmpty = reader.IsEmptyElement;
+
+                       if (isEmpty)
+                               return;
+
+                       while (reader.Read())
+                       {
+                               switch (reader.NodeType)
+                               {
+                                       case XmlNodeType.EndElement:
+                                               Debug.Assert(reader.Name == elementName); //make sure we close the right element
+                                               return;
+                                       case XmlNodeType.Element:
+                                               // 1. Property Element.
+                                               if (reader.Name.Contains("."))
+                                               {
+                                                       XmlName name;
+                                                       if (reader.Name.StartsWith(elementName + ".", StringComparison.Ordinal))
+                                                               name = new XmlName(reader.NamespaceURI, reader.Name.Substring(elementName.Length + 1));
+                                                       else //Attached DP
+                                                               name = new XmlName(reader.NamespaceURI, reader.LocalName);
+
+                                                       var prop = ReadNode(reader);
+                                                       if (prop != null)
+                                                               node.Properties.Add(name, prop);
+                                               }
+                                               // 2. Xaml2009 primitives, x:Arguments, ...
+                                               else if (reader.NamespaceURI == X2009Uri && reader.LocalName == "Arguments")
+                                               {
+                                                       var prop = ReadNode(reader);
+                                                       if (prop != null)
+                                                               node.Properties.Add(XmlName.xArguments, prop);
+                                               }
+                                               // 3. DataTemplate (should be handled by 4.)
+                                               else if ((node.XmlType.NamespaceUri == XFUri || node.XmlType.NamespaceUri == NUI2018Uri) &&
+                                                        (node.XmlType.Name == "DataTemplate" || node.XmlType.Name == "ControlTemplate"))
+                                               {
+                                                       var prop = ReadNode(reader, true);
+                                                       if (prop != null)
+                                                               node.Properties.Add(XmlName._CreateContent, prop);
+                                               }
+                                               // 4. Implicit content, implicit collection, or collection syntax. Add to CollectionItems, resolve case later.
+                                               else
+                                               {
+                                                       var item = ReadNode(reader, true);
+                                                       if (item != null)
+                                                               node.CollectionItems.Add(item);
+                                               }
+                                               break;
+                                       case XmlNodeType.Whitespace:
+                                               break;
+                                       case XmlNodeType.Text:
+                                       case XmlNodeType.CDATA:
+                                               if (node.CollectionItems.Count == 1 && node.CollectionItems[0] is ValueNode)
+                                                       ((ValueNode)node.CollectionItems[0]).Value += reader.Value.Trim();
+                                               else
+                                                       node.CollectionItems.Add(new ValueNode(reader.Value.Trim(), (IXmlNamespaceResolver)reader));
+                                               break;
+                                       default:
+                                               Debug.WriteLine("Unhandled node {0} {1} {2}", reader.NodeType, reader.Name, reader.Value);
+                                               break;
+                               }
+                       }
+               }
+
+               static INode ReadNode(XmlReader reader, bool nested = false)
+               {
+                       var skipFirstRead = nested;
+                       Debug.Assert(reader.NodeType == XmlNodeType.Element);
+                       var name = reader.Name;
+                       List<INode> nodes = new List<INode>();
+                       INode node = null;
+
+                       while (skipFirstRead || reader.Read())
+                       {
+                               skipFirstRead = false;
+
+                               switch (reader.NodeType)
+                               {
+                                       case XmlNodeType.EndElement:
+                                               Debug.Assert(reader.Name == name);
+                                               if (nodes.Count == 0) //Empty element
+                                                       return null;
+                                               if (nodes.Count == 1)
+                                                       return nodes[0];
+                                               return new ListNode(nodes, (IXmlNamespaceResolver)reader, ((IXmlLineInfo)reader).LineNumber,
+                                                       ((IXmlLineInfo)reader).LinePosition);
+                                       case XmlNodeType.Element:
+                                               var isEmpty = reader.IsEmptyElement && reader.Name == name;
+                                               var elementName = reader.Name;
+                                               var elementNsUri = reader.NamespaceURI;
+                                               var elementXmlInfo = (IXmlLineInfo)reader;
+                                               IList<KeyValuePair<string, string>> xmlns;
+
+                                               var attributes = ParseXamlAttributes(reader, out xmlns);
+                                               var prefixes = PrefixesToIgnore(xmlns);
+
+                                               IList<XmlType> typeArguments = null;
+                                               if (attributes.Any(kvp => kvp.Key == XmlName.xTypeArguments))
+                                               {
+                                                       typeArguments =
+                                                               ((ValueNode)attributes.First(kvp => kvp.Key == XmlName.xTypeArguments).Value).Value as IList<XmlType>;
+                                               }
+
+                                               node = new ElementNode(new XmlType(elementNsUri, elementName, typeArguments), elementNsUri,
+                                                       reader as IXmlNamespaceResolver, elementXmlInfo.LineNumber, elementXmlInfo.LinePosition);
+                                               ((IElementNode)node).Properties.AddRange(attributes);
+                                               (node.IgnorablePrefixes ?? (node.IgnorablePrefixes = new List<string>())).AddRange(prefixes);
+
+                                               ParseXamlElementFor((IElementNode)node, reader);
+                                               nodes.Add(node);
+                                               if (isEmpty || nested)
+                                                       return node;
+                                               break;
+                                       case XmlNodeType.Text:
+                                               node = new ValueNode(reader.Value.Trim(), (IXmlNamespaceResolver)reader, ((IXmlLineInfo)reader).LineNumber,
+                                                       ((IXmlLineInfo)reader).LinePosition);
+                                               nodes.Add(node);
+                                               break;
+                                       case XmlNodeType.Whitespace:
+                                               break;
+                                       default:
+                                               Debug.WriteLine("Unhandled node {0} {1} {2}", reader.NodeType, reader.Name, reader.Value);
+                                               break;
+                               }
+                       }
+                       throw new XamlParseException("Closing PropertyElement expected", (IXmlLineInfo)reader);
+               }
+
+               static IList<KeyValuePair<XmlName, INode>> ParseXamlAttributes(XmlReader reader, out IList<KeyValuePair<string,string>> xmlns)
+               {
+                       Debug.Assert(reader.NodeType == XmlNodeType.Element);
+                       var attributes = new List<KeyValuePair<XmlName, INode>>();
+                       xmlns = new List<KeyValuePair<string, string>>();
+                       for (var i = 0; i < reader.AttributeCount; i++)
+                       {
+                               reader.MoveToAttribute(i);
+
+                               //skip xmlns
+                               if (reader.NamespaceURI == "http://www.w3.org/2000/xmlns/") {
+                                       xmlns.Add(new KeyValuePair<string, string>(reader.LocalName, reader.Value));
+                                       continue;
+                               }
+
+                               var namespaceUri = reader.NamespaceURI;
+                               if (reader.LocalName.Contains(".") && namespaceUri == "")
+                                       namespaceUri = ((IXmlNamespaceResolver)reader).LookupNamespace("");
+                               var propertyName = new XmlName(namespaceUri, reader.LocalName);
+
+                               object value = reader.Value;
+
+                               if (reader.NamespaceURI == X2006Uri)
+                               {
+                                       switch (reader.Name) {
+                                       case "x:Key":
+                                               propertyName = XmlName.xKey;
+                                               break;
+                                       case "x:Name":
+                                               propertyName = XmlName.xName;
+                                               break;
+                                       case "x:Class":
+                                       case "x:FieldModifier":
+                                               continue;
+                                       default:
+                                               Debug.WriteLine("Unhandled attribute {0}", reader.Name);
+                                               continue;
+                                       }
+                }
+
+                               if (reader.NamespaceURI == X2009Uri)
+                               {
+                                       switch (reader.Name) {
+                                       case "x:Key":
+                                               propertyName = XmlName.xKey;
+                                               break;
+                                       case "x:Name":
+                                               propertyName = XmlName.xName;
+                                               break;
+                                       case "x:TypeArguments":
+                                               propertyName = XmlName.xTypeArguments;
+                                               value = TypeArgumentsParser.ParseExpression((string)value, (IXmlNamespaceResolver)reader, (IXmlLineInfo)reader);
+                                               break;
+                                       case "x:DataType":
+                                               propertyName = XmlName.xDataType;
+                                               break;
+                                       case "x:Class":
+                                       case "x:FieldModifier":
+                                               continue;
+                                       case "x:FactoryMethod":
+                                               propertyName = XmlName.xFactoryMethod;
+                                               break;
+                                       case "x:Arguments":
+                                               propertyName = XmlName.xArguments;
+                                               break;
+                                       default:
+                                               Debug.WriteLine("Unhandled attribute {0}", reader.Name);
+                                               continue;
+                                       }
+                               }
+
+                               var propertyNode = GetValueNode(value, reader);
+                               attributes.Add(new KeyValuePair<XmlName, INode>(propertyName, propertyNode));
+                       }
+                       reader.MoveToElement();
+                       return attributes;
+               }
+
+               static IList<string> PrefixesToIgnore(IList<KeyValuePair<string, string>> xmlns)
+               {
+                       var prefixes = new List<string>();
+                       foreach (var kvp in xmlns) {
+                               var prefix = kvp.Key;
+
+                               string typeName = null, ns = null, asm = null, targetPlatform = null;
+                               XmlnsHelper.ParseXmlns(kvp.Value, out typeName, out ns, out asm, out targetPlatform);
+                               if (targetPlatform == null)
+                                       continue;
+                               try {
+                                       if (targetPlatform != Device.RuntimePlatform)
+                                       {
+                                               // Special case for Windows backward compatibility
+                                               if (targetPlatform == "Windows" && Device.RuntimePlatform == Device.UWP)
+                                                       continue;
+                                               
+                                               prefixes.Add(prefix);
+                                       }
+                               } catch (InvalidOperationException) {
+                                       prefixes.Add(prefix);
+                               }
+                       }
+                       return prefixes;
+               }
+
+               static IValueNode GetValueNode(object value, XmlReader reader)
+               {
+                       var valueString = value as string;
+                       if (valueString != null && valueString.Trim().StartsWith("{}", StringComparison.Ordinal))
+                       {
+                               return new ValueNode(valueString.Substring(2), (IXmlNamespaceResolver)reader, ((IXmlLineInfo)reader).LineNumber,
+                                       ((IXmlLineInfo)reader).LinePosition);
+                       }
+                       if (valueString != null && valueString.Trim().StartsWith("{", StringComparison.Ordinal))
+                       {
+                               return new MarkupNode(valueString.Trim(), reader as IXmlNamespaceResolver, ((IXmlLineInfo)reader).LineNumber,
+                                       ((IXmlLineInfo)reader).LinePosition);
+                       }
+                       return new ValueNode(value, (IXmlNamespaceResolver)reader, ((IXmlLineInfo)reader).LineNumber,
+                               ((IXmlLineInfo)reader).LinePosition);
+               }
+
+               static IList<XmlnsDefinitionAttribute> s_xmlnsDefinitions;
+
+               static void GatherXmlnsDefinitionAttributes()
+               {
+                       //this could be extended to look for [XmlnsDefinition] in all assemblies
+                       var assemblies = new [] {
+                               typeof(View).GetTypeInfo().Assembly,
+                               typeof(XamlLoader).GetTypeInfo().Assembly,
+                       };
+
+                       s_xmlnsDefinitions = new List<XmlnsDefinitionAttribute>();
+
+                       foreach (var assembly in assemblies)
+                               foreach (XmlnsDefinitionAttribute attribute in assembly.GetCustomAttributes(typeof(XmlnsDefinitionAttribute))) {
+                                       s_xmlnsDefinitions.Add(attribute);
+                                       attribute.AssemblyName = attribute.AssemblyName ?? assembly.FullName;
+                               }
+               }
+
+               public static Type GetElementType(XmlType xmlType, IXmlLineInfo xmlInfo, Assembly currentAssembly,
+                       out XamlParseException exception)
+               {
+                       if (s_xmlnsDefinitions == null)
+                               GatherXmlnsDefinitionAttributes();
+
+                       var namespaceURI = xmlType.NamespaceUri;
+                       var elementName = xmlType.Name;
+                       var typeArguments = xmlType.TypeArguments;
+                       exception = null;
+
+                       var lookupAssemblies = new List<XmlnsDefinitionAttribute>();
+                       var lookupNames = new List<string>();
+
+                       foreach (var xmlnsDef in s_xmlnsDefinitions) {
+                               if (xmlnsDef.XmlNamespace != namespaceURI)
+                                       continue;
+                               lookupAssemblies.Add(xmlnsDef);
+                       }
+
+                       if (lookupAssemblies.Count == 0) {
+                               string ns, asmstring, _;
+                               XmlnsHelper.ParseXmlns(namespaceURI, out _, out ns, out asmstring, out _);
+                               lookupAssemblies.Add(new XmlnsDefinitionAttribute(namespaceURI, ns) {
+                                       AssemblyName = asmstring ?? currentAssembly.FullName
+                               });
+                       }
+
+                       lookupNames.Add(elementName);
+                       lookupNames.Add(elementName + "Extension");
+
+                       for (var i = 0; i < lookupNames.Count; i++)
+                       {
+                               var name = lookupNames[i];
+                               if (name.Contains(":"))
+                                       name = name.Substring(name.LastIndexOf(':') + 1);
+                               if (typeArguments != null)
+                                       name += "`" + typeArguments.Count; //this will return an open generic Type
+                               lookupNames[i] = name;
+                       }
+
+                       Type type = null;
+                       foreach (var asm in lookupAssemblies) {
+                               foreach (var name in lookupNames)
+                                       if ((type = Type.GetType($"{asm.ClrNamespace}.{name}, {asm.AssemblyName}")) != null)
+                                               break;
+                               if (type != null)
+                                       break;
+                       }
+
+            if (type == null)
+            {
+                List<Tuple<string, Assembly>> lookupAssemblies2 = new List<Tuple<string, Assembly>>();
+                if (namespaceURI == NUI2018Uri)
+                {
+                    // Got the type of Tizen.NUI wiedget here, then CreateValueVisitor will create the instance of Tizen.NUI widget
+                    lookupAssemblies2.Add(new Tuple<string, Assembly>("Tizen.NUI", typeof(Tizen.NUI.BaseComponents.View).GetTypeInfo().Assembly));
+                    lookupAssemblies2.Add(new Tuple<string, Assembly>("Tizen.NUI.BaseComponents", typeof(Tizen.NUI.BaseComponents.View).GetTypeInfo().Assembly));
+                    lookupAssemblies2.Add(new Tuple<string, Assembly>("Tizen.NUI.UIComponents", typeof(Tizen.NUI.BaseComponents.View).GetTypeInfo().Assembly));
+                    lookupAssemblies2.Add(new Tuple<string, Assembly>("Tizen.NUI.Xaml", typeof(XamlLoader).GetTypeInfo().Assembly));
+                    lookupAssemblies2.Add(new Tuple<string, Assembly>("Tizen.NUI.Binding", typeof(Tizen.NUI.BaseComponents.View).GetTypeInfo().Assembly));
+                }
+                else if (namespaceURI == X2009Uri || namespaceURI == X2006Uri)
+                {
+                    lookupAssemblies2.Add(new Tuple<string, Assembly>("Tizen.NUI.Xaml", typeof(XamlLoader).GetTypeInfo().Assembly));
+                    lookupAssemblies2.Add(new Tuple<string, Assembly>("System", typeof(object).GetTypeInfo().Assembly));
+                    lookupAssemblies2.Add(new Tuple<string, Assembly>("System", typeof(Uri).GetTypeInfo().Assembly)); //System.dll
+                }
+                else
+                {
+                    string ns;
+                    string typename;
+                    string asmstring;
+                    Assembly asm;
+                    XmlnsHelper.ParseXmlns(namespaceURI, out typename, out ns, out asmstring, out _);
+                    asm = asmstring == null ? currentAssembly : Assembly.Load(new AssemblyName(asmstring));
+                    lookupAssemblies2.Add(new Tuple<string, Assembly>(ns, asm));
+                }
+
+                foreach (var asm in lookupAssemblies2)
+                {
+                    if (type != null)
+                        break;
+                    foreach (var name in lookupNames)
+                    {
+                        if (type != null)
+                            break;
+                        type = asm.Item2.GetType(asm.Item1 + "." + name);
+                    }
+                }
+            }
+
+                       if (type != null && typeArguments != null)
+                       {
+                               XamlParseException innerexception = null;
+                               var args = typeArguments.Select(delegate(XmlType xmltype)
+                               {
+                                       XamlParseException xpe;
+                                       var t = GetElementType(xmltype, xmlInfo, currentAssembly, out xpe);
+                                       if (xpe != null)
+                                       {
+                                               innerexception = xpe;
+                                               return null;
+                                       }
+                                       return t;
+                               }).ToArray();
+                               if (innerexception != null)
+                               {
+                                       exception = innerexception;
+                                       return null;
+                               }
+                               type = type.MakeGenericType(args);
+                       }
+
+                       if (type == null)
+                               exception = new XamlParseException($"Type {elementName} not found in xmlns {namespaceURI}", xmlInfo);
+
+                       return type;
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/XamlResourceIdAttribute.cs b/src/Tizen.NUI/src/internal/Xaml/XamlResourceIdAttribute.cs
new file mode 100755 (executable)
index 0000000..ae86a57
--- /dev/null
@@ -0,0 +1,67 @@
+using System;
+using System.Reflection;
+
+namespace Tizen.NUI.Xaml
+{
+       [AttributeUsage(AttributeTargets.Assembly, Inherited = false, AllowMultiple = true)]
+       internal sealed class XamlResourceIdAttribute : Attribute
+       {
+               public string ResourceId { get; set; }
+               public string Path { get; set; }
+               public Type Type { get; set; }
+
+               public XamlResourceIdAttribute(string resourceId, string path, Type type)
+               {
+                       ResourceId = resourceId;
+                       Path = path;
+                       Type = type;
+               }
+
+               internal static string GetResourceIdForType(Type type)
+               {
+                       var assembly = type.GetTypeInfo().Assembly;
+                       foreach (var xria in assembly.GetCustomAttributes<XamlResourceIdAttribute>()) {
+                               if (xria.Type == type)
+                                       return xria.ResourceId;
+                       }
+                       return null;
+               }
+
+               internal static string GetPathForType(Type type)
+               {
+                       var assembly = type.GetTypeInfo().Assembly;
+                       foreach (var xria in assembly.GetCustomAttributes<XamlResourceIdAttribute>()) {
+                               if (xria.Type == type)
+                                       return xria.Path;
+                       }
+                       return null;
+               }
+
+               internal static string GetResourceIdForPath(Assembly assembly, string path)
+               {
+                       foreach (var xria in assembly.GetCustomAttributes<XamlResourceIdAttribute>()) {
+                               if (xria.Path == path)
+                                       return xria.ResourceId;
+                       }
+                       return null;
+               }
+
+               internal static Type GetTypeForResourceId(Assembly assembly, string resourceId)
+               {
+                       foreach (var xria in assembly.GetCustomAttributes<XamlResourceIdAttribute>()) {
+                               if (xria.ResourceId == resourceId)
+                                       return xria.Type;
+                       }
+                       return null;
+               }
+
+               internal static Type GetTypeForPath(Assembly assembly, string path)
+               {
+                       foreach (var xria in assembly.GetCustomAttributes<XamlResourceIdAttribute>()) {
+                               if (xria.Path == path)
+                                       return xria.Type;
+                       }
+                       return null;
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/XamlServiceProvider.cs b/src/Tizen.NUI/src/internal/Xaml/XamlServiceProvider.cs
new file mode 100755 (executable)
index 0000000..7db6deb
--- /dev/null
@@ -0,0 +1,305 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Xml;
+using Tizen.NUI.Internals;
+
+namespace Tizen.NUI.Xaml
+{
+       internal class XamlServiceProvider : IServiceProvider
+       {
+               readonly Dictionary<Type, object> services = new Dictionary<Type, object>();
+
+               internal XamlServiceProvider(INode node, HydrationContext context)
+               {
+                       object targetObject;
+                       if (node != null && node.Parent != null && context.Values.TryGetValue(node.Parent, out targetObject))
+                               IProvideValueTarget = new XamlValueTargetProvider(targetObject, node, context, null);
+                       if (context != null)
+                               IRootObjectProvider = new XamlRootObjectProvider(context.RootElement);
+                       if (node != null)
+                       {
+                               IXamlTypeResolver = new XamlTypeResolver(node.NamespaceResolver, XamlParser.GetElementType,
+                                       context.RootElement.GetType().GetTypeInfo().Assembly);
+
+                               var enode = node;
+                               while (enode != null && !(enode is IElementNode))
+                                       enode = enode.Parent;
+                               if (enode != null)
+                                       INameScopeProvider = new NameScopeProvider { NameScope = (enode as IElementNode).Namescope };
+                       }
+
+                       var xmlLineInfo = node as IXmlLineInfo;
+                       if (xmlLineInfo != null)
+                               IXmlLineInfoProvider = new XmlLineInfoProvider(xmlLineInfo);
+
+                       IValueConverterProvider = new ValueConverterProvider();
+               }
+
+               public XamlServiceProvider()
+               {
+                       IValueConverterProvider = new ValueConverterProvider();
+               }
+
+               internal IProvideValueTarget IProvideValueTarget
+               {
+                       get { return (IProvideValueTarget)GetService(typeof (IProvideValueTarget)); }
+                       set { services[typeof (IProvideValueTarget)] = value; }
+               }
+
+               internal IXamlTypeResolver IXamlTypeResolver
+               {
+                       get { return (IXamlTypeResolver)GetService(typeof (IXamlTypeResolver)); }
+                       set { services[typeof (IXamlTypeResolver)] = value; }
+               }
+
+               internal IRootObjectProvider IRootObjectProvider
+               {
+                       get { return (IRootObjectProvider)GetService(typeof (IRootObjectProvider)); }
+                       set { services[typeof (IRootObjectProvider)] = value; }
+               }
+
+               internal IXmlLineInfoProvider IXmlLineInfoProvider
+               {
+                       get { return (IXmlLineInfoProvider)GetService(typeof (IXmlLineInfoProvider)); }
+                       set { services[typeof (IXmlLineInfoProvider)] = value; }
+               }
+
+               internal INameScopeProvider INameScopeProvider
+               {
+                       get { return (INameScopeProvider)GetService(typeof (INameScopeProvider)); }
+                       set { services[typeof (INameScopeProvider)] = value; }
+               }
+
+               internal IValueConverterProvider IValueConverterProvider
+               {
+                       get { return (IValueConverterProvider)GetService(typeof (IValueConverterProvider)); }
+                       set { services[typeof (IValueConverterProvider)] = value; }
+               }
+
+               public object GetService(Type serviceType)
+               {
+                       object service;
+                       return services.TryGetValue(serviceType, out service) ? service : null;
+               }
+
+               public void Add(Type type, object service)
+               {
+                       services.Add(type, service);
+               }
+       }
+
+       class XamlValueTargetProvider : IProvideParentValues, IProvideValueTarget
+       {
+               public XamlValueTargetProvider(object targetObject, INode node, HydrationContext context, object targetProperty)
+               {
+                       Context = context;
+                       Node = node;
+                       TargetObject = targetObject;
+                       TargetProperty = targetProperty;
+               }
+
+               INode Node { get; }
+
+               HydrationContext Context { get; }
+               public object TargetObject { get; }
+               public object TargetProperty { get; internal set; } = null;
+
+               IEnumerable<object> IProvideParentValues.ParentObjects
+               {
+                       get
+                       {
+                               if (Node == null || Context == null)
+                                       yield break;
+                               var n = Node;
+                               object obj = null;
+                               var context = Context;
+                               while (n.Parent != null && context != null)
+                               {
+                                       if (n.Parent is IElementNode)
+                                       {
+                                               if (context.Values.TryGetValue(n.Parent, out obj))
+                                                       yield return obj;
+                                               else
+                                               {
+                                                       context = context.ParentContext;
+                                                       continue;
+                                               }
+                                       }
+                                       n = n.Parent;
+                               }
+                       }
+               }
+       }
+
+       internal class SimpleValueTargetProvider : IProvideParentValues, IProvideValueTarget
+       {
+               readonly object[] objectAndParents;
+               readonly object targetProperty;
+
+               [Obsolete("SimpleValueTargetProvider(object[] objectAndParents) is obsolete as of version 2.3.4. Please use SimpleValueTargetProvider(object[] objectAndParents, object targetProperty) instead.")]
+               public SimpleValueTargetProvider(object[] objectAndParents) : this (objectAndParents, null)
+               {
+               }
+
+               public SimpleValueTargetProvider(object[] objectAndParents, object targetProperty)
+               {
+                       if (objectAndParents == null)
+                               throw new ArgumentNullException(nameof(objectAndParents));
+                       if (objectAndParents.Length == 0)
+                               throw new ArgumentException();
+
+                       this.objectAndParents = objectAndParents;
+                       this.targetProperty = targetProperty;
+               }
+
+               IEnumerable<object> IProvideParentValues.ParentObjects
+               {
+                       get { return objectAndParents; }
+               }
+
+               object IProvideValueTarget.TargetObject
+               {
+                       get { return objectAndParents[0]; }
+               }
+
+               object IProvideValueTarget.TargetProperty
+               {
+                       get { return targetProperty; }
+               }
+       }
+
+       internal class XamlTypeResolver : IXamlTypeResolver
+       {
+               readonly Assembly currentAssembly;
+               readonly GetTypeFromXmlName getTypeFromXmlName;
+               readonly IXmlNamespaceResolver namespaceResolver;
+
+               public XamlTypeResolver(IXmlNamespaceResolver namespaceResolver, Assembly currentAssembly)
+                       : this(namespaceResolver, XamlParser.GetElementType, currentAssembly)
+               {
+               }
+
+               internal XamlTypeResolver(IXmlNamespaceResolver namespaceResolver, GetTypeFromXmlName getTypeFromXmlName,
+                       Assembly currentAssembly)
+               {
+                       this.currentAssembly = currentAssembly;
+                       if (namespaceResolver == null)
+                               throw new ArgumentNullException();
+                       if (getTypeFromXmlName == null)
+                               throw new ArgumentNullException();
+
+                       this.namespaceResolver = namespaceResolver;
+                       this.getTypeFromXmlName = getTypeFromXmlName;
+               }
+
+               Type IXamlTypeResolver.Resolve(string qualifiedTypeName, IServiceProvider serviceProvider)
+               {
+                       XamlParseException e;
+                       var type = Resolve(qualifiedTypeName, serviceProvider, out e);
+                       if (e != null)
+                               throw e;
+                       return type;
+               }
+
+               bool IXamlTypeResolver.TryResolve(string qualifiedTypeName, out Type type)
+               {
+                       XamlParseException exception;
+                       type = Resolve(qualifiedTypeName, null, out exception);
+                       return exception == null;
+               }
+
+               Type Resolve(string qualifiedTypeName, IServiceProvider serviceProvider, out XamlParseException exception)
+               {
+                       exception = null;
+                       var split = qualifiedTypeName.Split(':');
+                       if (split.Length > 2)
+                               return null;
+
+                       string prefix, name;
+                       if (split.Length == 2)
+                       {
+                               prefix = split[0];
+                               name = split[1];
+                       }
+                       else
+                       {
+                               prefix = "";
+                               name = split[0];
+                       }
+
+                       IXmlLineInfo xmlLineInfo = null;
+                       if (serviceProvider != null)
+                       {
+                               var lineInfoProvider = serviceProvider.GetService(typeof (IXmlLineInfoProvider)) as IXmlLineInfoProvider;
+                               if (lineInfoProvider != null)
+                                       xmlLineInfo = lineInfoProvider.XmlLineInfo;
+                       }
+
+                       var namespaceuri = namespaceResolver.LookupNamespace(prefix);
+                       if (namespaceuri == null)
+                       {
+                               exception = new XamlParseException(string.Format("No xmlns declaration for prefix \"{0}\"", prefix), xmlLineInfo);
+                               return null;
+                       }
+
+                       return getTypeFromXmlName(new XmlType(namespaceuri, name, null), xmlLineInfo, currentAssembly, out exception);
+               }
+
+               internal delegate Type GetTypeFromXmlName(
+                       XmlType xmlType, IXmlLineInfo xmlInfo, Assembly currentAssembly, out XamlParseException exception);
+       }
+
+       class XamlRootObjectProvider : IRootObjectProvider
+       {
+               public XamlRootObjectProvider(object rootObject)
+               {
+                       RootObject = rootObject;
+               }
+
+               public object RootObject { get; }
+       }
+
+       internal class XmlLineInfoProvider : IXmlLineInfoProvider
+       {
+               public XmlLineInfoProvider(IXmlLineInfo xmlLineInfo)
+               {
+                       XmlLineInfo = xmlLineInfo;
+               }
+
+               public IXmlLineInfo XmlLineInfo { get; }
+       }
+
+       internal class NameScopeProvider : INameScopeProvider
+       {
+               public INameScope NameScope { get; set; }
+       }
+
+       internal class XmlNamespaceResolver : IXmlNamespaceResolver
+       {
+               readonly Dictionary<string, string> namespaces = new Dictionary<string, string>();
+
+               public IDictionary<string, string> GetNamespacesInScope(XmlNamespaceScope scope)
+               {
+                       throw new NotImplementedException();
+               }
+
+               public string LookupNamespace(string prefix)
+               {
+                       string result;
+                       if (namespaces.TryGetValue(prefix, out result))
+                               return result;
+                       return null;
+               }
+
+               public string LookupPrefix(string namespaceName)
+               {
+                       throw new NotImplementedException();
+               }
+
+               public void Add(string prefix, string ns)
+               {
+                       namespaces.Add(prefix, ns);
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/XmlLineInfo.cs b/src/Tizen.NUI/src/internal/Xaml/XmlLineInfo.cs
new file mode 100755 (executable)
index 0000000..318c21b
--- /dev/null
@@ -0,0 +1,29 @@
+using System.Xml;
+
+namespace Tizen.NUI.Xaml
+{
+       internal class XmlLineInfo : IXmlLineInfo
+       {
+               readonly bool _hasLineInfo;
+
+               public XmlLineInfo()
+               {
+               }
+
+               public XmlLineInfo(int linenumber, int lineposition)
+               {
+                       _hasLineInfo = true;
+                       LineNumber = linenumber;
+                       LinePosition = lineposition;
+               }
+
+               public bool HasLineInfo()
+               {
+                       return _hasLineInfo;
+               }
+
+               public int LineNumber { get; }
+
+               public int LinePosition { get; }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/XmlName.cs b/src/Tizen.NUI/src/internal/Xaml/XmlName.cs
new file mode 100755 (executable)
index 0000000..676cdcd
--- /dev/null
@@ -0,0 +1,58 @@
+using System.Diagnostics;
+
+namespace Tizen.NUI.Xaml
+{
+       [DebuggerDisplay("{NamespaceURI}:{LocalName}")]
+       internal struct XmlName
+       {
+               public static readonly XmlName _CreateContent = new XmlName("_", "CreateContent");
+               public static readonly XmlName xKey = new XmlName("x", "Key");
+               public static readonly XmlName xName = new XmlName("x", "Name");
+               public static readonly XmlName xTypeArguments = new XmlName("x", "TypeArguments");
+               public static readonly XmlName xArguments = new XmlName("x", "Arguments");
+               public static readonly XmlName xFactoryMethod = new XmlName("x", "FactoryMethod");
+               public static readonly XmlName xDataType = new XmlName("x", "DataType");
+               public static readonly XmlName Empty = new XmlName();
+
+               public string NamespaceURI { get; }
+               public string LocalName { get; }
+
+               public XmlName(string namespaceUri, string localName)
+               {
+                       NamespaceURI = namespaceUri;
+                       LocalName = localName;
+               }
+
+               public override bool Equals(object obj)
+               {
+                       if (obj == null)
+                               return false;
+                       if (obj.GetType() != typeof (XmlName))
+                               return false;
+                       var other = (XmlName)obj;
+                       return NamespaceURI == other.NamespaceURI && LocalName == other.LocalName;
+               }
+
+               public bool Equals(string namespaceUri, string localName)
+                       => Equals(new XmlName(namespaceUri, localName));
+
+               public override int GetHashCode()
+               {
+                       unchecked
+                       {
+                               int hashCode = 0;
+                               if (NamespaceURI != null)
+                                       hashCode = NamespaceURI.GetHashCode();
+                               if (LocalName != null)
+                                       hashCode = (hashCode * 397) ^ LocalName.GetHashCode();
+                               return hashCode;
+                       }
+               }
+
+               public static bool operator ==(XmlName x1, XmlName x2)
+                       => x1.NamespaceURI == x2.NamespaceURI && x1.LocalName == x2.LocalName;
+
+               public static bool operator !=(XmlName x1, XmlName x2)
+                       =>  !(x1 == x2);
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/Xaml/XmlnsHelper.cs b/src/Tizen.NUI/src/internal/Xaml/XmlnsHelper.cs
new file mode 100755 (executable)
index 0000000..7e80658
--- /dev/null
@@ -0,0 +1,75 @@
+using System;
+
+namespace Tizen.NUI.Xaml
+{
+       static class XmlnsHelper
+       {
+               public static string ParseNamespaceFromXmlns(string xmlns)
+               {
+                       string typeName;
+                       string ns;
+                       string asm;
+                       string targetPlatform;
+
+                       ParseXmlns(xmlns, out typeName, out ns, out asm, out targetPlatform);
+
+                       return ns;
+               }
+
+               public static void ParseXmlns(string xmlns, out string typeName, out string ns, out string asm, out string targetPlatform)
+               {
+                       typeName = ns = asm = targetPlatform = null;
+
+                       xmlns = xmlns.Trim();
+
+                       if (xmlns.StartsWith("using:", StringComparison.Ordinal)) {
+                               ParseUsing(xmlns, out typeName, out ns, out asm, out targetPlatform);
+                               return;
+                       }
+                       ParseClrNamespace(xmlns, out typeName, out ns, out asm, out targetPlatform);
+               }
+
+               static void ParseClrNamespace(string xmlns, out string typeName, out string ns, out string asm, out string targetPlatform)
+               {
+                       typeName = ns = asm = targetPlatform = null;
+
+                       foreach (var decl in xmlns.Split(';'))
+                       {
+                               if (decl.StartsWith("clr-namespace:", StringComparison.Ordinal))
+                               {
+                                       ns = decl.Substring(14, decl.Length - 14);
+                                       continue;
+                               }
+                               if (decl.StartsWith("assembly=", StringComparison.Ordinal))
+                               {
+                                       asm = decl.Substring(9, decl.Length - 9);
+                                       continue;
+                               }
+                               if (decl.StartsWith("targetPlatform=", StringComparison.Ordinal)) {
+                                       targetPlatform = decl.Substring(15, decl.Length - 15);
+                                       continue;
+                               }
+                               var nsind = decl.LastIndexOf(".", StringComparison.Ordinal);
+                               if (nsind > 0)
+                               {
+                                       ns = decl.Substring(0, nsind);
+                                       typeName = decl.Substring(nsind + 1, decl.Length - nsind - 1);
+                               }
+                               else
+                                       typeName = decl;
+                       }
+               }
+
+               static void ParseUsing(string xmlns, out string typeName, out string ns, out string asm, out string targetPlatform)
+               {
+                       typeName = ns = asm = targetPlatform = null;
+
+                       foreach (var decl in xmlns.Split(';')) {
+                               if (decl.StartsWith("using:", StringComparison.Ordinal)) {
+                                       ns = decl.Substring(6, decl.Length - 6);
+                                       continue;
+                               }
+                       }
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Accelerator.cs b/src/Tizen.NUI/src/internal/XamlBinding/Accelerator.cs
new file mode 100755 (executable)
index 0000000..d88349f
--- /dev/null
@@ -0,0 +1,86 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+
+namespace Tizen.NUI.Binding
+{
+       [System.ComponentModel.TypeConverter(typeof(AcceleratorTypeConverter))]
+       internal class Accelerator
+       {
+               const char Separator = '+';
+               string _text;
+
+               internal Accelerator(string text)
+               {
+                       if (string.IsNullOrEmpty(text))
+                               throw new ArgumentNullException(nameof(text));
+                       _text = text;
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public IEnumerable<string> Modifiers { get; set; }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public IEnumerable<string> Keys { get; set; }
+
+               public static Accelerator FromString(string text)
+               {
+                       var accelarat = new Accelerator(text);
+
+                       var acceleratorParts = text.Split(Separator);
+
+                       if (acceleratorParts.Length > 1)
+                       {
+                               var modifiers = new List<string>();
+                               for (int i = 0; i < acceleratorParts.Length; i++)
+                               {
+                                       var modifierMask = acceleratorParts[i];
+                                       var modiferMaskLower = modifierMask.ToLower();
+                                       switch (modiferMaskLower)
+                                       {
+                                               case "ctrl":
+                                               case "cmd":
+                                               case "alt":
+                                               case "shift":
+                                               case "fn":
+                                               case "win":
+                                                       modifiers.Add(modiferMaskLower);
+                                                       text = text.Replace(modifierMask, "");
+                                                       break;
+                                       }
+                               }
+                               accelarat.Modifiers = modifiers;
+
+                       }
+
+                       var keys = text.Split(new char[] { Separator }, StringSplitOptions.RemoveEmptyEntries);
+                       accelarat.Keys = keys;
+                       return accelarat;
+               }
+
+               public override string ToString()
+               {
+                       return _text;
+               }
+
+               public override bool Equals(object obj)
+               {
+                       return obj != null && obj is Accelerator && Equals((Accelerator)obj);
+               }
+
+               bool Equals(Accelerator other)
+               {
+                       return other.ToString() == ToString();
+               }
+
+               public override int GetHashCode()
+               {
+                       return ToString().GetHashCode();
+               }
+
+               public static implicit operator Accelerator(string accelerator)
+               {
+                       return FromString(accelerator);
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/AcceleratorTypeConverter.cs b/src/Tizen.NUI/src/internal/XamlBinding/AcceleratorTypeConverter.cs
new file mode 100755 (executable)
index 0000000..26beae9
--- /dev/null
@@ -0,0 +1,13 @@
+namespace Tizen.NUI.Binding
+{
+       internal class AcceleratorTypeConverter : TypeConverter
+       {
+               public override object ConvertFromInvariantString(string value)
+               {
+                       if (value == null)
+                               return null;
+
+                       return Accelerator.FromString(value);
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/ActionSheetArguments.cs b/src/Tizen.NUI/src/internal/XamlBinding/ActionSheetArguments.cs
new file mode 100755 (executable)
index 0000000..75e4414
--- /dev/null
@@ -0,0 +1,47 @@
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Threading.Tasks;
+
+namespace Tizen.NUI.Binding
+{
+       [EditorBrowsable(EditorBrowsableState.Never)]
+       internal class ActionSheetArguments
+       {
+               public ActionSheetArguments(string title, string cancel, string destruction, IEnumerable<string> buttons)
+               {
+                       Title = title;
+                       Cancel = cancel;
+                       Destruction = destruction;
+                       Buttons = buttons;
+                       Result = new TaskCompletionSource<string>();
+               }
+
+               /// <summary>
+               ///     Gets titles of any buttons on the action sheet that aren't <see cref="Cancel" /> or <see cref="Destruction" />. Can
+               ///     be <c>null</c>.
+               /// </summary>
+               public IEnumerable<string> Buttons { get; private set; }
+
+               /// <summary>
+               ///     Gets the text for a cancel button. Can be null.
+               /// </summary>
+               public string Cancel { get; private set; }
+
+               /// <summary>
+               ///     Gets the text for a destructive button. Can be null.
+               /// </summary>
+               public string Destruction { get; private set; }
+
+               public TaskCompletionSource<string> Result { get; }
+
+               /// <summary>
+               ///     Gets the title for the action sheet. Can be null.
+               /// </summary>
+               public string Title { get; private set; }
+
+               public void SetResult(string result)
+               {
+                       Result.TrySetResult(result);
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/AlertArguments.cs b/src/Tizen.NUI/src/internal/XamlBinding/AlertArguments.cs
new file mode 100755 (executable)
index 0000000..ffd0869
--- /dev/null
@@ -0,0 +1,45 @@
+using System.ComponentModel;
+using System.Threading.Tasks;
+
+namespace Tizen.NUI.Binding
+{
+       [EditorBrowsable(EditorBrowsableState.Never)]
+       internal class AlertArguments
+       {
+               public AlertArguments(string title, string message, string accept, string cancel)
+               {
+                       Title = title;
+                       Message = message;
+                       Accept = accept;
+                       Cancel = cancel;
+                       Result = new TaskCompletionSource<bool>();
+               }
+
+               /// <summary>
+               ///     Gets the text for the accept button. Can be null.
+               /// </summary>
+               public string Accept { get; private set; }
+
+               /// <summary>
+               ///     Gets the text of the cancel button.
+               /// </summary>
+               public string Cancel { get; private set; }
+
+               /// <summary>
+               ///     Gets the message for the alert. Can be null.
+               /// </summary>
+               public string Message { get; private set; }
+
+               public TaskCompletionSource<bool> Result { get; }
+
+               /// <summary>
+               ///     Gets the title for the alert. Can be null.
+               /// </summary>
+               public string Title { get; private set; }
+
+               public void SetResult(bool result)
+               {
+                       Result.TrySetResult(result);
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Application.cs b/src/Tizen.NUI/src/internal/XamlBinding/Application.cs
new file mode 100755 (executable)
index 0000000..0254b46
--- /dev/null
@@ -0,0 +1,406 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Threading;
+using System.ComponentModel;
+using System.Threading.Tasks;
+using Tizen.NUI.Internals;
+
+namespace Tizen.NUI.Binding
+{
+       internal class Application : Element, IResourcesProvider, IApplicationController, IElementConfiguration<Application>
+       {
+               static Application s_current;
+               Task<IDictionary<string, object>> _propertiesTask;
+               readonly Lazy<PlatformConfigurationRegistry<Application>> _platformConfigurationRegistry;
+
+               IAppIndexingProvider _appIndexProvider;
+
+               ReadOnlyCollection<Element> _logicalChildren;
+
+               Page _mainPage;
+
+               static SemaphoreSlim SaveSemaphore = new SemaphoreSlim(1, 1);
+
+               public Application()
+               {
+                       var f = false;
+                       // if (f)
+                       //      Loader.Load();
+                       NavigationProxy = new NavigationImpl(this);
+                       SetCurrentApplication(this);
+
+                       SystemResources = DependencyService.Get<ISystemResourcesProvider>().GetSystemResources();
+                       SystemResources.ValuesChanged += OnParentResourcesChanged;
+                       _platformConfigurationRegistry = new Lazy<PlatformConfigurationRegistry<Application>>(() => new PlatformConfigurationRegistry<Application>(this));
+               }
+
+               public void Quit()
+               {
+                       Device.PlatformServices?.QuitApplication();
+               }
+
+               public IAppLinks AppLinks
+               {
+                       get
+                       {
+                               if (_appIndexProvider == null)
+                                       throw new ArgumentException("No IAppIndexingProvider was provided");
+                               if (_appIndexProvider.AppLinks == null)
+                                       throw new ArgumentException("No AppLinks implementation was found, if in Android make sure you installed the Xamarin.Forms.AppLinks");
+                               return _appIndexProvider.AppLinks;
+                       }
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public static void SetCurrentApplication(Application value) => Current = value;
+
+               public static Application Current
+               {
+                       get { return s_current; }
+                       set
+                       {
+                               if (s_current == value)
+                                       return;
+                               if (value == null)
+                                       s_current = null; //Allow to reset current for unittesting
+                               s_current = value;
+                       }
+               }
+
+               public Page MainPage
+               {
+                       get { return _mainPage; }
+                       set
+                       {
+                               if (value == null)
+                                       throw new ArgumentNullException("value");
+
+                               if (_mainPage == value)
+                                       return;
+
+                               OnPropertyChanging();
+                               if (_mainPage != null)
+                               {
+                                       InternalChildren.Remove(_mainPage);
+                                       _mainPage.Parent = null;
+                               }
+
+                               _mainPage = value;
+
+                               if (_mainPage != null)
+                               {
+                                       _mainPage.Parent = this;
+                                       _mainPage.NavigationProxy.Inner = NavigationProxy;
+                                       InternalChildren.Add(_mainPage);
+                               }
+                               OnPropertyChanged();
+                       }
+               }
+
+               public IDictionary<string, object> Properties
+               {
+                       get
+                       {
+                               if (_propertiesTask == null)
+                               {
+                                       _propertiesTask = GetPropertiesAsync();
+                               }
+
+                               return _propertiesTask.Result;
+                       }
+               }
+
+               internal override ReadOnlyCollection<Element> LogicalChildrenInternal
+               {
+                       get { return _logicalChildren ?? (_logicalChildren = new ReadOnlyCollection<Element>(InternalChildren)); }
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public NavigationProxy NavigationProxy { get; }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public int PanGestureId { get; set; }
+
+               internal IResourceDictionary SystemResources { get; }
+
+               ObservableCollection<Element> InternalChildren { get; } = new ObservableCollection<Element>();
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public void SetAppIndexingProvider(IAppIndexingProvider provider)
+               {
+                       _appIndexProvider = provider;
+               }
+
+               ResourceDictionary _resources;
+               bool IResourcesProvider.IsResourcesCreated => _resources != null;
+
+               public ResourceDictionary Resources
+               {
+                       get
+                       {
+                               if (_resources != null)
+                                       return _resources;
+
+                               _resources = new ResourceDictionary();
+                               ((IResourceDictionary)_resources).ValuesChanged += OnResourcesChanged;
+                               return _resources;
+                       }
+                       set
+                       {
+                               if (_resources == value)
+                                       return;
+                               OnPropertyChanging();
+                               if (_resources != null)
+                                       ((IResourceDictionary)_resources).ValuesChanged -= OnResourcesChanged;
+                               _resources = value;
+                               OnResourcesChanged(value);
+                               if (_resources != null)
+                                       ((IResourceDictionary)_resources).ValuesChanged += OnResourcesChanged;
+                               OnPropertyChanged();
+                       }
+               }
+
+               public event EventHandler<ModalPoppedEventArgs> ModalPopped;
+
+               public event EventHandler<ModalPoppingEventArgs> ModalPopping;
+
+               public event EventHandler<ModalPushedEventArgs> ModalPushed;
+
+               public event EventHandler<ModalPushingEventArgs> ModalPushing;
+
+               public event EventHandler<Page> PageAppearing;
+
+               public event EventHandler<Page> PageDisappearing;
+
+
+               async void SaveProperties()
+               {
+                       try
+                       {
+                               await SetPropertiesAsync();
+                       }
+                       catch (Exception exc)
+                       {
+                               Console.WriteLine(nameof(Application), $"Exception while saving Application Properties: {exc}");
+                       }
+               }
+
+               public async Task SavePropertiesAsync()
+               {
+                       if (Device.IsInvokeRequired)
+                       {
+                               Device.BeginInvokeOnMainThread(SaveProperties);
+                       }
+                       else
+                       {
+                               await SetPropertiesAsync();
+                       }
+               }
+
+               // Don't use this unless there really is no better option
+               internal void SavePropertiesAsFireAndForget()
+               {
+                       if (Device.IsInvokeRequired)
+                       {
+                               Device.BeginInvokeOnMainThread(SaveProperties);
+                       }
+                       else
+                       {
+                               SaveProperties();
+                       }
+               }
+
+               public IPlatformElementConfiguration<T, Application> On<T>() where T : IConfigPlatform
+               {
+                       return _platformConfigurationRegistry.Value.On<T>();
+               }
+
+               protected virtual void OnAppLinkRequestReceived(Uri uri)
+               {
+               }
+
+               protected override void OnParentSet()
+               {
+                       throw new InvalidOperationException("Setting a Parent on Application is invalid.");
+               }
+
+               protected virtual void OnResume()
+               {
+               }
+
+               protected virtual void OnSleep()
+               {
+               }
+
+               protected virtual void OnStart()
+               {
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public static void ClearCurrent()
+               {
+                       s_current = null;
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public static bool IsApplicationOrNull(Element element)
+               {
+                       return element == null || element is Application;
+               }
+
+               internal override void OnParentResourcesChanged(IEnumerable<KeyValuePair<string, object>> values)
+               {
+                       if (!((IResourcesProvider)this).IsResourcesCreated || Resources.Count == 0)
+                       {
+                               base.OnParentResourcesChanged(values);
+                               return;
+                       }
+
+                       var innerKeys = new HashSet<string>();
+                       var changedResources = new List<KeyValuePair<string, object>>();
+                       foreach (KeyValuePair<string, object> c in Resources)
+                               innerKeys.Add(c.Key);
+                       foreach (KeyValuePair<string, object> value in values)
+                       {
+                               if (innerKeys.Add(value.Key))
+                                       changedResources.Add(value);
+                       }
+                       OnResourcesChanged(changedResources);
+               }
+
+               internal event EventHandler PopCanceled;
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public void SendOnAppLinkRequestReceived(Uri uri)
+               {
+                       OnAppLinkRequestReceived(uri);
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public void SendResume()
+               {
+                       s_current = this;
+                       OnResume();
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public void SendSleep()
+               {
+                       OnSleep();
+                       SavePropertiesAsFireAndForget();
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public Task SendSleepAsync()
+               {
+                       OnSleep();
+                       return SavePropertiesAsync();
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public void SendStart()
+               {
+                       OnStart();
+               }
+
+               async Task<IDictionary<string, object>> GetPropertiesAsync()
+               {
+                       var deserializer = DependencyService.Get<IDeserializer>();
+                       if (deserializer == null)
+                       {
+                               Console.WriteLine("Startup", "No IDeserialzier was found registered");
+                               return new Dictionary<string, object>(4);
+                       }
+
+                       IDictionary<string, object> properties = await deserializer.DeserializePropertiesAsync().ConfigureAwait(false);
+                       if (properties == null)
+                               properties = new Dictionary<string, object>(4);
+
+                       return properties;
+               }
+
+               internal void OnPageAppearing(Page page)
+                       => PageAppearing?.Invoke(this, page);
+
+               internal void OnPageDisappearing(Page page)
+                       => PageDisappearing?.Invoke(this, page);
+
+               void OnModalPopped(Page modalPage)
+                       => ModalPopped?.Invoke(this, new ModalPoppedEventArgs(modalPage));
+
+               bool OnModalPopping(Page modalPage)
+               {
+                       var args = new ModalPoppingEventArgs(modalPage);
+                       ModalPopping?.Invoke(this, args);
+                       return args.Cancel;
+               }
+
+               void OnModalPushed(Page modalPage)
+                       => ModalPushed?.Invoke(this, new ModalPushedEventArgs(modalPage));
+
+               void OnModalPushing(Page modalPage)
+                       => ModalPushing?.Invoke(this, new ModalPushingEventArgs(modalPage));
+
+               void OnPopCanceled()
+                       => PopCanceled?.Invoke(this, EventArgs.Empty);
+
+               async Task SetPropertiesAsync()
+               {
+                       await SaveSemaphore.WaitAsync();
+                       try
+                       {
+                               await DependencyService.Get<IDeserializer>().SerializePropertiesAsync(Properties);
+                       }
+                       finally
+                       {
+                               SaveSemaphore.Release();
+                       }
+
+               }
+
+               class NavigationImpl : NavigationProxy
+               {
+                       readonly Application _owner;
+
+                       public NavigationImpl(Application owner)
+                       {
+                               _owner = owner;
+                       }
+
+                       protected override async Task<Page> OnPopModal(bool animated)
+                       {
+                               Page modal = ModalStack[ModalStack.Count - 1];
+                               if (_owner.OnModalPopping(modal))
+                               {
+                                       _owner.OnPopCanceled();
+                                       return null;
+                               }
+                               Page result = await base.OnPopModal(animated);
+                               result.Parent = null;
+                               _owner.OnModalPopped(result);
+                               return result;
+                       }
+
+                       protected override async Task OnPushModal(Page modal, bool animated)
+                       {
+                               _owner.OnModalPushing(modal);
+
+                               modal.Parent = _owner;
+
+                               if (modal.NavigationProxy.ModalStack.Count == 0)
+                               {
+                                       modal.NavigationProxy.Inner = this;
+                                       await base.OnPushModal(modal, animated);
+                               }
+                               else
+                               {
+                                       await base.OnPushModal(modal, animated);
+                                       modal.NavigationProxy.Inner = this;
+                               }
+
+                               _owner.OnModalPushed(modal);
+                       }
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/BaseMenuItem.cs b/src/Tizen.NUI/src/internal/XamlBinding/BaseMenuItem.cs
new file mode 100755 (executable)
index 0000000..7dec924
--- /dev/null
@@ -0,0 +1,8 @@
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.Binding
+{
+       internal abstract class BaseMenuItem : Element
+       {
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/BindableObjectExtensions.cs b/src/Tizen.NUI/src/internal/XamlBinding/BindableObjectExtensions.cs
new file mode 100755 (executable)
index 0000000..be8ae84
--- /dev/null
@@ -0,0 +1,35 @@
+using System;
+using System.Linq.Expressions;
+
+namespace Tizen.NUI.Binding
+{
+       internal static class BindableObjectExtensions
+       {
+               public static void SetBinding(this BindableObject self, BindableProperty targetProperty, string path, BindingMode mode = BindingMode.Default, IValueConverter converter = null,
+                                                                         string stringFormat = null)
+               {
+                       if (self == null)
+                               throw new ArgumentNullException("self");
+                       if (targetProperty == null)
+                               throw new ArgumentNullException("targetProperty");
+
+                       var binding = new Binding(path, mode, converter, stringFormat: stringFormat);
+                       self.SetBinding(targetProperty, binding);
+               }
+
+               [Obsolete]
+               public static void SetBinding<TSource>(this BindableObject self, BindableProperty targetProperty, Expression<Func<TSource, object>> sourceProperty, BindingMode mode = BindingMode.Default,
+                                                                                          IValueConverter converter = null, string stringFormat = null)
+               {
+                       if (self == null)
+                               throw new ArgumentNullException("self");
+                       if (targetProperty == null)
+                               throw new ArgumentNullException("targetProperty");
+                       if (sourceProperty == null)
+                               throw new ArgumentNullException("sourceProperty");
+
+                       Binding binding = Binding.Create(sourceProperty, mode, converter, stringFormat: stringFormat);
+                       self.SetBinding(targetProperty, binding);
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/BindablePropertyConverter.cs b/src/Tizen.NUI/src/internal/XamlBinding/BindablePropertyConverter.cs
new file mode 100755 (executable)
index 0000000..0f4d26a
--- /dev/null
@@ -0,0 +1,151 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Globalization;
+using System.Linq;
+using System.Reflection;
+using System.Xml;
+using Tizen.NUI.Internals;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Binding
+{
+       // [Xaml.ProvideCompiled("Xamarin.Forms.Core.XamlC.BindablePropertyConverter")]
+       [Xaml.TypeConversion(typeof(BindableProperty))]
+       internal sealed class BindablePropertyConverter : TypeConverter, IExtendedTypeConverter
+       {
+               object IExtendedTypeConverter.ConvertFrom(CultureInfo culture, object value, IServiceProvider serviceProvider)
+               {
+                       return ((IExtendedTypeConverter)this).ConvertFromInvariantString(value as string, serviceProvider);
+               }
+
+               object IExtendedTypeConverter.ConvertFromInvariantString(string value, IServiceProvider serviceProvider)
+               {
+                       if (string.IsNullOrWhiteSpace(value))
+                               return null;
+                       if (serviceProvider == null)
+                               return null;
+                       var parentValuesProvider = serviceProvider.GetService(typeof(IProvideValueTarget)) as IProvideParentValues;
+                       var typeResolver = serviceProvider.GetService(typeof(IXamlTypeResolver)) as IXamlTypeResolver;
+                       if (typeResolver == null)
+                               return null;
+                       IXmlLineInfo lineinfo = null;
+                       var xmlLineInfoProvider = serviceProvider.GetService(typeof(IXmlLineInfoProvider)) as IXmlLineInfoProvider;
+                       if (xmlLineInfoProvider != null)
+                               lineinfo = xmlLineInfoProvider.XmlLineInfo;
+                       string[] parts = value.Split('.');
+                       Type type = null;
+                       if (parts.Length == 1)
+                       {
+                               if (parentValuesProvider == null)
+                               {
+                                       string msg = string.Format("Can't resolve {0}", parts[0]);
+                                       throw new XamlParseException(msg, lineinfo);
+                               }
+                               object parent = parentValuesProvider.ParentObjects.Skip(1).FirstOrDefault();
+                               if (parentValuesProvider.TargetObject is Setter)
+                               {
+                                       var style = parent as Style;
+                                       var triggerBase = parent as TriggerBase;
+                                       var visualState = parent as VisualState;
+                                       if (style != null)
+                                               type = style.TargetType;
+                                       else if (triggerBase != null)
+                                               type = triggerBase.TargetType;
+                                       else if (visualState != null)
+                                               type = FindTypeForVisualState(parentValuesProvider, lineinfo);
+                               }
+                               else if (parentValuesProvider.TargetObject is Trigger)
+                                       type = (parentValuesProvider.TargetObject as Trigger).TargetType;
+                               else if (parentValuesProvider.TargetObject is PropertyCondition && (parent as TriggerBase) != null)
+                                       type = (parent as TriggerBase).TargetType;
+
+                               if (type == null)
+                                       throw new XamlParseException($"Can't resolve {parts [0]}", lineinfo);
+
+                               return ConvertFrom(type, parts[0], lineinfo);
+                       }
+                       if (parts.Length == 2)
+                       {
+                               if (!typeResolver.TryResolve(parts[0], out type))
+                               {
+                                       string msg = string.Format("Can't resolve {0}", parts[0]);
+                                       throw new XamlParseException(msg, lineinfo);
+                               }
+                               return ConvertFrom(type, parts[1], lineinfo);
+                       }
+                       throw new XamlParseException($"Can't resolve {value}. Syntax is [[prefix:]Type.]PropertyName.", lineinfo);
+               }
+
+               public override object ConvertFromInvariantString(string value)
+               {
+                       if (string.IsNullOrWhiteSpace(value))
+                               return null;
+                       if (value.Contains(":"))
+                       {
+                               Console.WriteLine(null, "Can't resolve properties with xml namespace prefix.");
+                               return null;
+                       }
+                       string[] parts = value.Split('.');
+                       if (parts.Length != 2)
+                       {
+                               Console.WriteLine(null, $"Can't resolve {value}. Accepted syntax is Type.PropertyName.");
+                               return null;
+                       }
+                       Type type = Type.GetType("Tizen.NUI." + parts[0]);
+                       return ConvertFrom(type, parts[1], null);
+               }
+
+               BindableProperty ConvertFrom(Type type, string propertyName, IXmlLineInfo lineinfo)
+               {
+                       string name = propertyName + "Property";
+                       FieldInfo bpinfo = type.GetField(fi => fi.Name == name && fi.IsStatic && fi.IsPublic && fi.FieldType == typeof(BindableProperty));
+                       if (bpinfo == null)
+                               throw new XamlParseException($"Can't resolve {name} on {type.Name}", lineinfo);
+                       var bp = bpinfo.GetValue(null) as BindableProperty;
+                       var isObsolete = bpinfo.GetCustomAttribute<ObsoleteAttribute>() != null;
+                       if (bp.PropertyName != propertyName && !isObsolete)
+                               throw new XamlParseException($"The PropertyName of {type.Name}.{name} is not {propertyName}", lineinfo);
+                       return bp;
+               }
+
+               Type FindTypeForVisualState(IProvideParentValues parentValueProvider, IXmlLineInfo lineInfo)
+               {
+                       var parents = parentValueProvider.ParentObjects.ToList();
+
+                       // Skip 0; we would not be making this check if TargetObject were not a Setter
+                       // Skip 1; we would not be making this check if the immediate parent were not a VisualState
+
+                       // VisualStates must be in a VisualStateGroup
+                       if(!(parents[2] is VisualStateGroup)) {
+                               throw new XamlParseException($"Expected {nameof(VisualStateGroup)} but found {parents[2]}.", lineInfo);
+                       }
+
+                       var vsTarget = parents[3];
+
+                       // Are these Visual States directly on a VisualElement?
+                       if (vsTarget is /*VisualElement*/BaseHandle)
+                       {
+                               return vsTarget.GetType();
+                       }
+
+                       if (!(parents[3] is VisualStateGroupList))
+                       {
+                               throw new XamlParseException($"Expected {nameof(VisualStateGroupList)} but found {parents[3]}.", lineInfo);
+                       }
+
+                       if (!(parents[4] is Setter))
+                       {
+                               throw new XamlParseException($"Expected {nameof(Setter)} but found {parents[4]}.", lineInfo);
+                       }
+
+                       // These must be part of a Style; verify that 
+                       if (!(parents[5] is Style style))
+                       {
+                               throw new XamlParseException($"Expected {nameof(Style)} but found {parents[5]}.", lineInfo);
+                       }
+
+                       return style.TargetType;
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Binding.cs b/src/Tizen.NUI/src/internal/XamlBinding/Binding.cs
new file mode 100755 (executable)
index 0000000..a049465
--- /dev/null
@@ -0,0 +1,255 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Globalization;
+using System.Linq;
+using System.Linq.Expressions;
+using System.Reflection;
+using System.Text;
+using Tizen.NUI.Internals;
+
+namespace Tizen.NUI.Binding
+{
+       internal sealed class Binding : BindingBase
+       {
+               internal const string SelfPath = ".";
+               IValueConverter _converter;
+               object _converterParameter;
+
+               BindingExpression _expression;
+               string _path;
+               object _source;
+               string _updateSourceEventName;
+
+               public Binding()
+               {
+               }
+
+               public Binding(string path, BindingMode mode = BindingMode.Default, IValueConverter converter = null, object converterParameter = null, string stringFormat = null, object source = null)
+               {
+                       if (path == null)
+                               throw new ArgumentNullException("path");
+                       if (string.IsNullOrWhiteSpace(path))
+                               throw new ArgumentException("path can not be an empty string", "path");
+
+                       Path = path;
+                       Converter = converter;
+                       ConverterParameter = converterParameter;
+                       Mode = mode;
+                       StringFormat = stringFormat;
+                       Source = source;
+               }
+
+               public IValueConverter Converter
+               {
+                       get { return _converter; }
+                       set
+                       {
+                               ThrowIfApplied();
+
+                               _converter = value;
+                       }
+               }
+
+               public object ConverterParameter
+               {
+                       get { return _converterParameter; }
+                       set
+                       {
+                               ThrowIfApplied();
+
+                               _converterParameter = value;
+                       }
+               }
+
+               public string Path
+               {
+                       get { return _path; }
+                       set
+                       {
+                               ThrowIfApplied();
+
+                               _path = value;
+                               _expression = new BindingExpression(this, !string.IsNullOrWhiteSpace(value) ? value : SelfPath);
+                       }
+               }
+
+               public object Source
+               {
+                       get { return _source; }
+                       set
+                       {
+                               ThrowIfApplied();
+                               _source = value;
+                       }
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public string UpdateSourceEventName {
+                       get { return _updateSourceEventName; }
+                       set {
+                               ThrowIfApplied();
+                               _updateSourceEventName = value;
+                       }
+               }
+
+               [Obsolete]
+               public static Binding Create<TSource>(Expression<Func<TSource, object>> propertyGetter, BindingMode mode = BindingMode.Default, IValueConverter converter = null, object converterParameter = null,
+                                                                                         string stringFormat = null)
+               {
+                       if (propertyGetter == null)
+                               throw new ArgumentNullException("propertyGetter");
+
+                       string path = GetBindingPath(propertyGetter);
+                       return new Binding(path, mode, converter, converterParameter, stringFormat);
+               }
+
+               internal override void Apply(bool fromTarget)
+               {
+                       base.Apply(fromTarget);
+
+                       if (_expression == null)
+                               _expression = new BindingExpression(this, SelfPath);
+
+                       _expression.Apply(fromTarget);
+               }
+
+               internal override void Apply(object newContext, BindableObject bindObj, BindableProperty targetProperty, bool fromBindingContextChanged = false)
+               {
+                       object src = _source;
+                       var isApplied = IsApplied;
+
+                       base.Apply(src ?? newContext, bindObj, targetProperty, fromBindingContextChanged: fromBindingContextChanged);
+
+                       if (src != null && isApplied && fromBindingContextChanged)
+                               return;
+
+                       object bindingContext = src ?? Context ?? newContext;
+                       if (_expression == null && bindingContext != null)
+                               _expression = new BindingExpression(this, SelfPath);
+
+                       _expression.Apply(bindingContext, bindObj, targetProperty);
+               }
+
+               internal override BindingBase Clone()
+               {
+                       return new Binding(Path, Mode) { Converter = Converter, ConverterParameter = ConverterParameter, StringFormat = StringFormat, Source = Source, UpdateSourceEventName = UpdateSourceEventName };
+               }
+
+               internal override object GetSourceValue(object value, Type targetPropertyType)
+               {
+                       if (Converter != null)
+                               value = Converter.Convert(value, targetPropertyType, ConverterParameter, CultureInfo.CurrentUICulture);
+
+                       return base.GetSourceValue(value, targetPropertyType);
+               }
+
+               internal override object GetTargetValue(object value, Type sourcePropertyType)
+               {
+                       if (Converter != null)
+                               value = Converter.ConvertBack(value, sourcePropertyType, ConverterParameter, CultureInfo.CurrentUICulture);
+
+                       return base.GetTargetValue(value, sourcePropertyType);
+               }
+
+               internal override void Unapply(bool fromBindingContextChanged = false)
+               {
+                       if (Source != null && fromBindingContextChanged && IsApplied)
+                               return;
+                       
+                       base.Unapply(fromBindingContextChanged: fromBindingContextChanged);
+
+                       if (_expression != null)
+                               _expression.Unapply();
+               }
+
+               [Obsolete]
+               static string GetBindingPath<TSource>(Expression<Func<TSource, object>> propertyGetter)
+               {
+                       Expression expr = propertyGetter.Body;
+
+                       var unary = expr as UnaryExpression;
+                       if (unary != null)
+                               expr = unary.Operand;
+
+                       var builder = new StringBuilder();
+
+                       var indexed = false;
+
+                       var member = expr as MemberExpression;
+                       if (member == null)
+                       {
+                               var methodCall = expr as MethodCallExpression;
+                               if (methodCall != null)
+                               {
+                                       if (methodCall.Arguments.Count == 0)
+                                               throw new ArgumentException("Method calls are not allowed in binding expression");
+
+                                       var arguments = new List<string>(methodCall.Arguments.Count);
+                                       foreach (Expression arg in methodCall.Arguments)
+                                       {
+                                               if (arg.NodeType != ExpressionType.Constant)
+                                                       throw new ArgumentException("Only constants can be used as indexer arguments");
+
+                                               object value = ((ConstantExpression)arg).Value;
+                                               arguments.Add(value != null ? value.ToString() : "null");
+                                       }
+
+                                       Type declarerType = methodCall.Method.DeclaringType;
+                                       DefaultMemberAttribute defaultMember = declarerType.GetTypeInfo().GetCustomAttributes(typeof(DefaultMemberAttribute), true).OfType<DefaultMemberAttribute>().FirstOrDefault();
+                                       string indexerName = defaultMember != null ? defaultMember.MemberName : "Item";
+
+                                       MethodInfo getterInfo =
+                                               declarerType.GetProperties().Where(pi => pi.Name == indexerName && pi.CanRead && pi.GetMethod.IsPublic && !pi.GetMethod.IsStatic).Select(pi => pi.GetMethod).FirstOrDefault();
+                                       if (getterInfo != null)
+                                       {
+                                               if (getterInfo == methodCall.Method)
+                                               {
+                                                       indexed = true;
+                                                       builder.Append("[");
+
+                                                       var first = true;
+                                                       foreach (string argument in arguments)
+                                                       {
+                                                               if (!first)
+                                                                       builder.Append(",");
+
+                                                               builder.Append(argument);
+                                                               first = false;
+                                                       }
+
+                                                       builder.Append("]");
+
+                                                       member = methodCall.Object as MemberExpression;
+                                               }
+                                               else
+                                                       throw new ArgumentException("Method calls are not allowed in binding expressions");
+                                       }
+                                       else
+                                               throw new ArgumentException("Public indexer not found");
+                               }
+                               else
+                                       throw new ArgumentException("Invalid expression type");
+                       }
+
+                       while (member != null)
+                       {
+                               var property = (PropertyInfo)member.Member;
+                               if (builder.Length != 0)
+                               {
+                                       if (!indexed)
+                                               builder.Insert(0, ".");
+                                       else
+                                               indexed = false;
+                               }
+
+                               builder.Insert(0, property.Name);
+
+                               //                              member = member.Expression as MemberExpression ?? (member.Expression as UnaryExpression)?.Operand as MemberExpression;
+                               member = member.Expression as MemberExpression ?? (member.Expression is UnaryExpression ? (member.Expression as UnaryExpression).Operand as MemberExpression : null);
+                       }
+
+                       return builder.ToString();
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/BindingBaseExtensions.cs b/src/Tizen.NUI/src/internal/XamlBinding/BindingBaseExtensions.cs
new file mode 100755 (executable)
index 0000000..cb9dce9
--- /dev/null
@@ -0,0 +1,12 @@
+using System;
+
+namespace Tizen.NUI.Binding
+{
+       static class BindingBaseExtensions
+       {
+               public static BindingMode GetRealizedMode(this BindingBase self, BindableProperty property)
+               {
+                       return self.Mode != BindingMode.Default ? self.Mode : property.DefaultBindingMode;
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/BindingExpression.cs b/src/Tizen.NUI/src/internal/XamlBinding/BindingExpression.cs
new file mode 100755 (executable)
index 0000000..4aa407f
--- /dev/null
@@ -0,0 +1,643 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Globalization;
+using System.Linq;
+using System.Reflection;
+using Tizen.NUI.Internals;
+using System.Runtime.CompilerServices;
+
+namespace Tizen.NUI.Binding
+{
+       internal class BindingExpression
+       {
+               internal const string PropertyNotFoundErrorMessage = "'{0}' property not found on '{1}', target property: '{2}.{3}'";
+
+               readonly List<BindingExpressionPart> _parts = new List<BindingExpressionPart>();
+
+               BindableProperty _targetProperty;
+               WeakReference<object> _weakSource;
+               WeakReference<BindableObject> _weakTarget;
+
+               internal BindingExpression(BindingBase binding, string path)
+               {
+                       if (binding == null)
+                               throw new ArgumentNullException(nameof(binding));
+                       if (path == null)
+                               throw new ArgumentNullException(nameof(path));
+
+                       Binding = binding;
+                       Path = path;
+
+                       ParsePath();
+               }
+
+               internal BindingBase Binding { get; }
+
+               internal string Path { get; }
+
+               /// <summary>
+               ///     Applies the binding expression to a previously set source and target.
+               /// </summary>
+               internal void Apply(bool fromTarget = false)
+               {
+                       if (_weakSource == null || _weakTarget == null)
+                               return;
+
+                       BindableObject target;
+                       if (!_weakTarget.TryGetTarget(out target))
+                       {
+                               Unapply();
+                               return;
+                       }
+
+                       object source;
+                       if (_weakSource.TryGetTarget(out source) && _targetProperty != null)
+                               ApplyCore(source, target, _targetProperty, fromTarget);
+               }
+
+               /// <summary>
+               ///     Applies the binding expression to a new source or target.
+               /// </summary>
+               internal void Apply(object sourceObject, BindableObject target, BindableProperty property)
+               {
+                       _targetProperty = property;
+
+                       BindableObject prevTarget;
+                       if (_weakTarget != null && _weakTarget.TryGetTarget(out prevTarget) && !ReferenceEquals(prevTarget, target))
+                               throw new InvalidOperationException("Binding instances can not be reused");
+
+                       object previousSource;
+                       if (_weakSource != null && _weakSource.TryGetTarget(out previousSource) && !ReferenceEquals(previousSource, sourceObject))
+                               throw new InvalidOperationException("Binding instances can not be reused");
+
+                       _weakSource = new WeakReference<object>(sourceObject);
+                       _weakTarget = new WeakReference<BindableObject>(target);
+
+                       ApplyCore(sourceObject, target, property);
+               }
+
+               internal void Unapply()
+               {
+                       object sourceObject;
+                       if (_weakSource != null && _weakSource.TryGetTarget(out sourceObject))
+                       {
+                               for (var i = 0; i < _parts.Count - 1; i++)
+                               {
+                                       BindingExpressionPart part = _parts[i];
+
+                                       if (!part.IsSelf)
+                                       {
+                                               part.TryGetValue(sourceObject, out sourceObject);
+                                       }
+
+                                       part.Unsubscribe();
+                               }
+                       }
+
+                       _weakSource = null;
+                       _weakTarget = null;
+               }
+
+               /// <summary>
+               ///     Applies the binding expression to a previously set source or target.
+               /// </summary>
+               void ApplyCore(object sourceObject, BindableObject target, BindableProperty property, bool fromTarget = false)
+               {
+                       BindingMode mode = Binding.GetRealizedMode(_targetProperty);
+                       if ((mode == BindingMode.OneWay || mode == BindingMode.OneTime) && fromTarget)
+                               return;
+
+                       bool needsGetter = (mode == BindingMode.TwoWay && !fromTarget) || mode == BindingMode.OneWay || mode == BindingMode.OneTime;
+                       bool needsSetter = !needsGetter && ((mode == BindingMode.TwoWay && fromTarget) || mode == BindingMode.OneWayToSource);
+
+                       object current = sourceObject;
+                       object previous = null;
+                       BindingExpressionPart part = null;
+
+                       for (var i = 0; i < _parts.Count; i++)
+                       {
+                               part = _parts[i];
+                               bool isLast = i + 1 == _parts.Count;
+
+                               if (!part.IsSelf && current != null)
+                               {
+                                       // Allow the object instance itself to provide its own TypeInfo 
+                                       var reflectable = current as IReflectableType;
+                                       System.Reflection.TypeInfo currentType = reflectable != null ? reflectable.GetTypeInfo() : current.GetType().GetTypeInfo();
+                                       if (part.LastGetter == null || !part.LastGetter.DeclaringType.GetTypeInfo().IsAssignableFrom(currentType))
+                                               SetupPart(currentType, part);
+
+                                       if (!isLast)
+                                               part.TryGetValue(current, out current);
+                               }
+
+                               if (!part.IsSelf && current != null)
+                               {
+                                       if ((needsGetter && part.LastGetter == null) || (needsSetter && part.NextPart == null && part.LastSetter == null))
+                                       {
+                                               Console.WriteLine("Binding", PropertyNotFoundErrorMessage, part.Content, current, target.GetType(), property.PropertyName);
+                                               break;
+                                       }
+                               }
+
+                               if (mode == BindingMode.OneWay || mode == BindingMode.TwoWay)
+                               {
+                                       var inpc = current as INotifyPropertyChanged;
+                                       if (inpc != null && !ReferenceEquals(current, previous))
+                                               part.Subscribe(inpc);
+                               }
+
+                               previous = current;
+                       }
+
+                       Debug.Assert(part != null, "There should always be at least the self part in the expression.");
+
+                       if (needsGetter)
+                       {
+                               object value = property.DefaultValue;
+                               if (part.TryGetValue(current, out value) || part.IsSelf)
+                               {
+                                       value = Binding.GetSourceValue(value, property.ReturnType);
+                               }
+                               else
+                                       value = property.DefaultValue;
+
+                               if (!TryConvert(part, ref value, property.ReturnType, true))
+                               {
+                                       Console.WriteLine("Binding", "{0} can not be converted to type '{1}'", value, property.ReturnType);
+                                       return;
+                               }
+
+                               target.SetValueCore(property, value, SetValueFlags.ClearDynamicResource, BindableObject.SetValuePrivateFlags.Default | BindableObject.SetValuePrivateFlags.Converted);
+                       }
+                       else if (needsSetter && part.LastSetter != null && current != null)
+                       {
+                               object value = Binding.GetTargetValue(target.GetValue(property), part.SetterType);
+
+                               if (!TryConvert(part, ref value, part.SetterType, false))
+                               {
+                                       Console.WriteLine("Binding", "{0} can not be converted to type '{1}'", value, part.SetterType);
+                                       return;
+                               }
+
+                               object[] args;
+                               if (part.IsIndexer)
+                               {
+                                       args = new object[part.Arguments.Length + 1];
+                                       part.Arguments.CopyTo(args, 0);
+                                       args[args.Length - 1] = value;
+                               }
+                               else if (part.IsBindablePropertySetter)
+                               {
+                                       args = new[] { part.BindablePropertyField, value };
+                               }
+                               else
+                               {
+                                       args = new[] { value };
+                               }
+
+                               part.LastSetter.Invoke(current, args);
+                       }
+               }
+
+               IEnumerable<BindingExpressionPart> GetPart(string part)
+               {
+                       part = part.Trim();
+                       if (part == string.Empty)
+                               throw new FormatException("Path contains an empty part");
+
+                       BindingExpressionPart indexer = null;
+
+                       int lbIndex = part.IndexOf('[');
+                       if (lbIndex != -1)
+                       {
+                               int rbIndex = part.LastIndexOf(']');
+                               if (rbIndex == -1)
+                                       throw new FormatException("Indexer did not contain closing bracket");
+
+                               int argLength = rbIndex - lbIndex - 1;
+                               if (argLength == 0)
+                                       throw new FormatException("Indexer did not contain arguments");
+
+                               string argString = part.Substring(lbIndex + 1, argLength);
+                               indexer = new BindingExpressionPart(this, argString, true);
+
+                               part = part.Substring(0, lbIndex);
+                               part = part.Trim();
+                       }
+
+                       if (part.Length > 0)
+                               yield return new BindingExpressionPart(this, part);
+                       if (indexer != null)
+                               yield return indexer;
+               }
+
+               void ParsePath()
+               {
+                       string p = Path.Trim();
+
+                       var last = new BindingExpressionPart(this, ".");
+                       _parts.Add(last);
+
+                       if (p[0] == '.')
+                       {
+                               if (p.Length == 1)
+                                       return;
+
+                               p = p.Substring(1);
+                       }
+
+                       string[] pathParts = p.Split('.');
+                       for (var i = 0; i < pathParts.Length; i++)
+                       {
+                               foreach (BindingExpressionPart part in GetPart(pathParts[i]))
+                               {
+                                       last.NextPart = part;
+                                       _parts.Add(part);
+                                       last = part;
+                               }
+                       }
+               }
+
+               void SetupPart(System.Reflection.TypeInfo sourceType, BindingExpressionPart part)
+               {
+                       part.Arguments = null;
+                       part.LastGetter = null;
+                       part.LastSetter = null;
+
+                       PropertyInfo property = null;
+                       if (part.IsIndexer)
+                       {
+                               if (sourceType.IsArray)
+                               {
+                                       int index;
+                                       if (!int.TryParse(part.Content, out index))
+                                               Console.WriteLine("Binding", "{0} could not be parsed as an index for a {1}", part.Content, sourceType);
+                                       else
+                                               part.Arguments = new object[] { index };
+
+                                       part.LastGetter = sourceType.GetDeclaredMethod("Get");
+                                       part.LastSetter = sourceType.GetDeclaredMethod("Set");
+                                       part.SetterType = sourceType.GetElementType();
+                               }
+
+                               DefaultMemberAttribute defaultMember = sourceType.GetCustomAttributes(typeof(DefaultMemberAttribute), true).OfType<DefaultMemberAttribute>().FirstOrDefault();
+                               string indexerName = defaultMember != null ? defaultMember.MemberName : "Item";
+
+                               part.IndexerName = indexerName;
+
+#if NETSTANDARD2_0
+                               try {
+                                       property = sourceType.GetDeclaredProperty(indexerName);
+                               }
+                               catch (AmbiguousMatchException) {
+                                       // Get most derived instance of property
+                                       foreach (var p in sourceType.GetProperties().Where(prop => prop.Name == indexerName)) {
+                                               if (property == null || property.DeclaringType.IsAssignableFrom(property.DeclaringType))
+                                                       property = p;
+                                       }
+                               }
+#else
+                               property = sourceType.GetDeclaredProperty(indexerName);
+#endif
+
+                               if (property == null) //is the indexer defined on the base class?
+                                       property = sourceType.BaseType.GetProperty(indexerName);
+                               if (property == null) //is the indexer defined on implemented interface ?
+                               {
+                                       foreach (var implementedInterface in sourceType.ImplementedInterfaces)
+                                       {
+                                               property = implementedInterface.GetProperty(indexerName);
+                                               if (property != null)
+                                                       break;
+                                       }
+                               }
+
+                               if (property != null)
+                               {
+                                       ParameterInfo parameter = property.GetIndexParameters().FirstOrDefault();
+                                       if (parameter != null)
+                                       {
+                                               try
+                                               {
+                                                       object arg = Convert.ChangeType(part.Content, parameter.ParameterType, CultureInfo.InvariantCulture);
+                                                       part.Arguments = new[] { arg };
+                                               }
+                                               catch (FormatException)
+                                               {
+                                               }
+                                               catch (InvalidCastException)
+                                               {
+                                               }
+                                               catch (OverflowException)
+                                               {
+                                               }
+                                       }
+                               }
+                       }
+                       else
+                               property = sourceType.GetDeclaredProperty(part.Content) ?? sourceType.BaseType?.GetProperty(part.Content);
+
+                       if (property != null)
+                       {
+                               if (property.CanRead && property.GetMethod.IsPublic && !property.GetMethod.IsStatic)
+                                       part.LastGetter = property.GetMethod;
+                               if (property.CanWrite && property.SetMethod.IsPublic && !property.SetMethod.IsStatic)
+                               {
+                                       part.LastSetter = property.SetMethod;
+                                       part.SetterType = part.LastSetter.GetParameters().Last().ParameterType;
+
+                                       if (Binding.AllowChaining)
+                                       {
+                                               FieldInfo bindablePropertyField = sourceType.GetDeclaredField(part.Content + "Property");
+                                               if (bindablePropertyField != null && bindablePropertyField.FieldType == typeof(BindableProperty) && sourceType.ImplementedInterfaces.Contains(typeof(IElementController)))
+                                               {
+                                                       MethodInfo setValueMethod = null;
+#if NETSTANDARD1_0
+                                                       foreach (MethodInfo m in sourceType.AsType().GetRuntimeMethods())
+                                                       {
+                                                               if (m.Name.EndsWith("IElementController.SetValueFromRenderer"))
+                                                               {
+                                                                       ParameterInfo[] parameters = m.GetParameters();
+                                                                       if (parameters.Length == 2 && parameters[0].ParameterType == typeof(BindableProperty))
+                                                                       {
+                                                                               setValueMethod = m;
+                                                                               break;
+                                                                       }
+                                                               }
+                                                       }
+#else
+                                                       setValueMethod = typeof(IElementController).GetMethod("SetValueFromRenderer", new[] { typeof(BindableProperty), typeof(object) });
+#endif
+                                                       if (setValueMethod != null)
+                                                       {
+                                                               part.LastSetter = setValueMethod;
+                                                               part.IsBindablePropertySetter = true;
+                                                               part.BindablePropertyField = bindablePropertyField.GetValue(null);
+                                                       }
+                                               }
+                                       }
+                               }
+#if !NETSTANDARD1_0
+                               TupleElementNamesAttribute tupleEltNames;
+                               if (   property != null
+                                       && part.NextPart != null
+                                       && property.PropertyType.IsGenericType
+                                       && (   property.PropertyType.GetGenericTypeDefinition() == typeof(ValueTuple<>)
+                                               || property.PropertyType.GetGenericTypeDefinition() == typeof(ValueTuple<,>)
+                                               || property.PropertyType.GetGenericTypeDefinition() == typeof(ValueTuple<,,>)
+                                               || property.PropertyType.GetGenericTypeDefinition() == typeof(ValueTuple<,,,>)
+                                               || property.PropertyType.GetGenericTypeDefinition() == typeof(ValueTuple<,,,,>)
+                                               || property.PropertyType.GetGenericTypeDefinition() == typeof(ValueTuple<,,,,,>)
+                                               || property.PropertyType.GetGenericTypeDefinition() == typeof(ValueTuple<,,,,,,>)
+                                               || property.PropertyType.GetGenericTypeDefinition() == typeof(ValueTuple<,,,,,,,>))
+                                       && (tupleEltNames = property.GetCustomAttribute(typeof(TupleElementNamesAttribute)) as TupleElementNamesAttribute) != null)
+                               {
+                                       //modify the nextPart to access the tuple item via the ITuple indexer
+                                       var nextPart = part.NextPart;
+                                       var name = nextPart.Content;
+                                       var index = tupleEltNames.TransformNames.IndexOf(name);
+                                       if (index >= 0)
+                                       {
+                                               nextPart.IsIndexer = true;
+                                               nextPart.Content = index.ToString();
+                                       }
+                               }
+#endif
+                       }
+
+               }
+               static Type[] DecimalTypes = new[] { typeof(float), typeof(decimal), typeof(double) };
+
+               bool TryConvert(BindingExpressionPart part, ref object value, Type convertTo, bool toTarget)
+               {
+                       if (value == null)
+                               return true;
+                       if ((toTarget && _targetProperty.TryConvert(ref value)) || (!toTarget && convertTo.IsInstanceOfType(value)))
+                               return true;
+
+                       object original = value;
+                       try
+                       {
+                               var stringValue = value as string ?? string.Empty;
+                               // see: https://bugzilla.xamarin.com/show_bug.cgi?id=32871
+                               // do not canonicalize "*.[.]"; "1." should not update bound BindableProperty
+                               if (stringValue.EndsWith(".") && DecimalTypes.Contains(convertTo))
+                                       throw new FormatException();
+
+                               // do not canonicalize "-0"; user will likely enter a period after "-0"
+                               if (stringValue == "-0" && DecimalTypes.Contains(convertTo))
+                                       throw new FormatException();
+
+                               value = Convert.ChangeType(value, convertTo, CultureInfo.InvariantCulture);
+                               return true;
+                       }
+                       catch (InvalidCastException)
+                       {
+                               value = original;
+                               return false;
+                       }
+                       catch (FormatException)
+                       {
+                               value = original;
+                               return false;
+                       }
+                       catch (OverflowException)
+                       {
+                               value = original;
+                               return false;
+                       }
+               }
+
+               class BindingPair
+               {
+                       public BindingPair(BindingExpressionPart part, object source, bool isLast)
+                       {
+                               Part = part;
+                               Source = source;
+                               IsLast = isLast;
+                       }
+
+                       public bool IsLast { get; set; }
+
+                       public BindingExpressionPart Part { get; private set; }
+
+                       public object Source { get; private set; }
+               }
+
+               internal class WeakPropertyChangedProxy
+               {
+                       readonly WeakReference<INotifyPropertyChanged> _source = new WeakReference<INotifyPropertyChanged>(null);
+                       readonly WeakReference<PropertyChangedEventHandler> _listener = new WeakReference<PropertyChangedEventHandler>(null);
+                       readonly PropertyChangedEventHandler _handler;
+                       readonly EventHandler _bchandler;
+                       internal WeakReference<INotifyPropertyChanged> Source => _source;
+
+                       public WeakPropertyChangedProxy()
+                       {
+                               _handler = new PropertyChangedEventHandler(OnPropertyChanged);
+                               _bchandler = new EventHandler(OnBCChanged);
+                       }
+
+                       public WeakPropertyChangedProxy(INotifyPropertyChanged source, PropertyChangedEventHandler listener) : this()
+                       {
+                               SubscribeTo(source, listener);
+                       }
+
+                       public void SubscribeTo(INotifyPropertyChanged source, PropertyChangedEventHandler listener)
+                       {
+                               source.PropertyChanged += _handler;
+                               var bo = source as BindableObject;
+                               if (bo != null)
+                                       bo.BindingContextChanged += _bchandler;
+                               _source.SetTarget(source);
+                               _listener.SetTarget(listener);
+                       }
+
+                       public void Unsubscribe()
+                       {
+                               INotifyPropertyChanged source;
+                               if (_source.TryGetTarget(out source) && source != null)
+                                       source.PropertyChanged -= _handler;
+                               var bo = source as BindableObject;
+                               if (bo != null)
+                                       bo.BindingContextChanged -= _bchandler;
+
+                               _source.SetTarget(null);
+                               _listener.SetTarget(null);
+                       }
+
+                       void OnPropertyChanged(object sender, PropertyChangedEventArgs e)
+                       {
+                               PropertyChangedEventHandler handler;
+                               if (_listener.TryGetTarget(out handler) && handler != null)
+                                       handler(sender, e);
+                               else
+                                       Unsubscribe();
+                       }
+
+                       void OnBCChanged(object sender, EventArgs e)
+                       {
+                               OnPropertyChanged(sender, new PropertyChangedEventArgs("BindingContext"));
+                       }
+               }
+
+               class BindingExpressionPart
+               {
+                       readonly BindingExpression _expression;
+                       readonly PropertyChangedEventHandler _changeHandler;
+                       WeakPropertyChangedProxy _listener;
+
+                       public BindingExpressionPart(BindingExpression expression, string content, bool isIndexer = false)
+                       {
+                               _expression = expression;
+                               IsSelf = content == Tizen.NUI.Binding.Binding.SelfPath;
+                               Content = content;
+                               IsIndexer = isIndexer;
+
+                               _changeHandler = PropertyChanged;
+                       }
+
+                       public void Subscribe(INotifyPropertyChanged handler)
+                       {
+                               INotifyPropertyChanged source;
+                               if (_listener != null && _listener.Source.TryGetTarget(out source) && ReferenceEquals(handler, source))
+                                       // Already subscribed
+                                       return;
+
+                               // Clear out the old subscription if necessary
+                               Unsubscribe();
+
+                               _listener = new WeakPropertyChangedProxy(handler, _changeHandler);
+                       }
+
+                       public void Unsubscribe()
+                       {
+                               var listener = _listener;
+                               if (listener != null)
+                               {
+                                       listener.Unsubscribe();
+                                       _listener = null;
+                               }
+                       }
+
+                       public object[] Arguments { get; set; }
+
+                       public object BindablePropertyField { get; set; }
+
+                       public string Content { get; internal set; }
+
+                       public string IndexerName { get; set; }
+
+                       public bool IsBindablePropertySetter { get; set; }
+
+                       public bool IsIndexer { get; internal set; }
+
+                       public bool IsSelf { get; }
+
+                       public MethodInfo LastGetter { get; set; }
+
+                       public MethodInfo LastSetter { get; set; }
+
+                       public BindingExpressionPart NextPart { get; set; }
+
+                       public Type SetterType { get; set; }
+
+                       public void PropertyChanged(object sender, PropertyChangedEventArgs args)
+                       {
+                               BindingExpressionPart part = NextPart ?? this;
+
+                               string name = args.PropertyName;
+
+                               if (!string.IsNullOrEmpty(name))
+                               {
+                                       if (part.IsIndexer)
+                                       {
+                                               if (name.Contains("["))
+                                               {
+                                                       if (name != string.Format("{0}[{1}]", part.IndexerName, part.Content))
+                                                               return;
+                                               }
+                                               else if (name != part.IndexerName)
+                                                       return;
+                                       }
+                                       else if (name != part.Content)
+                                       {
+                                               return;
+                                       }
+                               }
+
+                               Device.BeginInvokeOnMainThread(() => _expression.Apply());
+                       }
+
+                       public bool TryGetValue(object source, out object value)
+                       {
+                               value = source;
+
+                               if (LastGetter != null && value != null)
+                               {
+                                       if (IsIndexer)
+                                       {
+                                               try
+                                               {
+                                                       value = LastGetter.Invoke(value, Arguments);
+                                               }
+                                               catch (TargetInvocationException ex)
+                                               {
+                                                       if (!(ex.InnerException is KeyNotFoundException))
+                                                               throw;
+                                                       value = null;
+                                               }
+                                               return true;
+                                       }
+                                       value = LastGetter.Invoke(value, Arguments);
+                                       return true;
+                               }
+
+                               return false;
+                       }
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/BindingTypeConverter.cs b/src/Tizen.NUI/src/internal/XamlBinding/BindingTypeConverter.cs
new file mode 100755 (executable)
index 0000000..fa93023
--- /dev/null
@@ -0,0 +1,12 @@
+namespace Tizen.NUI.Binding
+{
+       // [Xaml.ProvideCompiled("Xamarin.Forms.Core.XamlC.BindingTypeConverter")]
+       [Xaml.TypeConversion(typeof(Binding))]
+       internal sealed class BindingTypeConverter : TypeConverter
+       {
+               public override object ConvertFromInvariantString(string value)
+               {
+                       return new Binding(value);
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/CollectionSynchronizationCallback.cs b/src/Tizen.NUI/src/internal/XamlBinding/CollectionSynchronizationCallback.cs
new file mode 100755 (executable)
index 0000000..545ca3f
--- /dev/null
@@ -0,0 +1,7 @@
+using System;
+using System.Collections;
+
+namespace Tizen.NUI.Binding
+{
+       internal delegate void CollectionSynchronizationCallback(IEnumerable collection, object context, Action accessMethod, bool writeAccess);
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/CollectionSynchronizationContext.cs b/src/Tizen.NUI/src/internal/XamlBinding/CollectionSynchronizationContext.cs
new file mode 100755 (executable)
index 0000000..c6a898d
--- /dev/null
@@ -0,0 +1,22 @@
+using System;
+
+namespace Tizen.NUI.Binding
+{
+       internal sealed class CollectionSynchronizationContext
+       {
+               internal CollectionSynchronizationContext(object context, CollectionSynchronizationCallback callback)
+               {
+                       ContextReference = new WeakReference(context);
+                       Callback = callback;
+               }
+
+               internal CollectionSynchronizationCallback Callback { get; private set; }
+
+               internal object Context
+               {
+                       get { return ContextReference != null ? ContextReference.Target : null; }
+               }
+
+               internal WeakReference ContextReference { get; }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/ColorTypeConverter.cs b/src/Tizen.NUI/src/internal/XamlBinding/ColorTypeConverter.cs
new file mode 100755 (executable)
index 0000000..494218c
--- /dev/null
@@ -0,0 +1,129 @@
+using System;
+using System.Linq;
+using System.Reflection;
+
+using Tizen.NUI;
+
+namespace Tizen.NUI.Binding
+{
+    // [Xaml.ProvideCompiled("Tizen.NUI.XamlC.ColorTypeConverter")]
+    [Xaml.TypeConversion(typeof(Color))]
+    internal class ColorTypeConverter : TypeConverter
+    {
+        // Supported inputs
+        // HEX         #rgb, #argb, #rrggbb, #aarrggbb
+        // float array      0.5,0.5,0.5,0.5
+        // Predefined color        case insensitive
+        public override object ConvertFromInvariantString(string value)
+        {
+            if (value != null)
+            {
+                value = value.Trim();
+                if (value.StartsWith("#", StringComparison.Ordinal))
+                {
+                    return FromHex(value);
+                }
+
+                string[] parts = value.Split(',');
+                if (parts.Length == 1) //like Red or Color.Red
+                {
+                    parts = value.Split('.');
+                    if (parts.Length == 1 || (parts.Length == 2 && parts[0] == "Color"))
+                    {
+                        string color = parts[parts.Length - 1];
+                        switch (color)
+                        {
+                            case "Black": return Color.Black;
+                            case "White": return Color.White;
+                            case "Red": return Color.Red;
+                            case "Green": return Color.Green;
+                            case "Blue": return Color.Blue;
+                            case "Yellow": return Color.Yellow;
+                            case "Magenta": return Color.Magenta;
+                            case "Cyan": return Color.Cyan;
+                            case "Transparent": return Color.Transparent;
+                        }
+                    }
+                }
+                else if (parts.Length == 4) //like 0.5,0.5,0.5,0.5
+                {
+                    return new Color(float.Parse(parts[0].Trim()), float.Parse(parts[1].Trim()), float.Parse(parts[2].Trim()), float.Parse(parts[3].Trim()));
+                }
+            }
+
+            throw new InvalidOperationException($"Cannot convert \"{value}\" into {typeof(Color)}");
+        }
+
+        static uint ToHex(char c)
+        {
+            ushort x = (ushort)c;
+            if (x >= '0' && x <= '9')
+                return (uint)(x - '0');
+
+            x |= 0x20;
+            if (x >= 'a' && x <= 'f')
+                return (uint)(x - 'a' + 10);
+            return 0;
+        }
+
+        static uint ToHexD(char c)
+        {
+            var j = ToHex(c);
+            return (j << 4) | j;
+        }
+
+        public static Color FromRgba(int r, int g, int b, int a)
+        {
+            float red = (float)r / 255;
+            float green = (float)g / 255;
+            float blue = (float)b / 255;
+            float alpha = (float)a / 255;
+            return new Color(red, green, blue, alpha);
+        }
+
+        public static Color FromRgb(int r, int g, int b)
+        {
+            return FromRgba(r, g, b, 255);
+        }
+
+        static Color FromHex(string hex)
+        {
+            // Undefined
+            if (hex.Length < 3)
+                return Color.Black;
+            int idx = (hex[0] == '#') ? 1 : 0;
+
+            switch (hex.Length - idx)
+            {
+                case 3: //#rgb => ffrrggbb
+                    var t1 = ToHexD(hex[idx++]);
+                    var t2 = ToHexD(hex[idx++]);
+                    var t3 = ToHexD(hex[idx]);
+
+                    return FromRgb((int)t1, (int)t2, (int)t3);
+
+                case 4: //#argb => aarrggbb
+                    var f1 = ToHexD(hex[idx++]);
+                    var f2 = ToHexD(hex[idx++]);
+                    var f3 = ToHexD(hex[idx++]);
+                    var f4 = ToHexD(hex[idx]);
+                    return FromRgba((int)f2, (int)f3, (int)f4, (int)f1);
+
+                case 6: //#rrggbb => ffrrggbb
+                    return FromRgb((int)(ToHex(hex[idx++]) << 4 | ToHex(hex[idx++])),
+                            (int)(ToHex(hex[idx++]) << 4 | ToHex(hex[idx++])),
+                            (int)(ToHex(hex[idx++]) << 4 | ToHex(hex[idx])));
+
+                case 8: //#aarrggbb
+                    var a1 = ToHex(hex[idx++]) << 4 | ToHex(hex[idx++]);
+                    return FromRgba((int)(ToHex(hex[idx++]) << 4 | ToHex(hex[idx++])),
+                            (int)(ToHex(hex[idx++]) << 4 | ToHex(hex[idx++])),
+                            (int)(ToHex(hex[idx++]) << 4 | ToHex(hex[idx])),
+                            (int)a1);
+
+                default: //everything else will result in unexpected results
+                    return Color.Black;
+            }
+        }
+    }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Configuration.cs b/src/Tizen.NUI/src/internal/XamlBinding/Configuration.cs
new file mode 100755 (executable)
index 0000000..27e7a95
--- /dev/null
@@ -0,0 +1,21 @@
+
+namespace Tizen.NUI.Binding
+{
+       internal class Configuration<TPlatform, TElement> : IPlatformElementConfiguration<TPlatform, TElement>
+                       where TPlatform : IConfigPlatform
+                       where TElement : Element
+
+       {
+               public Configuration(TElement element)
+               {
+                       Element = element;
+               }
+
+               public TElement Element { get; }
+
+               public static Configuration<TPlatform, TElement> Create(TElement element)
+               {
+                       return new Configuration<TPlatform, TElement>(element);
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/ContentPropertyAttribute.cs b/src/Tizen.NUI/src/internal/XamlBinding/ContentPropertyAttribute.cs
new file mode 100755 (executable)
index 0000000..2b1e169
--- /dev/null
@@ -0,0 +1,26 @@
+//
+// ContentPropertyAttribute.cs
+//
+// Author:
+//       Stephane Delcroix <stephane@delcroix.org>
+//
+// Copyright (c) 2013 S. Delcroix
+//
+
+using System;
+
+namespace Tizen.NUI.Binding
+{
+       [AttributeUsage(AttributeTargets.Class)]
+       internal sealed class ContentPropertyAttribute : Attribute
+       {
+               internal static string[] ContentPropertyTypes = { "Tizen.NUI.Binding.ContentPropertyAttribute", "System.Windows.Markup.ContentPropertyAttribute" };
+
+               public ContentPropertyAttribute(string name)
+               {
+                       Name = name;
+               }
+
+               public string Name { get; private set; }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/DataTemplate.cs b/src/Tizen.NUI/src/internal/XamlBinding/DataTemplate.cs
new file mode 100755 (executable)
index 0000000..d7e7ed7
--- /dev/null
@@ -0,0 +1,80 @@
+using System;
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Binding
+{
+       internal class DataTemplate : ElementTemplate
+       {
+               public DataTemplate()
+               {
+               }
+
+               public DataTemplate(Type type) : base(type)
+               {
+               }
+
+               public DataTemplate(Func<object> loadTemplate) : base(loadTemplate)
+               {
+               }
+
+               public IDictionary<BindableProperty, BindingBase> Bindings { get; } = new Dictionary<BindableProperty, BindingBase>();
+
+               public IDictionary<BindableProperty, object> Values { get; } = new Dictionary<BindableProperty, object>();
+
+               public void SetBinding(BindableProperty property, BindingBase binding)
+               {
+                       if (property == null)
+                               throw new ArgumentNullException("property");
+                       if (binding == null)
+                               throw new ArgumentNullException("binding");
+
+                       Values.Remove(property);
+                       Bindings[property] = binding;
+               }
+
+               public void SetValue(BindableProperty property, object value)
+               {
+                       if (property == null)
+                               throw new ArgumentNullException("property");
+
+                       Bindings.Remove(property);
+                       Values[property] = value;
+               }
+
+               internal override void SetupContent(object item)
+               {
+                       ApplyBindings(item);
+                       ApplyValues(item);
+               }
+
+               void ApplyBindings(object item)
+               {
+                       if (Bindings == null)
+                               return;
+
+                       var bindable = item as BindableObject;
+                       if (bindable == null)
+                               return;
+
+                       foreach (KeyValuePair<BindableProperty, BindingBase> kvp in Bindings)
+                       {
+                               if (Values.ContainsKey(kvp.Key))
+                                       throw new InvalidOperationException("Binding and Value found for " + kvp.Key.PropertyName);
+
+                               bindable.SetBinding(kvp.Key, kvp.Value.Clone());
+                       }
+               }
+
+               void ApplyValues(object item)
+               {
+                       if (Values == null)
+                               return;
+
+                       var bindable = item as BindableObject;
+                       if (bindable == null)
+                               return;
+                       foreach (KeyValuePair<BindableProperty, object> kvp in Values)
+                               bindable.SetValue(kvp.Key, kvp.Value);
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/DataTemplateExtensions.cs b/src/Tizen.NUI/src/internal/XamlBinding/DataTemplateExtensions.cs
new file mode 100755 (executable)
index 0000000..585320e
--- /dev/null
@@ -0,0 +1,22 @@
+using System.ComponentModel;
+
+namespace Tizen.NUI.Binding
+{
+       [EditorBrowsable(EditorBrowsableState.Never)]
+       internal static class DataTemplateExtensions
+       {
+               public static DataTemplate SelectDataTemplate(this DataTemplate self, object item, BindableObject container)
+               {
+                       var selector = self as DataTemplateSelector;
+                       if (selector == null)
+                               return self;
+
+                       return selector.SelectTemplate(item, container);
+               }
+
+               public static object CreateContent(this DataTemplate self, object item, BindableObject container)
+               {
+                       return self.SelectDataTemplate(item, container).CreateContent();
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/DataTemplateSelector.cs b/src/Tizen.NUI/src/internal/XamlBinding/DataTemplateSelector.cs
new file mode 100755 (executable)
index 0000000..1a3626f
--- /dev/null
@@ -0,0 +1,41 @@
+using System;
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Binding
+{
+       internal abstract class DataTemplateSelector : DataTemplate
+       {
+               Dictionary<Type, DataTemplate> _dataTemplates = new Dictionary<Type, DataTemplate>();
+
+               public DataTemplate SelectTemplate(object item, BindableObject container)
+               {
+                       // var listView = container as ListView;
+
+                       // var recycle = listView == null ? false :
+                       //      (listView.CachingStrategy & ListViewCachingStrategy.RecycleElementAndDataTemplate) ==
+                       //              ListViewCachingStrategy.RecycleElementAndDataTemplate;
+
+                       DataTemplate dataTemplate = null;
+                       // if (recycle && _dataTemplates.TryGetValue(item.GetType(), out dataTemplate))
+                               // return dataTemplate;
+
+                       dataTemplate = OnSelectTemplate(item, container);
+                       if (dataTemplate is DataTemplateSelector)
+                               throw new NotSupportedException(
+                                       "DataTemplateSelector.OnSelectTemplate must not return another DataTemplateSelector");
+
+                       // if (recycle)
+                       // {
+                       //      if (!dataTemplate.CanRecycle)
+                       //              throw new NotSupportedException(
+                       //                      "RecycleElementAndDataTemplate requires DataTemplate activated with ctor taking a type.");
+
+                       //      _dataTemplates[item.GetType()] = dataTemplate;
+                       // }
+
+                       return dataTemplate;
+               }
+
+               protected abstract DataTemplate OnSelectTemplate(object item, BindableObject container);
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/DependencyAttribute.cs b/src/Tizen.NUI/src/internal/XamlBinding/DependencyAttribute.cs
new file mode 100755 (executable)
index 0000000..e9a2a72
--- /dev/null
@@ -0,0 +1,15 @@
+using System;
+
+namespace Tizen.NUI.Binding
+{
+       [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
+       internal class DependencyAttribute : Attribute
+       {
+               public DependencyAttribute(Type implementorType)
+               {
+                       Implementor = implementorType;
+               }
+
+               internal Type Implementor { get; private set; }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/DependencyFetchTarget.cs b/src/Tizen.NUI/src/internal/XamlBinding/DependencyFetchTarget.cs
new file mode 100755 (executable)
index 0000000..a114cd7
--- /dev/null
@@ -0,0 +1,8 @@
+namespace Tizen.NUI.Binding
+{
+       internal enum DependencyFetchTarget
+       {
+               GlobalInstance,
+               NewInstance
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/DependencyResolver.cs b/src/Tizen.NUI/src/internal/XamlBinding/DependencyResolver.cs
new file mode 100755 (executable)
index 0000000..e4c7337
--- /dev/null
@@ -0,0 +1,57 @@
+using System;
+using System.Linq;
+using System.Reflection;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.Binding
+{
+       internal static class DependencyResolver
+       {
+               static Func<Type, object[], object> Resolver { get; set; }
+
+               public static void ResolveUsing(Func<Type, object[], object> resolver)
+               {
+                       Resolver = resolver;
+               }
+
+               public static void ResolveUsing(Func<Type, object> resolver)
+               {
+                       Resolver = (type, objects) => resolver.Invoke(type);
+               }
+
+               internal static object Resolve(Type type, params object[] args)
+               {
+                       var result = Resolver?.Invoke(type, args);
+
+                       if (result != null)
+                       {
+                               if (!type.IsInstanceOfType(result))
+                               {
+                                       throw new InvalidCastException("Resolved instance is not of the correct type.");
+                               }
+                       }
+
+                       return result;
+               }
+
+               internal static object ResolveOrCreate(Type type, params object[] args)
+               {
+                       var result = Resolve(type, args);
+
+                       if (result != null) return result;
+
+                       if (args.Length > 0)
+                       {
+                               // This is by no means a general solution to matching with the correct constructor, but it'll
+                               // do for finding Android renderers which need Context (vs older custom renderers which may still use
+                               // parameterless constructors)
+                               if (type.GetTypeInfo().DeclaredConstructors.Any(info => info.GetParameters().Length == args.Length))
+                               {
+                                       return Activator.CreateInstance(type, args);
+                               }
+                       }
+                       
+                       return Activator.CreateInstance(type);
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/DependencyService.cs b/src/Tizen.NUI/src/internal/XamlBinding/DependencyService.cs
new file mode 100755 (executable)
index 0000000..07a1807
--- /dev/null
@@ -0,0 +1,135 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using Tizen.NUI.Internals;
+
+namespace Tizen.NUI.Binding
+{
+       internal static class DependencyService
+       {
+               static bool s_initialized;
+
+               static readonly List<Type> DependencyTypes = new List<Type>();
+               static readonly Dictionary<Type, DependencyData> DependencyImplementations = new Dictionary<Type, DependencyData>();
+
+               public static T Resolve<T>(DependencyFetchTarget fallbackFetchTarget = DependencyFetchTarget.GlobalInstance) where T : class
+               {
+                       var result = DependencyResolver.Resolve(typeof(T)) as T;
+
+                       return result ?? Get<T>(fallbackFetchTarget);
+               }
+
+               public static T Get<T>(DependencyFetchTarget fetchTarget = DependencyFetchTarget.GlobalInstance) where T : class
+               {
+                       Initialize();
+
+                       Type targetType = typeof(T);
+
+                       if (!DependencyImplementations.ContainsKey(targetType))
+                       {
+                               Type implementor = FindImplementor(targetType);
+                               DependencyImplementations[targetType] = implementor != null ? new DependencyData { ImplementorType = implementor } : null;
+                       }
+
+                       DependencyData dependencyImplementation = DependencyImplementations[targetType];
+                       if (dependencyImplementation == null)
+                               return null;
+
+                       if (fetchTarget == DependencyFetchTarget.GlobalInstance)
+                       {
+                               if (dependencyImplementation.GlobalInstance == null)
+                               {
+                                       dependencyImplementation.GlobalInstance = Activator.CreateInstance(dependencyImplementation.ImplementorType);
+                               }
+                               return (T)dependencyImplementation.GlobalInstance;
+                       }
+                       return (T)Activator.CreateInstance(dependencyImplementation.ImplementorType);
+               }
+
+               public static void Register<T>() where T : class
+               {
+                       Type type = typeof(T);
+                       if (!DependencyTypes.Contains(type))
+                               DependencyTypes.Add(type);
+               }
+
+               public static void Register<T, TImpl>() where T : class where TImpl : class, T
+               {
+                       Type targetType = typeof(T);
+                       Type implementorType = typeof(TImpl);
+                       if (!DependencyTypes.Contains(targetType))
+                               DependencyTypes.Add(targetType);
+
+                       DependencyImplementations[targetType] = new DependencyData { ImplementorType = implementorType };
+               }
+
+               static Type FindImplementor(Type target)
+               {
+                       return DependencyTypes.FirstOrDefault(t => target.IsAssignableFrom(t));
+               }
+
+               static void Initialize()
+               {
+                       if (s_initialized)
+                       {
+                               return;
+                       }
+
+                       Assembly[] assemblies = Device.GetAssemblies();
+                       if (Tizen.NUI.Internals.Registrar.ExtraAssemblies != null)
+                       {
+                               assemblies = assemblies.Union(Tizen.NUI.Internals.Registrar.ExtraAssemblies).ToArray();
+                       }
+
+                       Initialize(assemblies);
+               }
+
+               internal static void Initialize(Assembly[] assemblies)
+               {
+                       if (s_initialized || assemblies == null)
+                       {
+                               return;
+                       }
+
+                       Type targetAttrType = typeof(DependencyAttribute);
+
+                       // Don't use LINQ for performance reasons
+                       // Naive implementation can easily take over a second to run
+                       foreach (Assembly assembly in assemblies)
+                       {
+                               Attribute[] attributes;
+                               try
+                               {
+                                       attributes = assembly.GetCustomAttributes(targetAttrType).ToArray();
+                               }
+                               catch (System.IO.FileNotFoundException)
+                               {
+                                       // Sometimes the previewer doesn't actually have everything required for these loads to work
+                                       Console.WriteLine(nameof(Registrar), "Could not load assembly: {0} for Attibute {1} | Some renderers may not be loaded", assembly.FullName, targetAttrType.FullName);
+                                       continue;
+                               }
+                               
+                               if (attributes.Length == 0)
+                                       continue;
+
+                               foreach (DependencyAttribute attribute in attributes)
+                               {
+                                       if (!DependencyTypes.Contains(attribute.Implementor))
+                                       {
+                                               DependencyTypes.Add(attribute.Implementor);
+                                       }
+                               }
+                       }
+
+                       s_initialized = true;
+               }
+
+               class DependencyData
+               {
+                       public object GlobalInstance { get; set; }
+
+                       public Type ImplementorType { get; set; }
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Device.cs b/src/Tizen.NUI/src/internal/XamlBinding/Device.cs
new file mode 100755 (executable)
index 0000000..d012c33
--- /dev/null
@@ -0,0 +1,218 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.IO;
+using System.Reflection;
+using System.Threading;
+using System.Threading.Tasks;
+using Tizen.NUI.Internals;
+
+namespace Tizen.NUI.Binding
+{
+    internal static class Device
+    {
+        public const string iOS = "iOS";
+        public const string Android = "Android";
+        public const string UWP = "UWP";
+        public const string macOS = "macOS";
+        public const string GTK = "GTK";
+        public const string Tizen = "Tizen";
+               public const string WPF = "WPF";
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static DeviceInfo info;
+
+        static IPlatformServices s_platformServices;
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static void SetIdiom(TargetIdiom value) => Idiom = value;
+        public static TargetIdiom Idiom { get; internal set; }
+
+               //TODO: Why are there two of these? This is never used...?
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public static void SetTargetIdiom(TargetIdiom value) => Idiom = value;
+
+        [Obsolete("TargetPlatform is obsolete as of version 2.3.4. Please use RuntimePlatform instead.")]
+#pragma warning disable 0618
+        public static TargetPlatform OS
+        {
+            get
+            {
+                TargetPlatform platform;
+                if (Enum.TryParse(RuntimePlatform, out platform))
+                    return platform;
+
+                // In the old TargetPlatform, there was no distinction between WinRT/UWP
+                if (RuntimePlatform == UWP)
+                {
+                    return TargetPlatform.Windows;
+                }
+
+                return TargetPlatform.Other;
+            }
+        }
+#pragma warning restore 0618
+
+               public static string RuntimePlatform => PlatformServices?.RuntimePlatform;
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public static DeviceInfo Info
+               {
+                       get
+                       {
+                               // if (info == null)
+                               //      throw new InvalidOperationException("You MUST call Xamarin.Forms.Init(); prior to using it.");
+                               return info;
+                       }
+                       set { info = value; }
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public static void SetFlowDirection(FlowDirection value) => FlowDirection = value;
+               public static FlowDirection FlowDirection { get; internal set; }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public static bool IsInvokeRequired
+               {
+                       get { return PlatformServices.IsInvokeRequired; }
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public static IPlatformServices PlatformServices
+               {
+                       get
+                       {
+                               // if (s_platformServices == null)
+                               //      throw new InvalidOperationException("You MUST call Tizen.NUI.Init(); prior to using it.");
+                               return s_platformServices;
+                       }
+                       set { s_platformServices = value; }
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public static IReadOnlyList<string> Flags { get; private set; }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public static void SetFlags(IReadOnlyList<string> flags)
+               {
+                       Flags = flags;
+               }
+
+               public static void BeginInvokeOnMainThread(Action action)
+               {
+                       PlatformServices?.BeginInvokeOnMainThread(action);
+               }
+
+        public static double GetNamedSize(NamedSize size, Element targetElement)
+        {
+            return GetNamedSize(size, targetElement.GetType());
+        }
+
+        public static double GetNamedSize(NamedSize size, Type targetElementType)
+        {
+            return GetNamedSize(size, targetElementType, false);
+        }
+
+        [Obsolete("OnPlatform is obsolete as of version 2.3.4. Please use switch(RuntimePlatform) instead.")]
+        public static void OnPlatform(Action iOS = null, Action Android = null, Action WinPhone = null, Action Default = null)
+        {
+            switch (OS)
+            {
+                case TargetPlatform.iOS:
+                    if (iOS != null)
+                        iOS();
+                    else if (Default != null)
+                        Default();
+                    break;
+                case TargetPlatform.Android:
+                    if (Android != null)
+                        Android();
+                    else if (Default != null)
+                        Default();
+                    break;
+                case TargetPlatform.Windows:
+                case TargetPlatform.WinPhone:
+                    if (WinPhone != null)
+                        WinPhone();
+                    else if (Default != null)
+                        Default();
+                    break;
+                case TargetPlatform.Other:
+                    if (Default != null)
+                        Default();
+                    break;
+            }
+        }
+
+        [Obsolete("OnPlatform<> (generic) is obsolete as of version 2.3.4. Please use switch(RuntimePlatform) instead.")]
+        public static T OnPlatform<T>(T iOS, T Android, T WinPhone)
+        {
+            switch (OS)
+            {
+                case TargetPlatform.iOS:
+                    return iOS;
+                case TargetPlatform.Android:
+                    return Android;
+                case TargetPlatform.Windows:
+                case TargetPlatform.WinPhone:
+                    return WinPhone;
+            }
+
+            return iOS;
+        }
+
+        public static void OpenUri(Uri uri)
+        {
+            PlatformServices?.OpenUriAction(uri);
+        }
+
+        public static void StartTimer(TimeSpan interval, Func<bool> callback)
+        {
+            PlatformServices?.StartTimer(interval, callback);
+        }
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static Assembly[] GetAssemblies()
+        {
+            return PlatformServices?.GetAssemblies();
+        }
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static double GetNamedSize(NamedSize size, Type targetElementType, bool useOldSizes)
+        {
+            return PlatformServices.GetNamedSize(size, targetElementType, useOldSizes);
+        }
+
+        internal static Task<Stream> GetStreamAsync(Uri uri, CancellationToken cancellationToken)
+        {
+            return PlatformServices?.GetStreamAsync(uri, cancellationToken);
+        }
+
+        public static class Styles
+        {
+            public static readonly string TitleStyleKey = "TitleStyle";
+
+                       public static readonly string SubtitleStyleKey = "SubtitleStyle";
+
+                       public static readonly string BodyStyleKey = "BodyStyle";
+
+                       public static readonly string ListItemTextStyleKey = "ListItemTextStyle";
+
+                       public static readonly string ListItemDetailTextStyleKey = "ListItemDetailTextStyle";
+
+                       public static readonly string CaptionStyleKey = "CaptionStyle";
+
+                       public static readonly Style TitleStyle = new Style(typeof(Tizen.NUI.BaseComponents.TextLabel)) { BaseResourceKey = TitleStyleKey };
+
+                       public static readonly Style SubtitleStyle = new Style(typeof(Tizen.NUI.BaseComponents.TextLabel)) { BaseResourceKey = SubtitleStyleKey };
+
+                       public static readonly Style BodyStyle = new Style(typeof(Tizen.NUI.BaseComponents.TextLabel)) { BaseResourceKey = BodyStyleKey };
+
+                       public static readonly Style ListItemTextStyle = new Style(typeof(Tizen.NUI.BaseComponents.TextLabel)) { BaseResourceKey = ListItemTextStyleKey };
+
+                       public static readonly Style ListItemDetailTextStyle = new Style(typeof(Tizen.NUI.BaseComponents.TextLabel)) { BaseResourceKey = ListItemDetailTextStyleKey };
+
+                       public static readonly Style CaptionStyle = new Style(typeof(Tizen.NUI.BaseComponents.TextLabel)) { BaseResourceKey = CaptionStyleKey };
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/DeviceInfo.cs b/src/Tizen.NUI/src/internal/XamlBinding/DeviceInfo.cs
new file mode 100755 (executable)
index 0000000..2b04031
--- /dev/null
@@ -0,0 +1,51 @@
+using System;
+using System.ComponentModel;
+using System.Runtime.CompilerServices;
+
+namespace Tizen.NUI.Binding
+{
+       [EditorBrowsable(EditorBrowsableState.Never)]
+       internal abstract class DeviceInfo : INotifyPropertyChanged, IDisposable
+       {
+               DeviceOrientation _currentOrientation;
+               bool _disposed;
+
+               public DeviceOrientation CurrentOrientation
+               {
+                       get { return _currentOrientation; }
+                       set
+                       {
+                               if (Equals(_currentOrientation, value))
+                                       return;
+                               _currentOrientation = value;
+                               OnPropertyChanged();
+                       }
+               }
+
+               public virtual double DisplayRound(double value) =>
+                       Math.Round(value);
+
+               public abstract Size PixelScreenSize { get; }
+
+               public abstract Size ScaledScreenSize { get; }
+
+               public abstract double ScalingFactor { get; }
+
+               public void Dispose()
+               {
+                       Dispose(true);
+               }
+
+               public event PropertyChangedEventHandler PropertyChanged;
+
+               protected virtual void Dispose(bool disposing)
+               {
+                       if (_disposed)
+                               return;
+                       _disposed = true;
+               }
+
+               protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
+                       => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/DeviceOrientation.cs b/src/Tizen.NUI/src/internal/XamlBinding/DeviceOrientation.cs
new file mode 100755 (executable)
index 0000000..a31fe7f
--- /dev/null
@@ -0,0 +1,16 @@
+using System.ComponentModel;
+
+namespace Tizen.NUI.Binding
+{
+       [EditorBrowsable(EditorBrowsableState.Never)]
+       internal enum DeviceOrientation
+       {
+               Portrait,
+               Landscape,
+               PortraitUp,
+               PortraitDown,
+               LandscapeLeft,
+               LandscapeRight,
+               Other
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/EffectiveFlowDirection.cs b/src/Tizen.NUI/src/internal/XamlBinding/EffectiveFlowDirection.cs
new file mode 100755 (executable)
index 0000000..8cc1895
--- /dev/null
@@ -0,0 +1,11 @@
+using System;
+
+namespace Tizen.NUI.Binding
+{
+       [Flags]
+       internal enum EffectiveFlowDirection
+       {
+               RightToLeft = 1 << 0,
+               Explicit = 1 << 1,
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/EffectiveFlowDirectionExtensions.cs b/src/Tizen.NUI/src/internal/XamlBinding/EffectiveFlowDirectionExtensions.cs
new file mode 100755 (executable)
index 0000000..98c6ffc
--- /dev/null
@@ -0,0 +1,73 @@
+using System;
+using System.ComponentModel;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.Binding
+{
+       [EditorBrowsable(EditorBrowsableState.Never)]
+       internal static class EffectiveFlowDirectionExtensions
+       {
+               internal static EffectiveFlowDirection ToEffectiveFlowDirection(this FlowDirection self, bool isExplicit = false)
+               {
+                       switch (self)
+                       {
+                               case FlowDirection.MatchParent:
+                                       return default(EffectiveFlowDirection);
+
+
+                               case FlowDirection.LeftToRight:
+                                       if (isExplicit)
+                                       {
+                                               return EffectiveFlowDirection.Explicit;
+                                       }
+                                       else
+                                       {
+                                               return default(EffectiveFlowDirection);
+                                       }
+
+                               case FlowDirection.RightToLeft:
+                                       if (isExplicit)
+                                       {
+                                               return EffectiveFlowDirection.RightToLeft | EffectiveFlowDirection.Explicit;
+                                       }
+                                       else
+                                       {
+                                               return EffectiveFlowDirection.RightToLeft;
+                                       }
+
+                               default:
+                                       throw new InvalidOperationException($"Cannot convert {self} to {nameof(EffectiveFlowDirection)}.");
+                       }
+               }
+
+               internal static FlowDirection ToFlowDirection(this EffectiveFlowDirection self)
+               {
+                       if (self.IsLeftToRight())
+                               return FlowDirection.LeftToRight;
+                       else
+                               return FlowDirection.RightToLeft;
+
+                       throw new InvalidOperationException($"Cannot convert {self} to {nameof(FlowDirection)}.");
+               }
+
+               public static bool IsRightToLeft(this EffectiveFlowDirection self)
+               {
+                       return (self & EffectiveFlowDirection.RightToLeft) == EffectiveFlowDirection.RightToLeft;
+               }
+
+               public static bool IsLeftToRight(this EffectiveFlowDirection self)
+               {
+                       return (self & EffectiveFlowDirection.RightToLeft) != EffectiveFlowDirection.RightToLeft;
+               }
+
+               public static bool IsImplicit(this EffectiveFlowDirection self)
+               {
+                       return (self & EffectiveFlowDirection.Explicit) != EffectiveFlowDirection.Explicit;
+               }
+
+               public static bool IsExplicit(this EffectiveFlowDirection self)
+               {
+                       return (self & EffectiveFlowDirection.Explicit) == EffectiveFlowDirection.Explicit;
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/ElementCollection.cs b/src/Tizen.NUI/src/internal/XamlBinding/ElementCollection.cs
new file mode 100755 (executable)
index 0000000..4e0d006
--- /dev/null
@@ -0,0 +1,11 @@
+using System.Collections.ObjectModel;
+
+namespace Tizen.NUI.Binding
+{
+       internal class ElementCollection<T> : ObservableWrapper<Element, T> where T : Element
+       {
+               public ElementCollection(ObservableCollection<Element> list) : base(list)
+               {
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/ElementEventArgs.cs b/src/Tizen.NUI/src/internal/XamlBinding/ElementEventArgs.cs
new file mode 100755 (executable)
index 0000000..2725033
--- /dev/null
@@ -0,0 +1,17 @@
+using System;
+
+namespace Tizen.NUI.Binding
+{
+       internal class ElementEventArgs : EventArgs
+       {
+               public ElementEventArgs(Element element)
+               {
+                       if (element == null)
+                               throw new ArgumentNullException("element");
+
+                       Element = element;
+               }
+
+               public Element Element { get; private set; }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/EnumerableExtensions.cs b/src/Tizen.NUI/src/internal/XamlBinding/EnumerableExtensions.cs
new file mode 100755 (executable)
index 0000000..cd13604
--- /dev/null
@@ -0,0 +1,83 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+
+namespace Tizen.NUI.Binding
+{
+       [EditorBrowsable(EditorBrowsableState.Never)]
+       internal static class EnumerableExtensions
+       {
+               public static IEnumerable<T> GetGesturesFor<T>(this IEnumerable<IGestureRecognizer> gestures, Func<T, bool> predicate = null) where T : GestureRecognizer
+               {
+                       if (gestures == null)
+                               yield break;
+
+                       if (predicate == null)
+                               predicate = x => true;
+
+                       foreach (IGestureRecognizer item in gestures)
+                       {
+                               var gesture = item as T;
+                               if (gesture != null && predicate(gesture))
+                               {
+                                       yield return gesture;
+                               }
+                       }
+               }
+
+               internal static IEnumerable<T> Append<T>(this IEnumerable<T> enumerable, T item)
+               {
+                       foreach (T x in enumerable)
+                               yield return x;
+
+                       yield return item;
+               }
+
+               public static void ForEach<T>(this IEnumerable<T> enumeration, Action<T> action)
+               {
+                       foreach (T item in enumeration)
+                       {
+                               action(item);
+                       }
+               }
+
+               public static int IndexOf<T>(this IEnumerable<T> enumerable, T item)
+               {
+                       if (enumerable == null)
+                               throw new ArgumentNullException("enumerable");
+
+                       var i = 0;
+                       foreach (T element in enumerable)
+                       {
+                               if (Equals(element, item))
+                                       return i;
+
+                               i++;
+                       }
+
+                       return -1;
+               }
+
+               public static int IndexOf<T>(this IEnumerable<T> enumerable, Func<T, bool> predicate)
+               {
+                       var i = 0;
+                       foreach (T element in enumerable)
+                       {
+                               if (predicate(element))
+                                       return i;
+
+                               i++;
+                       }
+
+                       return -1;
+               }
+
+               public static IEnumerable<T> Prepend<T>(this IEnumerable<T> enumerable, T item)
+               {
+                       yield return item;
+
+                       foreach (T x in enumerable)
+                               yield return x;
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/EventArg.cs b/src/Tizen.NUI/src/internal/XamlBinding/EventArg.cs
new file mode 100755 (executable)
index 0000000..1257996
--- /dev/null
@@ -0,0 +1,20 @@
+using System;
+using System.ComponentModel;
+
+namespace Tizen.NUI.Binding
+{
+       [EditorBrowsable(EditorBrowsableState.Never)]
+       internal class EventArg<T> : EventArgs
+       {
+               // Property variable
+
+               // Constructor
+               public EventArg(T data)
+               {
+                       Data = data;
+               }
+
+               // Property for EventArgs argument
+               public T Data { get; }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/ExportEffectAttribute.cs b/src/Tizen.NUI/src/internal/XamlBinding/ExportEffectAttribute.cs
new file mode 100755 (executable)
index 0000000..3996a28
--- /dev/null
@@ -0,0 +1,20 @@
+using System;
+
+namespace Tizen.NUI.Binding
+{
+       [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
+       internal class ExportEffectAttribute : Attribute
+       {
+               public ExportEffectAttribute(Type effectType, string uniqueName)
+               {
+                       if (uniqueName.Contains("."))
+                               throw new ArgumentException("uniqueName must not contain a .");
+                       Type = effectType;
+                       Id = uniqueName;
+               }
+
+               internal string Id { get; private set; }
+
+               internal Type Type { get; private set; }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/ExtentsTypeConverter.cs b/src/Tizen.NUI/src/internal/XamlBinding/ExtentsTypeConverter.cs
new file mode 100755 (executable)
index 0000000..5903c02
--- /dev/null
@@ -0,0 +1,25 @@
+using System;
+using System.Linq;
+using System.Reflection;
+
+using Tizen.NUI;
+
+namespace Tizen.NUI.Binding
+{
+    internal class ExtentsTypeConverter : TypeConverter
+    {
+        public override object ConvertFromInvariantString(string value)
+        {
+            if (value != null)
+            {
+                string[] parts = value.Split(',');
+                if (parts.Length == 4)
+                {
+                    return new Extents(ushort.Parse(parts[0].Trim()), ushort.Parse(parts[1].Trim()), ushort.Parse(parts[2].Trim()), ushort.Parse(parts[3].Trim()));
+                }
+            }
+
+            throw new InvalidOperationException($"Cannot convert \"{value}\" into {typeof(Extents)}");
+        }
+    }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/FileImageSource.cs b/src/Tizen.NUI/src/internal/XamlBinding/FileImageSource.cs
new file mode 100755 (executable)
index 0000000..c197f53
--- /dev/null
@@ -0,0 +1,43 @@
+using System.Threading.Tasks;
+
+namespace Tizen.NUI.Binding
+{
+       [TypeConverter(typeof(FileImageSourceConverter))]
+       internal sealed class FileImageSource : ImageSource
+       {
+               public static readonly BindableProperty FileProperty = BindableProperty.Create("File", typeof(string), typeof(FileImageSource), default(string));
+
+               public string File
+               {
+                       get { return (string)GetValue(FileProperty); }
+                       set { SetValue(FileProperty, value); }
+               }
+
+               public override Task<bool> Cancel()
+               {
+                       return Task.FromResult(false);
+               }
+
+               public override string ToString()
+               {
+                       return $"File: {File}";
+               }
+
+               public static implicit operator FileImageSource(string file)
+               {
+                       return (FileImageSource)FromFile(file);
+               }
+
+               public static implicit operator string(FileImageSource file)
+               {
+                       return file != null ? file.File : null;
+               }
+
+               protected override void OnPropertyChanged(string propertyName = null)
+               {
+                       if (propertyName == FileProperty.PropertyName)
+                               OnSourceChanged();
+                       base.OnPropertyChanged(propertyName);
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/FileImageSourceConverter.cs b/src/Tizen.NUI/src/internal/XamlBinding/FileImageSourceConverter.cs
new file mode 100755 (executable)
index 0000000..954ff9e
--- /dev/null
@@ -0,0 +1,16 @@
+using System;
+
+namespace Tizen.NUI.Binding
+{
+       [Xaml.TypeConversion(typeof(FileImageSource))]
+       internal sealed class FileImageSourceConverter : TypeConverter
+       {
+               public override object ConvertFromInvariantString(string value)
+               {
+                       if (value != null)
+                               return (FileImageSource)ImageSource.FromFile(value);
+
+                       throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", value, typeof(FileImageSource)));
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/FlowDirection.cs b/src/Tizen.NUI/src/internal/XamlBinding/FlowDirection.cs
new file mode 100755 (executable)
index 0000000..493428b
--- /dev/null
@@ -0,0 +1,32 @@
+using System;
+
+namespace Tizen.NUI.Binding
+{
+       [TypeConverter(typeof(FlowDirectionConverter))]
+       internal enum FlowDirection
+       {
+               MatchParent = 0,
+               LeftToRight = 1,
+               RightToLeft = 2,
+       }
+
+       [Xaml.TypeConversion(typeof(FlowDirection))]
+       internal class FlowDirectionConverter : TypeConverter
+       {
+               public override object ConvertFromInvariantString(string value)
+               {
+                       if (value != null) {
+                               if (Enum.TryParse(value, out FlowDirection direction))
+                                       return direction;
+
+                               if (value.Equals("ltr", StringComparison.OrdinalIgnoreCase))
+                                       return FlowDirection.LeftToRight;
+                               if (value.Equals("rtl", StringComparison.OrdinalIgnoreCase))
+                                       return FlowDirection.RightToLeft;
+                               if (value.Equals("inherit", StringComparison.OrdinalIgnoreCase))
+                                       return FlowDirection.MatchParent;
+                       }
+                       throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", value, typeof(FlowDirection)));
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/GestureRecognizer.cs b/src/Tizen.NUI/src/internal/XamlBinding/GestureRecognizer.cs
new file mode 100755 (executable)
index 0000000..febf913
--- /dev/null
@@ -0,0 +1,9 @@
+namespace Tizen.NUI.Binding
+{
+       internal class GestureRecognizer : Element, IGestureRecognizer
+       {
+               internal GestureRecognizer()
+               {
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/HandlerAttribute.cs b/src/Tizen.NUI/src/internal/XamlBinding/HandlerAttribute.cs
new file mode 100755 (executable)
index 0000000..4412fbc
--- /dev/null
@@ -0,0 +1,23 @@
+using System;
+
+namespace Tizen.NUI.Binding
+{
+       [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
+       internal abstract class HandlerAttribute : Attribute
+       {
+               protected HandlerAttribute(Type handler, Type target)
+               {
+                       TargetType = target;
+                       HandlerType = handler;
+               }
+
+               internal Type HandlerType { get; private set; }
+
+               internal Type TargetType { get; private set; }
+
+               public virtual bool ShouldRegister()
+               {
+                       return true;
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/IAppIndexingProvider.cs b/src/Tizen.NUI/src/internal/XamlBinding/IAppIndexingProvider.cs
new file mode 100755 (executable)
index 0000000..a8bd9e3
--- /dev/null
@@ -0,0 +1,7 @@
+namespace Tizen.NUI.Binding
+{
+       internal interface IAppIndexingProvider
+       {
+               IAppLinks AppLinks { get; }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/IAppLinkEntry.cs b/src/Tizen.NUI/src/internal/XamlBinding/IAppLinkEntry.cs
new file mode 100755 (executable)
index 0000000..5638189
--- /dev/null
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Binding
+{
+       internal interface IAppLinkEntry
+       {
+               Uri AppLinkUri { get; set; }
+
+               string Description { get; set; }
+
+               bool IsLinkActive { get; set; }
+
+               IDictionary<string, string> KeyValues { get; }
+
+               ImageSource Thumbnail { get; set; }
+
+               string Title { get; set; }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/IAppLinks.cs b/src/Tizen.NUI/src/internal/XamlBinding/IAppLinks.cs
new file mode 100755 (executable)
index 0000000..7ef133c
--- /dev/null
@@ -0,0 +1,11 @@
+using System;
+
+namespace Tizen.NUI.Binding
+{
+       internal interface IAppLinks
+       {
+               void DeregisterLink(IAppLinkEntry appLink);
+               void DeregisterLink(Uri appLinkUri);
+               void RegisterLink(IAppLinkEntry appLink);
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/IApplicationController.cs b/src/Tizen.NUI/src/internal/XamlBinding/IApplicationController.cs
new file mode 100755 (executable)
index 0000000..94d374f
--- /dev/null
@@ -0,0 +1,7 @@
+namespace Tizen.NUI.Binding
+{
+       internal interface IApplicationController
+       {
+               void SetAppIndexingProvider(IAppIndexingProvider appIndexing);
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/IControlTemplated.cs b/src/Tizen.NUI/src/internal/XamlBinding/IControlTemplated.cs
new file mode 100755 (executable)
index 0000000..b868ed6
--- /dev/null
@@ -0,0 +1,13 @@
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Binding
+{
+       internal interface IControlTemplated
+       {
+               ControlTemplate ControlTemplate { get; set; }
+
+               IList<Element> InternalChildren { get; }
+
+               void OnControlTemplateChanged(ControlTemplate oldValue, ControlTemplate newValue);
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/IElement.cs b/src/Tizen.NUI/src/internal/XamlBinding/IElement.cs
new file mode 100755 (executable)
index 0000000..cb2e3ec
--- /dev/null
@@ -0,0 +1,14 @@
+using System;
+using Tizen.NUI.Internals;
+
+namespace Tizen.NUI.Binding
+{
+       internal interface IElement
+       {
+               Element Parent { get; set; }
+
+               //Use these 2 instead of an event to avoid cloning way too much multicastdelegates on mono
+               void AddResourcesChangedListener(Action<object, ResourcesChangedEventArgs> onchanged);
+               void RemoveResourcesChangedListener(Action<object, ResourcesChangedEventArgs> onchanged);
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/IElementConfiguration.cs b/src/Tizen.NUI/src/internal/XamlBinding/IElementConfiguration.cs
new file mode 100755 (executable)
index 0000000..3ce337c
--- /dev/null
@@ -0,0 +1,8 @@
+
+namespace Tizen.NUI.Binding
+{
+       internal interface IElementConfiguration<out TElement> where TElement : Element
+       {
+               IPlatformElementConfiguration<T, TElement> On<T>() where T : IConfigPlatform;
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/IElementController.cs b/src/Tizen.NUI/src/internal/XamlBinding/IElementController.cs
new file mode 100755 (executable)
index 0000000..d2e96cc
--- /dev/null
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using Tizen.NUI.Internals;
+
+namespace Tizen.NUI.Binding
+{
+       internal interface IElementController
+       {
+               IEffectControlProvider EffectControlProvider { get; set; }
+
+               bool EffectIsAttached(string name);
+
+               void SetValueFromRenderer(BindableProperty property, object value);
+               void SetValueFromRenderer(BindablePropertyKey propertyKey, object value);
+               ReadOnlyCollection<Element> LogicalChildren { get; }
+               IPlatform Platform { get; set; }
+               Element RealParent { get; }
+               IEnumerable<Element> Descendants();
+               event EventHandler PlatformSet;
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/IExtendedTypeConverter.cs b/src/Tizen.NUI/src/internal/XamlBinding/IExtendedTypeConverter.cs
new file mode 100755 (executable)
index 0000000..5f74479
--- /dev/null
@@ -0,0 +1,13 @@
+using System;
+using System.Globalization;
+
+namespace Tizen.NUI.Binding
+{
+       internal interface IExtendedTypeConverter
+       {
+               [Obsolete("IExtendedTypeConverter.ConvertFrom is obsolete as of version 2.2.0. Please use ConvertFromInvariantString (string, IServiceProvider) instead.")]
+               object ConvertFrom(CultureInfo culture, object value, IServiceProvider serviceProvider);
+
+               object ConvertFromInvariantString(string value, IServiceProvider serviceProvider);
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/IGestureRecognizer.cs b/src/Tizen.NUI/src/internal/XamlBinding/IGestureRecognizer.cs
new file mode 100755 (executable)
index 0000000..63302f0
--- /dev/null
@@ -0,0 +1,8 @@
+using System.ComponentModel;
+
+namespace Tizen.NUI.Binding
+{
+       internal interface IGestureRecognizer : INotifyPropertyChanged
+       {
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/IIsolatedStorageFile.cs b/src/Tizen.NUI/src/internal/XamlBinding/IIsolatedStorageFile.cs
new file mode 100755 (executable)
index 0000000..1dca420
--- /dev/null
@@ -0,0 +1,20 @@
+using System;
+using System.ComponentModel;
+using System.IO;
+using System.Threading.Tasks;
+
+namespace Tizen.NUI.Binding
+{
+       [EditorBrowsable(EditorBrowsableState.Never)]
+       internal interface IIsolatedStorageFile
+       {
+               Task CreateDirectoryAsync(string path);
+               Task<bool> GetDirectoryExistsAsync(string path);
+               Task<bool> GetFileExistsAsync(string path);
+
+               Task<DateTimeOffset> GetLastWriteTimeAsync(string path);
+
+               Task<Stream> OpenFileAsync(string path, FileMode mode, FileAccess access);
+               Task<Stream> OpenFileAsync(string path, FileMode mode, FileAccess access, FileShare share);
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/ILayout.cs b/src/Tizen.NUI/src/internal/XamlBinding/ILayout.cs
new file mode 100755 (executable)
index 0000000..37aa031
--- /dev/null
@@ -0,0 +1,9 @@
+using System;
+
+namespace Tizen.NUI.Binding
+{
+       internal interface ILayout
+       {
+               event EventHandler LayoutChanged;
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/ILayoutController.cs b/src/Tizen.NUI/src/internal/XamlBinding/ILayoutController.cs
new file mode 100755 (executable)
index 0000000..fa7ed8a
--- /dev/null
@@ -0,0 +1,9 @@
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Binding
+{
+       internal interface ILayoutController
+       {
+               IReadOnlyList<Element> Children { get; }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/IMenuItemController.cs b/src/Tizen.NUI/src/internal/XamlBinding/IMenuItemController.cs
new file mode 100755 (executable)
index 0000000..3993b3a
--- /dev/null
@@ -0,0 +1,10 @@
+namespace Tizen.NUI.Binding
+{
+       internal interface IMenuItemController
+       {
+               bool IsEnabled { get; set; }
+               string IsEnabledPropertyName { get; }
+
+               void Activate();
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/INativeBindingService.cs b/src/Tizen.NUI/src/internal/XamlBinding/INativeBindingService.cs
new file mode 100755 (executable)
index 0000000..5065dea
--- /dev/null
@@ -0,0 +1,10 @@
+namespace Tizen.NUI.Binding
+{
+
+       internal interface INativeBindingService
+       {
+               bool TrySetBinding(object target, string propertyName, BindingBase binding);
+               bool TrySetBinding(object target, BindableProperty property, BindingBase binding);
+               bool TrySetValue(object target, BindableProperty property, object value);
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/INavigationMenuController.cs b/src/Tizen.NUI/src/internal/XamlBinding/INavigationMenuController.cs
new file mode 100755 (executable)
index 0000000..9849ee6
--- /dev/null
@@ -0,0 +1,7 @@
+namespace Tizen.NUI.Binding
+{
+       internal interface INavigationMenuController : IViewController
+       {
+               void SendTargetSelected(Page target);
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/INavigationPageController.cs b/src/Tizen.NUI/src/internal/XamlBinding/INavigationPageController.cs
new file mode 100755 (executable)
index 0000000..baca702
--- /dev/null
@@ -0,0 +1,30 @@
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using Tizen.NUI.Internals;
+
+namespace Tizen.NUI.Binding
+{
+       internal interface INavigationPageController
+       {
+               Task<Page> RemoveAsyncInner(Page page, bool animated, bool fast);
+
+               Page Peek(int depth = 0);
+
+               IEnumerable<Page> Pages { get; }
+
+               int StackDepth { get; }
+
+               Task<Page> PopAsyncInner(bool animated, bool fast = false);
+
+               event EventHandler<NavigationRequestedEventArgs> InsertPageBeforeRequested;
+
+               event EventHandler<NavigationRequestedEventArgs> PopRequested;
+
+               event EventHandler<NavigationRequestedEventArgs> PopToRootRequested;
+
+               event EventHandler<NavigationRequestedEventArgs> PushRequested;
+
+               event EventHandler<NavigationRequestedEventArgs> RemovePageRequested;
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/IPaddingElement.cs b/src/Tizen.NUI/src/internal/XamlBinding/IPaddingElement.cs
new file mode 100755 (executable)
index 0000000..6101c06
--- /dev/null
@@ -0,0 +1,12 @@
+namespace Tizen.NUI.Binding
+{
+       interface IPaddingElement
+       {
+               //note to implementor: implement this property publicly
+               Thickness Padding { get; }
+
+               //note to implementor: but implement this method explicitly
+               void OnPaddingPropertyChanged(Thickness oldValue, Thickness newValue);
+               Thickness PaddingDefaultValueCreator();
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/IPageContainer.cs b/src/Tizen.NUI/src/internal/XamlBinding/IPageContainer.cs
new file mode 100755 (executable)
index 0000000..920b387
--- /dev/null
@@ -0,0 +1,7 @@
+namespace Tizen.NUI.Binding
+{
+       internal interface IPageContainer<out T> where T : Page
+       {
+               T CurrentPage { get; }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/IPageController.cs b/src/Tizen.NUI/src/internal/XamlBinding/IPageController.cs
new file mode 100755 (executable)
index 0000000..bdbf56f
--- /dev/null
@@ -0,0 +1,17 @@
+using System.Collections.ObjectModel;
+
+namespace Tizen.NUI.Binding
+{
+       internal interface IPageController
+       {
+               Rectangle ContainerArea { get; set; }
+
+               bool IgnoresContainerArea { get; set; }
+
+               ObservableCollection<Element> InternalChildren { get; }
+
+               void SendAppearing();
+
+               void SendDisappearing();
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/IPlatformServices.cs b/src/Tizen.NUI/src/internal/XamlBinding/IPlatformServices.cs
new file mode 100755 (executable)
index 0000000..33bfc9d
--- /dev/null
@@ -0,0 +1,38 @@
+using System;
+using System.ComponentModel;
+using System.IO;
+using System.Reflection;
+using System.Threading;
+using System.Threading.Tasks;
+using Tizen.NUI.Internals;
+
+namespace Tizen.NUI.Binding
+{
+       [EditorBrowsable(EditorBrowsableState.Never)]
+       internal interface IPlatformServices
+       {
+               bool IsInvokeRequired { get; }
+
+               void BeginInvokeOnMainThread(Action action);
+
+               Ticker CreateTicker();
+
+               Assembly[] GetAssemblies();
+
+               string GetMD5Hash(string input);
+
+               double GetNamedSize(NamedSize size, Type targetElementType, bool useOldSizes);
+
+               Task<Stream> GetStreamAsync(Uri uri, CancellationToken cancellationToken);
+
+               IIsolatedStorageFile GetUserStoreForApplication();
+
+               void OpenUriAction(Uri uri);
+
+               void StartTimer(TimeSpan interval, Func<bool> callback);
+
+               string RuntimePlatform { get; }
+
+               void QuitApplication();
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/IRegisterable.cs b/src/Tizen.NUI/src/internal/XamlBinding/IRegisterable.cs
new file mode 100755 (executable)
index 0000000..b80ed67
--- /dev/null
@@ -0,0 +1,6 @@
+namespace Tizen.NUI.Binding
+{
+       internal interface IRegisterable
+       {
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/IResourceDictionary.cs b/src/Tizen.NUI/src/internal/XamlBinding/IResourceDictionary.cs
new file mode 100755 (executable)
index 0000000..1b60af5
--- /dev/null
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+
+namespace Tizen.NUI.Binding
+{
+       [EditorBrowsable(EditorBrowsableState.Never)]
+       internal interface IResourceDictionary : IEnumerable<KeyValuePair<string, object>>
+       {
+               bool TryGetValue(string key, out object value);
+
+               event EventHandler<ResourcesChangedEventArgs> ValuesChanged;
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/IResourcesProvider.cs b/src/Tizen.NUI/src/internal/XamlBinding/IResourcesProvider.cs
new file mode 100755 (executable)
index 0000000..69e7957
--- /dev/null
@@ -0,0 +1,8 @@
+namespace Tizen.NUI.Binding
+{
+       interface IResourcesProvider
+       {
+               bool IsResourcesCreated { get; }
+               ResourceDictionary Resources { get; set; }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/ISystemResourcesProvider.cs b/src/Tizen.NUI/src/internal/XamlBinding/ISystemResourcesProvider.cs
new file mode 100755 (executable)
index 0000000..c446422
--- /dev/null
@@ -0,0 +1,10 @@
+using System.ComponentModel;
+
+namespace Tizen.NUI.Binding
+{
+       [EditorBrowsable(EditorBrowsableState.Never)]
+       internal interface ISystemResourcesProvider
+       {
+               IResourceDictionary GetSystemResources();
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/ITimer.cs b/src/Tizen.NUI/src/internal/XamlBinding/ITimer.cs
new file mode 100755 (executable)
index 0000000..5c693e2
--- /dev/null
@@ -0,0 +1,13 @@
+using System;
+
+namespace Tizen.NUI.Binding
+{
+       //this will go once Timer is included in Pcl profiles
+       internal interface ITimer
+       {
+               void Change(int dueTime, int period);
+               void Change(long dueTime, long period);
+               void Change(TimeSpan dueTime, TimeSpan period);
+               void Change(uint dueTime, uint period);
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/IValueConverter.cs b/src/Tizen.NUI/src/internal/XamlBinding/IValueConverter.cs
new file mode 100755 (executable)
index 0000000..b2a72e3
--- /dev/null
@@ -0,0 +1,11 @@
+using System;
+using System.Globalization;
+
+namespace Tizen.NUI.Binding
+{
+       internal interface IValueConverter
+       {
+               object Convert(object value, Type targetType, object parameter, CultureInfo culture);
+               object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture);
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/IViewContainer.cs b/src/Tizen.NUI/src/internal/XamlBinding/IViewContainer.cs
new file mode 100755 (executable)
index 0000000..6ab8862
--- /dev/null
@@ -0,0 +1,9 @@
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Binding
+{
+       internal interface IViewContainer<T> where T : /*VisualElement*/BaseHandle
+       {
+               IList<T> Children { get; }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/IViewController.cs b/src/Tizen.NUI/src/internal/XamlBinding/IViewController.cs
new file mode 100755 (executable)
index 0000000..7fd8711
--- /dev/null
@@ -0,0 +1,6 @@
+namespace Tizen.NUI.Binding
+{
+       internal interface IViewController : IVisualElementController
+       {
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/IVisualElementController.cs b/src/Tizen.NUI/src/internal/XamlBinding/IVisualElementController.cs
new file mode 100755 (executable)
index 0000000..fd12284
--- /dev/null
@@ -0,0 +1,20 @@
+using System;
+using Tizen.NUI.Internals;
+
+namespace Tizen.NUI.Binding
+{
+       internal interface IVisualElementController : IElementController
+       {
+               void NativeSizeChanged();
+               void InvalidateMeasure(InvalidationTrigger trigger);
+               bool Batched { get; }
+               bool DisableLayout { get; set; }
+               EffectiveFlowDirection EffectiveFlowDirection { get; }
+               bool IsInNativeLayout { get; set; }
+               bool IsNativeStateConsistent { get; set; }
+               bool IsPlatformEnabled { get; set; }
+               NavigationProxy NavigationProxy { get; }
+               event EventHandler<EventArg</*VisualElement*/BaseHandle>> BatchCommitted;
+               event EventHandler<BaseHandle.FocusRequestArgs> FocusChangeRequested;
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/ImageSource.cs b/src/Tizen.NUI/src/internal/XamlBinding/ImageSource.cs
new file mode 100755 (executable)
index 0000000..0ef2d90
--- /dev/null
@@ -0,0 +1,151 @@
+using System;
+using System.IO;
+using System.Reflection;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace Tizen.NUI.Binding
+{
+       [TypeConverter(typeof(ImageSourceConverter))]
+       internal abstract class ImageSource : Element
+       {
+               readonly object _synchandle = new object();
+               CancellationTokenSource _cancellationTokenSource;
+
+               TaskCompletionSource<bool> _completionSource;
+
+               readonly WeakEventManager _weakEventManager = new WeakEventManager();
+
+               protected ImageSource()
+               {
+               }
+
+               protected CancellationTokenSource CancellationTokenSource
+               {
+                       get { return _cancellationTokenSource; }
+                       private set
+                       {
+                               if (_cancellationTokenSource == value)
+                                       return;
+                               if (_cancellationTokenSource != null)
+                                       _cancellationTokenSource.Cancel();
+                               _cancellationTokenSource = value;
+                       }
+               }
+
+               bool IsLoading
+               {
+                       get { return _cancellationTokenSource != null; }
+               }
+
+               public virtual Task<bool> Cancel()
+               {
+                       if (!IsLoading)
+                               return Task.FromResult(false);
+
+                       var tcs = new TaskCompletionSource<bool>();
+                       TaskCompletionSource<bool> original = Interlocked.CompareExchange(ref _completionSource, tcs, null);
+                       if (original == null)
+                       {
+                               _cancellationTokenSource.Cancel();
+                       }
+                       else
+                               tcs = original;
+
+                       return tcs.Task;
+               }
+
+               public static ImageSource FromFile(string file)
+               {
+                       return new FileImageSource { File = file };
+               }
+
+               public static ImageSource FromResource(string resource, Type resolvingType)
+               {
+                       return FromResource(resource, resolvingType.GetTypeInfo().Assembly);
+               }
+
+               public static ImageSource FromResource(string resource, Assembly sourceAssembly = null)
+               {
+#if NETSTANDARD2_0
+                       sourceAssembly = sourceAssembly ?? Assembly.GetCallingAssembly();
+#else
+                       if (sourceAssembly == null)
+                       {
+                               MethodInfo callingAssemblyMethod = typeof(Assembly).GetTypeInfo().GetDeclaredMethod("GetCallingAssembly");
+                               if (callingAssemblyMethod != null)
+                               {
+                                       sourceAssembly = (Assembly)callingAssemblyMethod.Invoke(null, new object[0]);
+                               }
+                               else
+                               {
+                                       Internals.Log.Warning("Warning", "Can not find CallingAssembly, pass resolvingType to FromResource to ensure proper resolution");
+                                       return null;
+                               }
+                       }
+#endif
+                       return FromStream(() => sourceAssembly.GetManifestResourceStream(resource));
+               }
+
+               public static ImageSource FromStream(Func<Stream> stream)
+               {
+                       // return new StreamImageSource { Stream = token => Task.Run(stream, token) };
+                       return null;
+               }
+
+               public static ImageSource FromUri(Uri uri)
+               {
+                       if (!uri.IsAbsoluteUri)
+                               throw new ArgumentException("uri is relative");
+                       // return new UriImageSource { Uri = uri };
+                       return null;
+               }
+
+               public static implicit operator ImageSource(string source)
+               {
+                       Uri uri;
+                       return Uri.TryCreate(source, UriKind.Absolute, out uri) && uri.Scheme != "file" ? FromUri(uri) : FromFile(source);
+               }
+
+               public static implicit operator ImageSource(Uri uri)
+               {
+                       if (!uri.IsAbsoluteUri)
+                               throw new ArgumentException("uri is relative");
+                       return FromUri(uri);
+               }
+
+               protected void OnLoadingCompleted(bool cancelled)
+               {
+                       if (!IsLoading || _completionSource == null)
+                               return;
+
+                       TaskCompletionSource<bool> tcs = Interlocked.Exchange(ref _completionSource, null);
+                       if (tcs != null)
+                               tcs.SetResult(cancelled);
+
+                       lock (_synchandle)
+                       {
+                               CancellationTokenSource = null;
+                       }
+               }
+
+               protected void OnLoadingStarted()
+               {
+                       lock (_synchandle)
+                       {
+                               CancellationTokenSource = new CancellationTokenSource();
+                       }
+               }
+
+               protected void OnSourceChanged()
+               {
+                       _weakEventManager.HandleEvent(this, EventArgs.Empty, nameof(SourceChanged));
+               }
+
+               internal event EventHandler SourceChanged
+               {
+                       add { _weakEventManager.AddEventHandler(nameof(SourceChanged), value); }
+                       remove { _weakEventManager.RemoveEventHandler(nameof(SourceChanged), value); }
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/ImageSourceConverter.cs b/src/Tizen.NUI/src/internal/XamlBinding/ImageSourceConverter.cs
new file mode 100755 (executable)
index 0000000..6412467
--- /dev/null
@@ -0,0 +1,19 @@
+using System;
+
+namespace Tizen.NUI.Binding
+{
+       [Xaml.TypeConversion(typeof(ImageSource))]
+       internal sealed class ImageSourceConverter : TypeConverter
+       {
+               public override object ConvertFromInvariantString(string value)
+               {
+                       if (value != null)
+                       {
+                               Uri uri;
+                               return Uri.TryCreate(value, UriKind.Absolute, out uri) && uri.Scheme != "file" ? ImageSource.FromUri(uri) : ImageSource.FromFile(value);
+                       }
+
+                       throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", value, typeof(ImageSource)));
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Interactivity/AttachedCollection.cs b/src/Tizen.NUI/src/internal/XamlBinding/Interactivity/AttachedCollection.cs
new file mode 100755 (executable)
index 0000000..284d314
--- /dev/null
@@ -0,0 +1,127 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+
+namespace Tizen.NUI.Binding
+{
+       internal class AttachedCollection<T> : ObservableCollection<T>, ICollection<T>, IAttachedObject where T : BindableObject, IAttachedObject
+       {
+               readonly List<WeakReference> _associatedObjects = new List<WeakReference>();
+
+               public AttachedCollection()
+               {
+               }
+
+               public AttachedCollection(IEnumerable<T> collection) : base(collection)
+               {
+               }
+
+               public AttachedCollection(IList<T> list) : base(list)
+               {
+               }
+
+               public void AttachTo(BindableObject bindable)
+               {
+                       if (bindable == null)
+                               throw new ArgumentNullException("bindable");
+                       OnAttachedTo(bindable);
+               }
+
+               public void DetachFrom(BindableObject bindable)
+               {
+                       OnDetachingFrom(bindable);
+               }
+
+               protected override void ClearItems()
+               {
+                       foreach (WeakReference weakbindable in _associatedObjects)
+                       {
+                               foreach (T item in this)
+                               {
+                                       var bindable = weakbindable.Target as BindableObject;
+                                       if (bindable == null)
+                                               continue;
+                                       item.DetachFrom(bindable);
+                               }
+                       }
+                       base.ClearItems();
+               }
+
+               protected override void InsertItem(int index, T item)
+               {
+                       base.InsertItem(index, item);
+                       foreach (WeakReference weakbindable in _associatedObjects)
+                       {
+                               var bindable = weakbindable.Target as BindableObject;
+                               if (bindable == null)
+                                       continue;
+                               item.AttachTo(bindable);
+                       }
+               }
+
+               protected virtual void OnAttachedTo(BindableObject bindable)
+               {
+                       lock (_associatedObjects)
+                       {
+                               _associatedObjects.Add(new WeakReference(bindable));
+                       }
+                       foreach (T item in this)
+                               item.AttachTo(bindable);
+               }
+
+               protected virtual void OnDetachingFrom(BindableObject bindable)
+               {
+                       foreach (T item in this)
+                               item.DetachFrom(bindable);
+                       lock (_associatedObjects)
+                       {
+                               for (var i = 0; i < _associatedObjects.Count; i++)
+                               {
+                                       object target = _associatedObjects[i].Target;
+
+                                       if (target == null || target == bindable)
+                                       {
+                                               _associatedObjects.RemoveAt(i);
+                                               i--;
+                                       }
+                               }
+                       }
+               }
+
+               protected override void RemoveItem(int index)
+               {
+                       T item = this[index];
+                       foreach (WeakReference weakbindable in _associatedObjects)
+                       {
+                               var bindable = weakbindable.Target as BindableObject;
+                               if (bindable == null)
+                                       continue;
+                               item.DetachFrom(bindable);
+                       }
+
+                       base.RemoveItem(index);
+               }
+
+               protected override void SetItem(int index, T item)
+               {
+                       T old = this[index];
+                       foreach (WeakReference weakbindable in _associatedObjects)
+                       {
+                               var bindable = weakbindable.Target as BindableObject;
+                               if (bindable == null)
+                                       continue;
+                               old.DetachFrom(bindable);
+                       }
+
+                       base.SetItem(index, item);
+
+                       foreach (WeakReference weakbindable in _associatedObjects)
+                       {
+                               var bindable = weakbindable.Target as BindableObject;
+                               if (bindable == null)
+                                       continue;
+                               item.AttachTo(bindable);
+                       }
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Interactivity/Behavior.cs b/src/Tizen.NUI/src/internal/XamlBinding/Interactivity/Behavior.cs
new file mode 100755 (executable)
index 0000000..3e99808
--- /dev/null
@@ -0,0 +1,66 @@
+using System;
+using System.Reflection;
+
+namespace Tizen.NUI.Binding
+{
+       internal abstract class Behavior : BindableObject, IAttachedObject
+       {
+               internal Behavior(Type associatedType)
+               {
+                       if (associatedType == null)
+                               throw new ArgumentNullException("associatedType");
+                       AssociatedType = associatedType;
+               }
+
+               protected Type AssociatedType { get; }
+
+               void IAttachedObject.AttachTo(BindableObject bindable)
+               {
+                       if (bindable == null)
+                               throw new ArgumentNullException("bindable");
+                       if (!AssociatedType.IsInstanceOfType(bindable))
+                               throw new InvalidOperationException("bindable not an instance of AssociatedType");
+                       OnAttachedTo(bindable);
+               }
+
+               void IAttachedObject.DetachFrom(BindableObject bindable)
+               {
+                       OnDetachingFrom(bindable);
+               }
+
+               protected virtual void OnAttachedTo(BindableObject bindable)
+               {
+               }
+
+               protected virtual void OnDetachingFrom(BindableObject bindable)
+               {
+               }
+       }
+
+       internal abstract class Behavior<T> : Behavior where T : BindableObject
+       {
+               protected Behavior() : base(typeof(T))
+               {
+               }
+
+               protected override void OnAttachedTo(BindableObject bindable)
+               {
+                       base.OnAttachedTo(bindable);
+                       OnAttachedTo((T)bindable);
+               }
+
+               protected virtual void OnAttachedTo(T bindable)
+               {
+               }
+
+               protected override void OnDetachingFrom(BindableObject bindable)
+               {
+                       OnDetachingFrom((T)bindable);
+                       base.OnDetachingFrom(bindable);
+               }
+
+               protected virtual void OnDetachingFrom(T bindable)
+               {
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Interactivity/BindingCondition.cs b/src/Tizen.NUI/src/internal/XamlBinding/Interactivity/BindingCondition.cs
new file mode 100755 (executable)
index 0000000..21ff197
--- /dev/null
@@ -0,0 +1,98 @@
+using System;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Binding
+{
+       // [ProvideCompiled("Xamarin.Forms.Core.XamlC.PassthroughValueProvider")]
+       [AcceptEmptyServiceProvider]
+       internal sealed class BindingCondition : Condition, IValueProvider
+       {
+               readonly BindableProperty _boundProperty;
+
+               BindingBase _binding;
+               object _triggerValue;
+
+               public BindingCondition()
+               {
+                       _boundProperty = BindableProperty.CreateAttached("Bound", typeof(object), typeof(BindingCondition), null, propertyChanged: OnBoundPropertyChanged);
+               }
+
+               public BindingBase Binding
+               {
+                       get { return _binding; }
+                       set
+                       {
+                               if (_binding == value)
+                                       return;
+                               if (IsSealed)
+                                       throw new InvalidOperationException("Can not change Binding once the Condition has been applied.");
+                               _binding = value;
+                       }
+               }
+
+               public object Value
+               {
+                       get { return _triggerValue; }
+                       set
+                       {
+                               if (_triggerValue == value)
+                                       return;
+                               if (IsSealed)
+                                       throw new InvalidOperationException("Can not change Value once the Condition has been applied.");
+                               _triggerValue = value;
+                       }
+               }
+
+               object IValueProvider.ProvideValue(IServiceProvider serviceProvider)
+               {
+                       //This is no longer required
+                       return this;
+               }
+
+               internal override bool GetState(BindableObject bindable)
+               {
+                       object newValue = bindable.GetValue(_boundProperty);
+                       return EqualsToValue(newValue);
+               }
+
+               internal override void SetUp(BindableObject bindable)
+               {
+                       if (Binding != null)
+                               bindable.SetBinding(_boundProperty, Binding.Clone());
+               }
+
+               internal override void TearDown(BindableObject bindable)
+               {
+                       bindable.RemoveBinding(_boundProperty);
+                       bindable.ClearValue(_boundProperty);
+               }
+
+               static IValueConverterProvider s_valueConverter = DependencyService.Get<IValueConverterProvider>();
+
+               bool EqualsToValue(object other)
+               {
+                       if ((other == Value) || (other != null && other.Equals(Value)))
+                               return true;
+
+                       object converted = null;
+                       if (s_valueConverter != null)
+                               converted = s_valueConverter.Convert(Value, other != null ? other.GetType() : typeof(object), null, null);
+                       else
+                               return false;
+
+                       return (other == converted) || (other != null && other.Equals(converted));
+               }
+
+               void OnBoundPropertyChanged(BindableObject bindable, object oldValue, object newValue)
+               {
+                       bool oldState = EqualsToValue(oldValue);
+                       bool newState = EqualsToValue(newValue);
+
+                       if (newState == oldState)
+                               return;
+
+                       if (ConditionChanged != null)
+                               ConditionChanged(bindable, oldState, newState);
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Interactivity/Condition.cs b/src/Tizen.NUI/src/internal/XamlBinding/Interactivity/Condition.cs
new file mode 100755 (executable)
index 0000000..580fed9
--- /dev/null
@@ -0,0 +1,51 @@
+using System;
+
+namespace Tizen.NUI.Binding
+{
+       internal abstract class Condition
+       {
+               Action<BindableObject, bool, bool> _conditionChanged;
+
+               bool _isSealed;
+
+               internal Condition()
+               {
+               }
+
+               internal Action<BindableObject, bool, bool> ConditionChanged
+               {
+                       get { return _conditionChanged; }
+                       set
+                       {
+                               if (_conditionChanged == value)
+                                       return;
+                               if (_conditionChanged != null)
+                                       throw new InvalidOperationException("The same condition instance can not be reused");
+                               _conditionChanged = value;
+                       }
+               }
+
+               internal bool IsSealed
+               {
+                       get { return _isSealed; }
+                       set
+                       {
+                               if (_isSealed == value)
+                                       return;
+                               if (!value)
+                                       throw new InvalidOperationException("What is sealed can not be unsealed.");
+                               _isSealed = value;
+                               OnSealed();
+                       }
+               }
+
+               internal abstract bool GetState(BindableObject bindable);
+
+               internal virtual void OnSealed()
+               {
+               }
+
+               internal abstract void SetUp(BindableObject bindable);
+               internal abstract void TearDown(BindableObject bindable);
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Interactivity/DataTrigger.cs b/src/Tizen.NUI/src/internal/XamlBinding/Interactivity/DataTrigger.cs
new file mode 100755 (executable)
index 0000000..ed3fa54
--- /dev/null
@@ -0,0 +1,57 @@
+using System;
+using System.Collections.Generic;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Binding
+{
+       [ContentProperty("Setters")]
+       // [ProvideCompiled("Xamarin.Forms.Core.XamlC.PassthroughValueProvider")]
+       [AcceptEmptyServiceProvider]
+       internal sealed class DataTrigger : TriggerBase, IValueProvider
+       {
+               public DataTrigger([TypeConverter(typeof(TypeTypeConverter))] [Parameter("TargetType")] Type targetType) : base(new BindingCondition(), targetType)
+               {
+               }
+
+               public BindingBase Binding
+               {
+                       get { return ((BindingCondition)Condition).Binding; }
+                       set
+                       {
+                               if (((BindingCondition)Condition).Binding == value)
+                                       return;
+                               if (IsSealed)
+                                       throw new InvalidOperationException("Can not change Binding once the Trigger has been applied.");
+                               OnPropertyChanging();
+                               ((BindingCondition)Condition).Binding = value;
+                               OnPropertyChanged();
+                       }
+               }
+
+               public new IList<Setter> Setters
+               {
+                       get { return base.Setters; }
+               }
+
+               public object Value
+               {
+                       get { return ((BindingCondition)Condition).Value; }
+                       set
+                       {
+                               if (((BindingCondition)Condition).Value == value)
+                                       return;
+                               if (IsSealed)
+                                       throw new InvalidOperationException("Can not change Value once the Trigger has been applied.");
+                               OnPropertyChanging();
+                               ((BindingCondition)Condition).Value = value;
+                               OnPropertyChanged();
+                       }
+               }
+
+               object IValueProvider.ProvideValue(IServiceProvider serviceProvider)
+               {
+                       //This is no longer required
+                       return this;
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Interactivity/EventTrigger.cs b/src/Tizen.NUI/src/internal/XamlBinding/Interactivity/EventTrigger.cs
new file mode 100755 (executable)
index 0000000..0363f6a
--- /dev/null
@@ -0,0 +1,92 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using Tizen.NUI.Internals;
+
+namespace Tizen.NUI.Binding
+{
+       [ContentProperty("Actions")]
+       internal sealed class EventTrigger : TriggerBase
+       {
+               static readonly MethodInfo s_handlerinfo = typeof(EventTrigger).GetRuntimeMethods().Single(mi => mi.Name == "OnEventTriggered" && mi.IsPublic == false);
+               readonly List<BindableObject> _associatedObjects = new List<BindableObject>();
+
+               EventInfo _eventinfo;
+
+               string _eventname;
+               Delegate _handlerdelegate;
+
+               public EventTrigger() : base(typeof(BindableObject))
+               {
+                       Actions = new SealedList<TriggerAction>();
+               }
+
+               public IList<TriggerAction> Actions { get; }
+
+               public string Event
+               {
+                       get { return _eventname; }
+                       set
+                       {
+                               if (_eventname == value)
+                                       return;
+                               if (IsSealed)
+                                       throw new InvalidOperationException("Event cannot be changed once the Trigger has been applied");
+                               OnPropertyChanging();
+                               _eventname = value;
+                               OnPropertyChanged();
+                       }
+               }
+
+               internal override void OnAttachedTo(BindableObject bindable)
+               {
+                       base.OnAttachedTo(bindable);
+                       if (!string.IsNullOrEmpty(Event))
+                               AttachHandlerTo(bindable);
+                       _associatedObjects.Add(bindable);
+               }
+
+               internal override void OnDetachingFrom(BindableObject bindable)
+               {
+                       _associatedObjects.Remove(bindable);
+                       DetachHandlerFrom(bindable);
+                       base.OnDetachingFrom(bindable);
+               }
+
+               internal override void OnSeal()
+               {
+                       base.OnSeal();
+                       ((SealedList<TriggerAction>)Actions).IsReadOnly = true;
+               }
+
+               void AttachHandlerTo(BindableObject bindable)
+               {
+                       try
+                       {
+                               _eventinfo = bindable.GetType().GetRuntimeEvent(Event);
+                               _handlerdelegate = s_handlerinfo.CreateDelegate(_eventinfo.EventHandlerType, this);
+                       }
+                       catch (Exception)
+                       {
+                               Console.WriteLine("EventTrigger", "Can not attach EventTrigger to {0}.{1}. Check if the handler exists and if the signature is right.", bindable.GetType(), Event);
+                       }
+                       if (_eventinfo != null && _handlerdelegate != null)
+                               _eventinfo.AddEventHandler(bindable, _handlerdelegate);
+               }
+
+               void DetachHandlerFrom(BindableObject bindable)
+               {
+                       if (_eventinfo != null && _handlerdelegate != null)
+                               _eventinfo.RemoveEventHandler(bindable, _handlerdelegate);
+               }
+
+               // [Preserve]
+               void OnEventTriggered(object sender, EventArgs e)
+               {
+                       var bindable = (BindableObject)sender;
+                       foreach (TriggerAction action in Actions)
+                               action.DoInvoke(bindable);
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Interactivity/IAttachedObject.cs b/src/Tizen.NUI/src/internal/XamlBinding/Interactivity/IAttachedObject.cs
new file mode 100755 (executable)
index 0000000..d3c15e1
--- /dev/null
@@ -0,0 +1,8 @@
+namespace Tizen.NUI.Binding
+{
+       internal interface IAttachedObject
+       {
+               void AttachTo(BindableObject bindable);
+               void DetachFrom(BindableObject bindable);
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Interactivity/MultiCondition.cs b/src/Tizen.NUI/src/internal/XamlBinding/Interactivity/MultiCondition.cs
new file mode 100755 (executable)
index 0000000..a85d971
--- /dev/null
@@ -0,0 +1,65 @@
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Binding
+{
+       internal sealed class MultiCondition : Condition
+       {
+               readonly BindableProperty _aggregatedStateProperty;
+
+               public MultiCondition()
+               {
+                       _aggregatedStateProperty = BindableProperty.CreateAttached("AggregatedState", typeof(bool), typeof(MultiCondition), false, propertyChanged: OnAggregatedStatePropertyChanged);
+                       Conditions = new TriggerBase.SealedList<Condition>();
+               }
+
+               public IList<Condition> Conditions { get; }
+
+               internal override bool GetState(BindableObject bindable)
+               {
+                       return (bool)bindable.GetValue(_aggregatedStateProperty);
+               }
+
+               internal override void OnSealed()
+               {
+                       ((TriggerBase.SealedList<Condition>)Conditions).IsReadOnly = true;
+                       foreach (Condition condition in Conditions)
+                               condition.ConditionChanged = OnConditionChanged;
+               }
+
+               internal override void SetUp(BindableObject bindable)
+               {
+                       foreach (Condition condition in Conditions)
+                               condition.SetUp(bindable);
+               }
+
+               internal override void TearDown(BindableObject bindable)
+               {
+                       foreach (Condition condition in Conditions)
+                               condition.TearDown(bindable);
+               }
+
+               void OnAggregatedStatePropertyChanged(BindableObject bindable, object oldValue, object newValue)
+               {
+                       if ((bool)oldValue == (bool)newValue)
+                               return;
+
+                       ConditionChanged?.Invoke(bindable, (bool)oldValue, (bool)newValue);
+               }
+
+               void OnConditionChanged(BindableObject bindable, bool oldValue, bool newValue)
+               {
+                       var oldState = (bool)bindable.GetValue(_aggregatedStateProperty);
+                       var newState = true;
+                       foreach (Condition condition in Conditions)
+                       {
+                               if (!condition.GetState(bindable))
+                               {
+                                       newState = false;
+                                       break;
+                               }
+                       }
+                       if (newState != oldState)
+                               bindable.SetValue(_aggregatedStateProperty, newState);
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Interactivity/MultiTrigger.cs b/src/Tizen.NUI/src/internal/XamlBinding/Interactivity/MultiTrigger.cs
new file mode 100755 (executable)
index 0000000..a74843d
--- /dev/null
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Binding
+{
+       [ContentProperty("Setters")]
+       internal sealed class MultiTrigger : TriggerBase
+       {
+               public MultiTrigger([TypeConverter(typeof(TypeTypeConverter))] [Parameter("TargetType")] Type targetType) : base(new MultiCondition(), targetType)
+               {
+               }
+
+               public IList<Condition> Conditions
+               {
+                       get { return ((MultiCondition)Condition).Conditions; }
+               }
+
+               public new IList<Setter> Setters
+               {
+                       get { return base.Setters; }
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Interactivity/PropertyCondition.cs b/src/Tizen.NUI/src/internal/XamlBinding/Interactivity/PropertyCondition.cs
new file mode 100755 (executable)
index 0000000..0c2d9ac
--- /dev/null
@@ -0,0 +1,112 @@
+using System;
+using System.ComponentModel;
+using System.Reflection;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Binding
+{
+       // [ProvideCompiled("Tizen.NUI.Core.XamlC.PassthroughValueProvider")]
+       [AcceptEmptyServiceProvider]
+       internal sealed class PropertyCondition : Condition, IValueProvider
+       {
+               readonly BindableProperty _stateProperty;
+
+               BindableProperty _property;
+               object _triggerValue;
+
+               public PropertyCondition()
+               {
+                       _stateProperty = BindableProperty.CreateAttached("State", typeof(bool), typeof(PropertyCondition), false, propertyChanged: OnStatePropertyChanged);
+               }
+
+               public BindableProperty Property
+               {
+                       get { return _property; }
+                       set
+                       {
+                               if (_property == value)
+                                       return;
+                               if (IsSealed)
+                                       throw new InvalidOperationException("Can not change Property once the Trigger has been applied.");
+                               _property = value;
+
+                               //convert the value
+                               if (_property != null && s_valueConverter != null)
+                               {
+                                       Func<MemberInfo> minforetriever = () => Property.DeclaringType.GetRuntimeProperty(Property.PropertyName);
+                                       Value = s_valueConverter.Convert(Value, Property.ReturnType, minforetriever, null);
+                               }
+                       }
+               }
+
+               public object Value
+               {
+                       get { return _triggerValue; }
+                       set
+                       {
+                               if (_triggerValue == value)
+                                       return;
+                               if (IsSealed)
+                                       throw new InvalidOperationException("Can not change Value once the Trigger has been applied.");
+
+                               //convert the value
+                               if (_property != null && s_valueConverter != null)
+                               {
+                                       Func<MemberInfo> minforetriever = () => Property.DeclaringType.GetRuntimeProperty(Property.PropertyName);
+                                       value = s_valueConverter.Convert(value, Property.ReturnType, minforetriever, null);
+                               }
+                               _triggerValue = value;
+                       }
+               }
+
+               object IValueProvider.ProvideValue(IServiceProvider serviceProvider)
+               {
+                       //This is no longer required
+                       return this;
+               }
+
+               internal override bool GetState(BindableObject bindable)
+               {
+                       return (bool)bindable.GetValue(_stateProperty);
+               }
+
+               static IValueConverterProvider s_valueConverter = DependencyService.Get<IValueConverterProvider>();
+
+               internal override void SetUp(BindableObject bindable)
+               {
+                       object newvalue = bindable.GetValue(Property);
+                       bool newState = (newvalue == Value) || (newvalue != null && newvalue.Equals(Value));
+                       bindable.SetValue(_stateProperty, newState);
+                       bindable.PropertyChanged += OnAttachedObjectPropertyChanged;
+               }
+
+               internal override void TearDown(BindableObject bindable)
+               {
+                       bindable.ClearValue(_stateProperty);
+                       bindable.PropertyChanged -= OnAttachedObjectPropertyChanged;
+               }
+
+               void OnAttachedObjectPropertyChanged(object sender, PropertyChangedEventArgs e)
+               {
+                       var bindable = (BindableObject)sender;
+                       var oldState = (bool)bindable.GetValue(_stateProperty);
+
+                       if (Property == null)
+                               return;
+                       if (e.PropertyName != Property.PropertyName)
+                               return;
+                       object newvalue = bindable.GetValue(Property);
+                       bool newstate = (newvalue == Value) || (newvalue != null && newvalue.Equals(Value));
+                       if (oldState != newstate)
+                               bindable.SetValue(_stateProperty, newstate);
+               }
+
+               void OnStatePropertyChanged(BindableObject bindable, object oldValue, object newValue)
+               {
+                       if ((bool)oldValue == (bool)newValue)
+                               return;
+
+                       ConditionChanged?.Invoke(bindable, (bool)oldValue, (bool)newValue);
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Interactivity/Trigger.cs b/src/Tizen.NUI/src/internal/XamlBinding/Interactivity/Trigger.cs
new file mode 100755 (executable)
index 0000000..102b716
--- /dev/null
@@ -0,0 +1,59 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Binding
+{
+       [ContentProperty("Setters")]
+       // [ProvideCompiled("Xamarin.Forms.Core.XamlC.PassthroughValueProvider")]
+       [AcceptEmptyServiceProvider]
+       internal sealed class Trigger : TriggerBase, IValueProvider
+       {
+               public Trigger([TypeConverter(typeof(TypeTypeConverter))] [Parameter("TargetType")] Type targetType) : base(new PropertyCondition(), targetType)
+               {
+               }
+
+               public BindableProperty Property
+               {
+                       get { return ((PropertyCondition)Condition).Property; }
+                       set
+                       {
+                               if (((PropertyCondition)Condition).Property == value)
+                                       return;
+                               if (IsSealed)
+                                       throw new InvalidOperationException("Can not change Property once the Trigger has been applied.");
+                               OnPropertyChanging();
+                               ((PropertyCondition)Condition).Property = value;
+                               OnPropertyChanged();
+                       }
+               }
+
+               public new IList<Setter> Setters
+               {
+                       get { return base.Setters; }
+               }
+
+               public object Value
+               {
+                       get { return ((PropertyCondition)Condition).Value; }
+                       set
+                       {
+                               if (((PropertyCondition)Condition).Value == value)
+                                       return;
+                               if (IsSealed)
+                                       throw new InvalidOperationException("Can not change Value once the Trigger has been applied.");
+                               OnPropertyChanging();
+                               ((PropertyCondition)Condition).Value = value;
+                               OnPropertyChanged();
+                       }
+               }
+
+               object IValueProvider.ProvideValue(IServiceProvider serviceProvider)
+               {
+                       //This is no longer required
+                       return this;
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Interactivity/TriggerAction.cs b/src/Tizen.NUI/src/internal/XamlBinding/Interactivity/TriggerAction.cs
new file mode 100755 (executable)
index 0000000..2351f79
--- /dev/null
@@ -0,0 +1,37 @@
+using System;
+
+namespace Tizen.NUI.Binding
+{
+       internal abstract class TriggerAction
+       {
+               internal TriggerAction(Type associatedType)
+               {
+                       if (associatedType == null)
+                               throw new ArgumentNullException("associatedType");
+                       AssociatedType = associatedType;
+               }
+
+               protected Type AssociatedType { get; private set; }
+
+               protected abstract void Invoke(object sender);
+
+               internal virtual void DoInvoke(object sender)
+               {
+                       Invoke(sender);
+               }
+       }
+
+       internal abstract class TriggerAction<T> : TriggerAction where T : BindableObject
+       {
+               protected TriggerAction() : base(typeof(T))
+               {
+               }
+
+               protected override void Invoke(object sender)
+               {
+                       Invoke((T)sender);
+               }
+
+               protected abstract void Invoke(T sender);
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Interactivity/TriggerBase.cs b/src/Tizen.NUI/src/internal/XamlBinding/Interactivity/TriggerBase.cs
new file mode 100755 (executable)
index 0000000..f6e18d2
--- /dev/null
@@ -0,0 +1,213 @@
+using System;
+using System.Reflection;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Binding
+{
+       internal abstract class TriggerBase : BindableObject, IAttachedObject
+       {
+               bool _isSealed;
+
+               internal TriggerBase(Type targetType)
+               {
+                       if (targetType == null)
+                               throw new ArgumentNullException("targetType");
+                       TargetType = targetType;
+
+                       EnterActions = new SealedList<TriggerAction>();
+                       ExitActions = new SealedList<TriggerAction>();
+               }
+
+               internal TriggerBase(Condition condition, Type targetType) : this(targetType)
+               {
+                       Setters = new SealedList<Setter>();
+                       Condition = condition;
+                       Condition.ConditionChanged = OnConditionChanged;
+               }
+
+               public IList<TriggerAction> EnterActions { get; }
+
+               public IList<TriggerAction> ExitActions { get; }
+
+               public bool IsSealed
+               {
+                       get { return _isSealed; }
+                       private set
+                       {
+                               if (_isSealed == value)
+                                       return;
+                               if (!value)
+                                       throw new InvalidOperationException("What is sealed can not be unsealed.");
+                               _isSealed = value;
+                               OnSeal();
+                       }
+               }
+
+               public Type TargetType { get; }
+
+               internal Condition Condition { get; }
+
+               //Setters and Condition are used by Trigger, DataTrigger and MultiTrigger
+               internal IList<Setter> Setters { get; }
+
+               void IAttachedObject.AttachTo(BindableObject bindable)
+               {
+                       IsSealed = true;
+
+                       if (bindable == null)
+                               throw new ArgumentNullException("bindable");
+                       if (!TargetType.IsInstanceOfType(bindable))
+                               throw new InvalidOperationException("bindable not an instance of AssociatedType");
+                       OnAttachedTo(bindable);
+               }
+
+               void IAttachedObject.DetachFrom(BindableObject bindable)
+               {
+                       if (bindable == null)
+                               throw new ArgumentNullException("bindable");
+                       OnDetachingFrom(bindable);
+               }
+
+               internal virtual void OnAttachedTo(BindableObject bindable)
+               {
+                       if (Condition != null)
+                               Condition.SetUp(bindable);
+               }
+
+               internal virtual void OnDetachingFrom(BindableObject bindable)
+               {
+                       if (Condition != null)
+                               Condition.TearDown(bindable);
+               }
+
+               internal virtual void OnSeal()
+               {
+                       ((SealedList<TriggerAction>)EnterActions).IsReadOnly = true;
+                       ((SealedList<TriggerAction>)ExitActions).IsReadOnly = true;
+                       if (Setters != null)
+                               ((SealedList<Setter>)Setters).IsReadOnly = true;
+                       if (Condition != null)
+                               Condition.IsSealed = true;
+               }
+
+               void OnConditionChanged(BindableObject bindable, bool oldValue, bool newValue)
+               {
+                       if (newValue)
+                       {
+                               foreach (TriggerAction action in EnterActions)
+                                       action.DoInvoke(bindable);
+                               foreach (Setter setter in Setters)
+                                       setter.Apply(bindable);
+                       }
+                       else
+                       {
+                               foreach (Setter setter in Setters)
+                                       setter.UnApply(bindable);
+                               foreach (TriggerAction action in ExitActions)
+                                       action.DoInvoke(bindable);
+                       }
+               }
+
+               internal class SealedList<T> : IList<T>
+               {
+                       readonly IList<T> _actual;
+
+                       bool _isReadOnly;
+
+                       public SealedList()
+                       {
+                               _actual = new List<T>();
+                       }
+
+                       public void Add(T item)
+                       {
+                               if (IsReadOnly)
+                                       throw new InvalidOperationException("This list is ReadOnly");
+                               _actual.Add(item);
+                       }
+
+                       public void Clear()
+                       {
+                               if (IsReadOnly)
+                                       throw new InvalidOperationException("This list is ReadOnly");
+                               _actual.Clear();
+                       }
+
+                       public bool Contains(T item)
+                       {
+                               return _actual.Contains(item);
+                       }
+
+                       public void CopyTo(T[] array, int arrayIndex)
+                       {
+                               _actual.CopyTo(array, arrayIndex);
+                       }
+
+                       public int Count
+                       {
+                               get { return _actual.Count; }
+                       }
+
+                       public bool IsReadOnly
+                       {
+                               get { return _isReadOnly; }
+                               set
+                               {
+                                       if (_isReadOnly == value)
+                                               return;
+                                       if (!value)
+                                               throw new InvalidOperationException("Can't change this back to non readonly");
+                                       _isReadOnly = value;
+                               }
+                       }
+
+                       public bool Remove(T item)
+                       {
+                               if (IsReadOnly)
+                                       throw new InvalidOperationException("This list is ReadOnly");
+                               return _actual.Remove(item);
+                       }
+
+                       IEnumerator IEnumerable.GetEnumerator()
+                       {
+                               return ((IEnumerable)_actual).GetEnumerator();
+                       }
+
+                       public IEnumerator<T> GetEnumerator()
+                       {
+                               return _actual.GetEnumerator();
+                       }
+
+                       public int IndexOf(T item)
+                       {
+                               return _actual.IndexOf(item);
+                       }
+
+                       public void Insert(int index, T item)
+                       {
+                               if (IsReadOnly)
+                                       throw new InvalidOperationException("This list is ReadOnly");
+                               _actual.Insert(index, item);
+                       }
+
+                       public T this[int index]
+                       {
+                               get { return _actual[index]; }
+                               set
+                               {
+                                       if (IsReadOnly)
+                                               throw new InvalidOperationException("This list is ReadOnly");
+                                       _actual[index] = value;
+                               }
+                       }
+
+                       public void RemoveAt(int index)
+                       {
+                               if (IsReadOnly)
+                                       throw new InvalidOperationException("This list is ReadOnly");
+                               _actual.RemoveAt(index);
+                       }
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Internals/DynamicResource.cs b/src/Tizen.NUI/src/internal/XamlBinding/Internals/DynamicResource.cs
new file mode 100755 (executable)
index 0000000..76a91e6
--- /dev/null
@@ -0,0 +1,15 @@
+using System.ComponentModel;
+
+namespace Tizen.NUI.Internals
+{
+       [EditorBrowsable(EditorBrowsableState.Never)]
+       internal class DynamicResource
+       {
+               public DynamicResource(string key)
+               {
+                       Key = key;
+               }
+
+               public string Key { get; private set; }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Internals/IDataTemplate.cs b/src/Tizen.NUI/src/internal/XamlBinding/Internals/IDataTemplate.cs
new file mode 100755 (executable)
index 0000000..6891013
--- /dev/null
@@ -0,0 +1,12 @@
+using System;
+using System.ComponentModel;
+
+namespace Tizen.NUI.Internals
+{
+       [Obsolete]
+       [EditorBrowsable(EditorBrowsableState.Never)]
+       internal interface IDataTemplate
+       {
+               Func<object> LoadTemplate { get; set; }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Internals/IDeserializer.cs b/src/Tizen.NUI/src/internal/XamlBinding/Internals/IDeserializer.cs
new file mode 100755 (executable)
index 0000000..3e93a08
--- /dev/null
@@ -0,0 +1,13 @@
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Threading.Tasks;
+
+namespace Tizen.NUI.Internals
+{
+       [EditorBrowsable(EditorBrowsableState.Never)]
+       internal interface IDeserializer
+       {
+               Task<IDictionary<string, object>> DeserializePropertiesAsync();
+               Task SerializePropertiesAsync(IDictionary<string, object> properties);
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Internals/IDynamicResourceHandler.cs b/src/Tizen.NUI/src/internal/XamlBinding/Internals/IDynamicResourceHandler.cs
new file mode 100755 (executable)
index 0000000..0c223ac
--- /dev/null
@@ -0,0 +1,11 @@
+using System.ComponentModel;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.Internals
+{
+       [EditorBrowsable(EditorBrowsableState.Never)]
+       internal interface IDynamicResourceHandler
+       {
+               void SetDynamicResource(BindableProperty property, string key);
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Internals/INameScope.cs b/src/Tizen.NUI/src/internal/XamlBinding/Internals/INameScope.cs
new file mode 100755 (executable)
index 0000000..4716037
--- /dev/null
@@ -0,0 +1,15 @@
+using System;
+using System.ComponentModel;
+using System.Xml;
+
+namespace Tizen.NUI.Internals
+{
+       [EditorBrowsable(EditorBrowsableState.Never)]
+       internal interface INameScope
+       {
+               object FindByName(string name);
+               void RegisterName(string name, object scopedElement);
+               void UnregisterName(string name);
+               [Obsolete]void RegisterName(string name, object scopedElement, IXmlLineInfo xmlLineInfo);
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Internals/INamescopeProvider.cs b/src/Tizen.NUI/src/internal/XamlBinding/Internals/INamescopeProvider.cs
new file mode 100755 (executable)
index 0000000..3fad1aa
--- /dev/null
@@ -0,0 +1,9 @@
+using System;
+
+namespace Tizen.NUI.Internals
+{
+       interface INameScopeProvider
+       {
+               INameScope NameScope { get; }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Internals/InvalidationTrigger.cs b/src/Tizen.NUI/src/internal/XamlBinding/Internals/InvalidationTrigger.cs
new file mode 100755 (executable)
index 0000000..6b3bf30
--- /dev/null
@@ -0,0 +1,18 @@
+using System;
+using System.ComponentModel;
+
+namespace Tizen.NUI.Internals
+{
+       [Flags]
+       [EditorBrowsable(EditorBrowsableState.Never)]
+       internal enum InvalidationTrigger
+       {
+               Undefined = 0,
+               MeasureChanged = 1 << 0,
+               HorizontalOptionsChanged = 1 << 1,
+               VerticalOptionsChanged = 1 << 2,
+               SizeRequestChanged = 1 << 3,
+               RendererReady = 1 << 4,
+               MarginChanged = 1 << 5
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Internals/NameScope.cs b/src/Tizen.NUI/src/internal/XamlBinding/Internals/NameScope.cs
new file mode 100755 (executable)
index 0000000..f3fc22d
--- /dev/null
@@ -0,0 +1,60 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Xml;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Internals
+{
+       [EditorBrowsable(EditorBrowsableState.Never)]
+       internal class NameScope : INameScope
+       {
+               public static readonly BindableProperty NameScopeProperty = BindableProperty.CreateAttached("NameScope", typeof(INameScope), typeof(NameScope), default(INameScope));
+
+               readonly Dictionary<string, object> _names = new Dictionary<string, object>();
+
+               object INameScope.FindByName(string name)
+               {
+                       if (_names.ContainsKey(name))
+                               return _names[name];
+                       return null;
+               }
+
+               void INameScope.RegisterName(string name, object scopedElement)
+               {
+                       if (_names.ContainsKey(name))
+                               throw new ArgumentException("An element with the same key already exists in NameScope", "name");
+
+                       _names[name] = scopedElement;
+               }
+
+               [Obsolete]
+               void INameScope.RegisterName(string name, object scopedElement, IXmlLineInfo xmlLineInfo)
+               {
+                       try
+                       {
+                               ((INameScope)this).RegisterName(name, scopedElement);
+                       }
+                       catch (ArgumentException)
+                       {
+                               throw new XamlParseException(string.Format("An element with the name \"{0}\" already exists in this NameScope", name), xmlLineInfo);
+                       }
+               }
+
+               void INameScope.UnregisterName(string name)
+               {
+                       _names.Remove(name);
+               }
+
+               public static INameScope GetNameScope(BindableObject bindable)
+               {
+                       return (INameScope)bindable.GetValue(NameScopeProperty);
+               }
+
+               public static void SetNameScope(BindableObject bindable, INameScope value)
+               {
+                       bindable.SetValue(NameScopeProperty, value);
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Internals/ResourceLoader.cs b/src/Tizen.NUI/src/internal/XamlBinding/Internals/ResourceLoader.cs
new file mode 100755 (executable)
index 0000000..d9045fd
--- /dev/null
@@ -0,0 +1,22 @@
+using System;
+using System.Reflection;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Internals
+{
+       internal static class ResourceLoader
+       {
+               static Func<AssemblyName, string, string> resourceProvider;
+
+               //takes a resource path, returns string content
+               public static Func<AssemblyName, string, string> ResourceProvider {
+                       get => resourceProvider;
+                       internal set {
+                               DesignMode.IsDesignModeEnabled = true;
+                               resourceProvider = value;
+                       }
+               }
+
+               internal static Action<Exception> ExceptionHandler { get; set; }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Internals/Ticker.cs b/src/Tizen.NUI/src/internal/XamlBinding/Internals/Ticker.cs
new file mode 100755 (executable)
index 0000000..346fe02
--- /dev/null
@@ -0,0 +1,100 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Linq;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.Internals
+{
+       [EditorBrowsable(EditorBrowsableState.Never)]
+       internal abstract class Ticker
+       {
+               static Ticker s_ticker;
+               readonly Stopwatch _stopwatch;
+               readonly List<Tuple<int, Func<long, bool>>> _timeouts;
+
+               int _count;
+               bool _enabled;
+
+               protected Ticker()
+               {
+                       _count = 0;
+                       _timeouts = new List<Tuple<int, Func<long, bool>>>();
+
+                       _stopwatch = new Stopwatch();
+               }
+
+               public static void SetDefault(Ticker ticker) => Default = ticker;
+               public static Ticker Default
+               {
+                       internal set { s_ticker = value; }
+                       get { return s_ticker ?? (s_ticker =  Device.PlatformServices.CreateTicker()); }
+               }
+
+               public virtual int Insert(Func<long, bool> timeout)
+               {
+                       _count++;
+                       _timeouts.Add(new Tuple<int, Func<long, bool>>(_count, timeout));
+
+                       if (!_enabled)
+                       {
+                               _enabled = true;
+                               Enable();
+                       }
+
+                       return _count;
+               }
+
+               public virtual void Remove(int handle)
+               {
+                       // Device.BeginInvokeOnMainThread(() =>
+                       // {
+                       //      _timeouts.RemoveAll(t => t.Item1 == handle);
+
+                       //      if (!_timeouts.Any())
+                       //      {
+                       //              _enabled = false;
+                       //              Disable();
+                       //      }
+                       // });
+               }
+
+               protected abstract void DisableTimer();
+
+               protected abstract void EnableTimer();
+               
+               protected void SendSignals(int timestep = -1)
+               {
+                       long step = timestep >= 0 ? timestep : _stopwatch.ElapsedMilliseconds;
+                       _stopwatch.Reset();
+                       _stopwatch.Start();
+
+                       var localCopy = new List<Tuple<int, Func<long, bool>>>(_timeouts);
+                       foreach (Tuple<int, Func<long, bool>> timeout in localCopy)
+                       {
+                               bool remove = !timeout.Item2(step);
+                               if (remove)
+                                       _timeouts.RemoveAll(t => t.Item1 == timeout.Item1);
+                       }
+
+                       if (!_timeouts.Any())
+                       {
+                               _enabled = false;
+                               Disable();
+                       }
+               }
+
+               void Disable()
+               {
+                       _stopwatch.Reset();
+                       DisableTimer();
+               }
+
+               void Enable()
+               {
+                       _stopwatch.Start();
+                       EnableTimer();
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Internals/TypedBinding.cs b/src/Tizen.NUI/src/internal/XamlBinding/Internals/TypedBinding.cs
new file mode 100755 (executable)
index 0000000..6ea242e
--- /dev/null
@@ -0,0 +1,301 @@
+#define DO_NOT_CHECK_FOR_BINDING_REUSE
+
+using System;
+using System.ComponentModel;
+using System.Globalization;
+using System.Collections.Generic;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.Internals
+{
+       //FIXME: need a better name for this, and share with Binding, so we can share more unittests
+       [EditorBrowsable(EditorBrowsableState.Never)]
+       internal abstract class TypedBindingBase : BindingBase
+       {
+               IValueConverter _converter;
+               object _converterParameter;
+               object _source;
+               string _updateSourceEventName;
+
+               public IValueConverter Converter {
+                       get { return _converter; }
+                       set {
+                               ThrowIfApplied();
+                               _converter = value;
+                       }
+               }
+
+               public object ConverterParameter {
+                       get { return _converterParameter; }
+                       set {
+                               ThrowIfApplied();
+                               _converterParameter = value;
+                       }
+               }
+
+               public object Source {
+                       get { return _source; }
+                       set {
+                               ThrowIfApplied();
+                               _source = value;
+                       }
+               }
+
+               internal string UpdateSourceEventName {
+                       get { return _updateSourceEventName; }
+                       set {
+                               ThrowIfApplied();
+                               _updateSourceEventName = value;
+                       }
+               }
+
+               internal TypedBindingBase()
+               {
+               }
+       }
+
+       [EditorBrowsable(EditorBrowsableState.Never)]
+       internal sealed class TypedBinding<TSource, TProperty> : TypedBindingBase
+       {
+               readonly Func<TSource, TProperty> _getter;
+               readonly Action<TSource, TProperty> _setter;
+               readonly PropertyChangedProxy [] _handlers;
+
+               public TypedBinding(Func<TSource, TProperty> getter, Action<TSource, TProperty> setter, Tuple<Func<TSource, object>, string> [] handlers)
+               {
+                       if (getter == null)
+                               throw new ArgumentNullException(nameof(getter));
+
+                       _getter = getter;
+                       _setter = setter;
+
+                       if (handlers == null)
+                               return;
+
+                       _handlers = new PropertyChangedProxy [handlers.Length];
+                       for (var i = 0; i < handlers.Length; i++)
+                               _handlers [i] = new PropertyChangedProxy(handlers [i].Item1, handlers [i].Item2, this);
+               }
+
+               readonly WeakReference<object> _weakSource = new WeakReference<object>(null);
+               readonly WeakReference<BindableObject> _weakTarget = new WeakReference<BindableObject>(null);
+               BindableProperty _targetProperty;
+
+               // Applies the binding to a previously set source and target.
+               internal override void Apply(bool fromTarget = false)
+               {
+                       base.Apply(fromTarget);
+
+                       BindableObject target;
+#if DO_NOT_CHECK_FOR_BINDING_REUSE
+                       if (!_weakTarget.TryGetTarget(out target))
+                               throw new InvalidOperationException();
+#else
+                       if (!_weakTarget.TryGetTarget(out target) || target == null) {
+                               Unapply();
+                               return;
+                       }
+#endif
+                       object source;
+                       if (_weakSource.TryGetTarget(out source) && source != null)
+                               ApplyCore(source, target, _targetProperty, fromTarget);
+               }
+
+               // Applies the binding to a new source or target.
+               internal override void Apply(object context, BindableObject bindObj, BindableProperty targetProperty, bool fromBindingContextChanged = false)
+               {
+                       _targetProperty = targetProperty;
+                       var source = Source ?? Context ?? context;
+                       var isApplied = IsApplied;
+
+                       if (Source != null && isApplied && fromBindingContextChanged)
+                               return;
+
+                       base.Apply(source, bindObj, targetProperty, fromBindingContextChanged);
+                       
+#if (!DO_NOT_CHECK_FOR_BINDING_REUSE)
+                       BindableObject prevTarget;
+                       if (_weakTarget.TryGetTarget(out prevTarget) && !ReferenceEquals(prevTarget, bindObj))
+                               throw new InvalidOperationException("Binding instances can not be reused");
+
+                       object previousSource;
+                       if (_weakSource.TryGetTarget(out previousSource) && !ReferenceEquals(previousSource, source))
+                               throw new InvalidOperationException("Binding instances can not be reused");
+#endif
+                       _weakSource.SetTarget(source);
+                       _weakTarget.SetTarget(bindObj);
+
+                       ApplyCore(source, bindObj, targetProperty);
+               }
+
+               internal override BindingBase Clone()
+               {
+                       Tuple<Func<TSource, object>, string> [] handlers = _handlers == null ? null : new Tuple<Func<TSource, object>, string> [_handlers.Length];
+                       if (handlers != null) {
+                               for (var i = 0; i < _handlers.Length; i++)
+                                       handlers [i] = new Tuple<Func<TSource, object>, string>(_handlers [i].PartGetter, _handlers [i].PropertyName);
+                       }
+                       return new TypedBinding<TSource, TProperty>(_getter, _setter, handlers) {
+                               Mode = Mode,
+                               Converter = Converter,
+                               ConverterParameter = ConverterParameter,
+                               StringFormat = StringFormat,
+                               Source = Source,
+                               UpdateSourceEventName = UpdateSourceEventName,
+                       };
+               }
+
+               internal override object GetSourceValue(object value, Type targetPropertyType)
+               {
+                       if (Converter != null)
+                               value = Converter.Convert(value, targetPropertyType, ConverterParameter, CultureInfo.CurrentUICulture);
+
+                       //return base.GetSourceValue(value, targetPropertyType);
+                       if (StringFormat != null)
+                               return string.Format(StringFormat, value);
+
+                       return value;
+               }
+
+               internal override object GetTargetValue(object value, Type sourcePropertyType)
+               {
+                       if (Converter != null)
+                               value = Converter.ConvertBack(value, sourcePropertyType, ConverterParameter, CultureInfo.CurrentUICulture);
+
+                       //return base.GetTargetValue(value, sourcePropertyType);
+                       return value;
+               }
+
+               internal override void Unapply(bool fromBindingContextChanged = false)
+               {
+                       if (Source != null && fromBindingContextChanged && IsApplied)
+                               return;
+
+#if (!DO_NOT_CHECK_FOR_BINDING_REUSE)
+                       base.Unapply(fromBindingContextChanged:fromBindingContextChanged);
+#endif
+                       if (_handlers != null)
+                               Unsubscribe();
+                       
+#if (!DO_NOT_CHECK_FOR_BINDING_REUSE)
+                       _weakSource.SetTarget(null);
+                       _weakTarget.SetTarget(null);
+#endif
+               }
+
+               // ApplyCore is as slim as it should be:
+               // Setting  100000 values                                               : 17ms.
+               // ApplyCore  100000 (w/o INPC, w/o unnapply)   : 20ms.
+               internal void ApplyCore(object sourceObject, BindableObject target, BindableProperty property, bool fromTarget = false)
+               {
+                       var isTSource = sourceObject != null && sourceObject is TSource;
+                       var mode = this.GetRealizedMode(property);
+                       if ((mode == BindingMode.OneWay || mode == BindingMode.OneTime) && fromTarget)
+                               return;
+
+                       var needsGetter = (mode == BindingMode.TwoWay && !fromTarget) || mode == BindingMode.OneWay || mode == BindingMode.OneTime;
+
+                       if (isTSource && (mode == BindingMode.OneWay || mode == BindingMode.TwoWay) && _handlers != null)
+                               Subscribe((TSource)sourceObject);
+
+                       if (needsGetter) {
+                               var value = property.DefaultValue;
+                               if (isTSource) {
+                                       try {
+                                               value = GetSourceValue(_getter((TSource)sourceObject), property.ReturnType);
+                                       } catch (Exception ex) when (ex is NullReferenceException || ex is KeyNotFoundException) {
+                                       }
+                               }
+                               if (!TryConvert(ref value, property, property.ReturnType, true)) {
+                                       // Log.Warning("Binding", "{0} can not be converted to type '{1}'", value, property.ReturnType);
+                                       return;
+                               }
+                               target.SetValueCore(property, value, SetValueFlags.ClearDynamicResource, BindableObject.SetValuePrivateFlags.Default | BindableObject.SetValuePrivateFlags.Converted);
+                               return;
+                       }
+
+                       var needsSetter = (mode == BindingMode.TwoWay && fromTarget) || mode == BindingMode.OneWayToSource;
+                       if (needsSetter && _setter != null && isTSource) {
+                               var value = GetTargetValue(target.GetValue(property), typeof(TProperty));
+                               if (!TryConvert(ref value, property, typeof(TProperty), false)) {
+                                       // Log.Warning("Binding", "{0} can not be converted to type '{1}'", value, typeof(TProperty));
+                                       return;
+                               }
+                               _setter((TSource)sourceObject, (TProperty)value);
+                       }
+               }
+
+               static bool TryConvert(ref object value, BindableProperty targetProperty, Type convertTo, bool toTarget)
+               {
+                       if (value == null)
+                               return true;
+                       if ((toTarget && targetProperty.TryConvert(ref value)) || (!toTarget && convertTo.IsInstanceOfType(value)))
+                               return true;
+
+                       object original = value;
+                       try {
+                               value = Convert.ChangeType(value, convertTo, CultureInfo.InvariantCulture);
+                               return true;
+                       } catch (Exception ex ) when (ex is InvalidCastException || ex is FormatException||ex is OverflowException) {
+                               value = original;
+                               return false;
+                       }
+               }
+
+               class PropertyChangedProxy
+               {
+                       public Func<TSource, object> PartGetter { get; }
+                       public string PropertyName { get; }
+                       public BindingExpression.WeakPropertyChangedProxy Listener { get; }
+                       WeakReference<INotifyPropertyChanged> _weakPart = new WeakReference<INotifyPropertyChanged>(null);
+                       readonly BindingBase _binding;
+
+                       public INotifyPropertyChanged Part {
+                               get {
+                                       INotifyPropertyChanged target;
+                                       if (_weakPart.TryGetTarget(out target))
+                                               return target;
+                                       return null;
+                               } 
+                               set {
+                                       _weakPart.SetTarget(value);
+                                       Listener.SubscribeTo(value, OnPropertyChanged);
+                               }
+                       }
+
+                       public PropertyChangedProxy(Func<TSource, object> partGetter, string propertyName, BindingBase binding)
+                       {
+                               PartGetter = partGetter;
+                               PropertyName = propertyName;
+                               _binding = binding;
+                               Listener = new BindingExpression.WeakPropertyChangedProxy();
+                       }
+
+                       void OnPropertyChanged(object sender, PropertyChangedEventArgs e)
+                       {
+                               if (!string.IsNullOrEmpty(e.PropertyName) && string.CompareOrdinal(e.PropertyName, PropertyName) != 0)
+                                       return;
+                               Device.BeginInvokeOnMainThread(() => _binding.Apply(false));
+                       }
+               }
+
+               void Subscribe(TSource sourceObject)
+               {
+                       for (var i = 0; i < _handlers.Length; i++) {
+                               var part = _handlers [i].PartGetter(sourceObject);
+                               if (part == null)
+                                       break;
+                               var inpc = part as INotifyPropertyChanged;
+                               if (inpc == null)
+                                       continue;
+                               _handlers [i].Part = (inpc);
+                       }
+               }
+
+               void Unsubscribe()
+               {
+                       for (var i = 0; i < _handlers.Length; i++)
+                               _handlers [i].Listener.Unsubscribe();
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Internals/XmlnsDefinitionAttribute.cs b/src/Tizen.NUI/src/internal/XamlBinding/Internals/XmlnsDefinitionAttribute.cs
new file mode 100755 (executable)
index 0000000..ff642dc
--- /dev/null
@@ -0,0 +1,26 @@
+using System;
+using System.Diagnostics;
+
+
+namespace Tizen.NUI.Internals
+{
+       [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
+       [DebuggerDisplay("{XmlNamespace}, {ClrNamespace}, {AssemblyName}")]
+       sealed class XmlnsDefinitionAttribute : Attribute
+       {
+               public string XmlNamespace { get; }
+               public string ClrNamespace { get; }
+               public string AssemblyName { get; set; }
+
+               public XmlnsDefinitionAttribute(string xmlNamespace, string clrNamespace)
+               {
+                       if (xmlNamespace == null)
+                               throw new ArgumentNullException(nameof(xmlNamespace));
+                       if (clrNamespace == null)
+                               throw new ArgumentNullException(nameof(clrNamespace));
+
+                       ClrNamespace = clrNamespace;
+                       XmlNamespace = xmlNamespace;
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/InvalidNavigationException.cs b/src/Tizen.NUI/src/internal/XamlBinding/InvalidNavigationException.cs
new file mode 100755 (executable)
index 0000000..dd11881
--- /dev/null
@@ -0,0 +1,11 @@
+using System;
+
+namespace Tizen.NUI.Binding
+{
+       internal class InvalidNavigationException : Exception
+       {
+               public InvalidNavigationException(string message) : base(message)
+               {
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/InvalidationEventArgs.cs b/src/Tizen.NUI/src/internal/XamlBinding/InvalidationEventArgs.cs
new file mode 100755 (executable)
index 0000000..c755208
--- /dev/null
@@ -0,0 +1,15 @@
+using System;
+using Tizen.NUI.Internals;
+
+namespace Tizen.NUI.Binding
+{
+       internal class InvalidationEventArgs : EventArgs
+       {
+               public InvalidationEventArgs(InvalidationTrigger trigger)
+               {
+                       Trigger = trigger;
+               }
+
+               public InvalidationTrigger Trigger { get; private set; }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Layout.cs b/src/Tizen.NUI/src/internal/XamlBinding/Layout.cs
new file mode 100755 (executable)
index 0000000..40fa180
--- /dev/null
@@ -0,0 +1,480 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Collections.Specialized;
+using System.ComponentModel;
+using System.Linq;
+using Tizen.NUI.Internals;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Binding
+{
+       [ContentProperty("Children")]
+       internal abstract class Layout<T> : Layout, IViewContainer<T> where T : View
+       {
+               readonly ElementCollection<T> _children;
+
+               protected Layout()
+               {
+                       _children = new ElementCollection<T>(InternalChildren);
+               }
+
+               public new IList<T> Children
+               {
+                       get { return _children; }
+               }
+
+               protected virtual void OnAdded(T view)
+               {
+               }
+
+               protected override void OnChildAdded(Element child)
+               {
+                       base.OnChildAdded(child);
+
+                       var typedChild = child as T;
+                       if (typedChild != null)
+                               OnAdded(typedChild);
+               }
+
+               protected override void OnChildRemoved(Element child)
+               {
+                       base.OnChildRemoved(child);
+
+                       var typedChild = child as T;
+                       if (typedChild != null)
+                               OnRemoved(typedChild);
+               }
+
+               protected virtual void OnRemoved(T view)
+               {
+               }
+       }
+
+       internal abstract class Layout : View, ILayout, ILayoutController, IPaddingElement
+       {
+               public static readonly BindableProperty IsClippedToBoundsProperty = BindableProperty.Create("IsClippedToBounds", typeof(bool), typeof(Layout), false);
+
+               public static readonly BindableProperty CascadeInputTransparentProperty = BindableProperty.Create(
+                       nameof(CascadeInputTransparent), typeof(bool), typeof(Layout), true);
+
+               public static readonly BindableProperty PaddingProperty = PaddingElement.PaddingProperty;
+
+               static IList<KeyValuePair<Layout, int>> s_resolutionList = new List<KeyValuePair<Layout, int>>();
+               static bool s_relayoutInProgress;
+               bool _allocatedFlag;
+
+               bool _hasDoneLayout;
+               Size _lastLayoutSize = new Size(-1, -1, 0);
+
+               ReadOnlyCollection<Element> _logicalChildren;
+
+               protected Layout()
+               {
+                       //if things were added in base ctor (through implicit styles), the items added aren't properly parented
+                       if (InternalChildren.Count > 0)
+                               InternalChildrenOnCollectionChanged(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, InternalChildren));
+
+                       InternalChildren.CollectionChanged += InternalChildrenOnCollectionChanged;
+               }
+
+               public bool IsClippedToBounds
+               {
+                       get { return (bool)GetValue(IsClippedToBoundsProperty); }
+                       set { SetValue(IsClippedToBoundsProperty, value); }
+               }
+
+               public Thickness Padding
+               {
+                       get { return (Thickness)GetValue(PaddingElement.PaddingProperty); }
+                       set { SetValue(PaddingElement.PaddingProperty, value); }
+               }
+
+               public bool CascadeInputTransparent
+               {
+                       get { return (bool)GetValue(CascadeInputTransparentProperty); }
+                       set { SetValue(CascadeInputTransparentProperty, value); }
+               }
+
+               Thickness IPaddingElement.PaddingDefaultValueCreator()
+               {
+                       return default(Thickness);
+               }
+
+               void IPaddingElement.OnPaddingPropertyChanged(Thickness oldValue, Thickness newValue)
+               {
+                       UpdateChildrenLayout();
+               }
+
+               internal ObservableCollection<Element> InternalChildren { get; } = new ObservableCollection<Element>();
+
+               internal override ReadOnlyCollection<Element> LogicalChildrenInternal
+               {
+                       get { return _logicalChildren ?? (_logicalChildren = new ReadOnlyCollection<Element>(InternalChildren)); }
+               }
+
+               public event EventHandler LayoutChanged;
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public IReadOnlyList<Element> Children
+               {
+                       get { return InternalChildren; }
+               }
+
+               public void ForceLayout()
+               {
+                       //SizeAllocated(Width, Height);
+               }
+
+               [Obsolete("OnSizeRequest is obsolete as of version 2.2.0. Please use OnMeasure instead.")]
+               // public sealed override SizeRequest GetSizeRequest(double widthConstraint, double heightConstraint)
+               // {
+               //      SizeRequest size = base.GetSizeRequest(widthConstraint - Padding.HorizontalThickness, heightConstraint - Padding.VerticalThickness);
+               //      return new SizeRequest(new Size(size.Request.Width + Padding.HorizontalThickness, size.Request.Height + Padding.VerticalThickness, 0),
+               //              new Size(size.Minimum.Width + Padding.HorizontalThickness, size.Minimum.Height + Padding.VerticalThickness, 0));
+               // }
+
+               public static void LayoutChildIntoBoundingRegion(/*VisualElement*/BaseHandle child, Rectangle region)
+               {
+                       //var parent = child.Parent as IFlowDirectionController;
+                       bool isRightToLeft = false;
+                       //if (parent != null && (isRightToLeft = parent.EffectiveFlowDirection.IsRightToLeft()))
+                               //region = new Rectangle(parent.Width - region.Right, region.Y, region.Width, region.Height);
+
+                       var view = child as View;
+                       if (view == null)
+                       {
+                               //child.Layout(region);
+                               return;
+                       }
+
+                       //LayoutOptions horizontalOptions = view.HorizontalOptions;
+                       // if (horizontalOptions.Alignment != LayoutAlignment.Fill)
+                       // {
+                       //      SizeRequest request = child.Measure(region.Width, region.Height, MeasureFlags.IncludeMargins);
+                       //      double diff = Math.Max(0, region.Width - request.Request.Width);
+                       //      double horizontalAlign = horizontalOptions.Alignment.ToDouble();
+                       //      if (isRightToLeft)
+                       //              horizontalAlign = 1 - horizontalAlign;
+                       //      region.X += (int)(diff * horizontalAlign);
+                       //      region.Width -= diff;
+                       // }
+
+                       // LayoutOptions verticalOptions = view.VerticalOptions;
+                       // if (verticalOptions.Alignment != LayoutAlignment.Fill)
+                       // {
+                       //      SizeRequest request = child.Measure(region.Width, region.Height, MeasureFlags.IncludeMargins);
+                       //      double diff = Math.Max(0, region.Height - request.Request.Height);
+                       //      region.Y += (int)(diff * verticalOptions.Alignment.ToDouble());
+                       //      region.Height -= diff;
+                       // }
+
+                       // Thickness margin = view.Margin;
+                       // region.X += margin.Left;
+                       // region.Width -= margin.HorizontalThickness;
+                       // region.Y += margin.Top;
+                       // region.Height -= margin.VerticalThickness;
+
+                       // child.Layout(region);
+               }
+
+               public void LowerChild(View view)
+               {
+                       if (!InternalChildren.Contains(view) || InternalChildren.First() == view)
+                               return;
+
+                       InternalChildren.Move(InternalChildren.IndexOf(view), 0);
+                       // OnChildrenReordered();
+               }
+
+               public void RaiseChild(View view)
+               {
+                       if (!InternalChildren.Contains(view) || InternalChildren.Last() == view)
+                               return;
+
+                       InternalChildren.Move(InternalChildren.IndexOf(view), InternalChildren.Count - 1);
+                       // OnChildrenReordered();
+               }
+
+               protected virtual void InvalidateLayout()
+               {
+                       _hasDoneLayout = false;
+                       // InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged);
+                       if (!_hasDoneLayout)
+                               ForceLayout();
+               }
+
+               protected abstract void LayoutChildren(double x, double y, double width, double height);
+
+               protected void OnChildMeasureInvalidated(object sender, EventArgs e)
+               {
+                       InvalidationTrigger trigger = (e as InvalidationEventArgs)?.Trigger ?? InvalidationTrigger.Undefined;
+                       OnChildMeasureInvalidated((/*VisualElement*/BaseHandle)sender, trigger);
+                       OnChildMeasureInvalidated();
+               }
+
+               protected virtual void OnChildMeasureInvalidated()
+               {
+               }
+
+               // protected override void OnSizeAllocated(double width, double height)
+               // {
+               //      _allocatedFlag = true;
+               //      base.OnSizeAllocated(width, height);
+               //      UpdateChildrenLayout();
+               // }
+
+               protected virtual bool ShouldInvalidateOnChildAdded(View child)
+               {
+                       return true;
+               }
+
+               protected virtual bool ShouldInvalidateOnChildRemoved(View child)
+               {
+                       return true;
+               }
+
+               protected void UpdateChildrenLayout()
+               {
+                       _hasDoneLayout = true;
+
+                       if (!ShouldLayoutChildren())
+                               return;
+
+                       var oldBounds = new Rectangle[LogicalChildrenInternal.Count];
+                       for (var index = 0; index < oldBounds.Length; index++)
+                       {
+                               var c = (/*VisualElement*/BaseHandle)LogicalChildrenInternal[index];
+                               // oldBounds[index] = c.Bounds;
+                       }
+
+                       // double width = Width;
+                       // double height = Height;
+
+                       // double x = Padding.Left;
+                       // double y = Padding.Top;
+                       // double w = Math.Max(0, width - Padding.HorizontalThickness);
+                       // double h = Math.Max(0, height - Padding.VerticalThickness);
+
+                       // var isHeadless = CompressedLayout.GetIsHeadless(this);
+                       // var headlessOffset = CompressedLayout.GetHeadlessOffset(this);
+                       // for (var i = 0; i < LogicalChildrenInternal.Count; i++)
+                       //      CompressedLayout.SetHeadlessOffset((/*VisualElement*/BaseHandle)LogicalChildrenInternal[i], isHeadless ? new Point(headlessOffset.X + Bounds.X, headlessOffset.Y + Bounds.Y) : new Point());
+
+                       // LayoutChildren(x, y, w, h);
+
+                       // for (var i = 0; i < oldBounds.Length; i++)
+                       // {
+                       //      Rectangle oldBound = oldBounds[i];
+                       //      Rectangle newBound = ((/*VisualElement*/BaseHandle)LogicalChildrenInternal[i]).Bounds;
+                       //      if (oldBound != newBound)
+                       //      {
+                       //              LayoutChanged?.Invoke(this, EventArgs.Empty);
+                       //              return;
+                       //      }
+                       // }
+
+                       // _lastLayoutSize = new Size((float)width, (float)height, 0);
+               }
+
+               internal static void LayoutChildIntoBoundingRegion(View child, Rectangle region, SizeRequest childSizeRequest)
+               {
+                       // var parent = child.Parent as IFlowDirectionController;
+                       bool isRightToLeft = false;
+                       // if (parent != null && (isRightToLeft = parent.EffectiveFlowDirection.IsRightToLeft()))
+                       //      region = new Rectangle(parent.Width - region.Right, region.Y, region.Width, region.Height);
+
+                       // if (region.Size != childSizeRequest.Request)
+                       // {
+                       //      bool canUseAlreadyDoneRequest = region.Width >= childSizeRequest.Request.Width && region.Height >= childSizeRequest.Request.Height;
+
+                       //      LayoutOptions horizontalOptions = child.HorizontalOptions;
+                       //      if (horizontalOptions.Alignment != LayoutAlignment.Fill)
+                       //      {
+                       //              SizeRequest request = canUseAlreadyDoneRequest ? childSizeRequest : child.Measure(region.Width, region.Height, MeasureFlags.IncludeMargins);
+                       //              double diff = Math.Max(0, region.Width - request.Request.Width);
+                       //              double horizontalAlign = horizontalOptions.Alignment.ToDouble();
+                       //              if (isRightToLeft)
+                       //                      horizontalAlign = 1 - horizontalAlign;
+                       //              region.X += (int)(diff * horizontalAlign);
+                       //              region.Width -= diff;
+                       //      }
+
+                       //      LayoutOptions verticalOptions = child.VerticalOptions;
+                       //      if (verticalOptions.Alignment != LayoutAlignment.Fill)
+                       //      {
+                       //              SizeRequest request = canUseAlreadyDoneRequest ? childSizeRequest : child.Measure(region.Width, region.Height, MeasureFlags.IncludeMargins);
+                       //              double diff = Math.Max(0, region.Height - request.Request.Height);
+                       //              region.Y += (int)(diff * verticalOptions.Alignment.ToDouble());
+                       //              region.Height -= diff;
+                       //      }
+                       // }
+
+                       // Thickness margin = child.Margin;
+                       // region.X += margin.Left;
+                       // region.Width -= margin.HorizontalThickness;
+                       // region.Y += margin.Top;
+                       // region.Height -= margin.VerticalThickness;
+
+                       // child.Layout(region);
+               }
+
+               internal virtual void OnChildMeasureInvalidated(/*VisualElement*/BaseHandle child, InvalidationTrigger trigger)
+               {
+                       ReadOnlyCollection<Element> children = LogicalChildrenInternal;
+                       int count = children.Count;
+                       for (var index = 0; index < count; index++)
+                       {
+                               var v = LogicalChildrenInternal[index] as /*VisualElement*/BaseHandle;
+                               // if (v != null && v.IsVisible && (!v.IsPlatformEnabled || !v.IsNativeStateConsistent))
+                                       return;
+                       }
+
+                       var view = child as View;
+                       if (view != null)
+                       {
+                               // we can ignore the request if we are either fully constrained or when the size request changes and we were already fully constrainted
+                               // if ((trigger == InvalidationTrigger.MeasureChanged && view.Constraint == LayoutConstraint.Fixed) ||
+                               //      (trigger == InvalidationTrigger.SizeRequestChanged && view.ComputedConstraint == LayoutConstraint.Fixed))
+                               // {
+                               //      return;
+                               // }
+                               // if (trigger == InvalidationTrigger.HorizontalOptionsChanged || trigger == InvalidationTrigger.VerticalOptionsChanged)
+                               // {
+                               //      ComputeConstraintForView(view);
+                               // }
+                       }
+
+                       _allocatedFlag = false;
+                       if (trigger == InvalidationTrigger.RendererReady)
+                       {
+                               // InvalidateMeasureInternal(InvalidationTrigger.RendererReady);
+                       }
+                       else
+                       {
+                               // InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged);
+                       }
+
+                       s_resolutionList.Add(new KeyValuePair<Layout, int>(this, GetElementDepth(this)));
+                       if (!s_relayoutInProgress)
+                       {
+                               s_relayoutInProgress = true;
+                               Device.BeginInvokeOnMainThread(() =>
+                               {
+                                       // if thread safety mattered we would need to lock this and compareexchange above
+                                       IList<KeyValuePair<Layout, int>> copy = s_resolutionList;
+                                       s_resolutionList = new List<KeyValuePair<Layout, int>>();
+                                       s_relayoutInProgress = false;
+
+                                       foreach (KeyValuePair<Layout, int> kvp in copy.OrderBy(kvp => kvp.Value))
+                                       {
+                                               Layout layout = kvp.Key;
+                                               // double width = layout.Width, height = layout.Height;
+                                               // if (!layout._allocatedFlag && width >= 0 && height >= 0)
+                                               // {
+                                               //      layout.SizeAllocated(width, height);
+                                               // }
+                                       }
+                               });
+                       }
+               }
+
+               // internal override void OnIsVisibleChanged(bool oldValue, bool newValue)
+               // {
+               //      base.OnIsVisibleChanged(oldValue, newValue);
+               //      if (newValue)
+               //      {
+               //              if (_lastLayoutSize != new Size(Width, Height))
+               //              {
+               //                      UpdateChildrenLayout();
+               //              }
+               //      }
+               // }
+
+               static int GetElementDepth(Element view)
+               {
+                       var result = 0;
+                       while (view.Parent != null)
+                       {
+                               result++;
+                               view = view.Parent;
+                       }
+                       return result;
+               }
+
+               void InternalChildrenOnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
+               {
+                       if (e.Action == NotifyCollectionChangedAction.Move)
+                       {
+                               return;
+                       }
+
+                       if (e.OldItems != null)
+                       {
+                               foreach (object item in e.OldItems)
+                               {
+                                       var v = item as View;
+                                       if (v == null)
+                                               continue;
+
+                                       OnInternalRemoved(v);
+                               }
+                       }
+
+                       if (e.NewItems != null)
+                       {
+                               foreach (object item in e.NewItems)
+                               {
+                                       var v = item as View;
+                                       if (v == null)
+                                               continue;
+
+                                       if (item == this)
+                                               throw new InvalidOperationException("Can not add self to own child collection.");
+
+                                       OnInternalAdded(v);
+                               }
+                       }
+               }
+
+               void OnInternalAdded(View view)
+               {
+                       var parent = view.Parent as Layout;
+                       parent?.InternalChildren.Remove(view);
+
+                       OnChildAdded(view);
+                       if (ShouldInvalidateOnChildAdded(view))
+                               InvalidateLayout();
+
+                       // view.MeasureInvalidated += OnChildMeasureInvalidated;
+               }
+
+               void OnInternalRemoved(View view)
+               {
+                       // view.MeasureInvalidated -= OnChildMeasureInvalidated;
+
+                       OnChildRemoved(view);
+                       if (ShouldInvalidateOnChildRemoved(view))
+                               InvalidateLayout();
+               }
+
+               bool ShouldLayoutChildren()
+               {
+                       // if (Width <= 0 || Height <= 0 || !LogicalChildrenInternal.Any() || !IsVisible || !IsNativeStateConsistent || DisableLayout)
+                       //      return false;
+
+                       // foreach (Element element in VisibleDescendants())
+                       // {
+                       //      var visual = element as /*VisualElement*/BaseHandle;
+                       //      if (visual == null || !visual.IsVisible)
+                       //              continue;
+
+                       //      if (!visual.IsPlatformEnabled || !visual.IsNativeStateConsistent)
+                       //      {
+                       //              return false;
+                       //      }
+                       // }
+                       return true;
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/LayoutAlignment.cs b/src/Tizen.NUI/src/internal/XamlBinding/LayoutAlignment.cs
new file mode 100755 (executable)
index 0000000..1cdc107
--- /dev/null
@@ -0,0 +1,13 @@
+using System;
+
+namespace Tizen.NUI.Binding
+{
+       [Flags]
+       internal enum LayoutAlignment
+       {
+               Start = 0,
+               Center = 1,
+               End = 2,
+               Fill = 3
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/LayoutExpandFlag.cs b/src/Tizen.NUI/src/internal/XamlBinding/LayoutExpandFlag.cs
new file mode 100755 (executable)
index 0000000..3c06b90
--- /dev/null
@@ -0,0 +1,10 @@
+using System;
+
+namespace Tizen.NUI.Binding
+{
+       [Flags]
+       internal enum LayoutExpandFlag
+       {
+               Expand = 4
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/LayoutOptions.cs b/src/Tizen.NUI/src/internal/XamlBinding/LayoutOptions.cs
new file mode 100755 (executable)
index 0000000..874f5df
--- /dev/null
@@ -0,0 +1,39 @@
+using System;
+
+namespace Tizen.NUI.Binding
+{
+       [TypeConverter(typeof(LayoutOptionsConverter))]
+       internal struct LayoutOptions
+       {
+               int _flags;
+
+               public static readonly LayoutOptions Start = new LayoutOptions(LayoutAlignment.Start, false);
+               public static readonly LayoutOptions Center = new LayoutOptions(LayoutAlignment.Center, false);
+               public static readonly LayoutOptions End = new LayoutOptions(LayoutAlignment.End, false);
+               public static readonly LayoutOptions Fill = new LayoutOptions(LayoutAlignment.Fill, false);
+               public static readonly LayoutOptions StartAndExpand = new LayoutOptions(LayoutAlignment.Start, true);
+               public static readonly LayoutOptions CenterAndExpand = new LayoutOptions(LayoutAlignment.Center, true);
+               public static readonly LayoutOptions EndAndExpand = new LayoutOptions(LayoutAlignment.End, true);
+               public static readonly LayoutOptions FillAndExpand = new LayoutOptions(LayoutAlignment.Fill, true);
+
+               public LayoutOptions(LayoutAlignment alignment, bool expands)
+               {
+                       var a = (int)alignment;
+                       if (a < 0 || a > 3)
+                               throw new ArgumentOutOfRangeException();
+                       _flags = (int)alignment | (expands ? (int)LayoutExpandFlag.Expand : 0);
+               }
+
+               public LayoutAlignment Alignment
+               {
+                       get { return (LayoutAlignment)(_flags & 3); }
+                       set { _flags = (_flags & ~3) | (int)value; }
+               }
+
+               public bool Expands
+               {
+                       get { return (_flags & (int)LayoutExpandFlag.Expand) != 0; }
+                       set { _flags = (_flags & 3) | (value ? (int)LayoutExpandFlag.Expand : 0); }
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/LayoutOptionsConverter.cs b/src/Tizen.NUI/src/internal/XamlBinding/LayoutOptionsConverter.cs
new file mode 100755 (executable)
index 0000000..7c83c4c
--- /dev/null
@@ -0,0 +1,39 @@
+using System;
+using System.Linq;
+using System.Reflection;
+using Tizen.NUI.Internals;
+
+using Tizen.NUI;
+
+namespace Tizen.NUI.Binding
+{
+       // [Xaml.ProvideCompiled("Xamarin.Forms.Core.XamlC.LayoutOptionsConverter")]
+       [Xaml.TypeConversion(typeof(LayoutOptions))]
+       internal sealed class LayoutOptionsConverter : TypeConverter
+       {
+               public override object ConvertFromInvariantString(string value)
+               {
+                       if (value != null) {
+                               var parts = value.Split('.');
+                               if (parts.Length > 2 || (parts.Length == 2 && parts [0] != "LayoutOptions"))
+                                       throw new InvalidOperationException($"Cannot convert \"{value}\" into {typeof(LayoutOptions)}");
+                               value = parts [parts.Length - 1];
+                               switch (value) {
+                               case "Start": return LayoutOptions.Start;
+                               case "Center": return LayoutOptions.Center;
+                               case "End": return LayoutOptions.End;
+                               case "Fill": return LayoutOptions.Fill;
+                               case "StartAndExpand": return LayoutOptions.StartAndExpand;
+                               case "CenterAndExpand": return LayoutOptions.CenterAndExpand;
+                               case "EndAndExpand": return LayoutOptions.EndAndExpand;
+                               case "FillAndExpand": return LayoutOptions.FillAndExpand;
+                               }
+                               FieldInfo field = typeof(LayoutOptions).GetFields().FirstOrDefault(fi => fi.IsStatic && fi.Name == value);
+                               if (field != null)
+                                       return (LayoutOptions)field.GetValue(null);
+                       }
+
+                       throw new InvalidOperationException($"Cannot convert \"{value}\" into {typeof(LayoutOptions)}");
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/ListStringTypeConverter.cs b/src/Tizen.NUI/src/internal/XamlBinding/ListStringTypeConverter.cs
new file mode 100755 (executable)
index 0000000..dbae53f
--- /dev/null
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace Tizen.NUI.Binding
+{
+       // [Xaml.ProvideCompiled("Tizen.NUI.Core.XamlC.ListStringTypeConverter")]
+       [Xaml.TypeConversion(typeof(List<string>))]
+       internal class ListStringTypeConverter : TypeConverter
+       {
+               public override object ConvertFromInvariantString(string value)
+               {
+                       if (value == null)
+                               return null;
+                       
+                       return value.Split(new [] { ',' }, StringSplitOptions.RemoveEmptyEntries).Select(s => s.Trim()).ToList();
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/MenuItem.cs b/src/Tizen.NUI/src/internal/XamlBinding/MenuItem.cs
new file mode 100755 (executable)
index 0000000..3843a5d
--- /dev/null
@@ -0,0 +1,134 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Windows.Input;
+
+namespace Tizen.NUI.Binding
+{
+
+       internal class MenuItem : BaseMenuItem, IMenuItemController
+       {
+               public static readonly BindableProperty AcceleratorProperty = BindableProperty.CreateAttached(nameof(Accelerator), typeof(Accelerator), typeof(MenuItem), null);
+
+               public static Accelerator GetAccelerator(BindableObject bindable) => (Accelerator)bindable.GetValue(AcceleratorProperty);
+
+               public static void SetAccelerator(BindableObject bindable, Accelerator value) => bindable.SetValue(AcceleratorProperty, value);
+
+               public static readonly BindableProperty TextProperty = BindableProperty.Create("Text", typeof(string), typeof(MenuItem), null);
+
+               public static readonly BindableProperty CommandProperty = BindableProperty.Create("Command", typeof(ICommand), typeof(MenuItem), null,
+                       propertyChanging: (bo, o, n) => ((MenuItem)bo).OnCommandChanging(), propertyChanged: (bo, o, n) => ((MenuItem)bo).OnCommandChanged());
+
+               public static readonly BindableProperty CommandParameterProperty = BindableProperty.Create("CommandParameter", typeof(object), typeof(MenuItem), null,
+                       propertyChanged: (bo, o, n) => ((MenuItem)bo).OnCommandParameterChanged());
+
+               public static readonly BindableProperty IsDestructiveProperty = BindableProperty.Create("IsDestructive", typeof(bool), typeof(MenuItem), false);
+
+               public static readonly BindableProperty IconProperty = BindableProperty.Create("Icon", typeof(FileImageSource), typeof(MenuItem), default(FileImageSource));
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public static readonly BindableProperty IsEnabledProperty = BindableProperty.Create("IsEnabled", typeof(bool), typeof(ToolbarItem), true);
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public string IsEnabledPropertyName
+               {
+                       get
+                       {
+                               return IsEnabledProperty.PropertyName;
+                       }
+               }
+
+               public ICommand Command
+               {
+                       get { return (ICommand)GetValue(CommandProperty); }
+                       set { SetValue(CommandProperty, value); }
+               }
+
+               public object CommandParameter
+               {
+                       get { return GetValue(CommandParameterProperty); }
+                       set { SetValue(CommandParameterProperty, value); }
+               }
+
+               public FileImageSource Icon
+               {
+                       get { return (FileImageSource)GetValue(IconProperty); }
+                       set { SetValue(IconProperty, value); }
+               }
+
+               public bool IsDestructive
+               {
+                       get { return (bool)GetValue(IsDestructiveProperty); }
+                       set { SetValue(IsDestructiveProperty, value); }
+               }
+
+               public string Text
+               {
+                       get { return (string)GetValue(TextProperty); }
+                       set { SetValue(TextProperty, value); }
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public bool IsEnabled
+               {
+                       get { return (bool)GetValue(IsEnabledProperty); }
+                       set { SetValue(IsEnabledProperty, value); }
+               }
+
+               bool IsEnabledCore
+               {
+                       set { SetValueCore(IsEnabledProperty, value); }
+               }
+
+               public event EventHandler Clicked;
+
+               protected virtual void OnClicked()
+                       => Clicked?.Invoke(this, EventArgs.Empty);
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public void Activate()
+               {
+                       if (Command != null)
+                       {
+                               if (IsEnabled)
+                                       Command.Execute(CommandParameter);
+                       }
+
+                       OnClicked();
+               }
+
+               void OnCommandCanExecuteChanged(object sender, EventArgs eventArgs)
+               {
+                       IsEnabledCore = Command.CanExecute(CommandParameter);
+               }
+
+               void OnCommandChanged()
+               {
+                       if (Command == null)
+                       {
+                               IsEnabledCore = true;
+                               return;
+                       }
+
+                       IsEnabledCore = Command.CanExecute(CommandParameter);
+
+                       Command.CanExecuteChanged += OnCommandCanExecuteChanged;
+               }
+
+               void OnCommandChanging()
+               {
+                       if (Command == null)
+                               return;
+
+                       Command.CanExecuteChanged -= OnCommandCanExecuteChanged;
+               }
+
+               void OnCommandParameterChanged()
+               {
+                       if (Command == null)
+                               return;
+
+                       IsEnabledCore = Command.CanExecute(CommandParameter);
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/MessagingCenter.cs b/src/Tizen.NUI/src/internal/XamlBinding/MessagingCenter.cs
new file mode 100755 (executable)
index 0000000..ea4b2c6
--- /dev/null
@@ -0,0 +1,262 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+
+namespace Tizen.NUI.Binding
+{
+       internal interface IMessagingCenter
+       {
+               void Send<TSender, TArgs>(TSender sender, string message, TArgs args) where TSender : class;
+
+               void Send<TSender>(TSender sender, string message) where TSender : class;
+
+               void Subscribe<TSender, TArgs>(object subscriber, string message, Action<TSender, TArgs> callback, TSender source = null) where TSender : class;
+
+               void Subscribe<TSender>(object subscriber, string message, Action<TSender> callback, TSender source = null) where TSender : class;
+
+               void Unsubscribe<TSender, TArgs>(object subscriber, string message) where TSender : class;
+
+               void Unsubscribe<TSender>(object subscriber, string message) where TSender : class;
+       }
+
+       internal class MessagingCenter : IMessagingCenter
+       {
+               public static IMessagingCenter Instance { get; } = new MessagingCenter();
+
+               class Sender : Tuple<string, Type, Type>
+               {
+                       public Sender(string message, Type senderType, Type argType) : base(message, senderType, argType)
+                       {
+                       }
+               }
+
+               delegate bool Filter(object sender);
+
+               class MaybeWeakReference
+               {
+                       WeakReference DelegateWeakReference { get; }
+                       object DelegateStrongReference { get; }
+
+                       readonly bool _isStrongReference;
+
+                       public MaybeWeakReference(object subscriber, object delegateSource)
+                       {
+                               if (subscriber.Equals(delegateSource))
+                               {
+                                       // The target is the subscriber; we can use a weakreference
+                                       DelegateWeakReference = new WeakReference(delegateSource);
+                                       _isStrongReference = false;
+                               }
+                               else
+                               {
+                                       DelegateStrongReference = delegateSource;
+                                       _isStrongReference = true;
+                               }
+                       }
+
+                       public object Target => _isStrongReference ? DelegateStrongReference : DelegateWeakReference.Target;
+                       public bool IsAlive => _isStrongReference || DelegateWeakReference.IsAlive;
+               }
+
+               class Subscription : Tuple<WeakReference, MaybeWeakReference, MethodInfo, Filter>
+               {
+                       public Subscription(object subscriber, object delegateSource, MethodInfo methodInfo, Filter filter)
+                               : base(new WeakReference(subscriber), new MaybeWeakReference(subscriber, delegateSource), methodInfo, filter)
+                       {
+                       }
+
+                       public WeakReference Subscriber => Item1;
+                       MaybeWeakReference DelegateSource => Item2;
+                       MethodInfo MethodInfo => Item3;
+                       Filter Filter => Item4;
+
+                       public void InvokeCallback(object sender, object args)
+                       {
+                               if (!Filter(sender))
+                               {
+                                       return;
+                               }
+
+                               if (MethodInfo.IsStatic)
+                               {
+                                       MethodInfo.Invoke(null, MethodInfo.GetParameters().Length == 1 ? new[] { sender } : new[] { sender, args });
+                                       return;
+                               }
+
+                               var target = DelegateSource.Target;
+
+                               if (target == null)
+                               {
+                                       return; // Collected 
+                               }
+
+                               MethodInfo.Invoke(target, MethodInfo.GetParameters().Length == 1 ? new[] { sender } : new[] { sender, args });
+                       }
+
+                       public bool CanBeRemoved()
+                       {
+                               return !Subscriber.IsAlive || !DelegateSource.IsAlive;
+                       }
+               }
+
+               readonly Dictionary<Sender, List<Subscription>> _subscriptions =
+                       new Dictionary<Sender, List<Subscription>>();
+
+               public static void Send<TSender, TArgs>(TSender sender, string message, TArgs args) where TSender : class
+               {
+                       Instance.Send(sender, message, args);
+               }
+
+               void IMessagingCenter.Send<TSender, TArgs>(TSender sender, string message, TArgs args)
+               {
+                       if (sender == null)
+                               throw new ArgumentNullException(nameof(sender));
+                       InnerSend(message, typeof(TSender), typeof(TArgs), sender, args);
+               }
+
+               public static void Send<TSender>(TSender sender, string message) where TSender : class
+               {
+                       Instance.Send(sender, message);
+               }
+
+               void IMessagingCenter.Send<TSender>(TSender sender, string message)
+               {
+                       if (sender == null)
+                               throw new ArgumentNullException(nameof(sender));
+                       InnerSend(message, typeof(TSender), null, sender, null);
+               }
+
+               public static void Subscribe<TSender, TArgs>(object subscriber, string message, Action<TSender, TArgs> callback, TSender source = null) where TSender : class
+               {
+                       Instance.Subscribe(subscriber, message, callback, source);
+               }
+
+               void IMessagingCenter.Subscribe<TSender, TArgs>(object subscriber, string message, Action<TSender, TArgs> callback, TSender source)
+               {
+                       if (subscriber == null)
+                               throw new ArgumentNullException(nameof(subscriber));
+                       if (callback == null)
+                               throw new ArgumentNullException(nameof(callback));
+
+                       var target = callback.Target;
+
+                       Filter filter = sender =>
+                       {
+                               var send = (TSender)sender;
+                               return (source == null || send == source);
+                       };
+
+                       InnerSubscribe(subscriber, message, typeof(TSender), typeof(TArgs), target, callback.GetMethodInfo(), filter);
+               }
+
+               public static void Subscribe<TSender>(object subscriber, string message, Action<TSender> callback, TSender source = null) where TSender : class
+               {
+                       Instance.Subscribe(subscriber, message, callback, source);
+               }
+
+               void IMessagingCenter.Subscribe<TSender>(object subscriber, string message, Action<TSender> callback, TSender source)
+               {
+                       if (subscriber == null)
+                               throw new ArgumentNullException(nameof(subscriber));
+                       if (callback == null)
+                               throw new ArgumentNullException(nameof(callback));
+
+                       var target = callback.Target;
+
+                       Filter filter = sender =>
+                       {
+                               var send = (TSender)sender;
+                               return (source == null || send == source);
+                       };
+
+                       InnerSubscribe(subscriber, message, typeof(TSender), null, target, callback.GetMethodInfo(), filter);
+               }
+
+               public static void Unsubscribe<TSender, TArgs>(object subscriber, string message) where TSender : class
+               {
+                       Instance.Unsubscribe<TSender, TArgs>(subscriber, message);
+               }
+
+               void IMessagingCenter.Unsubscribe<TSender, TArgs>(object subscriber, string message)
+               {
+                       InnerUnsubscribe(message, typeof(TSender), typeof(TArgs), subscriber);
+               }
+
+               public static void Unsubscribe<TSender>(object subscriber, string message) where TSender : class
+               {
+                       Instance.Unsubscribe<TSender>(subscriber, message);
+               }
+
+               void IMessagingCenter.Unsubscribe<TSender>(object subscriber, string message)
+               {
+                       InnerUnsubscribe(message, typeof(TSender), null, subscriber);
+               }
+
+               void InnerSend(string message, Type senderType, Type argType, object sender, object args)
+               {
+                       if (message == null)
+                               throw new ArgumentNullException(nameof(message));
+                       var key = new Sender(message, senderType, argType);
+                       if (!_subscriptions.ContainsKey(key))
+                               return;
+                       List<Subscription> subcriptions = _subscriptions[key];
+                       if (subcriptions == null || !subcriptions.Any())
+                               return; // should not be reachable
+
+                       // ok so this code looks a bit funky but here is the gist of the problem. It is possible that in the course
+                       // of executing the callbacks for this message someone will subscribe/unsubscribe from the same message in
+                       // the callback. This would invalidate the enumerator. To work around this we make a copy. However if you unsubscribe 
+                       // from a message you can fairly reasonably expect that you will therefor not receive a call. To fix this we then
+                       // check that the item we are about to send the message to actually exists in the live list.
+                       List<Subscription> subscriptionsCopy = subcriptions.ToList();
+                       foreach (Subscription subscription in subscriptionsCopy)
+                       {
+                               if (subscription.Subscriber.Target != null && subcriptions.Contains(subscription))
+                               {
+                                       subscription.InvokeCallback(sender, args);
+                               }
+                       }
+               }
+
+               void InnerSubscribe(object subscriber, string message, Type senderType, Type argType, object target, MethodInfo methodInfo, Filter filter)
+               {
+                       if (message == null)
+                               throw new ArgumentNullException(nameof(message));
+                       var key = new Sender(message, senderType, argType);
+                       var value = new Subscription(subscriber, target, methodInfo, filter);
+                       if (_subscriptions.ContainsKey(key))
+                       {
+                               _subscriptions[key].Add(value);
+                       }
+                       else
+                       {
+                               var list = new List<Subscription> { value };
+                               _subscriptions[key] = list;
+                       }
+               }
+
+               void InnerUnsubscribe(string message, Type senderType, Type argType, object subscriber)
+               {
+                       if (subscriber == null)
+                               throw new ArgumentNullException(nameof(subscriber));
+                       if (message == null)
+                               throw new ArgumentNullException(nameof(message));
+
+                       var key = new Sender(message, senderType, argType);
+                       if (!_subscriptions.ContainsKey(key))
+                               return;
+                       _subscriptions[key].RemoveAll(sub => sub.CanBeRemoved() || sub.Subscriber.Target == subscriber);
+                       if (!_subscriptions[key].Any())
+                               _subscriptions.Remove(key);
+               }
+
+               // This is a bit gross; it only exists to support the unit tests in PageTests
+               // because the implementations of ActionSheet, Alert, and IsBusy are all very
+               // tightly coupled to the MessagingCenter singleton 
+               internal static void ClearSubscribers()
+               {
+                       (Instance as MessagingCenter)?._subscriptions.Clear();
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/ModalEventArgs.cs b/src/Tizen.NUI/src/internal/XamlBinding/ModalEventArgs.cs
new file mode 100755 (executable)
index 0000000..1d9de91
--- /dev/null
@@ -0,0 +1,14 @@
+using System;
+
+namespace Tizen.NUI.Binding
+{
+       internal abstract class ModalEventArgs : EventArgs
+       {
+               protected ModalEventArgs(Page modal)
+               {
+                       Modal = modal;
+               }
+
+               public Page Modal { get; private set; }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/ModalPoppedEventArgs.cs b/src/Tizen.NUI/src/internal/XamlBinding/ModalPoppedEventArgs.cs
new file mode 100755 (executable)
index 0000000..834619f
--- /dev/null
@@ -0,0 +1,9 @@
+namespace Tizen.NUI.Binding
+{
+       internal class ModalPoppedEventArgs : ModalEventArgs
+       {
+               public ModalPoppedEventArgs(Page modal) : base(modal)
+               {
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/ModalPoppingEventArgs.cs b/src/Tizen.NUI/src/internal/XamlBinding/ModalPoppingEventArgs.cs
new file mode 100755 (executable)
index 0000000..dd9b2d3
--- /dev/null
@@ -0,0 +1,11 @@
+namespace Tizen.NUI.Binding
+{
+       internal class ModalPoppingEventArgs : ModalEventArgs
+       {
+               public ModalPoppingEventArgs(Page modal) : base(modal)
+               {
+               }
+
+               public bool Cancel { get; set; }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/ModalPushedEventArgs.cs b/src/Tizen.NUI/src/internal/XamlBinding/ModalPushedEventArgs.cs
new file mode 100755 (executable)
index 0000000..91abe97
--- /dev/null
@@ -0,0 +1,9 @@
+namespace Tizen.NUI.Binding
+{
+       internal class ModalPushedEventArgs : ModalEventArgs
+       {
+               public ModalPushedEventArgs(Page modal) : base(modal)
+               {
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/ModalPushingEventArgs.cs b/src/Tizen.NUI/src/internal/XamlBinding/ModalPushingEventArgs.cs
new file mode 100755 (executable)
index 0000000..013ec53
--- /dev/null
@@ -0,0 +1,9 @@
+namespace Tizen.NUI.Binding
+{
+       internal class ModalPushingEventArgs : ModalEventArgs
+       {
+               public ModalPushingEventArgs(Page modal) : base(modal)
+               {
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/NUIConstantExtension.cs b/src/Tizen.NUI/src/internal/XamlBinding/NUIConstantExtension.cs
new file mode 100755 (executable)
index 0000000..682350e
--- /dev/null
@@ -0,0 +1,142 @@
+using System;
+using Tizen.NUI;
+using Tizen.NUI.Binding;
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Binding
+{
+    internal static class VisualExtension
+    {
+        public static Dictionary<string, int> KeyDictionary = new Dictionary<string, int>()
+        {
+            // Visual.Property
+            { "Visual.Property.Type", Visual.Property.Type },
+            { "Visual.Property.Shader", Visual.Property.Shader },
+            { "Visual.Property.Transform", Visual.Property.Transform },
+            { "Visual.Property.PremultipliedAlpha", Visual.Property.PremultipliedAlpha },
+            { "Visual.Property.MixColor", Visual.Property.MixColor },
+            { "Visual.Property.Opacity", Visual.Property.Opacity },
+            // ShaderProperty
+            { "Visual.ShaderProperty.VertexShader", Visual.ShaderProperty.VertexShader },
+            { "Visual.ShaderProperty.FragmentShader", Visual.ShaderProperty.FragmentShader },
+            { "Visual.ShaderProperty.ShaderSubdivideGridX", Visual.ShaderProperty.ShaderSubdivideGridX },
+            { "Visual.ShaderProperty.ShaderSubdivideGridY", Visual.ShaderProperty.ShaderSubdivideGridY },
+            { "Visual.ShaderProperty.ShaderHints", Visual.ShaderProperty.ShaderHints },
+            // BorderVisualProperty
+            { "BorderVisualProperty.Color", BorderVisualProperty.Color },
+            { "BorderVisualProperty.Size", BorderVisualProperty.Size },
+            { "BorderVisualProperty.AntiAliasing", BorderVisualProperty.AntiAliasing },
+            // ColorVisualProperty
+            { "ColorVisualProperty.MixColor", ColorVisualProperty.MixColor},
+            // GradientVisualProperty
+            { "GradientVisualProperty.StartPosition", GradientVisualProperty.StartPosition },
+            { "GradientVisualProperty.EndPosition", GradientVisualProperty.EndPosition },
+            { "GradientVisualProperty.Center", GradientVisualProperty.Center },
+            { "GradientVisualProperty.Radius", GradientVisualProperty.Radius },
+            { "GradientVisualProperty.StopOffset", GradientVisualProperty.StopOffset },
+            { "GradientVisualProperty.StopColor", GradientVisualProperty.StopColor },
+            { "GradientVisualProperty.Units", GradientVisualProperty.Units },
+            { "GradientVisualProperty.SpreadMethod", GradientVisualProperty.SpreadMethod },
+            // ImageVisualProperty
+            { "ImageVisualProperty.URL", ImageVisualProperty.URL },
+            { "ImageVisualProperty.AlphaMaskURL", ImageVisualProperty.AlphaMaskURL },
+            { "ImageVisualProperty.FittingMode", ImageVisualProperty.FittingMode },
+            { "ImageVisualProperty.SamplingMode", ImageVisualProperty.SamplingMode },
+            { "ImageVisualProperty.DesiredWidth", ImageVisualProperty.DesiredWidth },
+            { "ImageVisualProperty.DesiredHeight", ImageVisualProperty.DesiredHeight },
+            { "ImageVisualProperty.SynchronousLoading", ImageVisualProperty.SynchronousLoading },
+            { "ImageVisualProperty.BorderOnly", ImageVisualProperty.BorderOnly },
+            { "ImageVisualProperty.PixelArea", ImageVisualProperty.PixelArea },
+            { "ImageVisualProperty.WrapModeU", ImageVisualProperty.WrapModeU },
+            { "ImageVisualProperty.WrapModeV", ImageVisualProperty.WrapModeV },
+            { "ImageVisualProperty.Border", ImageVisualProperty.Border },
+            { "ImageVisualProperty.MaskContentScale", ImageVisualProperty.MaskContentScale },
+            { "ImageVisualProperty.CropToMask", ImageVisualProperty.CropToMask },
+            { "ImageVisualProperty.BatchSize", ImageVisualProperty.BatchSize },
+            { "ImageVisualProperty.CacheSize", ImageVisualProperty.CacheSize },
+            { "ImageVisualProperty.FrameDelay", ImageVisualProperty.FrameDelay },
+            { "ImageVisualProperty.LoopCount", ImageVisualProperty.LoopCount },
+            { "ImageVisualProperty.ReleasePolicy", ImageVisualProperty.ReleasePolicy },
+            { "ImageVisualProperty.LoadPolicy", ImageVisualProperty.LoadPolicy },
+            { "ImageVisualProperty.OrientationCorrection", ImageVisualProperty.OrientationCorrection },
+            { "ImageVisualProperty.AuxiliaryImageURL", ImageVisualProperty.AuxiliaryImageURL },
+            { "ImageVisualProperty.AuxiliaryImageAlpha", ImageVisualProperty.AuxiliaryImageAlpha },
+            // MeshVisualProperty
+            { "MeshVisualProperty.ObjectURL", MeshVisualProperty.ObjectURL },
+            { "MeshVisualProperty.MaterialtURL", MeshVisualProperty.MaterialtURL },
+            { "MeshVisualProperty.TexturesPath", MeshVisualProperty.TexturesPath },
+            { "MeshVisualProperty.ShadingMode", MeshVisualProperty.ShadingMode },
+            { "MeshVisualProperty.UseMipmapping", MeshVisualProperty.UseMipmapping },
+            { "MeshVisualProperty.UseSoftNormals", MeshVisualProperty.UseSoftNormals },
+            { "MeshVisualProperty.LightPosition", MeshVisualProperty.LightPosition },
+            // PrimitiveVisualProperty
+            { "PrimitiveVisualProperty.Shape", PrimitiveVisualProperty.Shape },
+            { "PrimitiveVisualProperty.MixColor", PrimitiveVisualProperty.MixColor },
+            { "PrimitiveVisualProperty.Slices", PrimitiveVisualProperty.Slices },
+            { "PrimitiveVisualProperty.Stacks", PrimitiveVisualProperty.Stacks },
+            { "PrimitiveVisualProperty.ScaleTopRadius", PrimitiveVisualProperty.ScaleTopRadius },
+            { "PrimitiveVisualProperty.ScaleBottomRadius", PrimitiveVisualProperty.ScaleBottomRadius },
+            { "PrimitiveVisualProperty.ScaleHeight", PrimitiveVisualProperty.ScaleHeight },
+            { "PrimitiveVisualProperty.ScaleRadius", PrimitiveVisualProperty.ScaleRadius },
+            { "PrimitiveVisualProperty.ScaleDimensions", PrimitiveVisualProperty.ScaleDimensions },
+            { "PrimitiveVisualProperty.BevelPercentage", PrimitiveVisualProperty.BevelPercentage },
+            { "PrimitiveVisualProperty.BevelSmoothness", PrimitiveVisualProperty.BevelSmoothness },
+            { "PrimitiveVisualProperty.LightPosition", PrimitiveVisualProperty.LightPosition },
+            // TextVisualProperty
+            { "TextVisualProperty.Text", TextVisualProperty.Text },
+            { "TextVisualProperty.FontFamily", TextVisualProperty.FontFamily },
+            { "TextVisualProperty.FontStyle", TextVisualProperty.FontStyle },
+            { "TextVisualProperty.PointSize", TextVisualProperty.PointSize },
+            { "TextVisualProperty.MultiLine", TextVisualProperty.MultiLine },
+            { "TextVisualProperty.HorizontalAlignment", TextVisualProperty.HorizontalAlignment },
+            { "TextVisualProperty.VerticalAlignment", TextVisualProperty.VerticalAlignment },
+            { "TextVisualProperty.TextColor", TextVisualProperty.TextColor },
+            { "TextVisualProperty.EnableMarkup", TextVisualProperty.EnableMarkup },
+            // NpatchImageVisualProperty
+            { "NpatchImageVisualProperty.URL", NpatchImageVisualProperty.URL },
+            { "NpatchImageVisualProperty.FittingMode", NpatchImageVisualProperty.FittingMode },
+            { "NpatchImageVisualProperty.SamplingMode", NpatchImageVisualProperty.SamplingMode },
+            { "NpatchImageVisualProperty.DesiredWidth", NpatchImageVisualProperty.DesiredWidth },
+            { "NpatchImageVisualProperty.DesiredHeight", NpatchImageVisualProperty.DesiredHeight },
+            { "NpatchImageVisualProperty.SynchronousLoading", NpatchImageVisualProperty.SynchronousLoading },
+            { "NpatchImageVisualProperty.BorderOnly", NpatchImageVisualProperty.BorderOnly },
+            { "NpatchImageVisualProperty.PixelArea", NpatchImageVisualProperty.PixelArea },
+            { "NpatchImageVisualProperty.WrapModeU", NpatchImageVisualProperty.WrapModeU },
+            { "NpatchImageVisualProperty.WrapModeV", NpatchImageVisualProperty.WrapModeV },
+            { "NpatchImageVisualProperty.Border", NpatchImageVisualProperty.Border },
+            // HiddenInputProperty
+            { "HiddenInputProperty.Mode", HiddenInputProperty.Mode },
+            { "HiddenInputProperty.SubstituteCharacter", HiddenInputProperty.SubstituteCharacter },
+            { "HiddenInputProperty.SubstituteCount", HiddenInputProperty.SubstituteCount },
+            { "HiddenInputProperty.ShowLastCharacterDuration", HiddenInputProperty.ShowLastCharacterDuration },
+        };
+    }
+
+    internal enum VisualTypeExtension
+    {
+        Border = Visual.Type.Border,
+        Color = Visual.Type.Color,
+        Gradient = Visual.Type.Gradient,
+        Image = Visual.Type.Image,
+        Mesh = Visual.Type.Mesh,
+        Primitive = Visual.Type.Primitive,
+        Wireframe = Visual.Type.Wireframe,
+        Text = Visual.Type.Text,
+        NPatch = Visual.Type.NPatch,
+        SVG = Visual.Type.SVG,
+        AnimatedImage = Visual.Type.AnimatedImage
+    }
+    
+    internal enum VisualAlignTypeExtension
+    {
+        TopBegin = Visual.AlignType.TopBegin,
+        TopCenter = Visual.AlignType.TopCenter,
+        TopEnd = Visual.AlignType.TopEnd,
+        CenterBegin = Visual.AlignType.CenterBegin,
+        Center = Visual.AlignType.Center,
+        CenterEnd = Visual.AlignType.CenterEnd,
+        BottomBegin = Visual.AlignType.BottomBegin,
+        BottomCenter = Visual.AlignType.BottomCenter,
+        BottomEnd = Visual.AlignType.BottomEnd
+    }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/NameScopeExtensions.cs b/src/Tizen.NUI/src/internal/XamlBinding/NameScopeExtensions.cs
new file mode 100755 (executable)
index 0000000..54390fe
--- /dev/null
@@ -0,0 +1,17 @@
+using Tizen.NUI.Internals;
+
+namespace Tizen.NUI.Binding
+{
+    internal static class NameScopeExtensions
+    {
+        public static T FindByName<T>(this Element element, string name)
+        {
+            return ((INameScope)element).FindByName<T>(name);
+        }
+
+        internal static T FindByName<T>(this INameScope namescope, string name)
+        {
+            return (T)namescope.FindByName(name);
+        }
+    }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/NamedSize.cs b/src/Tizen.NUI/src/internal/XamlBinding/NamedSize.cs
new file mode 100755 (executable)
index 0000000..a6f0078
--- /dev/null
@@ -0,0 +1,11 @@
+namespace Tizen.NUI.Binding
+{
+       internal enum NamedSize
+       {
+               Default = 0,
+               Micro = 1,
+               Small = 2,
+               Medium = 3,
+               Large = 4
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/NavigationMenu.cs b/src/Tizen.NUI/src/internal/XamlBinding/NavigationMenu.cs
new file mode 100755 (executable)
index 0000000..5660976
--- /dev/null
@@ -0,0 +1,82 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Binding
+{
+       // Mark as internal until renderers are ready for release after 1.0
+       // [RenderWith(typeof(_NavigationMenuRenderer))]
+       [EditorBrowsable(EditorBrowsableState.Never)]
+       internal class NavigationMenu : View, /*INavigationMenuController,*/ IElementConfiguration<NavigationMenu>
+       {
+               readonly List<Page> _targets = new List<Page>();
+
+               readonly Lazy<PlatformConfigurationRegistry<NavigationMenu>> _platformConfigurationRegistry;
+
+               public NavigationMenu()
+               {
+                       _platformConfigurationRegistry = new Lazy<PlatformConfigurationRegistry<NavigationMenu>>(() => new PlatformConfigurationRegistry<NavigationMenu>(this));
+               }
+
+               public IEnumerable<Page> Targets
+               {
+                       get { return _targets; }
+                       set
+                       {
+                               if (_targets.AsEnumerable().SequenceEqual(value))
+                                       return;
+
+                               foreach (Page page in value)
+                               {
+                                       VerifyTarget(page);
+                               }
+
+                               OnPropertyChanging();
+                               _targets.Clear();
+                               _targets.AddRange(value);
+                               OnPropertyChanged();
+                       }
+               }
+
+               public void Add(Page target)
+               {
+                       if (_targets.Contains(target))
+                               return;
+                       VerifyTarget(target);
+
+                       OnPropertyChanging("Targets");
+                       _targets.Add(target);
+                       OnPropertyChanged("Targets");
+               }
+
+               public void Remove(Page target)
+               {
+                       if (_targets.Contains(target))
+                       {
+                               OnPropertyChanging("Targets");
+                               if (_targets.Remove(target))
+                                       OnPropertyChanged("Targets");
+                       }
+               }
+
+               public IPlatformElementConfiguration<T, NavigationMenu> On<T>() where T : IConfigPlatform
+               {
+                       return _platformConfigurationRegistry.Value.On<T>();
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public void SendTargetSelected(Page target)
+               {
+                       Navigation.PushAsync(target);
+               }
+
+               void VerifyTarget(Page target)
+               {
+                       if (target.Icon == null || string.IsNullOrWhiteSpace(target.Icon.File))
+                               throw new Exception("Icon must be set for each page before adding them to a Navigation Menu");
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/NavigationModel.cs b/src/Tizen.NUI/src/internal/XamlBinding/NavigationModel.cs
new file mode 100755 (executable)
index 0000000..dbb6d3f
--- /dev/null
@@ -0,0 +1,180 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+
+namespace Tizen.NUI.Binding
+{
+       [EditorBrowsable(EditorBrowsableState.Never)]
+       internal class NavigationModel
+       {
+               readonly List<Page> _modalStack = new List<Page>();
+               readonly List<List<Page>> _navTree = new List<List<Page>>();
+
+               public Page CurrentPage
+               {
+                       get
+                       {
+                               if (_navTree.Any())
+                                       return _navTree.Last().Last();
+                               return null;
+                       }
+               }
+
+               public IEnumerable<Page> Modals
+               {
+                       get { return _modalStack; }
+               }
+
+               public IEnumerable<Page> Roots
+               {
+                       get
+                       {
+                               foreach (List<Page> list in _navTree)
+                               {
+                                       yield return list[0];
+                               }
+                       }
+               }
+
+               public IReadOnlyList<IReadOnlyList<Page>> Tree
+               {
+                       get { return _navTree; }
+               }
+
+               public void Clear()
+               {
+                       _navTree.Clear();
+                       _modalStack.Clear();
+               }
+
+               public void InsertPageBefore(Page page, Page before)
+               {
+                       List<Page> currentStack = _navTree.Last();
+                       int index = currentStack.IndexOf(before);
+
+                       if (index == -1)
+                               throw new ArgumentException("before must be in the current navigation context");
+
+                       currentStack.Insert(index, page);
+               }
+
+               public Page Pop(Page ancestralNav)
+               {
+                       ancestralNav = AncestorToRoot(ancestralNav);
+                       foreach (List<Page> stack in _navTree)
+                       {
+                               if (stack.Contains(ancestralNav))
+                               {
+                                       if (stack.Count <= 1)
+                                               throw new InvalidNavigationException("Can not pop final item in stack");
+                                       Page result = stack.Last();
+                                       stack.Remove(result);
+                                       return result;
+                               }
+                       }
+
+                       throw new InvalidNavigationException("Popped from unpushed item?");
+               }
+
+               public Page PopModal()
+               {
+                       if (_navTree.Count <= 1)
+                               throw new InvalidNavigationException("Can't pop modal without any modals pushed");
+                       Page modal = _navTree.Last().First();
+                       _modalStack.Remove(modal);
+                       _navTree.Remove(_navTree.Last());
+                       return modal;
+               }
+
+               public Page PopTopPage()
+               {
+                       Page itemToRemove;
+                       if (_navTree.Count == 1)
+                       {
+                               if (_navTree[0].Count > 1)
+                               {
+                                       itemToRemove = _navTree[0].Last();
+                                       _navTree[0].Remove(itemToRemove);
+                                       return itemToRemove;
+                               }
+                               return null;
+                       }
+                       itemToRemove = _navTree.Last().Last();
+                       _navTree.Last().Remove(itemToRemove);
+                       if (!_navTree.Last().Any())
+                       {
+                               _navTree.RemoveAt(_navTree.Count - 1);
+                       }
+                       return itemToRemove;
+               }
+
+               public void PopToRoot(Page ancestralNav)
+               {
+                       ancestralNav = AncestorToRoot(ancestralNav);
+                       foreach (List<Page> stack in _navTree)
+                       {
+                               if (stack.Contains(ancestralNav))
+                               {
+                                       if (stack.Count <= 1)
+                                               throw new InvalidNavigationException("Can not pop final item in stack");
+                                       stack.RemoveRange(1, stack.Count - 1);
+                                       return;
+                               }
+                       }
+
+                       throw new InvalidNavigationException("Popped from unpushed item?");
+               }
+
+               public void Push(Page page, Page ancestralNav)
+               {
+                       if (ancestralNav == null)
+                       {
+                               if (_navTree.Any())
+                                       throw new InvalidNavigationException("Ancestor must be provided for all pushes except first");
+                               _navTree.Add(new List<Page> { page });
+                               return;
+                       }
+
+                       ancestralNav = AncestorToRoot(ancestralNav);
+
+                       foreach (List<Page> stack in _navTree)
+                       {
+                               if (stack.Contains(ancestralNav))
+                               {
+                                       stack.Add(page);
+                                       return;
+                               }
+                       }
+
+                       throw new InvalidNavigationException("Invalid ancestor passed");
+               }
+
+               public void PushModal(Page page)
+               {
+                       _navTree.Add(new List<Page> { page });
+                       _modalStack.Add(page);
+               }
+
+               public bool RemovePage(Page page)
+               {
+                       bool found;
+                       List<Page> currentStack = _navTree.Last();
+                       var i = 0;
+                       while (!(found = currentStack.Remove(page)) && i < _navTree.Count - 1)
+                       {
+                               currentStack = _navTree[i++];
+                       }
+
+                       return found;
+               }
+
+               Page AncestorToRoot(Page ancestor)
+               {
+                       Page result = ancestor;
+                       // while (!Application.IsApplicationOrNull(result.RealParent))
+                               result = (Page)result.RealParent;
+                       return result;
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/NullEffect.cs b/src/Tizen.NUI/src/internal/XamlBinding/NullEffect.cs
new file mode 100755 (executable)
index 0000000..334ee62
--- /dev/null
@@ -0,0 +1,13 @@
+namespace Tizen.NUI.Binding
+{
+       internal class NullEffect : Effect
+       {
+               protected override void OnAttached()
+               {
+               }
+
+               protected override void OnDetached()
+               {
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/ObservableWrapper.cs b/src/Tizen.NUI/src/internal/XamlBinding/ObservableWrapper.cs
new file mode 100755 (executable)
index 0000000..f2abf9a
--- /dev/null
@@ -0,0 +1,256 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Collections.Specialized;
+using System.Linq;
+
+namespace Tizen.NUI.Binding
+{
+       internal class ObservableWrapper<TTrack, TRestrict> : IList<TRestrict>, INotifyCollectionChanged where TTrack : Element where TRestrict : TTrack
+       {
+               readonly ObservableCollection<TTrack> _list;
+
+               public ObservableWrapper(ObservableCollection<TTrack> list)
+               {
+                       if (list == null)
+                               throw new ArgumentNullException("list");
+
+                       _list = list;
+
+                       list.CollectionChanged += ListOnCollectionChanged;
+               }
+
+               public void Add(TRestrict item)
+               {
+                       if (item == null)
+                               throw new ArgumentNullException("item");
+                       if (IsReadOnly)
+                               throw new NotSupportedException("The collection is read-only.");
+
+                       if (_list.Contains(item))
+                               return;
+
+                       item.Owned = true;
+                       _list.Add(item);
+               }
+
+               public void Clear()
+               {
+                       if (IsReadOnly)
+                               throw new NotSupportedException("The collection is read-only.");
+
+                       foreach (TRestrict item in _list.OfType<TRestrict>().ToArray())
+                       {
+                               _list.Remove(item);
+                               item.Owned = false;
+                       }
+               }
+
+               public bool Contains(TRestrict item)
+               {
+                       return item.Owned && _list.Contains(item);
+               }
+
+               public void CopyTo(TRestrict[] array, int destIndex)
+               {
+                       if (array.Length - destIndex < Count)
+                               throw new ArgumentException("Destination array was not long enough. Check destIndex and length, and the array's lower bounds.");
+                       foreach (TRestrict item in this)
+                       {
+                               array[destIndex] = item;
+                               destIndex++;
+                       }
+               }
+
+               public int Count
+               {
+                       get { return _list.Where(i => i.Owned).OfType<TRestrict>().Count(); }
+               }
+
+               public bool IsReadOnly { get; internal set; }
+
+               public bool Remove(TRestrict item)
+               {
+                       if (item == null)
+                               throw new ArgumentNullException("item");
+                       if (IsReadOnly)
+                               throw new NotSupportedException("The collection is read-only.");
+
+                       if (!item.Owned)
+                               return false;
+
+                       if (_list.Remove(item))
+                       {
+                               item.Owned = false;
+                               return true;
+                       }
+                       return false;
+               }
+
+               IEnumerator IEnumerable.GetEnumerator()
+               {
+                       return GetEnumerator();
+               }
+
+               public IEnumerator<TRestrict> GetEnumerator()
+               {
+                       return _list.Where(i => i.Owned).OfType<TRestrict>().GetEnumerator();
+               }
+
+               public int IndexOf(TRestrict value)
+               {
+                       int innerIndex = _list.IndexOf(value);
+                       if (innerIndex == -1)
+                               return -1;
+                       return ToOuterIndex(innerIndex);
+               }
+
+               public void Insert(int index, TRestrict item)
+               {
+                       if (item == null)
+                               throw new ArgumentNullException("item");
+                       if (IsReadOnly)
+                               throw new NotSupportedException("The collection is read-only.");
+
+                       item.Owned = true;
+                       _list.Insert(ToInnerIndex(index), item);
+               }
+
+               public TRestrict this[int index]
+               {
+                       get { return (TRestrict)_list[ToInnerIndex(index)]; }
+                       set
+                       {
+                               int innerIndex = ToInnerIndex(index);
+                               if (value != null)
+                                       value.Owned = true;
+                               TTrack old = _list[innerIndex];
+                               _list[innerIndex] = value;
+
+                               if (old != null)
+                                       old.Owned = false;
+                       }
+               }
+
+               public void RemoveAt(int index)
+               {
+                       if (IsReadOnly)
+                               throw new NotSupportedException("The collection is read-only");
+                       int innerIndex = ToInnerIndex(index);
+                       TTrack item = _list[innerIndex];
+                       if (item.Owned)
+                       {
+                               _list.RemoveAt(innerIndex);
+                               item.Owned = false;
+                       }
+               }
+
+               public event NotifyCollectionChangedEventHandler CollectionChanged;
+
+               void ListOnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
+               {
+                       NotifyCollectionChangedEventHandler handler = CollectionChanged;
+                       if (handler == null)
+                               return;
+
+                       switch (e.Action)
+                       {
+                               case NotifyCollectionChangedAction.Add:
+                                       if (e.NewStartingIndex == -1 || e.NewItems.Count > 1)
+                                               goto case NotifyCollectionChangedAction.Reset;
+
+                                       var newItem = e.NewItems[0] as TRestrict;
+                                       if (newItem == null || !newItem.Owned)
+                                               break;
+
+                                       int outerIndex = ToOuterIndex(e.NewStartingIndex);
+                                       handler(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, e.NewItems, outerIndex));
+                                       break;
+                               case NotifyCollectionChangedAction.Move:
+                                       if (e.NewStartingIndex == -1 || e.OldStartingIndex == -1 || e.NewItems.Count > 1)
+                                               goto case NotifyCollectionChangedAction.Reset;
+
+                                       var movedItem = e.NewItems[0] as TRestrict;
+                                       if (movedItem == null || !movedItem.Owned)
+                                               break;
+
+                                       int outerOldIndex = ToOuterIndex(e.OldStartingIndex);
+                                       int outerNewIndex = ToOuterIndex(e.NewStartingIndex);
+                                       handler(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Move, e.NewItems, outerNewIndex, outerOldIndex));
+                                       break;
+                               case NotifyCollectionChangedAction.Remove:
+                                       if (e.OldStartingIndex == -1 || e.OldItems.Count > 1)
+                                               goto case NotifyCollectionChangedAction.Reset;
+
+                                       var removedItem = e.OldItems[0] as TRestrict;
+                                       if (removedItem == null || !removedItem.Owned)
+                                               break;
+
+                                       int outerRemovedIndex = ToOuterIndex(e.OldStartingIndex);
+                                       var args = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, removedItem, outerRemovedIndex);
+                                       handler(this, args);
+                                       break;
+                               case NotifyCollectionChangedAction.Replace:
+                                       if (e.NewStartingIndex == -1 || e.OldStartingIndex == -1 || e.NewItems.Count > 1)
+                                               goto case NotifyCollectionChangedAction.Reset;
+
+                                       var newReplaceItem = e.NewItems[0] as TRestrict;
+                                       var oldReplaceItem = e.OldItems[0] as TRestrict;
+
+                                       if ((newReplaceItem == null || !newReplaceItem.Owned) && (oldReplaceItem == null || !oldReplaceItem.Owned))
+                                       {
+                                               break;
+                                       }
+                                       if (newReplaceItem == null || !newReplaceItem.Owned || oldReplaceItem == null || !oldReplaceItem.Owned)
+                                       {
+                                               goto case NotifyCollectionChangedAction.Reset;
+                                       }
+
+                                       int index = ToOuterIndex(e.NewStartingIndex);
+
+                                       var replaceArgs = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Replace, newReplaceItem, oldReplaceItem, index);
+                                       handler(this, replaceArgs);
+                                       break;
+                               case NotifyCollectionChangedAction.Reset:
+                                       handler(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
+                                       break;
+                               default:
+                                       throw new ArgumentOutOfRangeException();
+                       }
+               }
+
+               int ToInnerIndex(int outterIndex)
+               {
+                       var outerIndex = 0;
+                       int innerIndex;
+                       for (innerIndex = 0; innerIndex < _list.Count; innerIndex++)
+                       {
+                               TTrack item = _list[innerIndex];
+                               if (item is TRestrict && item.Owned)
+                               {
+                                       if (outerIndex == outterIndex)
+                                               return innerIndex;
+                                       outerIndex++;
+                               }
+                       }
+
+                       return innerIndex;
+               }
+
+               int ToOuterIndex(int innerIndex)
+               {
+                       var outerIndex = 0;
+                       for (var index = 0; index < innerIndex; index++)
+                       {
+                               TTrack item = _list[index];
+                               if (item is TRestrict && item.Owned)
+                               {
+                                       outerIndex++;
+                               }
+                       }
+
+                       return outerIndex;
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/OnIdiom.cs b/src/Tizen.NUI/src/internal/XamlBinding/OnIdiom.cs
new file mode 100755 (executable)
index 0000000..a17ee98
--- /dev/null
@@ -0,0 +1,35 @@
+using Tizen.NUI.Internals;
+
+namespace Tizen.NUI.Binding
+{
+       internal class OnIdiom<T>
+       {
+               public T Phone { get; set; }
+
+               public T Tablet { get; set; }
+               
+               public T Desktop { get; set; }
+
+               public T TV { get; set; }
+
+               public T Watch { get; set; }
+
+               public static implicit operator T(OnIdiom<T> onIdiom)
+               {
+                       switch (Device.Idiom)
+                       {
+                               default:
+                               case TargetIdiom.Phone:
+                                       return onIdiom.Phone;
+                               case TargetIdiom.Tablet:
+                                       return onIdiom.Tablet;
+                               case TargetIdiom.Desktop:
+                                       return onIdiom.Desktop;
+                               case TargetIdiom.TV:
+                                       return onIdiom.TV;
+                               case TargetIdiom.Watch:
+                                       return onIdiom.Watch;
+                       }
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/OnPlatform.cs b/src/Tizen.NUI/src/internal/XamlBinding/OnPlatform.cs
new file mode 100755 (executable)
index 0000000..a476ea7
--- /dev/null
@@ -0,0 +1,91 @@
+using System;
+using System.Collections.Generic;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Binding
+{
+       [ContentProperty("Platforms")]
+       internal class OnPlatform<T>
+       {
+               public OnPlatform()
+               {
+                       Platforms = new List<On>();
+               }
+
+               bool useLegacyFallback;
+               T android;
+               [Obsolete]
+               public T Android {
+                       get { return android; }
+                       set {
+                               useLegacyFallback = true;
+                               android = value;
+                       }
+               }
+
+               T ios;
+               [Obsolete]
+               public T iOS {
+                       get { return ios; }
+                       set {
+                               useLegacyFallback = true;
+                               ios = value;
+                       }
+               }
+
+               T winPhone;
+               [Obsolete]
+               public T WinPhone {
+                       get { return winPhone; }
+                       set {
+                               useLegacyFallback = true;
+                               winPhone = value;
+                       }
+               }
+
+               bool hasDefault;
+               T @default;
+               public T Default {
+                       get { return @default; }
+                       set {
+                               hasDefault = true;
+                               @default = value;
+                       }
+               }
+
+               public IList<On> Platforms { get; private set; }
+
+#pragma warning disable RECS0108 // Warns about static fields in generic types
+               static readonly IValueConverterProvider s_valueConverter = DependencyService.Get<IValueConverterProvider>();
+#pragma warning restore RECS0108 // Warns about static fields in generic types
+
+               public static implicit operator T(OnPlatform<T> onPlatform)
+               {
+                       foreach (var onPlat in onPlatform.Platforms) {
+                               if (onPlat.Platform == null)
+                                       continue;
+                               if (!onPlat.Platform.Contains(Device.RuntimePlatform))
+                                       continue;
+                               if (s_valueConverter == null)
+                                       continue;
+                               return (T)s_valueConverter.Convert(onPlat.Value, typeof(T), null, null);
+                       }
+
+                       if (!onPlatform.useLegacyFallback)
+                               return onPlatform.hasDefault ? onPlatform.@default : default(T);
+
+                       //legacy fallback
+#pragma warning disable 0618, 0612
+                       return Device.OnPlatform(iOS: onPlatform.iOS, Android: onPlatform.Android, WinPhone: onPlatform.WinPhone);
+#pragma warning restore 0618, 0612
+               }
+       }
+
+       [ContentProperty("Value")]
+       internal class On
+       {
+               [TypeConverter(typeof(ListStringTypeConverter))]
+               public IList<string> Platform { get; set; }
+               public object Value { get; set; }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/PaddingElement.cs b/src/Tizen.NUI/src/internal/XamlBinding/PaddingElement.cs
new file mode 100755 (executable)
index 0000000..a4556be
--- /dev/null
@@ -0,0 +1,64 @@
+namespace Tizen.NUI.Binding
+{
+       static class PaddingElement
+       {
+               public static readonly BindableProperty PaddingProperty =
+                       BindableProperty.Create(nameof(IPaddingElement.Padding), typeof(Thickness), typeof(IPaddingElement), default(Thickness),
+                                                                       propertyChanged: OnPaddingPropertyChanged,
+                                                                       defaultValueCreator: PaddingDefaultValueCreator);
+
+               static void OnPaddingPropertyChanged(BindableObject bindable, object oldValue, object newValue)
+               {
+                       ((IPaddingElement)bindable).OnPaddingPropertyChanged((Thickness)oldValue, (Thickness)newValue);
+               }
+
+               static object PaddingDefaultValueCreator(BindableObject bindable)
+               {
+                       return ((IPaddingElement)bindable).PaddingDefaultValueCreator();
+               }
+
+               public static readonly BindableProperty PaddingLeftProperty =
+                       BindableProperty.Create("PaddingLeft", typeof(double), typeof(IPaddingElement), default(double),
+                                                                       propertyChanged: OnPaddingLeftChanged);
+
+               static void OnPaddingLeftChanged(BindableObject bindable, object oldValue, object newValue)
+               {
+                       var padding = (Thickness)bindable.GetValue(PaddingProperty);
+                       padding.Left = (double)newValue;
+                       bindable.SetValue(PaddingProperty, padding);
+               }
+
+               public static readonly BindableProperty PaddingTopProperty =
+                       BindableProperty.Create("PaddingTop", typeof(double), typeof(IPaddingElement), default(double),
+                                                                       propertyChanged: OnPaddingTopChanged);
+
+               static void OnPaddingTopChanged(BindableObject bindable, object oldValue, object newValue)
+               {
+                       var padding = (Thickness)bindable.GetValue(PaddingProperty);
+                       padding.Top = (double)newValue;
+                       bindable.SetValue(PaddingProperty, padding);
+               }
+
+               public static readonly BindableProperty PaddingRightProperty =
+                       BindableProperty.Create("PaddingRight", typeof(double), typeof(IPaddingElement), default(double),
+                                                                       propertyChanged: OnPaddingRightChanged);
+
+               static void OnPaddingRightChanged(BindableObject bindable, object oldValue, object newValue)
+               {
+                       var padding = (Thickness)bindable.GetValue(PaddingProperty);
+                       padding.Right = (double)newValue;
+                       bindable.SetValue(PaddingProperty, padding);
+               }
+
+               public static readonly BindableProperty PaddingBottomProperty =
+                       BindableProperty.Create("PaddingBottom", typeof(double), typeof(IPaddingElement), default(double),
+                                                                       propertyChanged: OnPaddingBottomChanged);
+
+               static void OnPaddingBottomChanged(BindableObject bindable, object oldValue, object newValue)
+               {
+                       var padding = (Thickness)bindable.GetValue(PaddingProperty);
+                       padding.Bottom = (double)newValue;
+                       bindable.SetValue(PaddingProperty, padding);
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/ParameterAttribute.cs b/src/Tizen.NUI/src/internal/XamlBinding/ParameterAttribute.cs
new file mode 100755 (executable)
index 0000000..0d655fa
--- /dev/null
@@ -0,0 +1,15 @@
+using System;
+
+namespace Tizen.NUI.Binding
+{
+       [AttributeUsage(AttributeTargets.Parameter)]
+       internal sealed class ParameterAttribute : Attribute
+       {
+               public ParameterAttribute(string name)
+               {
+                       Name = name;
+               }
+
+               public string Name { get; }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/PlatformConfigurationRegistry.cs b/src/Tizen.NUI/src/internal/XamlBinding/PlatformConfigurationRegistry.cs
new file mode 100755 (executable)
index 0000000..f3afde2
--- /dev/null
@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Binding
+{
+       /// <summary>
+       /// Helper that handles storing and lookup of platform specifics implementations
+       /// </summary>
+       /// <typeparam name="TElement">The Element type</typeparam>
+       internal class PlatformConfigurationRegistry<TElement> : IElementConfiguration<TElement>
+               where TElement : Element
+       {
+               readonly TElement _element;
+               readonly Dictionary<Type, object> _platformSpecifics = new Dictionary<Type, object>();
+
+               internal PlatformConfigurationRegistry(TElement element)
+               {
+                       _element = element;
+               }
+
+
+               public IPlatformElementConfiguration<T, TElement> On<T>() where T : IConfigPlatform
+               {
+                       if (_platformSpecifics.ContainsKey(typeof(T)))
+                       {
+                               return (IPlatformElementConfiguration<T, TElement>)_platformSpecifics[typeof(T)];
+                       }
+
+                       var emptyConfig = Configuration<T, TElement>.Create(_element);
+
+                       _platformSpecifics.Add(typeof(T), emptyConfig);
+
+                       return emptyConfig;
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/PositionTypeConverter.cs b/src/Tizen.NUI/src/internal/XamlBinding/PositionTypeConverter.cs
new file mode 100755 (executable)
index 0000000..cf03bf3
--- /dev/null
@@ -0,0 +1,74 @@
+using System;
+using System.Linq;
+using System.Reflection;
+
+using Tizen.NUI;
+
+namespace Tizen.NUI.Binding
+{
+    internal class PositionTypeConverter : TypeConverter
+    {
+        public override object ConvertFromInvariantString(string value)
+        {
+            if (value != null)
+            {
+                string[] parts = value.Split('.');
+                if (parts.Length == 1 || ( parts.Length == 2 && (parts[0].Trim() == "ParentOrigin" || parts[0].Trim() == "PivotPoint") ))
+                {
+                    string position = parts[parts.Length - 1].Trim();
+
+                    switch(position)
+                    {
+                        case "Top":
+                            return ParentOrigin.Top;
+                        case "Bottom":
+                            return ParentOrigin.Bottom;
+                        case "Left":
+                            return ParentOrigin.Left;
+                        case "Right":
+                            return ParentOrigin.Right;
+                        case "Middle":
+                            return ParentOrigin.Middle;
+                        case "TopLeft":
+                            return ParentOrigin.TopLeft;
+                        case "TopCenter":
+                            return ParentOrigin.TopCenter;
+                        case "TopRight":
+                            return ParentOrigin.TopRight;
+                        case "CenterLeft":
+                            return ParentOrigin.CenterLeft;
+                        case "Center":
+                            return ParentOrigin.Center;
+                        case "CenterRight":
+                            return ParentOrigin.CenterRight;
+                        case "BottomLeft":
+                            return ParentOrigin.BottomLeft;
+                        case "BottomCenter":
+                            return ParentOrigin.BottomCenter;
+                        case "BottomRight":
+                            return ParentOrigin.BottomRight;
+                    }
+                }
+            }
+
+            throw new InvalidOperationException($"Cannot convert \"{value}\" into {typeof(Position)}");
+        }
+    }
+
+    internal class Position2DTypeConverter : TypeConverter
+    {
+        public override object ConvertFromInvariantString(string value)
+        {
+            if (value != null)
+            {
+                string[] parts = value.Split(',');
+                if (parts.Length == 2)
+                {
+                    return new Position2D(int.Parse(parts[0].Trim()), int.Parse(parts[1].Trim()));
+                }
+            }
+
+            throw new InvalidOperationException($"Cannot convert \"{value}\" into {typeof(Position2D)}");
+        }
+    }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/RectangleTypeConverter.cs b/src/Tizen.NUI/src/internal/XamlBinding/RectangleTypeConverter.cs
new file mode 100755 (executable)
index 0000000..cbf26cf
--- /dev/null
@@ -0,0 +1,26 @@
+using System;
+using System.Globalization;
+
+using Tizen.NUI;
+
+namespace Tizen.NUI.Binding
+{
+       // [Xaml.ProvideCompiled("Xamarin.Forms.Core.XamlC.RectangleTypeConverter")]
+       [Xaml.TypeConversion(typeof(Rectangle))]
+       internal class RectangleTypeConverter : TypeConverter
+       {
+               public override object ConvertFromInvariantString(string value)
+               {
+                       if (value != null)
+                       {
+                               double x, y, w, h;
+                               string[] xywh = value.Split(',');
+                               if (xywh.Length == 4 && double.TryParse(xywh[0], NumberStyles.Number, CultureInfo.InvariantCulture, out x) && double.TryParse(xywh[1], NumberStyles.Number, CultureInfo.InvariantCulture, out y) &&
+                                       double.TryParse(xywh[2], NumberStyles.Number, CultureInfo.InvariantCulture, out w) && double.TryParse(xywh[3], NumberStyles.Number, CultureInfo.InvariantCulture, out h))
+                                       return new Rectangle((int)x, (int)y, (int)w, (int)h);
+                       }
+
+                       throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", value, typeof(Rectangle)));
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Registrar.cs b/src/Tizen.NUI/src/internal/XamlBinding/Registrar.cs
new file mode 100755 (executable)
index 0000000..c999e0d
--- /dev/null
@@ -0,0 +1,236 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Reflection;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.Binding
+{
+       // Previewer uses reflection to bind to this method; Removal or modification of visibility will break previewer.
+       internal static class Registrar
+       {
+               internal static void RegisterAll(Type[] attrTypes) => Internals.Registrar.RegisterAll(attrTypes);
+       }
+}
+
+namespace Tizen.NUI.Internals
+{
+       [EditorBrowsable(EditorBrowsableState.Never)]
+       public class Registrar<TRegistrable> where TRegistrable : class
+       {
+               readonly Dictionary<Type, Type> _handlers = new Dictionary<Type, Type>();
+
+               public void Register(Type tview, Type trender)
+               {
+                       //avoid caching null renderers
+                       if (trender == null)
+                               return;
+                       _handlers[tview] = trender;
+               }
+
+               internal TRegistrable GetHandler(Type type)
+               {
+                       Type handlerType = GetHandlerType(type);
+                       if (handlerType == null)
+                               return null;
+
+                       object handler = DependencyResolver.ResolveOrCreate(handlerType);
+
+                       return (TRegistrable)handler;
+               }
+
+               internal TRegistrable GetHandler(Type type, params object[] args)
+               {
+                       if (args.Length == 0)
+                       {
+                               return GetHandler(type);
+                       }
+
+                       Type handlerType = GetHandlerType(type);
+                       if (handlerType == null)
+                               return null;
+
+                       return (TRegistrable)DependencyResolver.ResolveOrCreate(handlerType, args);
+               }
+
+               public TOut GetHandler<TOut>(Type type) where TOut : TRegistrable
+               {
+                       return (TOut)GetHandler(type);
+               }
+
+               public TOut GetHandler<TOut>(Type type, params object[] args) where TOut : TRegistrable
+               {
+                       return (TOut)GetHandler(type, args);
+               }
+
+               public TOut GetHandlerForObject<TOut>(object obj) where TOut : TRegistrable
+               {
+                       if (obj == null)
+                               throw new ArgumentNullException(nameof(obj));
+
+                       var reflectableType = obj as IReflectableType;
+                       var type = reflectableType != null ? reflectableType.GetTypeInfo().AsType() : obj.GetType();
+
+                       return (TOut)GetHandler(type);
+               }
+
+               public TOut GetHandlerForObject<TOut>(object obj, params object[] args) where TOut : TRegistrable
+               {
+                       if (obj == null)
+                               throw new ArgumentNullException(nameof(obj));
+
+                       var reflectableType = obj as IReflectableType;
+                       var type = reflectableType != null ? reflectableType.GetTypeInfo().AsType() : obj.GetType();
+
+                       return (TOut)GetHandler(type, args);
+               }
+
+               public Type GetHandlerType(Type viewType)
+               {
+                       Type type;
+                       if (LookupHandlerType(viewType, out type))
+                               return type;
+
+                       // lazy load render-view association with RenderWithAttribute (as opposed to using ExportRenderer)
+                       var attribute = viewType.GetTypeInfo().GetCustomAttribute<RenderWithAttribute>();
+                       if (attribute == null)
+                       {
+                               Register(viewType, null); // Cache this result so we don't have to do GetCustomAttribute again
+                               return null;
+                       }
+
+                       type = attribute.Type;
+
+                       if (type.Name.StartsWith("_", StringComparison.Ordinal))
+                       {
+                               // TODO: Remove attribute2 once renderer names have been unified across all platforms
+                               var attribute2 = type.GetTypeInfo().GetCustomAttribute<RenderWithAttribute>();
+                               if (attribute2 != null)
+                                       type = attribute2.Type;
+
+                               if (type.Name.StartsWith("_", StringComparison.Ordinal))
+                               {
+                                       Register(viewType, null); // Cache this result so we don't work through this chain again
+                                       return null;
+                               }
+                       }
+
+                       Register(viewType, type); // Register this so we don't have to look for the RenderWith Attibute again in the future
+
+                       return type;
+               }
+
+               public Type GetHandlerTypeForObject(object obj)
+               {
+                       if (obj == null)
+                               throw new ArgumentNullException(nameof(obj));
+
+                       var reflectableType = obj as IReflectableType;
+                       var type = reflectableType != null ? reflectableType.GetTypeInfo().AsType() : obj.GetType();
+
+                       return GetHandlerType(type);
+               }
+
+               bool LookupHandlerType(Type viewType, out Type handlerType)
+               {
+                       Type type = viewType;
+
+                       while (type != null)
+                       {
+                               if (_handlers.ContainsKey(type))
+                               {
+                                       handlerType = _handlers[type];
+                                       return true;
+                               }
+
+                               type = type.GetTypeInfo().BaseType;
+                       }
+
+                       handlerType = null;
+                       return false;
+               }
+       }
+
+       [EditorBrowsable(EditorBrowsableState.Never)]
+       internal static class Registrar
+       {
+               static Registrar()
+               {
+                       Registered = new Registrar<IRegisterable>();
+               }
+
+               internal static Dictionary<string, Type> Effects { get; } = new Dictionary<string, Type>();
+               internal static Dictionary<string, StyleSheets.StylePropertyAttribute> StyleProperties { get; } = new Dictionary<string, StyleSheets.StylePropertyAttribute>();
+
+               public static IEnumerable<Assembly> ExtraAssemblies { get; set; }
+
+               public static Registrar<IRegisterable> Registered { get; internal set; }
+
+               public static void RegisterAll(Type[] attrTypes)
+               {
+                       Assembly[] assemblies = Device.GetAssemblies();
+                       if (ExtraAssemblies != null)
+                               assemblies = assemblies.Union(ExtraAssemblies).ToArray();
+
+                       Assembly defaultRendererAssembly = Device.PlatformServices.GetType().GetTypeInfo().Assembly;
+                       int indexOfExecuting = Array.IndexOf(assemblies, defaultRendererAssembly);
+
+                       if (indexOfExecuting > 0)
+                       {
+                               assemblies[indexOfExecuting] = assemblies[0];
+                               assemblies[0] = defaultRendererAssembly;
+                       }
+
+                       // Don't use LINQ for performance reasons
+                       // Naive implementation can easily take over a second to run
+                       foreach (Assembly assembly in assemblies)
+                       {
+                               foreach (Type attrType in attrTypes)
+                               {
+                                       Attribute[] attributes;
+                                       try
+                                       {
+                                               attributes = assembly.GetCustomAttributes(attrType).ToArray();
+                                       }
+                                       catch (System.IO.FileNotFoundException)
+                                       {
+                                               // Sometimes the previewer doesn't actually have everything required for these loads to work
+                                               Console.WriteLine(nameof(Registrar), "Could not load assembly: {0} for Attibute {1} | Some renderers may not be loaded", assembly.FullName, attrType.FullName);
+                                               continue;
+                                       }
+                                       var length = attributes.Length;
+                                       for (var i = 0; i < length;i++)
+                                       {
+                                               var attribute = (HandlerAttribute)attributes[i];
+                                               if (attribute.ShouldRegister())
+                                                       Registered.Register(attribute.HandlerType, attribute.TargetType);
+                                       }
+                               }
+
+                               string resolutionName = assembly.FullName;
+                               var resolutionNameAttribute = (ResolutionGroupNameAttribute)assembly.GetCustomAttribute(typeof(ResolutionGroupNameAttribute));
+                               if (resolutionNameAttribute != null)
+                                       resolutionName = resolutionNameAttribute.ShortName;
+
+                               Attribute[] effectAttributes = assembly.GetCustomAttributes(typeof(ExportEffectAttribute)).ToArray();
+                               var exportEffectsLength = effectAttributes.Length;
+                               for (var i = 0; i < exportEffectsLength;i++)
+                               {
+                                       var effect = (ExportEffectAttribute)effectAttributes[i];
+                                       Effects [resolutionName + "." + effect.Id] = effect.Type;
+                               }
+
+                               Attribute[] styleAttributes = assembly.GetCustomAttributes(typeof(StyleSheets.StylePropertyAttribute)).ToArray();
+                               var stylePropertiesLength = styleAttributes.Length;
+                               for (var i = 0; i < stylePropertiesLength; i++)
+                               {
+                                       var attribute = (StyleSheets.StylePropertyAttribute)styleAttributes[i];
+                                       StyleProperties[attribute.CssPropertyName] = attribute;
+                               }
+                       }
+
+                       DependencyService.Initialize(assemblies);
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/RenderWithAttribute.cs b/src/Tizen.NUI/src/internal/XamlBinding/RenderWithAttribute.cs
new file mode 100755 (executable)
index 0000000..da04542
--- /dev/null
@@ -0,0 +1,15 @@
+using System;
+
+namespace Tizen.NUI.Binding
+{
+       [AttributeUsage(AttributeTargets.Class)]
+       internal sealed class RenderWithAttribute : Attribute
+       {
+               public RenderWithAttribute(Type type)
+               {
+                       Type = type;
+               }
+
+               public Type Type { get; }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/ResolutionGroupNameAttribute.cs b/src/Tizen.NUI/src/internal/XamlBinding/ResolutionGroupNameAttribute.cs
new file mode 100755 (executable)
index 0000000..1b49908
--- /dev/null
@@ -0,0 +1,15 @@
+using System;
+
+namespace Tizen.NUI.Binding
+{
+       [AttributeUsage(AttributeTargets.Assembly)]
+       internal class ResolutionGroupNameAttribute : Attribute
+       {
+               public ResolutionGroupNameAttribute(string name)
+               {
+                       ShortName = name;
+               }
+
+               internal string ShortName { get; private set; }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/ResourceDictionary.cs b/src/Tizen.NUI/src/internal/XamlBinding/ResourceDictionary.cs
new file mode 100755 (executable)
index 0000000..8407a9d
--- /dev/null
@@ -0,0 +1,365 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Collections.Specialized;
+using System.ComponentModel;
+using System.Globalization;
+using System.Linq;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+using Tizen.NUI.Internals;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Binding
+{
+       internal class ResourceDictionary : IResourceDictionary, IDictionary<string, object>
+       {
+               static ConditionalWeakTable<Type, ResourceDictionary> s_instances = new ConditionalWeakTable<Type, ResourceDictionary>();
+               readonly Dictionary<string, object> _innerDictionary = new Dictionary<string, object>();
+               ResourceDictionary _mergedInstance;
+               Type _mergedWith;
+               Uri _source;
+
+               [TypeConverter(typeof(TypeTypeConverter))]
+               [Obsolete("Use Source")]
+               public Type MergedWith {
+                       get { return _mergedWith; }
+                       set {
+                               if (_mergedWith == value)
+                                       return;
+
+                               if (_source != null)
+                                       throw new ArgumentException("MergedWith can not be used with Source");
+
+                               if (!typeof(ResourceDictionary).GetTypeInfo().IsAssignableFrom(value.GetTypeInfo()))
+                                       throw new ArgumentException("MergedWith should inherit from ResourceDictionary");
+
+                               _mergedWith = value;
+                               if (_mergedWith == null)
+                                       return;
+
+                               _mergedInstance = s_instances.GetValue(_mergedWith, (key) => (ResourceDictionary)Activator.CreateInstance(key));
+                               OnValuesChanged(_mergedInstance.ToArray());
+                       }
+               }
+
+               [TypeConverter(typeof(RDSourceTypeConverter))]
+               public Uri Source {
+                       get { return _source; }
+                       set {
+                               if (_source == value)
+                                       return;
+                               throw new InvalidOperationException("Source can only be set from XAML."); //through the RDSourceTypeConverter
+                       }
+               }
+
+               //Used by the XamlC compiled converter
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public void SetAndLoadSource(Uri value, string resourcePath, Assembly assembly, System.Xml.IXmlLineInfo lineInfo)
+               {
+                       _source = value;
+                       if (_mergedWith != null)
+                               throw new ArgumentException("Source can not be used with MergedWith");
+
+                       //this will return a type if the RD as an x:Class element, and codebehind
+                       var type = XamlResourceIdAttribute.GetTypeForPath(assembly, resourcePath);
+                       if (type != null)
+                               _mergedInstance = s_instances.GetValue(type, (key) => (ResourceDictionary)Activator.CreateInstance(key));
+                       else
+                               _mergedInstance = DependencyService.Get<IResourcesLoader>().CreateFromResource<ResourceDictionary>(resourcePath, assembly, lineInfo);
+                       OnValuesChanged(_mergedInstance.ToArray());
+               }
+
+               ICollection<ResourceDictionary> _mergedDictionaries;
+               public ICollection<ResourceDictionary> MergedDictionaries {
+                       get {
+                               if (_mergedDictionaries == null) {
+                                       var col = new ObservableCollection<ResourceDictionary>();
+                                       col.CollectionChanged += MergedDictionaries_CollectionChanged;
+                                       _mergedDictionaries = col;
+                               }
+                               return _mergedDictionaries;
+                       }
+               }
+
+               internal IList<StyleSheets.StyleSheet> StyleSheets { get; set; }
+
+               void StyleSheetsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
+               {
+                       switch (e.Action) {
+                       case NotifyCollectionChangedAction.Add:
+                                       ValuesChanged?.Invoke(this, ResourcesChangedEventArgs.StyleSheets);
+                               break;
+                       }
+               }
+               IList<ResourceDictionary> _collectionTrack;
+
+               void MergedDictionaries_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
+               {
+                       // Move() isn't exposed by ICollection
+                       if (e.Action == NotifyCollectionChangedAction.Move)
+                               return;
+
+                       _collectionTrack = _collectionTrack ?? new List<ResourceDictionary>();
+                       // Collection has been cleared
+                       if (e.Action == NotifyCollectionChangedAction.Reset) {
+                               foreach (var dictionary in _collectionTrack)
+                                       dictionary.ValuesChanged -= Item_ValuesChanged;
+
+                               _collectionTrack.Clear();
+                               return;
+                       }
+
+                       // New Items
+                       if (e.NewItems != null)
+                       {
+                               foreach (var item in e.NewItems)
+                               {
+                                       var rd = (ResourceDictionary)item;
+                                       _collectionTrack.Add(rd);
+                                       rd.ValuesChanged += Item_ValuesChanged;
+                                       OnValuesChanged(rd.ToArray());
+                               }
+                       }
+
+                       // Old Items
+                       if (e.OldItems != null)
+                       {
+                               foreach (var item in e.OldItems)
+                               {
+                                       var rd = (ResourceDictionary)item;
+                                       rd.ValuesChanged -= Item_ValuesChanged;
+                                       _collectionTrack.Remove(rd);
+                               }
+                       }
+               }
+
+               void Item_ValuesChanged(object sender, ResourcesChangedEventArgs e)
+               {
+                       OnValuesChanged(e.Values.ToArray());
+               }
+
+               void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> item)
+               {
+                       ((ICollection<KeyValuePair<string, object>>)_innerDictionary).Add(item);
+                       OnValuesChanged(item);
+               }
+
+               public void Clear()
+               {
+                       _innerDictionary.Clear();
+               }
+
+               bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> item)
+               {
+                       return ((ICollection<KeyValuePair<string, object>>)_innerDictionary).Contains(item)
+                               || (_mergedInstance != null && _mergedInstance.Contains(item));
+               }
+
+               void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] array, int arrayIndex)
+               {
+                       ((ICollection<KeyValuePair<string, object>>)_innerDictionary).CopyTo(array, arrayIndex);
+               }
+
+               public int Count
+               {
+                       get { return _innerDictionary.Count; }
+               }
+
+               bool ICollection<KeyValuePair<string, object>>.IsReadOnly
+               {
+                       get { return ((ICollection<KeyValuePair<string, object>>)_innerDictionary).IsReadOnly; }
+               }
+
+               bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> item)
+               {
+                       return ((ICollection<KeyValuePair<string, object>>)_innerDictionary).Remove(item);
+               }
+
+               public void Add(string key, object value)
+               {
+                       if (ContainsKey(key))
+                               throw new ArgumentException($"A resource with the key '{key}' is already present in the ResourceDictionary.");
+                       _innerDictionary.Add(key, value);
+                       OnValueChanged(key, value);
+               }
+
+               public bool ContainsKey(string key)
+               {
+                       return _innerDictionary.ContainsKey(key);
+               }
+
+               [IndexerName("Item")]
+               public object this[string index]
+               {
+                       get
+                       {
+                               if (_innerDictionary.ContainsKey(index))
+                                       return _innerDictionary[index];
+                               if (_mergedInstance != null && _mergedInstance.ContainsKey(index))
+                                       return _mergedInstance[index];
+                               if (MergedDictionaries != null)
+                                       foreach (var dict in MergedDictionaries.Reverse())
+                                               if (dict.ContainsKey(index))
+                                                       return dict[index];
+                               throw new KeyNotFoundException($"The resource '{index}' is not present in the dictionary.");
+                       }
+                       set
+                       {
+                               _innerDictionary[index] = value;
+                               OnValueChanged(index, value);
+                       }
+               }
+
+               public ICollection<string> Keys
+               {
+                       get { return _innerDictionary.Keys; }
+               }
+
+               public bool Remove(string key)
+               {
+                       return _innerDictionary.Remove(key);
+               }
+
+               public ICollection<object> Values
+               {
+                       get { return _innerDictionary.Values; }
+               }
+
+               IEnumerator IEnumerable.GetEnumerator()
+               {
+                       return GetEnumerator();
+               }
+
+               public IEnumerator<KeyValuePair<string, object>> GetEnumerator()
+               {
+                       return _innerDictionary.GetEnumerator();
+               }
+
+               internal IEnumerable<KeyValuePair<string, object>> MergedResources {
+                       get {
+                               if (MergedDictionaries != null)
+                                       foreach (var r in MergedDictionaries.Reverse().SelectMany(x => x.MergedResources))
+                                               yield return r;
+                               if (_mergedInstance != null)
+                                       foreach (var r in _mergedInstance.MergedResources)
+                                               yield return r;
+                               foreach (var r in _innerDictionary)
+                                       yield return r;
+                       }
+               }
+
+               public bool TryGetValue(string key, out object value)
+               {
+                       return _innerDictionary.TryGetValue(key, out value)
+                               || (_mergedInstance != null && _mergedInstance.TryGetValue(key, out value))
+                               || (MergedDictionaries != null && TryGetMergedDictionaryValue(key, out value));
+               }
+
+               bool TryGetMergedDictionaryValue(string key, out object value)
+               {
+                       foreach (var dictionary in MergedDictionaries.Reverse())
+                               if (dictionary.TryGetValue(key, out value))
+                                       return true;
+
+                       value = null;
+                       return false;
+               }
+
+               event EventHandler<ResourcesChangedEventArgs> IResourceDictionary.ValuesChanged
+               {
+                       add { ValuesChanged += value; }
+                       remove { ValuesChanged -= value; }
+               }
+
+               public void Add(Style style)
+               {
+                       if (string.IsNullOrEmpty(style.Class))
+                               Add(style.TargetType.FullName, style);
+                       else
+                       {
+                               IList<Style> classes;
+                               object outclasses;
+                               if (!TryGetValue(Style.StyleClassPrefix + style.Class, out outclasses) || (classes = outclasses as IList<Style>) == null)
+                                       classes = new List<Style>();
+                               classes.Add(style);
+                               this[Style.StyleClassPrefix + style.Class] = classes;
+                       }
+               }
+
+               public void Add(ResourceDictionary mergedResourceDictionary)
+               {
+                       MergedDictionaries.Add(mergedResourceDictionary);
+               }
+
+               public void Add(StyleSheets.StyleSheet styleSheet)
+               {
+                       StyleSheets = StyleSheets ?? new List<StyleSheets.StyleSheet>(2);
+                       StyleSheets.Add(styleSheet);
+                       ValuesChanged?.Invoke(this, ResourcesChangedEventArgs.StyleSheets);
+               }
+
+               void OnValueChanged(string key, object value)
+               {
+                       OnValuesChanged(new KeyValuePair<string, object>(key, value));
+               }
+
+               void OnValuesChanged(params KeyValuePair<string, object>[] values)
+               {
+                       if (values == null || values.Length == 0)
+                               return;
+                       ValuesChanged?.Invoke(this, new ResourcesChangedEventArgs(values));
+               }
+
+               event EventHandler<ResourcesChangedEventArgs> ValuesChanged;
+
+               // [Xaml.ProvideCompiled("Xamarin.Forms.Core.XamlC.RDSourceTypeConverter")]
+               public class RDSourceTypeConverter : TypeConverter, IExtendedTypeConverter
+               {
+                       object IExtendedTypeConverter.ConvertFromInvariantString(string value, IServiceProvider serviceProvider)
+                       {
+                               if (serviceProvider == null)
+                                       throw new ArgumentNullException(nameof(serviceProvider));
+
+                               var targetRD = (serviceProvider.GetService(typeof(Xaml.IProvideValueTarget)) as Xaml.IProvideValueTarget)?.TargetObject as ResourceDictionary;
+                               if (targetRD == null)
+                                       return null;
+
+                               var rootObjectType = (serviceProvider.GetService(typeof(Xaml.IRootObjectProvider)) as Xaml.IRootObjectProvider)?.RootObject.GetType();
+                               if (rootObjectType == null)
+                                       return null;
+
+                               var lineInfo = (serviceProvider.GetService(typeof(Xaml.IXmlLineInfoProvider)) as Xaml.IXmlLineInfoProvider)?.XmlLineInfo;
+                               var rootTargetPath = XamlResourceIdAttribute.GetPathForType(rootObjectType);
+                               var uri = new Uri(value, UriKind.Relative); //we don't want file:// uris, even if they start with '/'
+                               var resourcePath = GetResourcePath(uri, rootTargetPath);
+
+                               targetRD.SetAndLoadSource(uri, resourcePath, rootObjectType.GetTypeInfo().Assembly, lineInfo);
+                               return uri;
+                       }
+
+                       internal static string GetResourcePath(Uri uri, string rootTargetPath)
+                       {
+                               //need a fake scheme so it's not seen as file:// uri, and the forward slashes are valid on all plats
+                               var resourceUri = uri.OriginalString.StartsWith("/", StringComparison.Ordinal)
+                                                    ? new Uri($"pack://{uri.OriginalString}", UriKind.Absolute)
+                                                    : new Uri($"pack:///{rootTargetPath}/../{uri.OriginalString}", UriKind.Absolute);
+
+                               //drop the leading '/'
+                               return resourceUri.AbsolutePath.Substring(1);
+                       }
+
+                       object IExtendedTypeConverter.ConvertFrom(CultureInfo culture, object value, IServiceProvider serviceProvider)
+                       {
+                               throw new NotImplementedException();
+                       }
+
+                       public override object ConvertFromInvariantString(string value)
+                       {
+                               throw new NotImplementedException();
+                       }
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/ResourcesChangedEventArgs.cs b/src/Tizen.NUI/src/internal/XamlBinding/ResourcesChangedEventArgs.cs
new file mode 100755 (executable)
index 0000000..c6a9719
--- /dev/null
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+
+namespace Tizen.NUI.Binding
+{
+       [EditorBrowsable(EditorBrowsableState.Never)]
+       internal class ResourcesChangedEventArgs : EventArgs
+       {
+               public static readonly ResourcesChangedEventArgs StyleSheets = new ResourcesChangedEventArgs(null);
+
+               public ResourcesChangedEventArgs(IEnumerable<KeyValuePair<string, object>> values)
+               {
+                       Values = values;
+               }
+
+               public IEnumerable<KeyValuePair<string, object>> Values { get; private set; }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/ResourcesExtensions.cs b/src/Tizen.NUI/src/internal/XamlBinding/ResourcesExtensions.cs
new file mode 100755 (executable)
index 0000000..90518b8
--- /dev/null
@@ -0,0 +1,67 @@
+using System;
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Binding
+{
+       static class ResourcesExtensions
+       {
+               public static IEnumerable<KeyValuePair<string, object>> GetMergedResources(this IElement element)
+               {
+                       Dictionary<string, object> resources = null;
+                       while (element != null)
+                       {
+                               var ve = element as IResourcesProvider;
+                               if (ve != null && ve.IsResourcesCreated)
+                               {
+                                       resources = resources ?? new Dictionary<string, object>();
+                                       foreach (KeyValuePair<string, object> res in ve.Resources.MergedResources)
+                                               if (!resources.ContainsKey(res.Key))
+                                                       resources.Add(res.Key, res.Value);
+                                               else if (res.Key.StartsWith(Style.StyleClassPrefix, StringComparison.Ordinal))
+                                               {
+                                                       var mergedClassStyles = new List<Style>(resources[res.Key] as List<Style>);
+                                                       mergedClassStyles.AddRange(res.Value as List<Style>);
+                                                       resources[res.Key] = mergedClassStyles;
+                                               }
+                               }
+                               var app = element as Application;
+                               if (app != null && app.SystemResources != null)
+                               {
+                                       resources = resources ?? new Dictionary<string, object>(8);
+                                       foreach (KeyValuePair<string, object> res in app.SystemResources)
+                                               if (!resources.ContainsKey(res.Key))
+                                                       resources.Add(res.Key, res.Value);
+                                               else if (res.Key.StartsWith(Style.StyleClassPrefix, StringComparison.Ordinal))
+                                               {
+                                                       var mergedClassStyles = new List<Style>(resources[res.Key] as List<Style>);
+                                                       mergedClassStyles.AddRange(res.Value as List<Style>);
+                                                       resources[res.Key] = mergedClassStyles;
+                                               }
+                               }
+                               element = element.Parent;
+                       }
+                       return resources;
+               }
+
+               public static bool TryGetResource(this IElement element, string key, out object value)
+               {
+                       while (element != null)
+                       {
+                               var ve = element as IResourcesProvider;
+                               if (ve != null && ve.IsResourcesCreated && ve.Resources.TryGetValue(key, out value))
+                                       return true;
+                               var app = element as Application;
+                               if (app != null && app.SystemResources != null && app.SystemResources.TryGetValue(key, out value))
+                                       return true;
+                               element = element.Parent;
+                       }
+
+                       //Fallback for the XF previewer
+                       if (Application.Current != null && ((IResourcesProvider)Application.Current).IsResourcesCreated && Application.Current.Resources.TryGetValue(key, out value))
+                               return true;
+
+                       value = null;
+                       return false;
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/RotationTypeConverter.cs b/src/Tizen.NUI/src/internal/XamlBinding/RotationTypeConverter.cs
new file mode 100755 (executable)
index 0000000..dc28713
--- /dev/null
@@ -0,0 +1,29 @@
+using System;
+using System.Linq;
+using System.Reflection;
+
+using Tizen.NUI;
+
+namespace Tizen.NUI.Binding
+{
+    internal class RotationTypeConverter : TypeConverter
+    {
+        public override object ConvertFromInvariantString(string value)
+        {
+            if (value != null)
+            {
+                string[] parts = value.Split(',');
+                if (parts.Length == 4)
+                {
+                    Radian radian = new Radian(float.Parse(parts[0].Trim()));
+                    Vector3 vector3 = new Vector3( float.Parse(parts[1].Trim()), float.Parse(parts[2].Trim()), float.Parse(parts[3].Trim()) );
+                    //Ex: <View Orientation="45.0,12,13,0" />
+                    // public Rotation(Radian radian(float), Vector3 vector3)
+                    return new Rotation( radian, vector3 );
+                }
+            }
+
+            throw new InvalidOperationException($"Cannot convert \"{value}\" into {typeof(Rotation)}");
+        }
+    }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/RoutingEffect.cs b/src/Tizen.NUI/src/internal/XamlBinding/RoutingEffect.cs
new file mode 100755 (executable)
index 0000000..a368ef1
--- /dev/null
@@ -0,0 +1,42 @@
+using System.ComponentModel;
+
+namespace Tizen.NUI.Binding
+{
+       internal class RoutingEffect : Effect
+       {
+               internal readonly Effect Inner;
+
+               protected RoutingEffect(string effectId)
+               {
+                       Inner = Resolve(effectId);
+               }
+
+               protected override void OnAttached()
+               {
+               }
+
+               protected override void OnDetached()
+               {
+               }
+
+               internal override void ClearEffect()
+               {
+                       Inner?.ClearEffect();
+               }
+
+               internal override void SendAttached()
+               {
+                       Inner?.SendAttached();
+               }
+
+               internal override void SendDetached()
+               {
+                       Inner?.SendDetached();
+               }
+
+               internal override void SendOnElementPropertyChanged(PropertyChangedEventArgs args)
+               {
+                       Inner?.SendOnElementPropertyChanged(args);
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Setter.cs b/src/Tizen.NUI/src/internal/XamlBinding/Setter.cs
new file mode 100755 (executable)
index 0000000..957babf
--- /dev/null
@@ -0,0 +1,95 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Xml;
+using Tizen.NUI.Internals;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Binding
+{
+       [ContentProperty("Value")]
+       // [ProvideCompiled("Tizen.NUI.Core.XamlC.SetterValueProvider")]
+       internal sealed class Setter : IValueProvider
+       {
+               readonly ConditionalWeakTable<BindableObject, object> _originalValues = new ConditionalWeakTable<BindableObject, object>();
+
+               public BindableProperty Property { get; set; }
+
+               public object Value { get; set; }
+
+               object IValueProvider.ProvideValue(IServiceProvider serviceProvider)
+               {
+                       if (Property == null)
+                       {
+                               var lineInfoProvider = serviceProvider.GetService(typeof(IXmlLineInfoProvider)) as IXmlLineInfoProvider;
+                               IXmlLineInfo lineInfo = lineInfoProvider != null ? lineInfoProvider.XmlLineInfo : new XmlLineInfo();
+                               throw new XamlParseException("Property not set", lineInfo);
+                       }
+                       var valueconverter = serviceProvider.GetService(typeof(IValueConverterProvider)) as IValueConverterProvider;
+
+                       Func<MemberInfo> minforetriever =
+                               () =>
+                               (MemberInfo)Property.DeclaringType.GetRuntimeProperty(Property.PropertyName) ?? (MemberInfo)Property.DeclaringType.GetRuntimeMethod("Get" + Property.PropertyName, new[] { typeof(BindableObject) });
+
+                       object value = valueconverter.Convert(Value, Property.ReturnType, minforetriever, serviceProvider);
+                       Value = value;
+                       return this;
+               }
+
+               internal void Apply(BindableObject target, bool fromStyle = false)
+               {
+                       if (target == null)
+                               throw new ArgumentNullException("target");
+                       if (Property == null)
+                               return;
+
+                       object originalValue = target.GetValue(Property);
+                       if (!Equals(originalValue, Property.DefaultValue))
+                       {
+                               _originalValues.Remove(target);
+                               _originalValues.Add(target, originalValue);
+                       }
+
+                       var dynamicResource = Value as DynamicResource;
+                       var binding = Value as BindingBase;
+                       if (binding != null)
+                               target.SetBinding(Property, binding.Clone(), fromStyle);
+                       else if (dynamicResource != null)
+                               target.SetDynamicResource(Property, dynamicResource.Key, fromStyle);
+                       else
+                       {
+                               if (Value is IList<VisualStateGroup> visualStateGroupCollection)
+                                       target.SetValue(Property, visualStateGroupCollection.Clone(), fromStyle);
+                               else
+                                       target.SetValue(Property, Value, fromStyle);
+                       }
+               }
+
+               internal void UnApply(BindableObject target, bool fromStyle = false)
+               {
+                       if (target == null)
+                               throw new ArgumentNullException(nameof(target));
+                       if (Property == null)
+                               return;
+
+                       object actual = target.GetValue(Property);
+                       if (!Equals(actual, Value) && !(Value is Tizen.NUI.Binding.Binding) && !(Value is DynamicResource))
+                       {
+                               //Do not reset default value if the value has been changed
+                               _originalValues.Remove(target);
+                               return;
+                       }
+
+                       object defaultValue;
+                       if (_originalValues.TryGetValue(target, out defaultValue))
+                       {
+                               //reset default value, unapply bindings and dynamicResource
+                               target.SetValue(Property, defaultValue, fromStyle);
+                               _originalValues.Remove(target);
+                       }
+                       else
+                               target.ClearValue(Property);
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/SizeTypeConverter.cs b/src/Tizen.NUI/src/internal/XamlBinding/SizeTypeConverter.cs
new file mode 100755 (executable)
index 0000000..a115f40
--- /dev/null
@@ -0,0 +1,42 @@
+using System;
+using System.Linq;
+using System.Reflection;
+
+using Tizen.NUI;
+
+namespace Tizen.NUI.Binding
+{
+    internal class SizeTypeConverter : TypeConverter
+    {
+        public override object ConvertFromInvariantString(string value)
+        {
+            if (value != null)
+            {
+                string[] parts = value.Split(',');
+                if (parts.Length == 3)
+                {
+                    return new Size(float.Parse(parts[0].Trim()), float.Parse(parts[1].Trim()), float.Parse(parts[2].Trim()));
+                }
+            }
+
+            throw new InvalidOperationException($"Cannot convert \"{value}\" into {typeof(Size)}");
+        }
+    }
+
+    internal class Size2DTypeConverter : TypeConverter
+    {
+        public override object ConvertFromInvariantString(string value)
+        {
+            if (value != null)
+            {
+                string[] parts = value.Split(',');
+                if (parts.Length == 2)
+                {
+                    return new Size2D(int.Parse(parts[0].Trim()), int.Parse(parts[1].Trim()));
+                }
+            }
+
+            throw new InvalidOperationException($"Cannot convert \"{value}\" into {typeof(Size2D)}");
+        }
+    }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Style.cs b/src/Tizen.NUI/src/internal/XamlBinding/Style.cs
new file mode 100755 (executable)
index 0000000..ede416f
--- /dev/null
@@ -0,0 +1,185 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using Tizen.NUI.StyleSheets;
+
+namespace Tizen.NUI.Binding
+{
+       [ContentProperty("Setters")]
+       internal sealed class Style : IStyle
+       {
+               internal const string StyleClassPrefix = "Xamarin.Forms.StyleClass.";
+
+               readonly BindableProperty _basedOnResourceProperty = BindableProperty.CreateAttached("BasedOnResource", typeof(Style), typeof(Style), default(Style),
+                       propertyChanged: OnBasedOnResourceChanged);
+
+               readonly List<WeakReference<BindableObject>> _targets = new List<WeakReference<BindableObject>>(4);
+
+               Style _basedOnStyle;
+
+               string _baseResourceKey;
+
+               IList<Behavior> _behaviors;
+
+               IList<TriggerBase> _triggers;
+
+               public Style([TypeConverter(typeof(TypeTypeConverter))] [Parameter("TargetType")] Type targetType)
+               {
+                       if (targetType == null)
+                               throw new ArgumentNullException("targetType");
+
+                       TargetType = targetType;
+                       Setters = new List<Setter>();
+               }
+
+               public bool ApplyToDerivedTypes { get; set; }
+
+               public Style BasedOn
+               {
+                       get { return _basedOnStyle; }
+                       set
+                       {
+                               if (_basedOnStyle == value)
+                                       return;
+                               if (!ValidateBasedOn(value))
+                                       throw new ArgumentException("BasedOn.TargetType is not compatible with TargetType");
+                               Style oldValue = _basedOnStyle;
+                               _basedOnStyle = value;
+                               BasedOnChanged(oldValue, value);
+                               if (value != null)
+                                       BaseResourceKey = null;
+                       }
+               }
+
+               public string BaseResourceKey
+               {
+                       get { return _baseResourceKey; }
+                       set
+                       {
+                               if (_baseResourceKey == value)
+                                       return;
+                               _baseResourceKey = value;
+                               //update all DynamicResources
+                               foreach (WeakReference<BindableObject> bindableWr in _targets)
+                               {
+                                       BindableObject target;
+                                       if (!bindableWr.TryGetTarget(out target))
+                                               continue;
+                                       target.RemoveDynamicResource(_basedOnResourceProperty);
+                                       if (value != null)
+                                               target.SetDynamicResource(_basedOnResourceProperty, value);
+                               }
+                               if (value != null)
+                                       BasedOn = null;
+                       }
+               }
+
+               public IList<Behavior> Behaviors
+               {
+                       get { return _behaviors ?? (_behaviors = new AttachedCollection<Behavior>()); }
+               }
+
+               public bool CanCascade { get; set; }
+
+               public string Class { get; set; }
+
+               public IList<Setter> Setters { get; }
+
+               public IList<TriggerBase> Triggers
+               {
+                       get { return _triggers ?? (_triggers = new AttachedCollection<TriggerBase>()); }
+               }
+
+               void IStyle.Apply(BindableObject bindable)
+               {
+                       _targets.Add(new WeakReference<BindableObject>(bindable));
+                       if (BaseResourceKey != null)
+                               bindable.SetDynamicResource(_basedOnResourceProperty, BaseResourceKey);
+                       ApplyCore(bindable, BasedOn ?? GetBasedOnResource(bindable));
+               }
+
+               public Type TargetType { get; }
+
+               void IStyle.UnApply(BindableObject bindable)
+               {
+                       UnApplyCore(bindable, BasedOn ?? GetBasedOnResource(bindable));
+                       bindable.RemoveDynamicResource(_basedOnResourceProperty);
+                       _targets.RemoveAll(wr =>
+                       {
+                               BindableObject target;
+                               return wr.TryGetTarget(out target) && target == bindable;
+                       });
+               }
+
+               internal bool CanBeAppliedTo(Type targetType)
+               {
+                       if (TargetType == targetType)
+                               return true;
+                       if (!ApplyToDerivedTypes)
+                               return false;
+                       do
+                       {
+                               targetType = targetType.GetTypeInfo().BaseType;
+                               if (TargetType == targetType)
+                                       return true;
+                       } while (targetType != typeof(Element));
+                       return false;
+               }
+
+               void ApplyCore(BindableObject bindable, Style basedOn)
+               {
+                       if (basedOn != null)
+                               ((IStyle)basedOn).Apply(bindable);
+
+                       foreach (Setter setter in Setters)
+                               setter.Apply(bindable, true);
+                       ((AttachedCollection<Behavior>)Behaviors).AttachTo(bindable);
+                       ((AttachedCollection<TriggerBase>)Triggers).AttachTo(bindable);
+               }
+
+               void BasedOnChanged(Style oldValue, Style newValue)
+               {
+                       foreach (WeakReference<BindableObject> bindableRef in _targets)
+                       {
+                               BindableObject bindable;
+                               if (!bindableRef.TryGetTarget(out bindable))
+                                       continue;
+
+                               UnApplyCore(bindable, oldValue);
+                               ApplyCore(bindable, newValue);
+                       }
+               }
+
+               Style GetBasedOnResource(BindableObject bindable)
+               {
+                       return (Style)bindable.GetValue(_basedOnResourceProperty);
+               }
+
+               static void OnBasedOnResourceChanged(BindableObject bindable, object oldValue, object newValue)
+               {
+                       // Style style = (bindable as /*VisualElement*/BaseHandle).Style;
+                       // if (style == null)
+                       //      return;
+                       // style.UnApplyCore(bindable, (Style)oldValue);
+                       // style.ApplyCore(bindable, (Style)newValue);
+               }
+
+               void UnApplyCore(BindableObject bindable, Style basedOn)
+               {
+                       ((AttachedCollection<TriggerBase>)Triggers).DetachFrom(bindable);
+                       ((AttachedCollection<Behavior>)Behaviors).DetachFrom(bindable);
+                       foreach (Setter setter in Setters)
+                               setter.UnApply(bindable, true);
+
+                       if (basedOn != null)
+                               ((IStyle)basedOn).UnApply(bindable);
+               }
+
+               bool ValidateBasedOn(Style value)
+               {
+                       if (value == null)
+                               return true;
+                       return value.TargetType.IsAssignableFrom(TargetType);
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/CharExtensions.cs b/src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/CharExtensions.cs
new file mode 100755 (executable)
index 0000000..3b7cb15
--- /dev/null
@@ -0,0 +1,41 @@
+using System.Runtime.CompilerServices;
+
+namespace Tizen.NUI.StyleSheets
+{
+       static class CharExtensions
+       {
+               //w                     [ \t\r\n\f]*
+               [MethodImpl(MethodImplOptions.AggressiveInlining)]
+               public static bool IsW(this char c)
+               {
+                       return c == ' '
+                               || c == '\t'
+                               || c == '\r'
+                               || c == '\n'
+                               || c == '\f';
+               }
+
+               //nmstart       [_a-z]|{nonascii}|{escape}
+               //escape        {unicode}|\\[^\n\r\f0-9a-f]
+               //nonascii      [^\0-\237]
+               // TODO support escape and nonascii
+               [MethodImpl(MethodImplOptions.AggressiveInlining)]
+               public static bool IsNmStart(this char c)
+               {
+                       return c == '_' || char.IsLetter(c);
+               }
+
+               //nmchar        [_a-z0-9-]|{nonascii}|{escape}
+               //unicode       \\[0-9a-f]{1,6}(\r\n|[ \n\r\t\f])?
+               //escape        {unicode}|\\[^\n\r\f0-9a-f]
+               //nonascii      [^\0-\237]
+               //TODO support escape, nonascii and unicode
+               [MethodImpl(MethodImplOptions.AggressiveInlining)]
+               public static bool IsNmChar(this char c)
+               {
+                       return c == '_'
+                               || c == '-'
+                               || char.IsLetterOrDigit(c);
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/CssReader.cs b/src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/CssReader.cs
new file mode 100755 (executable)
index 0000000..713f5bb
--- /dev/null
@@ -0,0 +1,97 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+
+namespace Tizen.NUI.StyleSheets
+{
+       sealed class CssReader : TextReader
+       {
+               readonly TextReader _reader;
+
+               public CssReader(TextReader reader)
+               {
+                       if (reader == null)
+                               throw new ArgumentNullException(nameof(reader));
+
+                       _reader = reader;
+               }
+
+               readonly Queue<char> _cache = new Queue<char>();
+
+               //skip comments
+               //TODO unescape escaped sequences
+               public override int Peek()
+               {
+                       if (_cache.Count > 0)
+                               return _cache.Peek();
+
+                       int p = _reader.Peek();
+                       if (p <= 0)
+                               return p;
+                       if (unchecked((char)p) != '/')
+                               return p;
+
+                       _cache.Enqueue(unchecked((char)_reader.Read()));
+                       p = _reader.Peek();
+                       if (p <= 0)
+                               return _cache.Peek();
+                       if (unchecked((char)p) != '*')
+                               return _cache.Peek();
+
+                       _cache.Clear();
+                       _reader.Read(); //consume the '*'
+
+                       bool hasStar = false;
+                       while (true) {
+                               var next = _reader.Read();
+                               if (next <= 0)
+                                       return next;
+                               if (unchecked((char)next) == '*')
+                                       hasStar = true;
+                               else if (hasStar && unchecked((char)next) == '/')
+                                       return Peek(); //recursively call self for comments following comments
+                               else
+                                       hasStar = false;
+                       }
+               }
+
+               //skip comments
+               //TODO unescape escaped sequences
+               public override int Read()
+               {
+                       if (_cache.Count > 0)
+                               return _cache.Dequeue();
+
+                       int p = _reader.Read();
+                       if (p <= 0)
+                               return p;
+                       var c = unchecked((char)p);
+                       if (c != '/')
+                               return p;
+
+                       _cache.Enqueue(c);
+                       p = _reader.Read();
+                       if (p <= 0)
+                               return _cache.Dequeue();
+                       c = unchecked((char)p);
+                       if (c != '*')
+                               return _cache.Dequeue();
+
+                       _cache.Clear();
+                       _reader.Read(); //consume the '*'
+
+                       bool hasStar = false;
+                       while (true) {
+                               var next = _reader.Read();
+                               if (next <= 0)
+                                       return next;
+                               if (unchecked((char)next) == '*')
+                                       hasStar = true;
+                               else if (hasStar && unchecked((char)next) == '/')
+                                       return Read(); //recursively call self for comments following comments
+                               else
+                                       hasStar = false;
+                       }
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/IStyle.cs b/src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/IStyle.cs
new file mode 100755 (executable)
index 0000000..a395046
--- /dev/null
@@ -0,0 +1,13 @@
+using System;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.StyleSheets
+{
+       interface IStyle
+       {
+               Type TargetType { get; }
+
+               void Apply(BindableObject bindable);
+               void UnApply(BindableObject bindable);
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/IStyleSelectable.cs b/src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/IStyleSelectable.cs
new file mode 100755 (executable)
index 0000000..5223f41
--- /dev/null
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.StyleSheets
+{
+       interface IStyleSelectable
+       {
+               string[] NameAndBases { get; }
+               string Id { get; }
+               IStyleSelectable Parent { get; }
+               IList<string> Classes { get; }
+               IEnumerable<IStyleSelectable> Children { get; }
+       }
+
+       interface IStylable
+       {
+               BindableProperty GetProperty(string key, bool inheriting);
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/Selector.cs b/src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/Selector.cs
new file mode 100755 (executable)
index 0000000..7cc9aff
--- /dev/null
@@ -0,0 +1,306 @@
+using System;
+
+namespace Tizen.NUI.StyleSheets
+{
+       abstract class Selector
+       {
+               Selector()
+               {
+               }
+
+               public static Selector Parse(CssReader reader, char stopChar = '\0')
+               {
+                       Selector root = All, workingRoot = All;
+                       Operator workingRootParent = null;
+                       Action<Operator, Selector> setCurrentSelector = (op, sel) => SetCurrentSelector(ref root, ref workingRoot, ref workingRootParent, op, sel);
+
+                       int p;
+                       reader.SkipWhiteSpaces();
+                       while ((p = reader.Peek()) > 0) {
+                               switch (unchecked((char)p)) {
+                               case '*':
+                                       setCurrentSelector(new And(), All);
+                                       reader.Read();
+                                       break;
+                               case '.':
+                                       reader.Read();
+                                       var className = reader.ReadIdent();
+                                       if (className == null)
+                                               return Invalid;
+                                       setCurrentSelector(new And(), new Class(className));
+                                       break;
+                               case '#':
+                                       reader.Read();
+                                       var id = reader.ReadName();
+                                       if (id == null)
+                                               return Invalid;
+                                       setCurrentSelector(new And(), new Id(id));
+                                       break;
+                               case '[':
+                                       throw new NotImplementedException("Attributes not implemented");
+                               case ',':
+                                       reader.Read();
+                                       setCurrentSelector(new Or(), All);
+                                       reader.SkipWhiteSpaces();
+                                       break;
+                               case '+':
+                                       reader.Read();
+                                       setCurrentSelector(new Adjacent(), All);
+                                       reader.SkipWhiteSpaces();
+                                       break;
+                               case '~':
+                                       reader.Read();
+                                       setCurrentSelector(new Sibling(), All);
+                                       reader.SkipWhiteSpaces();
+                                       break;
+                               case '>':
+                                       reader.Read();
+                                       setCurrentSelector(new Child(), All);
+                                       reader.SkipWhiteSpaces();
+                                       break;
+                               case '^':                               //not in CSS spec
+                                       reader.Read();
+                                       var element = reader.ReadIdent();
+                                       if (element == null)
+                                       return Invalid;
+                                       setCurrentSelector(new And(), new Base(element));
+                                       break;
+                               case ' ':
+                               case '\t':
+                               case '\n':
+                               case '\r':
+                               case '\f':
+                                       reader.Read();
+                                       bool processWs = false;
+                                       while ((p = reader.Peek()) > 0) {
+                                               var c = unchecked((char)p);
+                                               if (char.IsWhiteSpace(c)) {
+                                                       reader.Read();
+                                                       continue;
+                                               }
+                                               processWs = (c != '+'
+                                                                       && c != '>'
+                                                                       && c != ','
+                                                                       && c != '~'
+                                                                       && c != '^'
+                                                                       && c != stopChar);
+                                               break;
+                                       }
+                                       if (!processWs)
+                                               break;
+                                       setCurrentSelector(new Descendent(), All);
+                                       reader.SkipWhiteSpaces();
+                                       break;
+                               default:
+                                       if (unchecked((char)p) == stopChar)
+                                               return root;
+
+                                       var elementName = reader.ReadIdent();
+                                       if (elementName == null)
+                                               return Invalid;
+                                       setCurrentSelector(new And(), new Element(elementName));
+                                       break;
+                               }
+                       }
+                       return root;
+               }
+
+               static void SetCurrentSelector(ref Selector root, ref Selector workingRoot, ref Operator workingRootParent, Operator op, Selector sel)
+               {
+                       var updateRoot = root == workingRoot;
+
+                       op.Left = workingRoot;
+                       op.Right = sel;
+                       workingRoot = op;
+                       if (workingRootParent != null)
+                               workingRootParent.Right = workingRoot;
+
+                       if (updateRoot)
+                               root = workingRoot;
+
+                       if (workingRoot is Or) {
+                               workingRootParent = (Operator)workingRoot;
+                               workingRoot = sel;
+                       }
+               }
+
+               public abstract bool Matches(IStyleSelectable styleable);
+
+               internal static Selector Invalid = new Generic(s => false);
+               internal static Selector All = new Generic(s => true);
+
+               abstract class UnarySelector : Selector
+               {
+               }
+
+               abstract class Operator : Selector
+               {
+                       public Selector Left { get; set; } = Invalid;
+                       public Selector Right { get; set; } = Invalid;
+               }
+
+               sealed class Generic : UnarySelector
+               {
+                       readonly Func<IStyleSelectable, bool> func;
+                       public Generic(Func<IStyleSelectable, bool> func)
+                       {
+                               this.func = func;
+                       }
+
+                       public override bool Matches(IStyleSelectable styleable) => func(styleable);
+               }
+
+               sealed class Class : UnarySelector
+               {
+                       public Class(string className)
+                       {
+                               ClassName = className;
+                       }
+
+                       public string ClassName { get; }
+                       public override bool Matches(IStyleSelectable styleable)
+                               => styleable.Classes != null && styleable.Classes.Contains(ClassName);
+               }
+
+               sealed class Id : UnarySelector
+               {
+                       public Id(string id)
+                       {
+                               IdName = id;
+                       }
+
+                       public string IdName { get; }
+                       public override bool Matches(IStyleSelectable styleable) => styleable.Id == IdName;
+               }
+
+               sealed class Or : Operator
+               {
+                       public override bool Matches(IStyleSelectable styleable) => Right.Matches(styleable) || Left.Matches(styleable);
+               }
+
+               sealed class And : Operator
+               {
+                       public override bool Matches(IStyleSelectable styleable) => Right.Matches(styleable) && Left.Matches(styleable);
+               }
+
+               sealed class Element : UnarySelector
+               {
+                       public Element(string elementName)
+                       {
+                               ElementName = elementName;
+                       }
+
+                       public string ElementName { get; }
+                       public override bool Matches(IStyleSelectable styleable) =>
+                               string.Equals(styleable.NameAndBases[0], ElementName, StringComparison.OrdinalIgnoreCase);
+               }
+
+               sealed class Base : UnarySelector
+               {
+                       public Base(string elementName)
+                       {
+                               ElementName = elementName;
+                       }
+
+                       public string ElementName { get; }
+                       public override bool Matches(IStyleSelectable styleable) {
+                               for (var i = 0; i < styleable.NameAndBases.Length; i++)
+                                       if (string.Equals(styleable.NameAndBases[i], ElementName, StringComparison.OrdinalIgnoreCase))
+                                               return true;
+                               return false;
+                       }
+               }
+
+               sealed class Child : Operator
+               {
+                       public override bool Matches(IStyleSelectable styleable) =>
+                               Right.Matches(styleable) && styleable.Parent != null && Left.Matches(styleable.Parent);
+               }
+
+               sealed class Descendent : Operator
+               {
+                       public override bool Matches(IStyleSelectable styleable)
+                       {
+                               if (!Right.Matches(styleable))
+                                       return false;
+                               var parent = styleable.Parent;
+                               while (parent != null) {
+                                       if (Left.Matches(parent))
+                                               return true;
+                                       parent = parent.Parent;
+                               }
+                               return false;
+                       }
+               }
+
+               sealed class Adjacent : Operator
+               {
+                       public override bool Matches(IStyleSelectable styleable)
+                       {
+                               if (!Right.Matches(styleable))
+                                       return false;
+                               if (styleable.Parent == null)
+                                       return false;
+
+                               IStyleSelectable prev = null;
+                               foreach (var elem in styleable.Parent.Children) {
+                                       if (elem == styleable && prev != null)
+                                               return Left.Matches(prev);
+                                       prev = elem;
+                               }
+                               return false;
+                               //var index = styleable.Parent.Children.IndexOf(styleable);
+                               //if (index == 0)
+                               //      return false;
+                               //var adjacent = styleable.Parent.Children[index - 1];
+                               //return Left.Matches(adjacent);
+                       }
+               }
+
+               sealed class Sibling : Operator
+               {
+                       public override bool Matches(IStyleSelectable styleable)
+                       {
+                               if (!Right.Matches(styleable))
+                                       return false;
+                               if (styleable.Parent == null)
+                                       return false;
+
+                               int selfIndex = 0;
+                               bool foundSelfInParent = false;
+                               foreach (var elem in styleable.Parent.Children) {
+                                       if (elem == styleable) {
+                                               foundSelfInParent = true;
+                                               break;
+                                       }
+                                       ++selfIndex;
+                               }
+
+                               if (!foundSelfInParent)
+                                       return false;
+
+                               int index = 0;
+                               foreach (var elem in styleable.Parent.Children) {
+                                       if (index >= selfIndex)
+                                               return false;
+                                       if (Left.Matches(elem))
+                                               return true;
+                                       ++index;
+                               }
+
+                               return false;
+
+                               //var index = styleable.Parent.Children.IndexOf(styleable);
+                               //if (index == 0)
+                               //      return false;
+                               //int siblingIndex = -1;
+                               //for (var i = 0; i < index; i++)
+                               //      if (Left.Matches(styleable.Parent.Children[i])) {
+                               //              siblingIndex = i;
+                               //              break;
+                               //      }
+                               //return siblingIndex != -1;
+                       }
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/Style.cs b/src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/Style.cs
new file mode 100755 (executable)
index 0000000..cd50fdd
--- /dev/null
@@ -0,0 +1,98 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.StyleSheets
+{
+       sealed class Style
+       {
+               Style()
+               {
+               }
+
+               public IDictionary<string, string> Declarations { get; set; } = new Dictionary<string, string>();
+               Dictionary<KeyValuePair<string, string>, object> convertedValues = new Dictionary<KeyValuePair<string, string>, object>();
+
+               public static Style Parse(CssReader reader, char stopChar = '\0')
+               {
+                       Style style = new Style();
+                       string propertyName = null, propertyValue = null;
+
+                       int p;
+                       reader.SkipWhiteSpaces();
+                       bool readingName = true;
+                       while ((p = reader.Peek()) > 0) {
+                               switch (unchecked((char)p)) {
+                               case ':':
+                                       reader.Read();
+                                       readingName = false;
+                                       reader.SkipWhiteSpaces();
+                                       break;
+                               case ';':
+                                       reader.Read();
+                                       if (!string.IsNullOrEmpty(propertyName) && !string.IsNullOrEmpty(propertyValue))
+                                               style.Declarations.Add(propertyName, propertyValue);
+                                       propertyName = propertyValue = null;
+                                       readingName = true;
+                                       reader.SkipWhiteSpaces();
+                                       break;
+                               default:
+                                       if ((char)p == stopChar)
+                                               return style;
+
+                                       if (readingName) {
+                                               propertyName = reader.ReadIdent();
+                                               if (propertyName == null)
+                                                       throw new Exception();
+                                       } else 
+                                               propertyValue = reader.ReadUntil(stopChar, ';', ':');
+                                       break;
+                               }
+                       }
+                       return style;
+               }
+
+               public void Apply(/*VisualElement*/BaseHandle styleable, bool inheriting = false)
+               {
+                       if (styleable == null)
+                               throw new ArgumentNullException(nameof(styleable));
+
+                       foreach (var decl in Declarations) {
+                               var property = ((IStylable)styleable).GetProperty(decl.Key, inheriting);
+                               if (property == null)
+                                       continue;
+                               if (string.Equals(decl.Value, "initial", StringComparison.OrdinalIgnoreCase))
+                                       styleable.ClearValue(property, fromStyle: true);
+                               else {
+                                       object value;
+                                       if (!convertedValues.TryGetValue(decl, out value))
+                                               convertedValues[decl] = (value = Convert(styleable, decl.Value, property));
+                                       styleable.SetValue(property, value, fromStyle: true);
+                               }
+                       }
+
+                       foreach (var child in styleable.LogicalChildrenInternal) {
+                               var ve = child as /*VisualElement*/BaseHandle;
+                               if (ve == null)
+                                       continue;
+                               Apply(ve, inheriting: true);
+                       }
+               }
+
+               // [MethodImpl(MethodImplOptions.AggressiveInlining)]
+               static object Convert(object target, object value, BindableProperty property)
+               {
+                       Func<MemberInfo> minforetriever = () =>    property.DeclaringType.GetRuntimeProperty(property.PropertyName) as MemberInfo
+                                                                                                       ?? property.DeclaringType.GetRuntimeMethod("Get" + property.PropertyName, new[] { typeof(BindableObject) }) as MemberInfo;
+                       var serviceProvider = new StyleSheetServiceProvider(target, property);
+                       // return value.ConvertTo(property.ReturnType, minforetriever, serviceProvider);
+                       return null;
+               }
+
+               public void UnApply(IStylable styleable)
+               {
+                       throw new NotImplementedException();
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/StylePropertyAttribute.cs b/src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/StylePropertyAttribute.cs
new file mode 100755 (executable)
index 0000000..8442f25
--- /dev/null
@@ -0,0 +1,24 @@
+using System;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.StyleSheets
+{
+       [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true, Inherited = true)]
+       sealed class StylePropertyAttribute : Attribute
+       {
+               public string CssPropertyName { get; }
+               public string BindablePropertyName { get; }
+               public Type TargetType { get; }
+               public Type PropertyOwnerType { get; set; }
+               public BindableProperty BindableProperty { get; set; }
+               public bool Inherited { get; set; } = false;
+
+
+               public StylePropertyAttribute(string cssPropertyName, Type targetType, string bindablePropertyName)
+               {
+                       CssPropertyName = cssPropertyName;
+                       BindablePropertyName = bindablePropertyName;
+                       TargetType = targetType;
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/StyleSheet.cs b/src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/StyleSheet.cs
new file mode 100755 (executable)
index 0000000..9af0c29
--- /dev/null
@@ -0,0 +1,124 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.IO;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Xml;
+using Tizen.NUI.Xaml;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.StyleSheets
+{
+       internal sealed class StyleSheet : IStyle
+       {
+               StyleSheet()
+               {
+               }
+
+               internal IDictionary<Selector, Style> Styles { get; set; } = new Dictionary<Selector, Style>();
+
+               public static StyleSheet FromAssemblyResource(Assembly assembly, string resourceId, IXmlLineInfo lineInfo = null)
+               {
+                       using (var stream = assembly.GetManifestResourceStream(resourceId)) {
+                               if (stream == null)
+                                       throw new XamlParseException($"No resource found for '{resourceId}'.", lineInfo);
+                               using (var reader = new StreamReader(stream)) {
+                                       return FromReader(reader);
+                               }
+                       }
+               }
+
+               //used by code generated by XamlC. Has to stay public
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public static StyleSheet FromString(string stylesheet)
+               {
+                       if (stylesheet == null)
+                               throw new ArgumentNullException(nameof(stylesheet));
+                       using (var reader = new StringReader(stylesheet))
+                               return FromReader(reader);
+               }
+
+               public static StyleSheet FromReader(TextReader reader)
+               {
+                       if (reader == null)
+                               throw new ArgumentNullException(nameof(reader));
+
+                       return Parse(new CssReader(reader));
+               }
+
+               [MethodImpl(MethodImplOptions.AggressiveInlining)]
+               static StyleSheet Parse(CssReader reader)
+               {
+                       var sheet = new StyleSheet();
+
+                       Style style = null;
+                       var selector = Selector.All;
+
+                       int p;
+                       bool inStyle = false;
+                       reader.SkipWhiteSpaces();
+                       while ((p = reader.Peek()) > 0) {
+                               switch ((char)p) {
+                               case '@':
+                                       throw new NotSupportedException("AT-rules not supported");
+                               case '{':
+                                       reader.Read();
+                                       style = Style.Parse(reader, '}');
+                                       inStyle = true;
+                                       break;
+                               case '}':
+                                       reader.Read();
+                                       if (!inStyle)
+                                               throw new Exception();
+                                       inStyle = false;
+                                       sheet.Styles.Add(selector, style);
+                                       style = null;
+                                       selector = Selector.All;
+                                       break;
+                               default:
+                                       selector = Selector.Parse(reader, '{');
+                                       break;
+                               }
+                       }
+                       return sheet;
+               }
+
+               Type IStyle.TargetType
+                       => typeof(/*VisualElement*/BaseHandle);
+
+               void IStyle.Apply(BindableObject bindable)
+               {
+                       var styleable = bindable as Element;
+                       if (styleable == null)
+                               return;
+                       Apply(styleable);
+               }
+
+               void Apply(Element styleable)
+               {
+                       ApplyCore(styleable);
+                       foreach (var child in styleable.LogicalChildrenInternal)
+                               ((IStyle)this).Apply(child);
+               }
+
+               void ApplyCore(Element styleable)
+               {
+                       var visualStylable = styleable as /*VisualElement*/BaseHandle;
+                       if (visualStylable == null)
+                               return;
+                       foreach (var kvp in Styles) {
+                               var selector = kvp.Key;
+                               var style = kvp.Value;
+                               // if (!selector.Matches(styleable))
+                               //      continue;
+                               style.Apply(visualStylable);
+                       }
+               }
+
+               void IStyle.UnApply(BindableObject bindable)
+               {
+                       throw new NotImplementedException();
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/StyleSheetExtensions.cs b/src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/StyleSheetExtensions.cs
new file mode 100755 (executable)
index 0000000..b7c2aec
--- /dev/null
@@ -0,0 +1,18 @@
+using System.Collections.Generic;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.StyleSheets
+{
+       static class StyleSheetExtensions
+       {
+               public static IEnumerable<StyleSheet> GetStyleSheets(this IResourcesProvider resourcesProvider)
+               {
+                       if (!resourcesProvider.IsResourcesCreated)
+                               yield break;
+                       if (resourcesProvider.Resources.StyleSheets == null)
+                               yield break;
+                       foreach (var styleSheet in resourcesProvider.Resources.StyleSheets)
+                               yield return styleSheet;
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/StyleSheetServiceProvider.cs b/src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/StyleSheetServiceProvider.cs
new file mode 100755 (executable)
index 0000000..bd3b3a4
--- /dev/null
@@ -0,0 +1,39 @@
+using System;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.StyleSheets
+{
+       class StyleSheetServiceProvider : IServiceProvider
+       {
+               IProvideValueTarget vtProvider;
+               IConverterOptions convOptions => new ConverterOptions();
+
+               public StyleSheetServiceProvider(object targetObject, object targetProperty)
+               {
+                       vtProvider = new ValueTargetProvider {
+                               TargetObject = targetObject,
+                               TargetProperty = targetProperty
+                       };
+               }
+
+               public object GetService(Type serviceType)
+               {
+                       if (serviceType == typeof(IProvideValueTarget))
+                               return vtProvider;
+                       if (serviceType == typeof(IConverterOptions))
+                               return convOptions;
+                       return null;
+               }
+
+               class ValueTargetProvider : IProvideValueTarget
+               {
+                       public object TargetObject { get; set; }
+                       public object TargetProperty { get; set; }
+               }
+
+               class ConverterOptions : IConverterOptions
+               {
+                       public bool IgnoreCase => true;
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/TextReaderExtensions.cs b/src/Tizen.NUI/src/internal/XamlBinding/StyleSheets/TextReaderExtensions.cs
new file mode 100755 (executable)
index 0000000..4356faf
--- /dev/null
@@ -0,0 +1,76 @@
+using System;
+using System.IO;
+using System.Linq;
+using System.Text;
+
+namespace Tizen.NUI.StyleSheets
+{
+       static class TextReaderExtensions
+       {
+               //ident         [-]?{nmstart}{nmchar}*
+               public static string ReadIdent(this TextReader reader)
+               {
+                       var sb = new StringBuilder();
+                       bool first = true;
+                       bool hasLeadingDash = false;
+                       int p;
+                       while ((p = reader.Peek()) > 0) {
+                               var c = unchecked((char)p);
+                               if (first && !hasLeadingDash && c == '-') {
+                                       sb.Append((char)reader.Read());
+                                       hasLeadingDash = true;
+                               } else if (first && c.IsNmStart()) {
+                                       sb.Append((char)reader.Read());
+                                       first = false;
+                               } else if (first) { //a nmstart is expected
+                                       throw new Exception();
+                               } else if (c.IsNmChar())
+                                       sb.Append((char)reader.Read());
+                               else
+                                       break;
+                       }
+                       return sb.ToString();
+               }
+
+               //name          {nmchar}+
+               public static string ReadName(this TextReader reader)
+               {
+                       var sb = new StringBuilder();
+                       int p;
+                       while ((p = reader.Peek()) > 0) {
+                               var c = unchecked((char)p);
+                               if (c.IsNmChar())
+                                       sb.Append((char)reader.Read());
+                               else
+                                       break;
+                       }
+                       return sb.ToString();
+               }
+
+               public static string ReadUntil(this TextReader reader, params char[] limit)
+               {
+                       var sb = new StringBuilder();
+                       int p;
+                       while ((p = reader.Peek()) > 0) {
+                               var c = unchecked((char)p);
+                               if (limit != null && limit.Contains(c))
+                                       break;
+                               reader.Read();
+                               sb.Append(c);
+                       }
+                       return sb.ToString();
+               }
+
+               //w                     [ \t\r\n\f]*
+               public static void SkipWhiteSpaces(this TextReader reader)
+               {
+                       int p;
+                       while ((p = reader.Peek()) > 0) {
+                               var c = unchecked((char)p);
+                               if (!c.IsW())
+                                       break;
+                               reader.Read();
+                       }
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/SynchronizedList.cs b/src/Tizen.NUI/src/internal/XamlBinding/SynchronizedList.cs
new file mode 100755 (executable)
index 0000000..dfd7238
--- /dev/null
@@ -0,0 +1,130 @@
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+
+namespace Tizen.NUI.Binding
+{
+       internal class SynchronizedList<T> : IList<T>, IReadOnlyList<T>
+       {
+               readonly List<T> _list = new List<T>();
+               ReadOnlyCollection<T> _snapshot;
+
+               public void Add(T item)
+               {
+                       lock (_list)
+                       {
+                               _list.Add(item);
+                               _snapshot = null;
+                       }
+               }
+
+               public void Clear()
+               {
+                       lock (_list)
+                       {
+                               _list.Clear();
+                               _snapshot = null;
+                       }
+               }
+
+               public bool Contains(T item)
+               {
+                       lock (_list)
+                               return _list.Contains(item);
+               }
+
+               public void CopyTo(T[] array, int arrayIndex)
+               {
+                       lock (_list)
+                               _list.CopyTo(array, arrayIndex);
+               }
+
+               public int Count
+               {
+                       get { return _list.Count; }
+               }
+
+               bool ICollection<T>.IsReadOnly
+               {
+                       get { return false; }
+               }
+
+               public bool Remove(T item)
+               {
+                       lock (_list)
+                       {
+                               if (_list.Remove(item))
+                               {
+                                       _snapshot = null;
+                                       return true;
+                               }
+
+                               return false;
+                       }
+               }
+
+               IEnumerator IEnumerable.GetEnumerator()
+               {
+                       return GetEnumerator();
+               }
+
+               public IEnumerator<T> GetEnumerator()
+               {
+                       ReadOnlyCollection<T> snap = _snapshot;
+                       if (snap == null)
+                       {
+                               lock (_list)
+                                       _snapshot = snap = new ReadOnlyCollection<T>(_list.ToList());
+                       }
+
+                       return snap.GetEnumerator();
+               }
+
+               public int IndexOf(T item)
+               {
+                       lock (_list)
+                               return _list.IndexOf(item);
+               }
+
+               public void Insert(int index, T item)
+               {
+                       lock (_list)
+                       {
+                               _list.Insert(index, item);
+                               _snapshot = null;
+                       }
+               }
+
+               public T this[int index]
+               {
+                       get
+                       {
+                               ReadOnlyCollection<T> snap = _snapshot;
+                               if (snap != null)
+                                       return snap[index];
+
+                               lock (_list)
+                                       return _list[index];
+                       }
+
+                       set
+                       {
+                               lock (_list)
+                               {
+                                       _list[index] = value;
+                                       _snapshot = null;
+                               }
+                       }
+               }
+
+               public void RemoveAt(int index)
+               {
+                       lock (_list)
+                       {
+                               _list.RemoveAt(index);
+                               _snapshot = null;
+                       }
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/TargetIdiom.cs b/src/Tizen.NUI/src/internal/XamlBinding/TargetIdiom.cs
new file mode 100755 (executable)
index 0000000..9619ed8
--- /dev/null
@@ -0,0 +1,12 @@
+namespace Tizen.NUI.Binding
+{
+       internal enum TargetIdiom
+       {
+               Unsupported,
+               Phone,
+               Tablet,
+               Desktop,
+               TV,
+               Watch
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/TargetPlatform.cs b/src/Tizen.NUI/src/internal/XamlBinding/TargetPlatform.cs
new file mode 100755 (executable)
index 0000000..7ea03d8
--- /dev/null
@@ -0,0 +1,14 @@
+using System;
+
+namespace Tizen.NUI.Binding
+{
+       [Obsolete]
+       internal enum TargetPlatform
+       {
+               Other,
+               iOS,
+               Android,
+               WinPhone,
+               Windows
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/TemplateBinding.cs b/src/Tizen.NUI/src/internal/XamlBinding/TemplateBinding.cs
new file mode 100755 (executable)
index 0000000..0bffd40
--- /dev/null
@@ -0,0 +1,132 @@
+using System;
+using System.Globalization;
+
+namespace Tizen.NUI.Binding
+{
+       internal class TemplateBinding : BindingBase
+       {
+               internal const string SelfPath = ".";
+               IValueConverter _converter;
+               object _converterParameter;
+
+               BindingExpression _expression;
+               string _path;
+
+               public TemplateBinding()
+               {
+               }
+
+               public TemplateBinding(string path, BindingMode mode = BindingMode.Default, IValueConverter converter = null, object converterParameter = null, string stringFormat = null)
+               {
+                       if (path == null)
+                               throw new ArgumentNullException("path");
+                       if (string.IsNullOrWhiteSpace(path))
+                               throw new ArgumentException("path can not be an empty string", "path");
+
+                       AllowChaining = true;
+                       Path = path;
+                       Converter = converter;
+                       ConverterParameter = converterParameter;
+                       Mode = mode;
+                       StringFormat = stringFormat;
+               }
+
+               public IValueConverter Converter
+               {
+                       get { return _converter; }
+                       set
+                       {
+                               ThrowIfApplied();
+
+                               _converter = value;
+                       }
+               }
+
+               public object ConverterParameter
+               {
+                       get { return _converterParameter; }
+                       set
+                       {
+                               ThrowIfApplied();
+
+                               _converterParameter = value;
+                       }
+               }
+
+               public string Path
+               {
+                       get { return _path; }
+                       set
+                       {
+                               ThrowIfApplied();
+
+                               _path = value;
+                               _expression = GetBindingExpression(value);
+                       }
+               }
+
+               internal override void Apply(bool fromTarget)
+               {
+                       base.Apply(fromTarget);
+
+                       if (_expression == null)
+                               _expression = new BindingExpression(this, SelfPath);
+
+                       _expression.Apply(fromTarget);
+               }
+
+               internal override async void Apply(object newContext, BindableObject bindObj, BindableProperty targetProperty, bool fromBindingContextChanged = false)
+               {
+                       var view = bindObj as Element;
+                       if (view == null)
+                               throw new InvalidOperationException();
+
+                       base.Apply(newContext, bindObj, targetProperty, fromBindingContextChanged);
+
+                       Element templatedParent = await TemplateUtilities.FindTemplatedParentAsync(view);
+                       ApplyInner(templatedParent, bindObj, targetProperty);
+               }
+
+               internal override BindingBase Clone()
+               {
+                       return new TemplateBinding(Path, Mode) { Converter = Converter, ConverterParameter = ConverterParameter, StringFormat = StringFormat };
+               }
+
+               internal override object GetSourceValue(object value, Type targetPropertyType)
+               {
+                       if (Converter != null)
+                               value = Converter.Convert(value, targetPropertyType, ConverterParameter, CultureInfo.CurrentUICulture);
+
+                       return base.GetSourceValue(value, targetPropertyType);
+               }
+
+               internal override object GetTargetValue(object value, Type sourcePropertyType)
+               {
+                       if (Converter != null)
+                               value = Converter.ConvertBack(value, sourcePropertyType, ConverterParameter, CultureInfo.CurrentUICulture);
+
+                       return base.GetTargetValue(value, sourcePropertyType);
+               }
+
+               internal override void Unapply(bool fromBindingContextChanged = false)
+               {
+                       base.Unapply(fromBindingContextChanged: fromBindingContextChanged);
+
+                       if (_expression != null)
+                               _expression.Unapply();
+               }
+
+               void ApplyInner(Element templatedParent, BindableObject bindableObject, BindableProperty targetProperty)
+               {
+                       if (_expression == null && templatedParent != null)
+                               _expression = new BindingExpression(this, SelfPath);
+
+                       _expression?.Apply(templatedParent, bindableObject, targetProperty);
+               }
+
+               BindingExpression GetBindingExpression(string path)
+               {
+                       return new BindingExpression(this, !string.IsNullOrWhiteSpace(path) ? path : SelfPath);
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/TemplateUtilities.cs b/src/Tizen.NUI/src/internal/XamlBinding/TemplateUtilities.cs
new file mode 100755 (executable)
index 0000000..cd152a7
--- /dev/null
@@ -0,0 +1,131 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Threading.Tasks;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Binding
+{
+       internal static class TemplateUtilities
+       {
+               public static async Task<Element> FindTemplatedParentAsync(Element element)
+               {
+                       if (element.RealParent is Application)
+                               return null;
+
+                       var skipCount = 0;
+                       element = await GetRealParentAsync(element);
+                       while (!Application.IsApplicationOrNull(element))
+                       {
+                               var controlTemplated = element as IControlTemplated;
+                               if (controlTemplated?.ControlTemplate != null)
+                               {
+                                       if (skipCount == 0)
+                                               return element;
+                                       skipCount--;
+                               }
+                               // if (element is ContentPresenter)
+                               //      skipCount++;
+                               element = await GetRealParentAsync(element);
+                       }
+
+                       return null;
+               }
+
+               public static Task<Element> GetRealParentAsync(Element element)
+               {
+                       Element parent = element.RealParent;
+                       if (parent is Application)
+                               return Task.FromResult<Element>(null);
+
+                       if (parent != null)
+                               return Task.FromResult(parent);
+
+                       var tcs = new TaskCompletionSource<Element>();
+                       EventHandler handler = null;
+                       handler = (sender, args) =>
+                       {
+                               tcs.TrySetResult(element.RealParent);
+                               element.ParentSet -= handler;
+                       };
+                       element.ParentSet += handler;
+
+                       return tcs.Task;
+               }
+
+               public static void OnContentChanged(BindableObject bindable, object oldValue, object newValue)
+               {
+                       var self = (IControlTemplated)bindable;
+                       var newElement = (Element)newValue;
+                       if (self.ControlTemplate == null)
+                       {
+                               while (self.InternalChildren.Count > 0)
+                               {
+                                       self.InternalChildren.RemoveAt(self.InternalChildren.Count - 1);
+                               }
+
+                               if (newValue != null)
+                                       self.InternalChildren.Add(newElement);
+                       }
+                       else
+                       {
+                               if (newElement != null)
+                               {
+                                       BindableObject.SetInheritedBindingContext(newElement, bindable.BindingContext);
+                               }
+                       }
+               }
+
+               public static void OnControlTemplateChanged(BindableObject bindable, object oldValue, object newValue)
+               {
+                       var self = (IControlTemplated)bindable;
+
+                       // First make sure any old ContentPresenters are no longer bound up. This MUST be
+                       // done before we attempt to make the new template.
+                       if (oldValue != null)
+                       {
+                               var queue = new Queue<Element>(16);
+                               queue.Enqueue((Element)self);
+
+                               while (queue.Count > 0)
+                               {
+                                       ReadOnlyCollection<Element> children = queue.Dequeue().LogicalChildrenInternal;
+                                       for (var i = 0; i < children.Count; i++)
+                                       {
+                                               Element child = children[i];
+                                               var controlTemplated = child as IControlTemplated;
+
+                                               // var presenter = child as ContentPresenter;
+                                               // if (presenter != null)
+                                               //      presenter.Clear();
+                                               // else if (controlTemplated == null || controlTemplated.ControlTemplate == null)
+                                               //      queue.Enqueue(child);
+                                       }
+                               }
+                       }
+
+                       // Now remove all remnants of any other children just to be sure
+                       while (self.InternalChildren.Count > 0)
+                       {
+                               self.InternalChildren.RemoveAt(self.InternalChildren.Count - 1);
+                       }
+
+                       ControlTemplate template = self.ControlTemplate;
+                       if (template == null)
+                       {
+                               // do nothing for now
+                       }
+                       else
+                       {
+                               var content = template.CreateContent() as View;
+                               if (content == null)
+                               {
+                                       throw new NotSupportedException("ControlTemplate must return a type derived from View.");
+                               }
+
+                               self.InternalChildren.Add(content);
+                               ((IControlTemplated)bindable).OnControlTemplateChanged((ControlTemplate)oldValue, (ControlTemplate)newValue);
+                       }
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/ThicknessTypeConverter.cs b/src/Tizen.NUI/src/internal/XamlBinding/ThicknessTypeConverter.cs
new file mode 100755 (executable)
index 0000000..70ccbe6
--- /dev/null
@@ -0,0 +1,63 @@
+using System;
+using System.Globalization;
+
+namespace Tizen.NUI.Binding
+{
+       // [Xaml.ProvideCompiled("Xamarin.Forms.Core.XamlC.ThicknessTypeConverter")]
+       [Xaml.TypeConversion(typeof(Thickness))]
+       internal class ThicknessTypeConverter : TypeConverter
+       {
+               public override object ConvertFromInvariantString(string value)
+               {
+                       if (value != null) {
+                               value = value.Trim();
+                               if (value.Contains(",")) { //Xaml
+                                       var thickness = value.Split(',');
+                                       switch (thickness.Length) {
+                                       case 2:
+                                               if (   double.TryParse(thickness[0], NumberStyles.Number, CultureInfo.InvariantCulture, out double h)
+                                                       && double.TryParse(thickness[1], NumberStyles.Number, CultureInfo.InvariantCulture, out double v))
+                                                       return new Thickness(h, v);
+                                               break;
+                                       case 4:
+                                               if (   double.TryParse(thickness[0], NumberStyles.Number, CultureInfo.InvariantCulture, out double l)
+                                                       && double.TryParse(thickness[1], NumberStyles.Number, CultureInfo.InvariantCulture, out double t)
+                                                       && double.TryParse(thickness[2], NumberStyles.Number, CultureInfo.InvariantCulture, out double r)
+                                                       && double.TryParse(thickness[3], NumberStyles.Number, CultureInfo.InvariantCulture, out double b))
+                                                       return new Thickness(l, t, r, b);
+                                               break;
+                                       }
+                               }
+                               else if (value.Contains(" ")) { //CSS
+                                       var thickness = value.Split(' ');
+                                       switch (thickness.Length) {
+                                       case 2:
+                                               if (   double.TryParse(thickness[0], NumberStyles.Number, CultureInfo.InvariantCulture, out double v)
+                                                       && double.TryParse(thickness[1], NumberStyles.Number, CultureInfo.InvariantCulture, out double h))
+                                                       return new Thickness(h, v);
+                                               break;
+                                       case 3:
+                                               if (   double.TryParse(thickness[0], NumberStyles.Number, CultureInfo.InvariantCulture, out double t)
+                                                       && double.TryParse(thickness[1], NumberStyles.Number, CultureInfo.InvariantCulture, out h)
+                                                       && double.TryParse(thickness[2], NumberStyles.Number, CultureInfo.InvariantCulture, out double b))
+                                                       return new Thickness(h, t, h, b);
+                                               break;
+                                       case 4:
+                                               if (   double.TryParse(thickness[0], NumberStyles.Number, CultureInfo.InvariantCulture, out t)
+                                                       && double.TryParse(thickness[1], NumberStyles.Number, CultureInfo.InvariantCulture, out double r)
+                                                       && double.TryParse(thickness[2], NumberStyles.Number, CultureInfo.InvariantCulture, out b)
+                                                       && double.TryParse(thickness[3], NumberStyles.Number, CultureInfo.InvariantCulture, out double l))
+                                                       return new Thickness(l, t, r, b);
+                                               break;
+                                       }
+                               }
+                               else { //single uniform thickness
+                                       if (double.TryParse(value, NumberStyles.Number, CultureInfo.InvariantCulture, out double l))
+                                               return new Thickness(l);
+                               }
+                       }
+
+                       throw new InvalidOperationException($"Cannot convert \"{value}\" into {typeof(Thickness)}");
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/ToolbarItem.cs b/src/Tizen.NUI/src/internal/XamlBinding/ToolbarItem.cs
new file mode 100755 (executable)
index 0000000..8b3df35
--- /dev/null
@@ -0,0 +1,57 @@
+using System;
+
+namespace Tizen.NUI.Binding
+{
+       internal class ToolbarItem : MenuItem
+       {
+               static readonly BindableProperty OrderProperty = BindableProperty.Create("Order", typeof(ToolbarItemOrder), typeof(ToolbarItem), ToolbarItemOrder.Default, validateValue: (bo, o) =>
+               {
+                       var order = (ToolbarItemOrder)o;
+                       return order == ToolbarItemOrder.Default || order == ToolbarItemOrder.Primary || order == ToolbarItemOrder.Secondary;
+               });
+
+               static readonly BindableProperty PriorityProperty = BindableProperty.Create("Priority", typeof(int), typeof(ToolbarItem), 0);
+
+               public ToolbarItem()
+               {
+               }
+
+               public ToolbarItem(string name, string icon, Action activated, ToolbarItemOrder order = ToolbarItemOrder.Default, int priority = 0)
+               {
+                       if (activated == null)
+                               throw new ArgumentNullException("activated");
+
+                       Text = name;
+                       Icon = icon;
+                       Clicked += (s, e) => activated();
+                       Order = order;
+                       Priority = priority;
+               }
+
+               [Obsolete("Name is obsolete as of version 1.3.0. Please use Text instead.")]
+               public string Name
+               {
+                       get { return Text; }
+                       set { Text = value; }
+               }
+
+               public ToolbarItemOrder Order
+               {
+                       get { return (ToolbarItemOrder)GetValue(OrderProperty); }
+                       set { SetValue(OrderProperty, value); }
+               }
+
+               public int Priority
+               {
+                       get { return (int)GetValue(PriorityProperty); }
+                       set { SetValue(PriorityProperty, value); }
+               }
+
+               [Obsolete("Activated is obsolete as of version 1.3.0. Please use Clicked instead.")]
+               public event EventHandler Activated
+               {
+                       add { Clicked += value; }
+                       remove { Clicked -= value; }
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/ToolbarItemEventArgs.cs b/src/Tizen.NUI/src/internal/XamlBinding/ToolbarItemEventArgs.cs
new file mode 100755 (executable)
index 0000000..a788447
--- /dev/null
@@ -0,0 +1,14 @@
+using System;
+
+namespace Tizen.NUI.Binding
+{
+       internal class ToolbarItemEventArgs : EventArgs
+       {
+               public ToolbarItemEventArgs(ToolbarItem item)
+               {
+                       ToolbarItem = item;
+               }
+
+               public ToolbarItem ToolbarItem { get; private set; }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/ToolbarItemOrder.cs b/src/Tizen.NUI/src/internal/XamlBinding/ToolbarItemOrder.cs
new file mode 100755 (executable)
index 0000000..8c90927
--- /dev/null
@@ -0,0 +1,9 @@
+namespace Tizen.NUI.Binding
+{
+       internal enum ToolbarItemOrder
+       {
+               Default,
+               Primary,
+               Secondary
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/TrackableCollection.cs b/src/Tizen.NUI/src/internal/XamlBinding/TrackableCollection.cs
new file mode 100755 (executable)
index 0000000..0ba5a89
--- /dev/null
@@ -0,0 +1,16 @@
+using System;
+using System.Collections.ObjectModel;
+
+namespace Tizen.NUI.Binding
+{
+       internal class TrackableCollection<T> : ObservableCollection<T>
+       {
+               public event EventHandler Clearing;
+
+               protected override void ClearItems()
+               {
+                       Clearing?.Invoke(this, EventArgs.Empty);
+                       base.ClearItems();
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/TypeConverter.cs b/src/Tizen.NUI/src/internal/XamlBinding/TypeConverter.cs
new file mode 100755 (executable)
index 0000000..26964af
--- /dev/null
@@ -0,0 +1,35 @@
+using System;
+using System.Globalization;
+
+namespace Tizen.NUI.Binding
+{
+       internal abstract class TypeConverter
+       {
+               public virtual bool CanConvertFrom(Type sourceType)
+               {
+                       if (sourceType == null)
+                               throw new ArgumentNullException(nameof(sourceType));
+
+                       return sourceType == typeof(string);
+               }
+
+               [Obsolete("ConvertFrom is obsolete as of version 2.2.0. Please use ConvertFromInvariantString (string) instead.")]
+               public virtual object ConvertFrom(object o)
+               {
+                       return null;
+               }
+
+               [Obsolete("ConvertFrom is obsolete as of version 2.2.0. Please use ConvertFromInvariantString (string) instead.")]
+               public virtual object ConvertFrom(CultureInfo culture, object o)
+               {
+                       return null;
+               }
+
+               public virtual object ConvertFromInvariantString(string value)
+               {
+#pragma warning disable 0618 // retain until ConvertFrom removed
+                       return ConvertFrom(CultureInfo.InvariantCulture, value);
+#pragma warning restore
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/TypeConverterAttribute.cs b/src/Tizen.NUI/src/internal/XamlBinding/TypeConverterAttribute.cs
new file mode 100755 (executable)
index 0000000..4739bae
--- /dev/null
@@ -0,0 +1,74 @@
+//
+// System.ComponentModel.TypeConverterAttribute
+//
+// Authors:
+//  Gonzalo Paniagua Javier (gonzalo@ximian.com)
+//  Andreas Nahr (ClassDevelopment@A-SoftTech.com)
+//
+// (C) 2002 Ximian, Inc (http://www.ximian.com)
+// (C) 2003 Andreas Nahr
+//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace Tizen.NUI.Binding
+{
+       [AttributeUsage(AttributeTargets.All)]
+       internal sealed class TypeConverterAttribute : Attribute
+       {
+               internal static string[] TypeConvertersType = { "Tizen.NUI.Binding.TypeConverterAttribute", "System.ComponentModel.TypeConverterAttribute" };
+
+               public static readonly TypeConverterAttribute Default = new TypeConverterAttribute();
+
+               public TypeConverterAttribute()
+               {
+                       ConverterTypeName = "";
+               }
+
+               public TypeConverterAttribute(string typeName)
+               {
+                       ConverterTypeName = typeName;
+               }
+
+               public TypeConverterAttribute(Type type)
+               {
+                       ConverterTypeName = type.AssemblyQualifiedName;
+               }
+
+               public string ConverterTypeName { get; }
+
+               public override bool Equals(object obj)
+               {
+                       if (!(obj is TypeConverterAttribute))
+                               return false;
+
+                       return ((TypeConverterAttribute)obj).ConverterTypeName == ConverterTypeName;
+               }
+
+               public override int GetHashCode()
+               {
+                       return ConverterTypeName.GetHashCode();
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/TypeTypeConverter.cs b/src/Tizen.NUI/src/internal/XamlBinding/TypeTypeConverter.cs
new file mode 100755 (executable)
index 0000000..e48050d
--- /dev/null
@@ -0,0 +1,33 @@
+using System;
+using System.Globalization;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Binding
+{
+       // [Xaml.ProvideCompiled("Xamarin.Forms.Core.XamlC.TypeTypeConverter")]
+       [Xaml.TypeConversion(typeof(Type))]
+       internal sealed class TypeTypeConverter : TypeConverter, IExtendedTypeConverter
+       {
+               [Obsolete("IExtendedTypeConverter.ConvertFrom is obsolete as of version 2.2.0. Please use ConvertFromInvariantString (string, IServiceProvider) instead.")]
+               object IExtendedTypeConverter.ConvertFrom(CultureInfo culture, object value, IServiceProvider serviceProvider)
+               {
+                       return ((IExtendedTypeConverter)this).ConvertFromInvariantString((string)value, serviceProvider);
+               }
+
+               object IExtendedTypeConverter.ConvertFromInvariantString(string value, IServiceProvider serviceProvider)
+               {
+                       if (serviceProvider == null)
+                               throw new ArgumentNullException("serviceProvider");
+                       var typeResolver = serviceProvider.GetService(typeof(IXamlTypeResolver)) as IXamlTypeResolver;
+                       if (typeResolver == null)
+                               throw new ArgumentException("No IXamlTypeResolver in IServiceProvider");
+
+                       return typeResolver.Resolve(value, serviceProvider);
+               }
+
+               public override object ConvertFromInvariantString(string value)
+               {
+                       throw new NotImplementedException();
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/UriTypeConverter.cs b/src/Tizen.NUI/src/internal/XamlBinding/UriTypeConverter.cs
new file mode 100755 (executable)
index 0000000..0759528
--- /dev/null
@@ -0,0 +1,26 @@
+using System;
+
+namespace Tizen.NUI.Binding
+{
+       // [Xaml.ProvideCompiled("Tizen.NUI.Core.XamlC.UriTypeConverter")]
+       [Xaml.TypeConversion(typeof(Uri))]
+       internal class UriTypeConverter : TypeConverter
+       {
+               public override object ConvertFromInvariantString(string value)
+               {
+                       if (string.IsNullOrWhiteSpace(value))
+                               return null;
+                       return new Uri(value, UriKind.RelativeOrAbsolute);
+               }
+
+               bool CanConvert(Type type)
+               {
+                       if (type == typeof(string))
+                               return true;
+                       if (type == typeof(Uri))
+                               return true;
+
+                       return false;
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/VectorTypeConverter.cs b/src/Tizen.NUI/src/internal/XamlBinding/VectorTypeConverter.cs
new file mode 100755 (executable)
index 0000000..db53a0d
--- /dev/null
@@ -0,0 +1,110 @@
+using System;
+using System.Linq;
+using System.Reflection;
+
+using Tizen.NUI;
+
+namespace Tizen.NUI.Binding
+{
+    internal class Vector2TypeConverter : TypeConverter
+    {
+        public override object ConvertFromInvariantString(string value)
+        {
+            if (value != null)
+            {
+                string[] parts = value.Split(',');
+                if (parts.Length == 2 )
+                {
+                    return new Vector2(float.Parse(parts[0].Trim()), float.Parse(parts[1].Trim()));
+                }
+            }
+
+            throw new InvalidOperationException($"Cannot convert \"{value}\" into {typeof(Vector2)}");
+        }
+    }
+
+    internal class Vector3TypeConverter : TypeConverter
+    {
+        public override object ConvertFromInvariantString(string value)
+        {
+            if (value != null)
+            {
+                string[] parts = value.Split(',');
+                if (parts.Length == 3 )
+                {
+                    return new Vector3(float.Parse(parts[0].Trim()), float.Parse(parts[1].Trim()), float.Parse(parts[2].Trim()));
+                }
+            }
+
+            throw new InvalidOperationException($"Cannot convert \"{value}\" into {typeof(Vector3)}");
+        }
+    }
+
+    internal class Vector4TypeConverter : TypeConverter
+    {
+        public override object ConvertFromInvariantString(string value)
+        {
+            if (value != null)
+            {
+                string[] parts = value.Split(',');
+                if (parts.Length == 4 )
+                {
+                    return new Vector4(float.Parse(parts[0].Trim()), float.Parse(parts[1].Trim()), float.Parse(parts[2].Trim()), float.Parse(parts[3].Trim()));
+                }
+            }
+
+            throw new InvalidOperationException($"Cannot convert \"{value}\" into {typeof(Vector4)}");
+        }
+    }
+
+    internal class RelativeVector2TypeConverter : TypeConverter
+    {
+        public override object ConvertFromInvariantString(string value)
+        {
+            if (value != null)
+            {
+                string[] parts = value.Split(',');
+                if (parts.Length == 2 )
+                {
+                    return new RelativeVector2(float.Parse(parts[0].Trim()), float.Parse(parts[1].Trim()));
+                }
+            }
+
+            throw new InvalidOperationException("Cannot convert \"{value}\" into {typeof(RelativeVector2)}");
+        }
+    }
+
+    internal class RelativeVector3TypeConverter : TypeConverter
+    {
+        public override object ConvertFromInvariantString(string value)
+        {
+            if (value != null)
+            {
+                string[] parts = value.Split(',');
+                if (parts.Length == 3 )
+                {
+                    return new RelativeVector3(float.Parse(parts[0].Trim()), float.Parse(parts[1].Trim()), float.Parse(parts[2].Trim()));
+                }
+            }
+
+            throw new InvalidOperationException($"Cannot convert \"{value}\" into {typeof(RelativeVector3)}");
+        }
+    }
+
+    internal class RelativeVector4TypeConverter : TypeConverter
+    {
+        public override object ConvertFromInvariantString(string value)
+        {
+            if (value != null)
+            {
+                string[] parts = value.Split(',');
+                if (parts.Length == 4 )
+                {
+                    return new RelativeVector4(float.Parse(parts[0].Trim()), float.Parse(parts[1].Trim()), float.Parse(parts[2].Trim()), float.Parse(parts[3].Trim()));
+                }
+            }
+
+            throw new InvalidOperationException($"Cannot convert \"{value}\" into {typeof(RelativeVector4)}");
+        }
+    }
+}
diff --git a/src/Tizen.NUI/src/internal/XamlBinding/WeakEventManager.cs b/src/Tizen.NUI/src/internal/XamlBinding/WeakEventManager.cs
new file mode 100755 (executable)
index 0000000..67614b2
--- /dev/null
@@ -0,0 +1,176 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using static System.String;
+
+namespace Tizen.NUI.Binding
+{
+       internal class WeakEventManager
+       {
+               readonly Dictionary<string, List<Subscription>> _eventHandlers =
+                       new Dictionary<string, List<Subscription>>();
+
+               public void AddEventHandler<TEventArgs>(string eventName, EventHandler<TEventArgs> handler)
+                       where TEventArgs : EventArgs
+               {
+                       if (IsNullOrEmpty(eventName))
+                       {
+                               throw new ArgumentNullException(nameof(eventName));
+                       }
+
+                       if (handler == null)
+                       {
+                               throw new ArgumentNullException(nameof(handler));
+                       }
+
+                       AddEventHandler(eventName, handler.Target, handler.GetMethodInfo());
+               }
+
+               public void AddEventHandler(string eventName, EventHandler handler)
+               {
+                       if (IsNullOrEmpty(eventName))
+                       {
+                               throw new ArgumentNullException(nameof(eventName));
+                       }
+
+                       if (handler == null)
+                       {
+                               throw new ArgumentNullException(nameof(handler));
+                       }
+
+                       AddEventHandler(eventName, handler.Target, handler.GetMethodInfo());
+               }
+
+               public void HandleEvent(object sender, object args, string eventName)
+               {
+                       var toRaise = new List<Tuple<object, MethodInfo>>();
+                       var toRemove = new List<Subscription>();
+
+                       List<Subscription> target;
+                       if (_eventHandlers.TryGetValue(eventName, out target))
+                       {
+                               foreach (Subscription subscription in target)
+                               {
+                                       bool isStatic = subscription.Subscriber == null;
+                                       if (isStatic)
+                                       {
+                                               // For a static method, we'll just pass null as the first parameter of MethodInfo.Invoke
+                                               toRaise.Add(Tuple.Create<object, MethodInfo>(null, subscription.Handler));
+                                               continue;
+                                       }
+
+                                       object subscriber = subscription.Subscriber.Target;
+
+                                       if (subscriber == null)
+                                       {
+                                               // The subscriber was collected, so there's no need to keep this subscription around
+                                               toRemove.Add(subscription);
+                                       }
+                                       else
+                                       {
+                                               toRaise.Add(Tuple.Create(subscriber, subscription.Handler));
+                                       }
+                               }
+
+                               foreach (Subscription subscription in toRemove)
+                               {
+                                       target.Remove(subscription);
+                               }
+                       }
+
+                       foreach (Tuple<object, MethodInfo> tuple in toRaise)
+                       {
+                               tuple.Item2.Invoke(tuple.Item1, new[] { sender, args });
+                       }
+               }
+
+               public void RemoveEventHandler<TEventArgs>(string eventName, EventHandler<TEventArgs> handler)
+                       where TEventArgs : EventArgs
+               {
+                       if (IsNullOrEmpty(eventName))
+                       {
+                               throw new ArgumentNullException(nameof(eventName));
+                       }
+
+                       if (handler == null)
+                       {
+                               throw new ArgumentNullException(nameof(handler));
+                       }
+
+                       RemoveEventHandler(eventName, handler.Target, handler.GetMethodInfo());
+               }
+
+               public void RemoveEventHandler(string eventName, EventHandler handler)
+               {
+                       if (IsNullOrEmpty(eventName))
+                       {
+                               throw new ArgumentNullException(nameof(eventName));
+                       }
+
+                       if (handler == null)
+                       {
+                               throw new ArgumentNullException(nameof(handler));
+                       }
+
+                       RemoveEventHandler(eventName, handler.Target, handler.GetMethodInfo());
+               }
+
+               void AddEventHandler(string eventName, object handlerTarget, MethodInfo methodInfo)
+               {
+                       List<Subscription> targets;
+                       if (!_eventHandlers.TryGetValue(eventName, out targets))
+                       {
+                               targets = new List<Subscription>();
+                               _eventHandlers.Add(eventName, targets);
+                       }
+
+                       if (handlerTarget == null)
+                       {
+                               // This event handler is a static method
+                               targets.Add(new Subscription(null, methodInfo));
+                               return;
+                       }
+
+                       targets.Add(new Subscription(new WeakReference(handlerTarget), methodInfo));
+               }
+
+               void RemoveEventHandler(string eventName, object handlerTarget, MemberInfo methodInfo)
+               {
+                       List<Subscription> subscriptions;
+                       if (!_eventHandlers.TryGetValue(eventName, out subscriptions))
+                       {
+                               return;
+                       }
+
+                       for (int n = subscriptions.Count; n > 0; n--)
+                       {
+                               Subscription current = subscriptions[n - 1];
+
+                               if (current.Subscriber != handlerTarget
+                                   || current.Handler.Name != methodInfo.Name)
+                               {
+                                       continue;
+                               }
+
+                               subscriptions.Remove(current);
+                       }
+               }
+
+               struct Subscription
+               {
+                       public Subscription(WeakReference subscriber, MethodInfo handler)
+                       {
+                               if (handler == null)
+                               {
+                                       throw new ArgumentNullException(nameof(handler));
+                               }
+
+                               Subscriber = subscriber;
+                               Handler = handler;
+                       }
+
+                       public readonly WeakReference Subscriber;
+                       public readonly MethodInfo Handler;
+               }
+       }
+}
\ No newline at end of file
index be2115c..a8aa2ff 100755 (executable)
@@ -335,6 +335,15 @@ namespace Tizen.NUI.BaseComponents
         }
 
         /// <summary>
+        /// Creates the default TableView view.
+        /// </summary>
+        public TableView() : this(NDalicPINVOKE.TableView_New(1, 1), true)
+        {
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+
+        /// <summary>
         /// Creates the TableView view.
         /// </summary>
         /// <param name="initialRows">Initial rows for the table.</param>
index 17cf9f4..1c2ce92 100755 (executable)
  * limitations under the License.
  *
  */
+using System;
+using System.ComponentModel;
+using Tizen.NUI.Binding;
+using Tizen.NUI.Internals;
+
 namespace Tizen.NUI
 {
 
@@ -21,8 +26,12 @@ namespace Tizen.NUI
     /// BaseHandle is a handle to an internal Dali resource.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
-    public class BaseHandle : global::System.IDisposable
+    public class BaseHandle : Element, global::System.IDisposable
     {
+
+        internal static readonly BindablePropertyKey NavigationPropertyKey = BindableProperty.CreateReadOnly("Navigation", typeof(INavigation), typeof(/*VisualElement*/BaseHandle), default(INavigation));
+        public static readonly BindableProperty NavigationProperty = NavigationPropertyKey.BindableProperty;
+
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
         /// <summary>
         /// swigCMemOwn
@@ -465,6 +474,22 @@ namespace Tizen.NUI
             }
         }
 
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public NavigationProxy NavigationProxy
+        {
+            get { return Navigation as NavigationProxy; }
+        }
+        public INavigation Navigation
+        {
+            get { return (INavigation)GetValue(NavigationProperty); }
+            internal set { SetValue(NavigationPropertyKey, value); }
+        }
+
+        public class FocusRequestArgs : EventArgs
+        {
+            public bool Focus { get; set; }
+            public bool Result { get; set; }
+        }
     }
 
 }
index 5a5af4f..eb97c04 100755 (executable)
  *
  */
 
+using System;
+using Tizen.NUI.Binding;
+
 namespace Tizen.NUI
 {
 
-    using System;
-
     /// <summary>
     /// The Color class.
     /// </summary>
-    /// <since_tizen> 3 </since_tizen>
+    [TypeConverter(typeof(ColorTypeConverter))]
     public class Color : global::System.IDisposable
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
old mode 100644 (file)
new mode 100755 (executable)
index 62ea52d..3a7ad14
@@ -14,6 +14,8 @@
 * limitations under the License.
 *
 */
+using System;
+using Tizen.NUI.Binding;
 
 namespace Tizen.NUI
 {
@@ -21,6 +23,7 @@ namespace Tizen.NUI
     /// Extents class describing the a collection of uint16_t.
     /// </summary>
     /// <since_tizen> 4 </since_tizen>
+    [TypeConverter(typeof(ExtentsTypeConverter))]
     public class Extents : global::System.IDisposable
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
index f8fd384..3f9d3d2 100755 (executable)
@@ -162,9 +162,8 @@ namespace Tizen.NUI
             }
             else
             {
-                //if (e.ProposedView) return proposed;
-                //else return current;
-                return current; //xb.teng
+                if (e.ProposedView) return proposed;
+                else return current;
             }
         }
 
index 38d5382..5f9ebd3 100755 (executable)
@@ -16,6 +16,7 @@
  */
 
 using System;
+using Tizen.NUI.Binding;
 using System.ComponentModel;
 
 namespace Tizen.NUI
@@ -25,6 +26,7 @@ namespace Tizen.NUI
     /// Position is a three-dimensional vector.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
+    [Tizen.NUI.Binding.TypeConverter(typeof(PositionTypeConverter))]
     public class Position : global::System.IDisposable
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
index 2cfde0d..1477c6c 100755 (executable)
@@ -14,6 +14,8 @@
  * limitations under the License.
  *
  */
+using System;
+using Tizen.NUI.Binding;
 
 namespace Tizen.NUI
 {
@@ -22,6 +24,7 @@ namespace Tizen.NUI
     /// Position2D is a two-dimensional vector.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
+    [Tizen.NUI.Binding.TypeConverter(typeof(Position2DTypeConverter))]
     public class Position2D : global::System.IDisposable
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
index 98cd07c..5fb4066 100755 (executable)
@@ -17,6 +17,8 @@
 
 using System;
 using System.ComponentModel;
+using System.Collections.Generic;
+using Tizen.NUI.Binding;
 
 namespace Tizen.NUI
 {
@@ -463,6 +465,18 @@ namespace Tizen.NUI
         }
 
         /// <summary>
+        /// Adds an keyvalue to the array.
+        /// This function should be first
+        /// </summary>
+        /// <param name="value">The value to add at the end of the array.</param>
+        public PropertyArray Add(KeyValue value)
+        {
+            PropertyArray ret = new PropertyArray(NDalicPINVOKE.Property_Array_Add(swigCPtr, PropertyValue.getCPtr(value.TrueValue)), false);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
         /// Adds an element to the array.
         /// </summary>
         /// <param name="value">The value to add at the end of the array.</param>
@@ -1009,6 +1023,28 @@ namespace Tizen.NUI
         }
 
         /// <summary>
+        /// Inserts the keyvalue to the map.<br />
+        /// Does not check for duplicates.<br />
+        /// </summary>
+        /// <param name="keyValue">The keyvalue to insert.</param>
+        /// <returns>Returns a reference to this object.</returns>
+        public PropertyMap Add(KeyValue keyValue)
+        {
+            PropertyMap ret = new PropertyMap();
+            if ( keyValue.KeyInt != null )
+            {
+                ret = new PropertyMap(NDalicPINVOKE.Property_Map_Add__SWIG_2(swigCPtr, (int)keyValue.KeyInt, PropertyValue.getCPtr(keyValue.TrueValue)), false);
+            }
+            else if ( keyValue.KeyString != null)
+            {
+                ret = new PropertyMap(NDalicPINVOKE.Property_Map_Add__SWIG_0(swigCPtr, keyValue.KeyString, PropertyValue.getCPtr(keyValue.TrueValue)), false);
+            }
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+
+            return ret;
+        }
+
+        /// <summary>
         /// Retrieves the value at the specified position.
         /// </summary>
         /// <param name="position">The specified position.</param>
@@ -1225,12 +1261,15 @@ namespace Tizen.NUI
             System.Type type = obj.GetType();
 
             PropertyValue value;
-
-            if (type.Equals(typeof(int)))
+            if (type.IsEnum)
+            {
+                value = new PropertyValue((int)obj);//Enum.Parse(type, str);
+            }
+            else if (type.Equals(typeof(int)))
             {
                 value = new PropertyValue((int)obj);
             }
-            if (type.Equals(typeof(System.Int32)))
+            else if (type.Equals(typeof(System.Int32)))
             {
                 value = new PropertyValue((int)obj);
             }
@@ -1770,4 +1809,324 @@ namespace Tizen.NUI
             return ret;
         }
     }
+
+    /// <summary>
+    /// KeyValue class.
+    /// </summary>
+    public class KeyValue
+    {
+        private string _key = null;
+        private object _originalValue = null;
+        private object _originalKey = null;
+
+        public int? KeyInt = null;
+        public string KeyString = null;
+        public PropertyValue TrueValue = null;
+
+        /// <summary>
+        /// Default Constructor.
+        /// </summary>
+        public KeyValue()
+        {}
+
+        /// <summary>
+        /// Key property.
+        /// </summary>
+        public string Key
+        {
+            get
+            {
+                return _key;
+            }
+            set
+            {
+                _key = value;
+                ParseKey(value);
+            }
+        }
+
+        /// <summary>
+        /// OriginalKey property.
+        /// </summary>
+        public object OriginalKey
+        {
+            get
+            {
+                return _originalKey;
+            }
+            set
+            {
+                _originalKey = value;
+                if (value is int || value is Int32)
+                {
+                    KeyInt = (int)value;
+                }
+                if (value is string)
+                {
+                    KeyString = (string)value;
+                }
+
+
+                if (value.GetType().Equals(typeof(int)) || value.GetType().Equals(typeof(Int32)))
+                {
+                    KeyInt = (int)value;
+                }
+                else if (value.GetType().Equals(typeof(string)))
+                {
+                    KeyString = (string)value;
+                }
+                KeyInt = (int)value;
+            }
+        }
+
+        /// <summary>
+        /// Value property.
+        /// </summary>
+        public object Value
+        {
+            get
+            {
+                return _originalValue;
+            }
+            set
+            {
+                _originalValue = value;
+                TrueValue = PropertyValue.CreateFromObject(value);
+            }
+        }
+
+        /// <summary>
+        /// IntergerValue property.
+        /// </summary>
+        public int IntergerValue
+        {
+            set
+            {
+                TrueValue = new PropertyValue(value);
+            }
+        }
+
+        /// <summary>
+        /// BooleanValue property.
+        /// </summary>
+        public bool BooleanValue
+        {
+            set
+            {
+                TrueValue = new PropertyValue(value);
+            }
+        }
+
+        /// <summary>
+        /// SingleValue property.
+        /// </summary>
+        public float SingleValue
+        {
+            set
+            {
+                TrueValue = new PropertyValue(value);
+            }
+        }
+
+        /// <summary>
+        /// StringValue property.
+        /// </summary>
+        public string StringValue
+        {
+            set
+            {
+                TrueValue = new PropertyValue(value);
+            }
+        }
+
+        /// <summary>
+        /// Vector2Value property.
+        /// </summary>
+        public Vector2 Vector2Value
+        {
+            set
+            {
+                TrueValue = new PropertyValue(value);
+            }
+        }
+
+        /// <summary>
+        /// Vector3Value property.
+        /// </summary>
+        public Vector3 Vector3Value
+        {
+            set
+            {
+                TrueValue = new PropertyValue(value);
+            }
+        }
+
+        /// <summary>
+        /// Vector4Value property.
+        /// </summary>
+        public Vector4 Vector4Value
+        {
+            set
+            {
+                TrueValue = new PropertyValue(value);
+            }
+        }
+
+        /// <summary>
+        /// PositionValue property.
+        /// </summary>
+        public Position PositionValue
+        {
+            set
+            {
+                TrueValue = new PropertyValue(value);
+            }
+        }
+
+        /// <summary>
+        /// Position2DValue property.
+        /// </summary>
+        public Position2D Position2DValue
+        {
+            set
+            {
+                TrueValue = new PropertyValue(value);
+            }
+        }
+
+        /// <summary>
+        /// SizeValue property.
+        /// </summary>
+        public Size SizeValue
+        {
+            set
+            {
+                TrueValue = new PropertyValue(value);
+            }
+        }
+
+        /// <summary>
+        /// Size2DValue property.
+        /// </summary>
+        public Size2D Size2DValue
+        {
+            set
+            {
+                TrueValue = new PropertyValue(value);
+            }
+        }
+
+        /// <summary>
+        /// ColorValue property.
+        /// </summary>
+        public Color ColorValue
+        {
+            set
+            {
+                TrueValue = new PropertyValue(value);
+            }
+        }
+
+        /// <summary>
+        /// RectangleValue property.
+        /// </summary>
+        public Rectangle RectangleValue
+        {
+            set
+            {
+                TrueValue = new PropertyValue(value);
+            }
+        }
+
+        /// <summary>
+        /// RotationValue property.
+        /// </summary>
+        public Rotation RotationValue
+        {
+            set
+            {
+                TrueValue = new PropertyValue(value);
+            }
+        }
+
+        /// <summary>
+        /// RelativeVector2Value property.
+        /// </summary>
+        public RelativeVector2 RelativeVector2Value
+        {
+            set
+            {
+                TrueValue = new PropertyValue(value);
+            }
+        }
+
+        /// <summary>
+        /// RelativeVector3Value property.
+        /// </summary>
+        public RelativeVector3 RelativeVector3Value
+        {
+            set
+            {
+                TrueValue = new PropertyValue(value);
+            }
+        }
+
+        /// <summary>
+        /// RelativeVector4Value property.
+        /// </summary>
+        public RelativeVector4 RelativeVector4Value
+        {
+            set
+            {
+                TrueValue = new PropertyValue(value);
+            }
+        }
+
+        /// <summary>
+        /// ExtentsValue property.
+        /// </summary>
+        public Extents ExtentsValue
+        {
+            set
+            {
+                TrueValue = new PropertyValue(value);
+            }
+        }
+
+        /// <summary>
+        /// PropertyArrayValue property.
+        /// </summary>
+        public PropertyArray PropertyArrayValue
+        {
+            set
+            {
+                TrueValue = new PropertyValue(value);
+            }
+        }
+
+        /// <summary>
+        /// PropertyMapValue property.
+        /// </summary>
+        public PropertyMap PropertyMapValue
+        {
+            set
+            {
+                TrueValue = new PropertyValue(value);
+            }
+        }
+
+        private void ParseKey(string key)
+        {
+            int v = -1;
+            if (VisualExtension.KeyDictionary.ContainsKey(key))
+            {
+                VisualExtension.KeyDictionary.TryGetValue(key, out v);
+                KeyInt = v;
+            }
+            else
+            {
+                KeyString = Key;
+            }
+        }
+    }
 }
\ No newline at end of file
index 81cbc07..d02a394 100755 (executable)
@@ -14,6 +14,8 @@
  * limitations under the License.
  *
  */
+ using System;
+ using Tizen.NUI.Binding;
 
 namespace Tizen.NUI
 {
@@ -22,6 +24,7 @@ namespace Tizen.NUI
     /// The Rectangle class.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
+    [TypeConverter(typeof(RectangleTypeConverter))]
     public class Rectangle : global::System.IDisposable
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
index 5b9e621..e22adfe 100755 (executable)
@@ -15,6 +15,7 @@
  *
  */
  using System;
+ using Tizen.NUI.Binding;
 
 namespace Tizen.NUI
 {
@@ -24,6 +25,7 @@ namespace Tizen.NUI
     /// Both values (x and y) should be between [0, 1].
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
+    [TypeConverter(typeof(RelativeVector2TypeConverter))]
     public class RelativeVector2 : global::System.IDisposable
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
index bce6549..7212476 100755 (executable)
@@ -16,6 +16,8 @@
  */
 
 using System;
+using Tizen.NUI.Binding;
+
 namespace Tizen.NUI
 {
 
@@ -24,6 +26,7 @@ namespace Tizen.NUI
     /// All values (x, y, z and w) should be between [0, 1].
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
+    [TypeConverter(typeof(RelativeVector3TypeConverter))]
     public class RelativeVector3 : global::System.IDisposable
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
index c471f95..7a4314e 100755 (executable)
@@ -15,6 +15,7 @@
  *
  */
  using System;
+ using Tizen.NUI.Binding;
 
 namespace Tizen.NUI
 {
@@ -24,6 +25,7 @@ namespace Tizen.NUI
     /// All values (x, y, and z) should be between [0, 1].
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
+    [TypeConverter(typeof(RelativeVector4TypeConverter))]
     public class RelativeVector4 : global::System.IDisposable
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
index 7725b43..50ec032 100755 (executable)
@@ -14,6 +14,8 @@
  * limitations under the License.
  *
  */
+ using System;
+ using Tizen.NUI.Binding;
 
 namespace Tizen.NUI
 {
@@ -22,6 +24,7 @@ namespace Tizen.NUI
     /// The Rotation class.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
+    [TypeConverter(typeof(RotationTypeConverter))]
     public class Rotation : global::System.IDisposable
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
index ed1d4a7..8939fa9 100755 (executable)
@@ -14,6 +14,8 @@
  * limitations under the License.
  *
  */
+using System;
+using Tizen.NUI.Binding;
 
 namespace Tizen.NUI
 {
@@ -22,6 +24,7 @@ namespace Tizen.NUI
     /// A two-dimensional size.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
+    [Tizen.NUI.Binding.TypeConverter(typeof(Size2DTypeConverter))]
     public class Size2D : global::System.IDisposable
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
index bc3f15b..33ff251 100755 (executable)
@@ -14,6 +14,8 @@
  * limitations under the License.
  *
  */
+using System;
+using Tizen.NUI.Binding;
 
 namespace Tizen.NUI
 {
@@ -22,6 +24,7 @@ namespace Tizen.NUI
     /// A two-dimensional vector.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
+    [TypeConverter(typeof(Vector2TypeConverter))]
     public class Vector2 : global::System.IDisposable
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
index a828521..c48701f 100755 (executable)
@@ -14,6 +14,8 @@
  * limitations under the License.
  *
  */
+using System;
+using Tizen.NUI.Binding;
 
 namespace Tizen.NUI
 {
@@ -22,6 +24,7 @@ namespace Tizen.NUI
     /// A three-dimensional vector.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
+    [TypeConverter(typeof(Vector3TypeConverter))]
     public class Vector3 : global::System.IDisposable
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
index 577d87f..fa0bbd5 100755 (executable)
@@ -14,6 +14,8 @@
  * limitations under the License.
  *
  */
+using System;
+using Tizen.NUI.Binding;
 
 namespace Tizen.NUI
 {
@@ -22,6 +24,7 @@ namespace Tizen.NUI
     /// A four-dimensional vector.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
+    [TypeConverter(typeof(Vector4TypeConverter))]
     public class Vector4 : global::System.IDisposable
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
diff --git a/src/Tizen.NUI/src/public/Xaml/ViewExtensions.cs b/src/Tizen.NUI/src/public/Xaml/ViewExtensions.cs
new file mode 100755 (executable)
index 0000000..b073a44
--- /dev/null
@@ -0,0 +1,47 @@
+//
+// ViewExtensions.cs
+//
+// Author:
+//       Stephane Delcroix <stephane@mi8.be>
+//
+// Copyright (c) 2013 Mobile Inception
+// Copyright (c) 2013 Xamarin, Inc
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using System;
+using System.Reflection;
+
+namespace Tizen.NUI.Xaml
+{
+       public static class Extensions
+       {
+               public static TXaml LoadFromXaml<TXaml>(this TXaml view, Type callingType) 
+               {
+                       XamlLoader.Load(view, callingType);
+                       return view;
+               }
+
+               public static TXaml LoadFromXaml<TXaml>(this TXaml view, string xaml)
+               {
+                       XamlLoader.Load(view, xaml);
+                       return view;
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/public/XamlBinding/BindableObject.cs b/src/Tizen.NUI/src/public/XamlBinding/BindableObject.cs
new file mode 100755 (executable)
index 0000000..9e567f7
--- /dev/null
@@ -0,0 +1,693 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using Tizen.NUI.Internals;
+
+namespace Tizen.NUI.Binding
+{
+       public abstract class BindableObject : INotifyPropertyChanged, IDynamicResourceHandler
+       {
+               public static readonly BindableProperty BindingContextProperty =
+                       BindableProperty.Create("BindingContext", typeof(object), typeof(BindableObject), default(object),
+                                                                       BindingMode.OneWay, null, BindingContextPropertyChanged, null, null, BindingContextPropertyBindingChanging);
+
+               readonly List<BindablePropertyContext> _properties = new List<BindablePropertyContext>(4);
+
+               bool _applying;
+               object _inheritedContext;
+
+               public object BindingContext
+               {
+                       get { return _inheritedContext ?? GetValue(BindingContextProperty); }
+                       set { SetValue(BindingContextProperty, value); }
+               }
+
+               void IDynamicResourceHandler.SetDynamicResource(BindableProperty property, string key)
+               {
+                       SetDynamicResource(property, key, false);
+               }
+
+               public event PropertyChangedEventHandler PropertyChanged;
+
+               public event EventHandler BindingContextChanged;
+
+               internal void ClearValue(BindableProperty property, bool fromStyle)
+               {
+                       ClearValue(property, fromStyle: fromStyle, checkAccess: true);
+               }
+
+               public void ClearValue(BindableProperty property)
+               {
+                       ClearValue(property, fromStyle: false, checkAccess: true);
+               }
+
+               public void ClearValue(BindablePropertyKey propertyKey)
+               {
+                       if (propertyKey == null)
+                               throw new ArgumentNullException("propertyKey");
+
+                       ClearValue(propertyKey.BindableProperty, fromStyle:false, checkAccess: false);
+               }
+
+               public bool IsSet(BindableProperty targetProperty)
+               {
+                       if (targetProperty == null)
+                               throw new ArgumentNullException(nameof(targetProperty));
+
+                       var bpcontext = GetContext(targetProperty);
+                       return bpcontext != null
+                               && (bpcontext.Attributes & BindableContextAttributes.IsDefaultValue) == 0;
+               }
+
+               public object GetValue(BindableProperty property)
+               {
+                       if (property == null)
+                               throw new ArgumentNullException("property");
+
+                       BindablePropertyContext context = property.DefaultValueCreator != null ? GetOrCreateContext(property) : GetContext(property);
+
+                       if (context == null)
+                               return property.DefaultValue;
+
+                       return context.Value;
+               }
+
+               public event PropertyChangingEventHandler PropertyChanging;
+
+               public void RemoveBinding(BindableProperty property)
+               {
+                       if (property == null)
+                               throw new ArgumentNullException("property");
+
+                       BindablePropertyContext context = GetContext(property);
+                       if (context == null || context.Binding == null)
+                               return;
+
+                       RemoveBinding(property, context);
+               }
+
+               public void SetBinding(BindableProperty targetProperty, BindingBase binding)
+               {
+                       SetBinding(targetProperty, binding, false);
+               }
+
+               public void SetValue(BindableProperty property, object value)
+               {
+                       SetValue(property, value, false, true);
+               }
+
+               public void SetValue(BindablePropertyKey propertyKey, object value)
+               {
+                       if (propertyKey == null)
+                               throw new ArgumentNullException("propertyKey");
+
+                       SetValue(propertyKey.BindableProperty, value, false, false);
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public static void SetInheritedBindingContext(BindableObject bindable, object value)
+               {
+                       BindablePropertyContext bpContext = bindable.GetContext(BindingContextProperty);
+                       if (bpContext != null && ((bpContext.Attributes & BindableContextAttributes.IsManuallySet) != 0))
+                               return;
+
+                       object oldContext = bindable._inheritedContext;
+
+                       if (ReferenceEquals(oldContext, value))
+                               return;
+
+                       if (bpContext != null && oldContext == null)
+                               oldContext = bpContext.Value;
+
+                       if (bpContext != null && bpContext.Binding != null)
+                       {
+                               bpContext.Binding.Context = value;
+                               bindable._inheritedContext = null;
+                       }
+                       else
+                       {
+                               bindable._inheritedContext = value;
+                       }
+
+                       bindable.ApplyBindings(skipBindingContext:false, fromBindingContextChanged:true);
+                       bindable.OnBindingContextChanged();
+               }
+
+               protected void ApplyBindings()
+               {
+                       ApplyBindings(skipBindingContext: false, fromBindingContextChanged: false);
+               }
+
+               protected virtual void OnBindingContextChanged()
+               {
+                       BindingContextChanged?.Invoke(this, EventArgs.Empty);
+               }
+
+               protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
+                       => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+
+               protected virtual void OnPropertyChanging([CallerMemberName] string propertyName = null)
+                       => PropertyChanging?.Invoke(this, new PropertyChangingEventArgs(propertyName));
+
+               protected void UnapplyBindings()
+               {
+                       for (int i = 0, _propertiesCount = _properties.Count; i < _propertiesCount; i++) {
+                               BindablePropertyContext context = _properties [i];
+                               if (context.Binding == null)
+                                       continue;
+
+                               context.Binding.Unapply();
+                       }
+               }
+
+               internal bool GetIsBound(BindableProperty targetProperty)
+               {
+                       if (targetProperty == null)
+                               throw new ArgumentNullException("targetProperty");
+
+                       BindablePropertyContext bpcontext = GetContext(targetProperty);
+                       return bpcontext != null && bpcontext.Binding != null;
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public object[] GetValues(BindableProperty property0, BindableProperty property1)
+               {
+                       var values = new object[2];
+
+                       for (var i = 0; i < _properties.Count; i++)
+                       {
+                               BindablePropertyContext context = _properties[i];
+
+                               if (ReferenceEquals(context.Property, property0))
+                               {
+                                       values[0] = context.Value;
+                                       property0 = null;
+                               }
+                               else if (ReferenceEquals(context.Property, property1))
+                               {
+                                       values[1] = context.Value;
+                                       property1 = null;
+                               }
+
+                               if (property0 == null && property1 == null)
+                                       return values;
+                       }
+
+                       if (!ReferenceEquals(property0, null))
+                               values[0] = property0.DefaultValueCreator == null ? property0.DefaultValue : CreateAndAddContext(property0).Value;
+                       if (!ReferenceEquals(property1, null))
+                               values[1] = property1.DefaultValueCreator == null ? property1.DefaultValue : CreateAndAddContext(property1).Value;
+
+                       return values;
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public object[] GetValues(BindableProperty property0, BindableProperty property1, BindableProperty property2)
+               {
+                       var values = new object[3];
+
+                       for (var i = 0; i < _properties.Count; i++)
+                       {
+                               BindablePropertyContext context = _properties[i];
+
+                               if (ReferenceEquals(context.Property, property0))
+                               {
+                                       values[0] = context.Value;
+                                       property0 = null;
+                               }
+                               else if (ReferenceEquals(context.Property, property1))
+                               {
+                                       values[1] = context.Value;
+                                       property1 = null;
+                               }
+                               else if (ReferenceEquals(context.Property, property2))
+                               {
+                                       values[2] = context.Value;
+                                       property2 = null;
+                               }
+
+                               if (property0 == null && property1 == null && property2 == null)
+                                       return values;
+                       }
+
+                       if (!ReferenceEquals(property0, null))
+                               values[0] = property0.DefaultValueCreator == null ? property0.DefaultValue : CreateAndAddContext(property0).Value;
+                       if (!ReferenceEquals(property1, null))
+                               values[1] = property1.DefaultValueCreator == null ? property1.DefaultValue : CreateAndAddContext(property1).Value;
+                       if (!ReferenceEquals(property2, null))
+                               values[2] = property2.DefaultValueCreator == null ? property2.DefaultValue : CreateAndAddContext(property2).Value;
+
+                       return values;
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               internal object[] GetValues(params BindableProperty[] properties)
+               {
+                       var values = new object[properties.Length];
+                       for (var i = 0; i < _properties.Count; i++) {
+                               var context = _properties[i];
+                               var index = properties.IndexOf(context.Property);
+                               if (index < 0)
+                                       continue;
+                               values[index] = context.Value;
+                       }
+                       for (var i = 0; i < values.Length; i++) {
+                               if (!ReferenceEquals(values[i], null))
+                                       continue;
+                               values[i] = properties[i].DefaultValueCreator == null ? properties[i].DefaultValue : CreateAndAddContext(properties[i]).Value;
+                       }
+                       return values;
+               }
+
+               internal virtual void OnRemoveDynamicResource(BindableProperty property)
+               {
+               }
+
+               internal virtual void OnSetDynamicResource(BindableProperty property, string key)
+               {
+               }
+
+               internal void RemoveDynamicResource(BindableProperty property)
+               {
+                       if (property == null)
+                               throw new ArgumentNullException("property");
+
+                       OnRemoveDynamicResource(property);
+                       BindablePropertyContext context = GetOrCreateContext(property);
+                       context.Attributes &= ~BindableContextAttributes.IsDynamicResource;
+               }
+
+               internal void SetBinding(BindableProperty targetProperty, BindingBase binding, bool fromStyle)
+               {
+                       if (targetProperty == null)
+                               throw new ArgumentNullException("targetProperty");
+                       if (binding == null)
+                               throw new ArgumentNullException("binding");
+
+                       if (fromStyle && !CanBeSetFromStyle(targetProperty))
+                               return;
+
+                       var context = GetOrCreateContext(targetProperty);
+                       if (fromStyle)
+                               context.Attributes |= BindableContextAttributes.IsSetFromStyle;
+                       else
+                               context.Attributes &= ~BindableContextAttributes.IsSetFromStyle;
+
+                       if (context.Binding != null)
+                               context.Binding.Unapply();
+
+                       BindingBase oldBinding = context.Binding;
+                       context.Binding = binding;
+
+                       targetProperty.BindingChanging?.Invoke(this, oldBinding, binding);
+
+                       binding.Apply(BindingContext, this, targetProperty);
+               }
+
+               bool CanBeSetFromStyle(BindableProperty property)
+               {
+                       var context = GetContext(property);
+                       if (context == null)
+                               return true;
+                       if ((context.Attributes & BindableContextAttributes.IsSetFromStyle) == BindableContextAttributes.IsSetFromStyle)
+                               return true;
+                       if ((context.Attributes & BindableContextAttributes.IsDefaultValue) == BindableContextAttributes.IsDefaultValue)
+                               return true;
+                       if ((context.Attributes & BindableContextAttributes.IsDefaultValueCreated) == BindableContextAttributes.IsDefaultValueCreated)
+                               return true;
+                       return false;
+               }
+
+               internal void SetDynamicResource(BindableProperty property, string key)
+               {
+                       SetDynamicResource(property, key, false);
+               }
+
+               internal void SetDynamicResource(BindableProperty property, string key, bool fromStyle)
+               {
+                       if (property == null)
+                               throw new ArgumentNullException(nameof(property));
+                       if (string.IsNullOrEmpty(key))
+                               throw new ArgumentNullException(nameof(key));
+                       if (fromStyle && !CanBeSetFromStyle(property))
+                               return;
+
+                       var context = GetOrCreateContext(property);
+
+                       context.Attributes |= BindableContextAttributes.IsDynamicResource;
+                       if (fromStyle)
+                               context.Attributes |= BindableContextAttributes.IsSetFromStyle;
+                       else
+                               context.Attributes &= ~BindableContextAttributes.IsSetFromStyle;
+
+                       OnSetDynamicResource(property, key);
+               }
+
+               internal void SetValue(BindableProperty property, object value, bool fromStyle)
+               {
+                       SetValue(property, value, fromStyle, true);
+               }
+
+               internal void SetValueCore(BindablePropertyKey propertyKey, object value, SetValueFlags attributes = SetValueFlags.None)
+               {
+                       SetValueCore(propertyKey.BindableProperty, value, attributes, SetValuePrivateFlags.None);
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public void SetValueCore(BindableProperty property, object value, SetValueFlags attributes = SetValueFlags.None)
+               {
+                       SetValueCore(property, value, attributes, SetValuePrivateFlags.Default);
+               }
+
+               internal void SetValueCore(BindableProperty property, object value, SetValueFlags attributes, SetValuePrivateFlags privateAttributes)
+               {
+                       bool checkAccess = (privateAttributes & SetValuePrivateFlags.CheckAccess) != 0;
+                       bool manuallySet = (privateAttributes & SetValuePrivateFlags.ManuallySet) != 0;
+                       bool silent = (privateAttributes & SetValuePrivateFlags.Silent) != 0;
+                       bool fromStyle = (privateAttributes & SetValuePrivateFlags.FromStyle) != 0;
+                       bool converted = (privateAttributes & SetValuePrivateFlags.Converted) != 0;
+
+                       if (property == null)
+                               throw new ArgumentNullException("property");
+                       if (checkAccess && property.IsReadOnly)
+                       {
+                               Debug.WriteLine("Can not set the BindableProperty \"{0}\" because it is readonly.", property.PropertyName);
+                               return;
+                       }
+
+                       if (!converted && !property.TryConvert(ref value))
+                       {
+                               Console.WriteLine("SetValue", "Can not convert {0} to type '{1}'", value, property.ReturnType);
+                               return;
+                       }
+
+                       if (property.ValidateValue != null && !property.ValidateValue(this, value))
+                               throw new ArgumentException("Value was an invalid value for " + property.PropertyName, "value");
+
+                       if (property.CoerceValue != null)
+                               value = property.CoerceValue(this, value);
+
+                       BindablePropertyContext context = GetOrCreateContext(property);
+                       if (manuallySet) {
+                               context.Attributes |= BindableContextAttributes.IsManuallySet;
+                               context.Attributes &= ~BindableContextAttributes.IsSetFromStyle;
+                       } else
+                               context.Attributes &= ~BindableContextAttributes.IsManuallySet;
+
+                       if (fromStyle)
+                               context.Attributes |= BindableContextAttributes.IsSetFromStyle;
+                       // else omitted on purpose
+
+                       bool currentlyApplying = _applying;
+
+                       if ((context.Attributes & BindableContextAttributes.IsBeingSet) != 0)
+                       {
+                               Queue<SetValueArgs> delayQueue = context.DelayedSetters;
+                               if (delayQueue == null)
+                                       context.DelayedSetters = delayQueue = new Queue<SetValueArgs>();
+
+                               delayQueue.Enqueue(new SetValueArgs(property, context, value, currentlyApplying, attributes));
+                       }
+                       else
+                       {
+                               context.Attributes |= BindableContextAttributes.IsBeingSet;
+                               SetValueActual(property, context, value, currentlyApplying, attributes, silent);
+
+                               Queue<SetValueArgs> delayQueue = context.DelayedSetters;
+                               if (delayQueue != null)
+                               {
+                                       while (delayQueue.Count > 0)
+                                       {
+                                               SetValueArgs s = delayQueue.Dequeue();
+                                               SetValueActual(s.Property, s.Context, s.Value, s.CurrentlyApplying, s.Attributes);
+                                       }
+
+                                       context.DelayedSetters = null;
+                               }
+
+                               context.Attributes &= ~BindableContextAttributes.IsBeingSet;
+                       }
+               }
+
+               internal void ApplyBindings(bool skipBindingContext, bool fromBindingContextChanged)
+               {
+                       var prop = _properties.ToArray();
+                       for (int i = 0, propLength = prop.Length; i < propLength; i++) {
+                               BindablePropertyContext context = prop [i];
+                               BindingBase binding = context.Binding;
+                               if (binding == null)
+                                       continue;
+
+                               if (skipBindingContext && ReferenceEquals(context.Property, BindingContextProperty))
+                                       continue;
+
+                               binding.Unapply(fromBindingContextChanged: fromBindingContextChanged);
+                               binding.Apply(BindingContext, this, context.Property, fromBindingContextChanged: fromBindingContextChanged);
+                       }
+               }
+
+               static void BindingContextPropertyBindingChanging(BindableObject bindable, BindingBase oldBindingBase, BindingBase newBindingBase)
+               {
+                       object context = bindable._inheritedContext;
+                       var oldBinding = oldBindingBase as Binding;
+                       var newBinding = newBindingBase as Binding;
+
+                       if (context == null && oldBinding != null)
+                               context = oldBinding.Context;
+                       if (context != null && newBinding != null)
+                               newBinding.Context = context;
+               }
+
+               static void BindingContextPropertyChanged(BindableObject bindable, object oldvalue, object newvalue)
+               {
+                       bindable._inheritedContext = null;
+                       bindable.ApplyBindings(skipBindingContext: true, fromBindingContextChanged:true);
+                       bindable.OnBindingContextChanged();
+               }
+
+               void ClearValue(BindableProperty property, bool fromStyle, bool checkAccess)
+               {
+                       if (property == null)
+                               throw new ArgumentNullException(nameof(property));
+
+                       if (checkAccess && property.IsReadOnly)
+                               throw new InvalidOperationException(string.Format("The BindableProperty \"{0}\" is readonly.", property.PropertyName));
+
+                       BindablePropertyContext bpcontext = GetContext(property);
+                       if (bpcontext == null)
+                               return;
+
+                       if (fromStyle && !CanBeSetFromStyle(property))
+                               return;
+
+                       object original = bpcontext.Value;
+
+                       object newValue = property.GetDefaultValue(this);
+
+                       bool same = Equals(original, newValue);
+                       if (!same)
+                       {
+                               property.PropertyChanging?.Invoke(this, original, newValue);
+
+                               OnPropertyChanging(property.PropertyName);
+                       }
+
+                       bpcontext.Attributes &= ~BindableContextAttributes.IsManuallySet;
+                       bpcontext.Value = newValue;
+                       if (property.DefaultValueCreator == null)
+                               bpcontext.Attributes |= BindableContextAttributes.IsDefaultValue;
+                       else
+                               bpcontext.Attributes |= BindableContextAttributes.IsDefaultValueCreated;
+
+                       if (!same)
+                       {
+                               OnPropertyChanged(property.PropertyName);
+                               property.PropertyChanged?.Invoke(this, original, newValue);
+                       }
+               }
+
+               [MethodImpl(MethodImplOptions.AggressiveInlining)]
+               BindablePropertyContext CreateAndAddContext(BindableProperty property)
+               {
+                       var context = new BindablePropertyContext { Property = property, Value = property.DefaultValueCreator != null ? property.DefaultValueCreator(this) : property.DefaultValue };
+
+                       if (property.DefaultValueCreator == null)
+                               context.Attributes = BindableContextAttributes.IsDefaultValue;
+                       else
+                               context.Attributes = BindableContextAttributes.IsDefaultValueCreated;
+
+                       _properties.Add(context);
+                       return context;
+               }
+
+               [MethodImpl(MethodImplOptions.AggressiveInlining)]
+               BindablePropertyContext GetContext(BindableProperty property)
+               {
+                       List<BindablePropertyContext> properties = _properties;
+
+                       for (var i = 0; i < properties.Count; i++)
+                       {
+                               BindablePropertyContext context = properties[i];
+                               if (ReferenceEquals(context.Property, property))
+                                       return context;
+                       }
+
+                       return null;
+               }
+
+               [MethodImpl(MethodImplOptions.AggressiveInlining)]
+               BindablePropertyContext GetOrCreateContext(BindableProperty property)
+               {
+                       BindablePropertyContext context = GetContext(property);
+                       if (context == null)
+                       {
+                               context = CreateAndAddContext(property);
+                       }
+
+                       return context;
+               }
+
+               void RemoveBinding(BindableProperty property, BindablePropertyContext context)
+               {
+                       context.Binding.Unapply();
+
+                       property.BindingChanging?.Invoke(this, context.Binding, null);
+
+                       context.Binding = null;
+               }
+
+               void SetValue(BindableProperty property, object value, bool fromStyle, bool checkAccess)
+               {
+                       if (property == null)
+                               throw new ArgumentNullException("property");
+
+                       if (checkAccess && property.IsReadOnly)
+                               throw new InvalidOperationException(string.Format("The BindableProperty \"{0}\" is readonly.", property.PropertyName));
+
+                       if (fromStyle && !CanBeSetFromStyle(property))
+                               return;
+
+                       SetValueCore(property, value, SetValueFlags.ClearOneWayBindings | SetValueFlags.ClearDynamicResource,
+                               (fromStyle ? SetValuePrivateFlags.FromStyle : SetValuePrivateFlags.ManuallySet) | (checkAccess ? SetValuePrivateFlags.CheckAccess : 0));
+               }
+
+               void SetValueActual(BindableProperty property, BindablePropertyContext context, object value, bool currentlyApplying, SetValueFlags attributes, bool silent = false)
+               {
+                       object original = context.Value;
+                       bool raiseOnEqual = (attributes & SetValueFlags.RaiseOnEqual) != 0;
+                       bool clearDynamicResources = (attributes & SetValueFlags.ClearDynamicResource) != 0;
+                       bool clearOneWayBindings = (attributes & SetValueFlags.ClearOneWayBindings) != 0;
+                       bool clearTwoWayBindings = (attributes & SetValueFlags.ClearTwoWayBindings) != 0;
+
+                       bool same = ReferenceEquals(context.Property, BindingContextProperty) ? ReferenceEquals(value, original) : Equals(value, original);
+                       if (!silent && (!same || raiseOnEqual))
+                       {
+                               property.PropertyChanging?.Invoke(this, original, value);
+
+                               OnPropertyChanging(property.PropertyName);
+                       }
+
+                       if (!same || raiseOnEqual)
+                       {
+                               context.Value = value;
+                       }
+
+                       context.Attributes &= ~BindableContextAttributes.IsDefaultValue;
+                       context.Attributes &= ~BindableContextAttributes.IsDefaultValueCreated;
+
+                       if ((context.Attributes & BindableContextAttributes.IsDynamicResource) != 0 && clearDynamicResources)
+                               RemoveDynamicResource(property);
+
+                       BindingBase binding = context.Binding;
+                       if (binding != null)
+                       {
+                               if (clearOneWayBindings && binding.GetRealizedMode(property) == BindingMode.OneWay || clearTwoWayBindings && binding.GetRealizedMode(property) == BindingMode.TwoWay)
+                               {
+                                       RemoveBinding(property, context);
+                                       binding = null;
+                               }
+                       }
+
+                       if (!silent && (!same || raiseOnEqual))
+                       {
+                               if (binding != null && !currentlyApplying)
+                               {
+                                       _applying = true;
+                                       binding.Apply(true);
+                                       _applying = false;
+                               }
+
+                               OnPropertyChanged(property.PropertyName);
+
+                               property.PropertyChanged?.Invoke(this, original, value);
+                       }
+               }
+
+               [Flags]
+               enum BindableContextAttributes
+               {
+                       IsManuallySet = 1 << 0,
+                       IsBeingSet = 1 << 1,
+                       IsDynamicResource = 1 << 2,
+                       IsSetFromStyle = 1 << 3,
+                       IsDefaultValue = 1 << 4,
+                       IsDefaultValueCreated = 1 << 5,
+               }
+
+               class BindablePropertyContext
+               {
+                       public BindableContextAttributes Attributes;
+                       public BindingBase Binding;
+                       public Queue<SetValueArgs> DelayedSetters;
+                       public BindableProperty Property;
+                       public object Value;
+               }
+
+               [Flags]
+               internal enum SetValuePrivateFlags
+               {
+                       None = 0,
+                       CheckAccess = 1 << 0,
+                       Silent = 1 << 1,
+                       ManuallySet = 1 << 2,
+                       FromStyle = 1 << 3,
+                       Converted = 1 << 4,
+                       Default = CheckAccess
+               }
+
+               class SetValueArgs
+               {
+                       public readonly SetValueFlags Attributes;
+                       public readonly BindablePropertyContext Context;
+                       public readonly bool CurrentlyApplying;
+                       public readonly BindableProperty Property;
+                       public readonly object Value;
+
+                       public SetValueArgs(BindableProperty property, BindablePropertyContext context, object value, bool currentlyApplying, SetValueFlags attributes)
+                       {
+                               Property = property;
+                               Context = context;
+                               Value = value;
+                               CurrentlyApplying = currentlyApplying;
+                               Attributes = attributes;
+                       }
+               }
+       }
+}
+
+namespace Tizen.NUI.Internals
+{
+       [Flags]
+       [EditorBrowsable(EditorBrowsableState.Never)]
+       public enum SetValueFlags
+       {
+               None = 0,
+               ClearOneWayBindings = 1 << 0,
+               ClearTwoWayBindings = 1 << 1,
+               ClearDynamicResource = 1 << 2,
+               RaiseOnEqual = 1 << 3
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/public/XamlBinding/BindableProperty.cs b/src/Tizen.NUI/src/public/XamlBinding/BindableProperty.cs
new file mode 100755 (executable)
index 0000000..b5505e0
--- /dev/null
@@ -0,0 +1,339 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq.Expressions;
+using System.Reflection;
+using Tizen.NUI.Internals;
+using Tizen.NUI.Xaml;
+
+namespace Tizen.NUI.Binding
+{
+       [DebuggerDisplay("{PropertyName}")]
+       [TypeConverter(typeof(BindablePropertyConverter))]
+       public sealed class BindableProperty
+       {
+               public delegate void BindingPropertyChangedDelegate(BindableObject bindable, object oldValue, object newValue);
+
+               public delegate void BindingPropertyChangedDelegate<in TPropertyType>(BindableObject bindable, TPropertyType oldValue, TPropertyType newValue);
+
+               public delegate void BindingPropertyChangingDelegate(BindableObject bindable, object oldValue, object newValue);
+
+               public delegate void BindingPropertyChangingDelegate<in TPropertyType>(BindableObject bindable, TPropertyType oldValue, TPropertyType newValue);
+
+               public delegate object CoerceValueDelegate(BindableObject bindable, object value);
+
+               public delegate TPropertyType CoerceValueDelegate<TPropertyType>(BindableObject bindable, TPropertyType value);
+
+               public delegate object CreateDefaultValueDelegate(BindableObject bindable);
+
+               public delegate TPropertyType CreateDefaultValueDelegate<in TDeclarer, out TPropertyType>(TDeclarer bindable);
+
+               public delegate bool ValidateValueDelegate(BindableObject bindable, object value);
+
+               public delegate bool ValidateValueDelegate<in TPropertyType>(BindableObject bindable, TPropertyType value);
+
+               static readonly Dictionary<Type, TypeConverter> WellKnownConvertTypes = new  Dictionary<Type,TypeConverter>
+               {
+                       { typeof(Uri), new UriTypeConverter() },
+                       { typeof(Color), new ColorTypeConverter() },
+               };
+
+               // more or less the encoding of this, without the need to reflect
+               // http://msdn.microsoft.com/en-us/library/y5b434w4.aspx
+               static readonly Dictionary<Type, Type[]> SimpleConvertTypes = new Dictionary<Type, Type[]>
+               {
+                       { typeof(sbyte), new[] { typeof(string), typeof(short), typeof(int), typeof(long), typeof(float), typeof(double), typeof(decimal) } },
+                       { typeof(byte), new[] { typeof(string), typeof(short), typeof(ushort), typeof(int), typeof(uint), typeof(ulong), typeof(float), typeof(double), typeof(decimal) } },
+                       { typeof(short), new[] { typeof(string), typeof(int), typeof(long), typeof(float), typeof(double), typeof(decimal) } },
+                       { typeof(ushort), new[] { typeof(string), typeof(int), typeof(uint), typeof(long), typeof(ulong), typeof(float), typeof(double), typeof(decimal) } },
+                       { typeof(int), new[] { typeof(string), typeof(long), typeof(float), typeof(double), typeof(decimal) } },
+                       { typeof(uint), new[] { typeof(string), typeof(long), typeof(ulong), typeof(float), typeof(double), typeof(decimal) } },
+                       { typeof(long), new[] { typeof(string), typeof(float), typeof(double), typeof(decimal) } },
+                       { typeof(char), new[] { typeof(string), typeof(ushort), typeof(int), typeof(uint), typeof(long), typeof(ulong), typeof(float), typeof(double), typeof(decimal) } },
+                       { typeof(float), new[] { typeof(string), typeof(double) } },
+                       { typeof(ulong), new[] { typeof(string), typeof(float), typeof(double), typeof(decimal) } }
+               };
+
+               BindableProperty(string propertyName, Type returnType, Type declaringType, object defaultValue, BindingMode defaultBindingMode = BindingMode.OneWay,
+                                                                ValidateValueDelegate validateValue = null, BindingPropertyChangedDelegate propertyChanged = null, BindingPropertyChangingDelegate propertyChanging = null,
+                                                                CoerceValueDelegate coerceValue = null, BindablePropertyBindingChanging bindingChanging = null, bool isReadOnly = false, CreateDefaultValueDelegate defaultValueCreator = null)
+               {
+                       if (propertyName == null)
+                               throw new ArgumentNullException("propertyName");
+                       if (ReferenceEquals(returnType, null))
+                               throw new ArgumentNullException("returnType");
+                       if (ReferenceEquals(declaringType, null))
+                               throw new ArgumentNullException("declaringType");
+
+                       // don't use Enum.IsDefined as its redonkulously expensive for what it does
+                       if (defaultBindingMode != BindingMode.Default && defaultBindingMode != BindingMode.OneWay && defaultBindingMode != BindingMode.OneWayToSource && defaultBindingMode != BindingMode.TwoWay && defaultBindingMode != BindingMode.OneTime)
+                               throw new ArgumentException("Not a valid type of BindingMode", "defaultBindingMode");
+                       if (defaultValue == null && Nullable.GetUnderlyingType(returnType) == null && returnType.GetTypeInfo().IsValueType)
+                               throw new ArgumentException("Not a valid default value", "defaultValue");
+                       if (defaultValue != null && !returnType.IsInstanceOfType(defaultValue))
+                               throw new ArgumentException("Default value did not match return type", "defaultValue");
+                       if (defaultBindingMode == BindingMode.Default)
+                               defaultBindingMode = BindingMode.OneWay;
+
+                       PropertyName = propertyName;
+                       ReturnType = returnType;
+                       ReturnTypeInfo = returnType.GetTypeInfo();
+                       DeclaringType = declaringType;
+                       DefaultValue = defaultValue;
+                       DefaultBindingMode = defaultBindingMode;
+                       PropertyChanged = propertyChanged;
+                       PropertyChanging = propertyChanging;
+                       ValidateValue = validateValue;
+                       CoerceValue = coerceValue;
+                       BindingChanging = bindingChanging;
+                       IsReadOnly = isReadOnly;
+                       DefaultValueCreator = defaultValueCreator;
+               }
+
+               public Type DeclaringType { get; private set; }
+
+               public BindingMode DefaultBindingMode { get; private set; }
+
+               public object DefaultValue { get; }
+
+               public bool IsReadOnly { get; private set; }
+
+               public string PropertyName { get; }
+
+               public Type ReturnType { get; }
+
+               internal BindablePropertyBindingChanging BindingChanging { get; private set; }
+
+               internal CoerceValueDelegate CoerceValue { get; private set; }
+
+               internal CreateDefaultValueDelegate DefaultValueCreator { get; }
+
+               internal BindingPropertyChangedDelegate PropertyChanged { get; private set; }
+
+               internal BindingPropertyChangingDelegate PropertyChanging { get; private set; }
+
+               internal System.Reflection.TypeInfo ReturnTypeInfo { get; }
+
+               internal ValidateValueDelegate ValidateValue { get; private set; }
+
+               [Obsolete("Create<> (generic) is obsolete as of version 2.1.0 and is no longer supported.")]
+               public static BindableProperty Create<TDeclarer, TPropertyType>(Expression<Func<TDeclarer, TPropertyType>> getter, TPropertyType defaultValue, BindingMode defaultBindingMode = BindingMode.OneWay,
+                                                                                                                                               ValidateValueDelegate<TPropertyType> validateValue = null, BindingPropertyChangedDelegate<TPropertyType> propertyChanged = null,
+                                                                                                                                               BindingPropertyChangingDelegate<TPropertyType> propertyChanging = null, CoerceValueDelegate<TPropertyType> coerceValue = null,
+                                                                                                                                               CreateDefaultValueDelegate<TDeclarer, TPropertyType> defaultValueCreator = null) where TDeclarer : BindableObject
+               {
+                       return Create(getter, defaultValue, defaultBindingMode, validateValue, propertyChanged, propertyChanging, coerceValue, null, defaultValueCreator: defaultValueCreator);
+               }
+
+               public static BindableProperty Create(string propertyName, Type returnType, Type declaringType, object defaultValue = null, BindingMode defaultBindingMode = BindingMode.OneWay,
+                                                                                         ValidateValueDelegate validateValue = null, BindingPropertyChangedDelegate propertyChanged = null, BindingPropertyChangingDelegate propertyChanging = null,
+                                                                                         CoerceValueDelegate coerceValue = null, CreateDefaultValueDelegate defaultValueCreator = null)
+               {
+                       return new BindableProperty(propertyName, returnType, declaringType, defaultValue, defaultBindingMode, validateValue, propertyChanged, propertyChanging, coerceValue,
+                               defaultValueCreator: defaultValueCreator);
+               }
+
+               [Obsolete("CreateAttached<> (generic) is obsolete as of version 2.1.0 and is no longer supported.")]
+               public static BindableProperty CreateAttached<TDeclarer, TPropertyType>(Expression<Func<BindableObject, TPropertyType>> staticgetter, TPropertyType defaultValue,
+                                                                                                                                                               BindingMode defaultBindingMode = BindingMode.OneWay, ValidateValueDelegate<TPropertyType> validateValue = null, BindingPropertyChangedDelegate<TPropertyType> propertyChanged = null,
+                                                                                                                                                               BindingPropertyChangingDelegate<TPropertyType> propertyChanging = null, CoerceValueDelegate<TPropertyType> coerceValue = null,
+                                                                                                                                                               CreateDefaultValueDelegate<BindableObject, TPropertyType> defaultValueCreator = null)
+               {
+                       return CreateAttached<TDeclarer, TPropertyType>(staticgetter, defaultValue, defaultBindingMode, validateValue, propertyChanged, propertyChanging, coerceValue, null,
+                               defaultValueCreator: defaultValueCreator);
+               }
+
+               public static BindableProperty CreateAttached(string propertyName, Type returnType, Type declaringType, object defaultValue, BindingMode defaultBindingMode = BindingMode.OneWay,
+                                                                                                         ValidateValueDelegate validateValue = null, BindingPropertyChangedDelegate propertyChanged = null, BindingPropertyChangingDelegate propertyChanging = null,
+                                                                                                         CoerceValueDelegate coerceValue = null, CreateDefaultValueDelegate defaultValueCreator = null)
+               {
+                       return CreateAttached(propertyName, returnType, declaringType, defaultValue, defaultBindingMode, validateValue, propertyChanged, propertyChanging, coerceValue, null, false, defaultValueCreator);
+               }
+
+               [Obsolete("CreateAttachedReadOnly<> (generic) is obsolete as of version 2.1.0 and is no longer supported.")]
+               public static BindablePropertyKey CreateAttachedReadOnly<TDeclarer, TPropertyType>(Expression<Func<BindableObject, TPropertyType>> staticgetter, TPropertyType defaultValue,
+                                                                                                                                                                                  BindingMode defaultBindingMode = BindingMode.OneWayToSource, ValidateValueDelegate<TPropertyType> validateValue = null,
+                                                                                                                                                                                  BindingPropertyChangedDelegate<TPropertyType> propertyChanged = null, BindingPropertyChangingDelegate<TPropertyType> propertyChanging = null,
+                                                                                                                                                                                  CoerceValueDelegate<TPropertyType> coerceValue = null, CreateDefaultValueDelegate<BindableObject, TPropertyType> defaultValueCreator = null)
+
+               {
+                       return
+                               new BindablePropertyKey(CreateAttached<TDeclarer, TPropertyType>(staticgetter, defaultValue, defaultBindingMode, validateValue, propertyChanged, propertyChanging, coerceValue, null, true,
+                                       defaultValueCreator));
+               }
+
+               public static BindablePropertyKey CreateAttachedReadOnly(string propertyName, Type returnType, Type declaringType, object defaultValue, BindingMode defaultBindingMode = BindingMode.OneWayToSource,
+                                                                                                                                ValidateValueDelegate validateValue = null, BindingPropertyChangedDelegate propertyChanged = null, BindingPropertyChangingDelegate propertyChanging = null,
+                                                                                                                                CoerceValueDelegate coerceValue = null, CreateDefaultValueDelegate defaultValueCreator = null)
+               {
+                       return
+                               new BindablePropertyKey(CreateAttached(propertyName, returnType, declaringType, defaultValue, defaultBindingMode, validateValue, propertyChanged, propertyChanging, coerceValue, null, true,
+                                       defaultValueCreator));
+               }
+
+               [Obsolete("CreateReadOnly<> (generic) is obsolete as of version 2.1.0 and is no longer supported.")]
+               public static BindablePropertyKey CreateReadOnly<TDeclarer, TPropertyType>(Expression<Func<TDeclarer, TPropertyType>> getter, TPropertyType defaultValue,
+                                                                                                                                                                  BindingMode defaultBindingMode = BindingMode.OneWayToSource, ValidateValueDelegate<TPropertyType> validateValue = null,
+                                                                                                                                                                  BindingPropertyChangedDelegate<TPropertyType> propertyChanged = null, BindingPropertyChangingDelegate<TPropertyType> propertyChanging = null,
+                                                                                                                                                                  CoerceValueDelegate<TPropertyType> coerceValue = null, CreateDefaultValueDelegate<TDeclarer, TPropertyType> defaultValueCreator = null) where TDeclarer : BindableObject
+               {
+                       return new BindablePropertyKey(Create(getter, defaultValue, defaultBindingMode, validateValue, propertyChanged, propertyChanging, coerceValue, null, true, defaultValueCreator));
+               }
+
+               public static BindablePropertyKey CreateReadOnly(string propertyName, Type returnType, Type declaringType, object defaultValue, BindingMode defaultBindingMode = BindingMode.OneWayToSource,
+                                                                                                                ValidateValueDelegate validateValue = null, BindingPropertyChangedDelegate propertyChanged = null, BindingPropertyChangingDelegate propertyChanging = null,
+                                                                                                                CoerceValueDelegate coerceValue = null, CreateDefaultValueDelegate defaultValueCreator = null)
+               {
+                       return
+                               new BindablePropertyKey(new BindableProperty(propertyName, returnType, declaringType, defaultValue, defaultBindingMode, validateValue, propertyChanged, propertyChanging, coerceValue,
+                                       isReadOnly: true, defaultValueCreator: defaultValueCreator));
+               }
+
+               [Obsolete("Create<> (generic) is obsolete as of version 2.1.0 and is no longer supported.")]
+               internal static BindableProperty Create<TDeclarer, TPropertyType>(Expression<Func<TDeclarer, TPropertyType>> getter, TPropertyType defaultValue, BindingMode defaultBindingMode,
+                                                                                                                                                 ValidateValueDelegate<TPropertyType> validateValue, BindingPropertyChangedDelegate<TPropertyType> propertyChanged, BindingPropertyChangingDelegate<TPropertyType> propertyChanging,
+                                                                                                                                                 CoerceValueDelegate<TPropertyType> coerceValue, BindablePropertyBindingChanging bindingChanging, bool isReadOnly = false,
+                                                                                                                                                 CreateDefaultValueDelegate<TDeclarer, TPropertyType> defaultValueCreator = null) where TDeclarer : BindableObject
+               {
+                       if (getter == null)
+                               throw new ArgumentNullException("getter");
+
+                       Expression expr = getter.Body;
+
+                       var unary = expr as UnaryExpression;
+                       if (unary != null)
+                               expr = unary.Operand;
+
+                       var member = expr as MemberExpression;
+                       if (member == null)
+                               throw new ArgumentException("getter must be a MemberExpression", "getter");
+
+                       var property = (PropertyInfo)member.Member;
+
+                       ValidateValueDelegate untypedValidateValue = null;
+                       BindingPropertyChangedDelegate untypedBindingPropertyChanged = null;
+                       BindingPropertyChangingDelegate untypedBindingPropertyChanging = null;
+                       CoerceValueDelegate untypedCoerceValue = null;
+                       CreateDefaultValueDelegate untypedDefaultValueCreator = null;
+                       if (validateValue != null)
+                               untypedValidateValue = (bindable, value) => validateValue(bindable, (TPropertyType)value);
+                       if (propertyChanged != null)
+                               untypedBindingPropertyChanged = (bindable, oldValue, newValue) => propertyChanged(bindable, (TPropertyType)oldValue, (TPropertyType)newValue);
+                       if (propertyChanging != null)
+                               untypedBindingPropertyChanging = (bindable, oldValue, newValue) => propertyChanging(bindable, (TPropertyType)oldValue, (TPropertyType)newValue);
+                       if (coerceValue != null)
+                               untypedCoerceValue = (bindable, value) => coerceValue(bindable, (TPropertyType)value);
+                       if (defaultValueCreator != null)
+                               untypedDefaultValueCreator = o => defaultValueCreator((TDeclarer)o);
+
+                       return new BindableProperty(property.Name, property.PropertyType, typeof(TDeclarer), defaultValue, defaultBindingMode, untypedValidateValue, untypedBindingPropertyChanged,
+                               untypedBindingPropertyChanging, untypedCoerceValue, bindingChanging, isReadOnly, untypedDefaultValueCreator);
+               }
+
+               internal static BindableProperty Create(string propertyName, Type returnType, Type declaringType, object defaultValue, BindingMode defaultBindingMode, ValidateValueDelegate validateValue,
+                                                                                               BindingPropertyChangedDelegate propertyChanged, BindingPropertyChangingDelegate propertyChanging, CoerceValueDelegate coerceValue, BindablePropertyBindingChanging bindingChanging,
+                                                                                               CreateDefaultValueDelegate defaultValueCreator = null)
+               {
+                       return new BindableProperty(propertyName, returnType, declaringType, defaultValue, defaultBindingMode, validateValue, propertyChanged, propertyChanging, coerceValue, bindingChanging,
+                               defaultValueCreator: defaultValueCreator);
+               }
+
+               [Obsolete("CreateAttached<> (generic) is obsolete as of version 2.1.0 and is no longer supported.")]
+               internal static BindableProperty CreateAttached<TDeclarer, TPropertyType>(Expression<Func<BindableObject, TPropertyType>> staticgetter, TPropertyType defaultValue, BindingMode defaultBindingMode,
+                                                                                                                                                                 ValidateValueDelegate<TPropertyType> validateValue, BindingPropertyChangedDelegate<TPropertyType> propertyChanged, BindingPropertyChangingDelegate<TPropertyType> propertyChanging,
+                                                                                                                                                                 CoerceValueDelegate<TPropertyType> coerceValue, BindablePropertyBindingChanging bindingChanging, bool isReadOnly = false,
+                                                                                                                                                                 CreateDefaultValueDelegate<BindableObject, TPropertyType> defaultValueCreator = null)
+               {
+                       if (staticgetter == null)
+                               throw new ArgumentNullException("staticgetter");
+
+                       Expression expr = staticgetter.Body;
+
+                       var unary = expr as UnaryExpression;
+                       if (unary != null)
+                               expr = unary.Operand;
+
+                       var methodcall = expr as MethodCallExpression;
+                       if (methodcall == null)
+                               throw new ArgumentException("staticgetter must be a MethodCallExpression", "staticgetter");
+
+                       MethodInfo method = methodcall.Method;
+                       if (!method.Name.StartsWith("Get", StringComparison.Ordinal))
+                               throw new ArgumentException("staticgetter name must start with Get", "staticgetter");
+
+                       string propertyname = method.Name.Substring(3);
+
+                       ValidateValueDelegate untypedValidateValue = null;
+                       BindingPropertyChangedDelegate untypedBindingPropertyChanged = null;
+                       BindingPropertyChangingDelegate untypedBindingPropertyChanging = null;
+                       CoerceValueDelegate untypedCoerceValue = null;
+                       CreateDefaultValueDelegate untypedDefaultValueCreator = null;
+                       if (validateValue != null)
+                               untypedValidateValue = (bindable, value) => validateValue(bindable, (TPropertyType)value);
+                       if (propertyChanged != null)
+                               untypedBindingPropertyChanged = (bindable, oldValue, newValue) => propertyChanged(bindable, (TPropertyType)oldValue, (TPropertyType)newValue);
+                       if (propertyChanging != null)
+                               untypedBindingPropertyChanging = (bindable, oldValue, newValue) => propertyChanging(bindable, (TPropertyType)oldValue, (TPropertyType)newValue);
+                       if (coerceValue != null)
+                               untypedCoerceValue = (bindable, value) => coerceValue(bindable, (TPropertyType)value);
+                       if (defaultValueCreator != null)
+                               untypedDefaultValueCreator = o => defaultValueCreator(o);
+
+                       return new BindableProperty(propertyname, method.ReturnType, typeof(TDeclarer), defaultValue, defaultBindingMode, untypedValidateValue, untypedBindingPropertyChanged, untypedBindingPropertyChanging,
+                               untypedCoerceValue, bindingChanging, isReadOnly, untypedDefaultValueCreator);
+               }
+
+               internal static BindableProperty CreateAttached(string propertyName, Type returnType, Type declaringType, object defaultValue, BindingMode defaultBindingMode, ValidateValueDelegate validateValue,
+                                                                                                               BindingPropertyChangedDelegate propertyChanged, BindingPropertyChangingDelegate propertyChanging, CoerceValueDelegate coerceValue, BindablePropertyBindingChanging bindingChanging,
+                                                                                                               bool isReadOnly, CreateDefaultValueDelegate defaultValueCreator = null)
+               {
+                       return new BindableProperty(propertyName, returnType, declaringType, defaultValue, defaultBindingMode, validateValue, propertyChanged, propertyChanging, coerceValue, bindingChanging, isReadOnly,
+                               defaultValueCreator);
+               }
+
+               internal object GetDefaultValue(BindableObject bindable)
+               {
+                       if (DefaultValueCreator != null)
+                               return DefaultValueCreator(bindable);
+
+                       return DefaultValue;
+               }
+
+               internal bool TryConvert(ref object value)
+               {
+                       if (value == null)
+                       {
+                               return !ReturnTypeInfo.IsValueType || ReturnTypeInfo.IsGenericType && ReturnTypeInfo.GetGenericTypeDefinition() == typeof(Nullable<>);
+                       }
+
+                       Type valueType = value.GetType();
+                       Type type = ReturnType;
+
+                       // Dont support arbitrary IConvertible by limiting which types can use this
+                       Type[] convertableTo;
+                       TypeConverter typeConverterTo;
+                       if (SimpleConvertTypes.TryGetValue(valueType, out convertableTo) && Array.IndexOf(convertableTo, type) != -1)
+                       {
+                               value = Convert.ChangeType(value, type);
+                       }
+                       else if (WellKnownConvertTypes.TryGetValue(type, out typeConverterTo) && typeConverterTo.CanConvertFrom(valueType))
+                       {
+                               value = typeConverterTo.ConvertFromInvariantString(value.ToString());
+                       }
+                       else if (!ReturnTypeInfo.IsAssignableFrom(valueType.GetTypeInfo()))
+                       {
+                               var cast = type.GetImplicitConversionOperator(fromType: valueType, toType: type)
+                                               ?? valueType.GetImplicitConversionOperator(fromType: valueType, toType: type);
+
+                               if (cast == null)
+                                       return false;
+
+                               value = cast.Invoke(null, new[] { value });
+                       }
+
+                       return true;
+               }
+
+               internal delegate void BindablePropertyBindingChanging(BindableObject bindable, BindingBase oldValue, BindingBase newValue);
+       }
+}
diff --git a/src/Tizen.NUI/src/public/XamlBinding/BindablePropertyKey.cs b/src/Tizen.NUI/src/public/XamlBinding/BindablePropertyKey.cs
new file mode 100755 (executable)
index 0000000..6607b7b
--- /dev/null
@@ -0,0 +1,17 @@
+using System;
+
+namespace Tizen.NUI.Binding
+{
+       public sealed class BindablePropertyKey
+       {
+               internal BindablePropertyKey(BindableProperty property)
+               {
+                       if (property == null)
+                               throw new ArgumentNullException("property");
+
+                       BindableProperty = property;
+               }
+
+               public BindableProperty BindableProperty { get; private set; }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/public/XamlBinding/BindingBase.cs b/src/Tizen.NUI/src/public/XamlBinding/BindingBase.cs
new file mode 100755 (executable)
index 0000000..7807123
--- /dev/null
@@ -0,0 +1,115 @@
+using System;
+using System.Collections;
+using System.Runtime.CompilerServices;
+
+namespace Tizen.NUI.Binding
+{
+       public abstract class BindingBase
+       {
+               static readonly ConditionalWeakTable<IEnumerable, CollectionSynchronizationContext> SynchronizedCollections = new ConditionalWeakTable<IEnumerable, CollectionSynchronizationContext>();
+
+               BindingMode _mode = BindingMode.Default;
+               string _stringFormat;
+
+               internal BindingBase()
+               {
+               }
+
+               public BindingMode Mode
+               {
+                       get { return _mode; }
+                       set
+                       {
+                               if (   value != BindingMode.Default
+                                   && value != BindingMode.OneWay
+                                   && value != BindingMode.OneWayToSource
+                                   && value != BindingMode.TwoWay
+                                   && value != BindingMode.OneTime)
+                                       throw new ArgumentException("mode is not a valid BindingMode", "mode");
+
+                               ThrowIfApplied();
+
+                               _mode = value;
+                       }
+               }
+
+               public string StringFormat
+               {
+                       get { return _stringFormat; }
+                       set
+                       {
+                               ThrowIfApplied();
+
+                               _stringFormat = value;
+                       }
+               }
+
+               internal bool AllowChaining { get; set; }
+
+               internal object Context { get; set; }
+
+               internal bool IsApplied { get; private set; }
+
+               public static void DisableCollectionSynchronization(IEnumerable collection)
+               {
+                       if (collection == null)
+                               throw new ArgumentNullException(nameof(collection));
+
+                       SynchronizedCollections.Remove(collection);
+               }
+
+               internal static void EnableCollectionSynchronization(IEnumerable collection, object context, CollectionSynchronizationCallback callback)
+               {
+                       if (collection == null)
+                               throw new ArgumentNullException(nameof(collection));
+                       if (callback == null)
+                               throw new ArgumentNullException(nameof(callback));
+
+                       SynchronizedCollections.Add(collection, new CollectionSynchronizationContext(context, callback));
+               }
+
+               protected void ThrowIfApplied()
+               {
+                       if (IsApplied)
+                               throw new InvalidOperationException("Can not change a binding while it's applied");
+               }
+
+               internal virtual void Apply(bool fromTarget)
+               {
+                       IsApplied = true;
+               }
+
+               internal virtual void Apply(object context, BindableObject bindObj, BindableProperty targetProperty, bool fromBindingContextChanged = false)
+               {
+                       IsApplied = true;
+               }
+
+               internal abstract BindingBase Clone();
+
+               internal virtual object GetSourceValue(object value, Type targetPropertyType)
+               {
+                       if (StringFormat != null)
+                               return string.Format(StringFormat, value);
+
+                       return value;
+               }
+
+               internal virtual object GetTargetValue(object value, Type sourcePropertyType)
+               {
+                       return value;
+               }
+
+               internal static bool TryGetSynchronizedCollection(IEnumerable collection, out CollectionSynchronizationContext synchronizationContext)
+               {
+                       if (collection == null)
+                               throw new ArgumentNullException(nameof(collection));
+
+                       return SynchronizedCollections.TryGetValue(collection, out synchronizationContext);
+               }
+
+               internal virtual void Unapply(bool fromBindingContextChanged = false)
+               {
+                       IsApplied = false;
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/public/XamlBinding/BindingMode.cs b/src/Tizen.NUI/src/public/XamlBinding/BindingMode.cs
new file mode 100755 (executable)
index 0000000..bc6cb0e
--- /dev/null
@@ -0,0 +1,11 @@
+namespace Tizen.NUI.Binding
+{
+       public enum BindingMode
+       {
+               Default,
+               TwoWay,
+               OneWay,
+               OneWayToSource,
+               OneTime,
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/public/XamlBinding/Command.cs b/src/Tizen.NUI/src/public/XamlBinding/Command.cs
new file mode 100755 (executable)
index 0000000..4b4de2b
--- /dev/null
@@ -0,0 +1,116 @@
+using System;
+using System.Reflection;
+using System.Windows.Input;
+
+namespace Tizen.NUI.Binding
+{
+       internal sealed class Command<T> : Command 
+       {
+               public Command(Action<T> execute) 
+                       : base(o =>
+                       {
+                               if (IsValidParameter(o))
+                               {
+                                       execute((T)o);
+                               }
+                       })
+               {
+                       if (execute == null)
+                       {
+                               throw new ArgumentNullException(nameof(execute));
+                       }
+               }
+
+               public Command(Action<T> execute, Func<T, bool> canExecute) 
+                       : base(o =>
+                       {
+                               if (IsValidParameter(o))
+                               {
+                                       execute((T)o);
+                               }
+                       }, o => IsValidParameter(o) && canExecute((T)o))
+               {
+                       if (execute == null)
+                               throw new ArgumentNullException(nameof(execute));
+                       if (canExecute == null)
+                               throw new ArgumentNullException(nameof(canExecute));
+               }
+
+               static bool IsValidParameter(object o)
+               {
+                       if (o != null)
+                       {
+                               // The parameter isn't null, so we don't have to worry whether null is a valid option
+                               return o is T;
+                       }
+
+                       var t = typeof(T);
+
+                       // The parameter is null. Is T Nullable?
+                       if (Nullable.GetUnderlyingType(t) != null)
+                       {
+                               return true;
+                       }
+
+                       // Not a Nullable, if it's a value type then null is not valid
+                       return !t.GetTypeInfo().IsValueType;
+               }
+       }
+
+       public class Command : ICommand
+       {
+               readonly Func<object, bool> _canExecute;
+               readonly Action<object> _execute;
+
+               public Command(Action<object> execute)
+               {
+                       if (execute == null)
+                               throw new ArgumentNullException(nameof(execute));
+
+                       _execute = execute;
+               }
+
+               public Command(Action execute) : this(o => execute())
+               {
+                       if (execute == null)
+                               throw new ArgumentNullException(nameof(execute));
+               }
+
+               public Command(Action<object> execute, Func<object, bool> canExecute) : this(execute)
+               {
+                       if (canExecute == null)
+                               throw new ArgumentNullException(nameof(canExecute));
+
+                       _canExecute = canExecute;
+               }
+
+               public Command(Action execute, Func<bool> canExecute) : this(o => execute(), o => canExecute())
+               {
+                       if (execute == null)
+                               throw new ArgumentNullException(nameof(execute));
+                       if (canExecute == null)
+                               throw new ArgumentNullException(nameof(canExecute));
+               }
+
+               public bool CanExecute(object parameter)
+               {
+                       if (_canExecute != null)
+                               return _canExecute(parameter);
+
+                       return true;
+               }
+
+               public event EventHandler CanExecuteChanged;
+
+               public void Execute(object parameter)
+               {
+                       _execute(parameter);
+               }
+
+               public void ChangeCanExecute()
+               {
+                       EventHandler changed = CanExecuteChanged;
+                       changed?.Invoke(this, EventArgs.Empty);
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/public/XamlBinding/ContentPage.cs b/src/Tizen.NUI/src/public/XamlBinding/ContentPage.cs
new file mode 100755 (executable)
index 0000000..31a984b
--- /dev/null
@@ -0,0 +1,183 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 Tizen.NUI.Binding;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI
+{
+    /// <summary>
+    /// The ContentPage class.
+    /// </summary>
+    [ContentProperty("Content")]
+    public class ContentPage : TemplatedPage
+    {
+        private View _content;
+        private Window Window;
+
+               // public static readonly BindableProperty ContentProperty = BindableProperty.Create(nameof(Content), typeof(View), typeof(ContentPage), null, propertyChanged: TemplateUtilities.OnContentChanged);
+
+               // public View Content
+               // {
+               //      get { return (View)GetValue(ContentProperty); }
+               //      set { SetValue(ContentProperty, value); }
+               // }
+
+               protected override void OnBindingContextChanged()
+               {
+                       base.OnBindingContextChanged();
+
+                       View content = Content;
+                       ControlTemplate controlTemplate = ControlTemplate;
+                       if (content != null && controlTemplate != null)
+                       {
+                               SetInheritedBindingContext(content, BindingContext);
+                       }
+               }
+
+               internal override void OnControlTemplateChanged(ControlTemplate oldValue, ControlTemplate newValue)
+               {
+                       if (oldValue == null)
+                               return;
+
+                       base.OnControlTemplateChanged(oldValue, newValue);
+                       View content = Content;
+                       ControlTemplate controlTemplate = ControlTemplate;
+                       if (content != null && controlTemplate != null)
+                       {
+                               SetInheritedBindingContext(content, BindingContext);
+                       }
+               }
+               
+        /// <summary>
+        /// The constructor.
+        /// </summary>
+        public ContentPage(Window win)
+        {
+            _content = new View();
+            _content.WidthResizePolicy = ResizePolicyType.FillToParent;
+            _content.HeightResizePolicy = ResizePolicyType.FillToParent;
+            win.Add(_content);
+        }
+
+        /// <summary>
+        /// To make the ContentPage instance be disposed.
+        /// </summary>
+        protected override void Dispose(DisposeTypes type)
+        {
+            if (disposed)
+            {
+                return;
+            }
+
+            if (type == DisposeTypes.Explicit)
+            {
+                //Called by User
+                //Release your own managed resources here.
+                //You should release all of your own disposable objects here.
+            }
+
+            //Release your own unmanaged resources here.
+            //You should not access any managed member here except static instance.
+            //because the execution order of Finalizes is non-deterministic.
+            Window.Instance.Remove(_content);
+            _content?.Dispose();
+            _content = null;
+
+            base.Dispose(type);
+        }
+
+        /// <summary>
+        /// The contents of ContentPage can be added into it.
+        /// </summary>
+        public View Content
+        {
+            get
+            {
+                return _content;
+            }
+            set
+            {
+                if (value != null)
+                {
+                    _content.Add(value);
+                }
+            }
+        }
+
+        /// <summary>
+        /// Check whether the content is empty.
+        /// </summary>
+        public bool IsEmpty
+        {
+            get
+            {
+                return ( _content.ChildCount == 0 ) ? true : false;
+            }
+        }
+
+        /// <summary>
+        /// Clear all contents from this ContentPage.
+        /// </summary>
+        public void ClearContent()
+        {
+            if ( _content != null )
+            {
+                //Remove it from the window
+                Window.Instance.Remove(_content);
+                _content.Dispose();
+                _content = null;
+
+                //Readd to window
+                _content = new View();
+                _content.WidthResizePolicy = ResizePolicyType.FillToParent;
+                _content.HeightResizePolicy = ResizePolicyType.FillToParent;
+                Window.Instance.Add(_content);
+
+                ClearHandler();
+            }
+        }
+
+        private EventHandler _clearEventHandler;
+
+        public event EventHandler ClearEvent
+        {
+            add
+            {
+                _clearEventHandler += value;
+            }
+            remove
+            {
+                _clearEventHandler -= value;
+            }
+        }
+
+        private void ClearHandler()
+        {
+            if (_clearEventHandler != null)
+            {
+                _clearEventHandler(this, null);
+            }
+        }
+
+        /// <summary>
+        /// Users can set focus logic codes here.
+        /// </summary>
+        public virtual void SetFocus() { }
+
+    }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/public/XamlBinding/ControlTemplate.cs b/src/Tizen.NUI/src/public/XamlBinding/ControlTemplate.cs
new file mode 100755 (executable)
index 0000000..2616043
--- /dev/null
@@ -0,0 +1,15 @@
+using System;
+
+namespace Tizen.NUI.Binding
+{
+       public class ControlTemplate : ElementTemplate
+       {
+               public ControlTemplate()
+               {
+               }
+
+               public ControlTemplate(Type type) : base(type)
+               {
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/public/XamlBinding/Effect.cs b/src/Tizen.NUI/src/public/XamlBinding/Effect.cs
new file mode 100755 (executable)
index 0000000..77f8179
--- /dev/null
@@ -0,0 +1,70 @@
+using System;
+using System.ComponentModel;
+using Tizen.NUI.Internals;
+
+namespace Tizen.NUI.Binding
+{
+       public abstract class Effect
+       {
+               internal Effect()
+               {
+               }
+
+               public Element Element { get; internal set; }
+
+               public bool IsAttached { get; private set; }
+
+               public string ResolveId { get; internal set; }
+
+               #region Statics
+
+               public static Effect Resolve(string name)
+               {
+                       Effect result = null;
+                       if (Tizen.NUI.Internals.Registrar.Effects.TryGetValue(name, out Type effectType))
+                       {
+                               result = (Effect)DependencyResolver.ResolveOrCreate(effectType);
+                       }
+
+                       if (result == null)
+                               result = new NullEffect();
+                       result.ResolveId = name;
+                       return result;
+               }
+
+               #endregion
+
+               // Received after Control/Container/Element made valid
+               protected abstract void OnAttached();
+
+               // Received after Control/Container made invalid
+               protected abstract void OnDetached();
+
+               internal virtual void ClearEffect()
+               {
+                       if (IsAttached)
+                               SendDetached();
+                       Element = null;
+               }
+
+               internal virtual void SendAttached()
+               {
+                       if (IsAttached)
+                               return;
+                       OnAttached();
+                       IsAttached = true;
+               }
+
+               internal virtual void SendDetached()
+               {
+                       if (!IsAttached)
+                               return;
+                       OnDetached();
+                       IsAttached = false;
+               }
+
+               internal virtual void SendOnElementPropertyChanged(PropertyChangedEventArgs args)
+               {
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/public/XamlBinding/Element.cs b/src/Tizen.NUI/src/public/XamlBinding/Element.cs
new file mode 100755 (executable)
index 0000000..3af05c6
--- /dev/null
@@ -0,0 +1,659 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Collections.Specialized;
+using System.ComponentModel;
+using System.Runtime.CompilerServices;
+using System.Xml;
+using Tizen.NUI.Internals;
+
+namespace Tizen.NUI.Binding
+{
+       public abstract partial class Element : BindableObject, IElement, INameScope, IElementController
+       {
+
+               // public static readonly BindableProperty MenuProperty = BindableProperty.CreateAttached(nameof(Menu), typeof(Menu), typeof(Element), null);
+
+               // public static Menu GetMenu(BindableObject bindable)
+               // {
+               //      return (Menu)bindable.GetValue(MenuProperty);
+               // }
+
+               // public static void SetMenu(BindableObject bindable, Menu menu)
+               // {
+               //      bindable.SetValue(MenuProperty, menu);
+               // }
+
+               internal static readonly ReadOnlyCollection<Element> EmptyChildren = new ReadOnlyCollection<Element>(new Element[0]);
+
+               public static readonly BindableProperty ClassIdProperty = BindableProperty.Create("ClassId", typeof(string), typeof(Tizen.NUI.BaseComponents.View), null);
+
+               string _automationId;
+
+               IList<BindableObject> _bindableResources;
+
+               List<Action<object, ResourcesChangedEventArgs>> _changeHandlers;
+
+               Dictionary<BindableProperty, string> _dynamicResources;
+
+               IEffectControlProvider _effectControlProvider;
+
+               TrackableCollection<Effect> _effects;
+
+               Guid? _id;
+
+               Element _parentOverride;
+
+               IPlatform _platform;
+
+               string _styleId;
+
+               public string AutomationId
+               {
+                       get { return _automationId; }
+                       set
+                       {
+                               if (_automationId != null)
+                                       throw new InvalidOperationException("AutomationId may only be set one time");
+                               _automationId = value;
+                       }
+               }
+
+               public string ClassId
+               {
+                       get { return (string)GetValue(ClassIdProperty); }
+                       set { SetValue(ClassIdProperty, value); }
+               }
+
+               internal IList<Effect> Effects
+               {
+                       get
+                       {
+                               if (_effects == null)
+                               {
+                                       _effects = new TrackableCollection<Effect>();
+                                       _effects.CollectionChanged += EffectsOnCollectionChanged;
+                                       _effects.Clearing += EffectsOnClearing;
+                               }
+                               return _effects;
+                       }
+               }
+
+               public Guid Id
+               {
+                       get
+                       {
+                               if (!_id.HasValue)
+                                       _id = Guid.NewGuid();
+                               return _id.Value;
+                       }
+               }
+
+               [Obsolete("ParentView is obsolete as of version 2.1.0. Please use Parent instead.")]
+               public /*VisualElement*/BaseHandle ParentView
+               {
+                       get
+                       {
+                               Element parent = Parent;
+                               while (parent != null)
+                               {
+                                       var parentView = parent as /*VisualElement*/BaseHandle;
+                                       if (parentView != null)
+                                               return parentView;
+                                       parent = parent.RealParent;
+                               }
+                               return null;
+                       }
+               }
+
+               public string StyleId
+               {
+                       get { return _styleId; }
+                       set
+                       {
+                               if (_styleId == value)
+                                       return;
+
+                               OnPropertyChanging();
+                               _styleId = value;
+                               OnPropertyChanged();
+                       }
+               }
+
+               internal virtual ReadOnlyCollection<Element> LogicalChildrenInternal => EmptyChildren;
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public ReadOnlyCollection<Element> LogicalChildren => LogicalChildrenInternal;
+
+               internal bool Owned { get; set; }
+
+               internal Element ParentOverride
+               {
+                       get { return _parentOverride; }
+                       set
+                       {
+                               if (_parentOverride == value)
+                                       return;
+
+                               bool emitChange = Parent != value;
+
+                               if (emitChange)
+                                       OnPropertyChanging(nameof(Parent));
+
+                               _parentOverride = value;
+
+                               if (emitChange)
+                                       OnPropertyChanged(nameof(Parent));
+                       }
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public IPlatform Platform
+               {
+                       get
+                       {
+                               if (_platform == null && RealParent != null)
+                                       return RealParent.Platform;
+                               return _platform;
+                       }
+                       set
+                       {
+                               if (_platform == value)
+                                       return;
+                               _platform = value;
+                               PlatformSet?.Invoke(this, EventArgs.Empty);
+                               foreach (Element descendant in Descendants())
+                               {
+                                       descendant._platform = _platform;
+                                       descendant.PlatformSet?.Invoke(this, EventArgs.Empty);
+                               }
+                       }
+               }
+
+               // you're not my real dad
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public Element RealParent { get; private set; }
+
+               Dictionary<BindableProperty, string> DynamicResources
+               {
+                       get { return _dynamicResources ?? (_dynamicResources = new Dictionary<BindableProperty, string>()); }
+               }
+
+               void IElement.AddResourcesChangedListener(Action<object, ResourcesChangedEventArgs> onchanged)
+               {
+                       _changeHandlers = _changeHandlers ?? new List<Action<object, ResourcesChangedEventArgs>>(2);
+                       _changeHandlers.Add(onchanged);
+               }
+
+               public Element Parent
+               {
+                       get { return _parentOverride ?? RealParent; }
+                       set
+                       {
+                               if (RealParent == value)
+                                       return;
+
+                               OnPropertyChanging();
+
+                               if (RealParent != null)
+                                       ((IElement)RealParent).RemoveResourcesChangedListener(OnParentResourcesChanged);
+                               RealParent = value;
+                               if (RealParent != null)
+                               {
+                                       OnParentResourcesChanged(RealParent.GetMergedResources());
+                                       ((IElement)RealParent).AddResourcesChangedListener(OnParentResourcesChanged);
+                               }
+
+                               object context = value != null ? value.BindingContext : null;
+                               if (value != null)
+                               {
+                                       value.SetChildInheritedBindingContext(this, context);
+                               }
+                               else
+                               {
+                                       SetInheritedBindingContext(this, null);
+                               }
+
+                               OnParentSet();
+
+                               if (RealParent != null)
+                               {
+                                       IPlatform platform = RealParent.Platform;
+                                       if (platform != null)
+                                               Platform = platform;
+                               }
+
+                               OnPropertyChanged();
+                       }
+               }
+
+               void IElement.RemoveResourcesChangedListener(Action<object, ResourcesChangedEventArgs> onchanged)
+               {
+                       if (_changeHandlers == null)
+                               return;
+                       _changeHandlers.Remove(onchanged);
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public IEffectControlProvider EffectControlProvider
+               {
+                       get { return _effectControlProvider; }
+                       set
+                       {
+                               if (_effectControlProvider == value)
+                                       return;
+                               if (_effectControlProvider != null && _effects != null)
+                               {
+                                       foreach (Effect effect in _effects)
+                                               effect?.SendDetached();
+                               }
+                               _effectControlProvider = value;
+                               if (_effectControlProvider != null && _effects != null)
+                               {
+                                       foreach (Effect effect in _effects)
+                                       {
+                                               if (effect != null)
+                                                       AttachEffect(effect);
+                                       }
+                               }
+                       }
+               }
+
+               void IElementController.SetValueFromRenderer(BindableProperty property, object value) => SetValueFromRenderer(property, value);
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public void SetValueFromRenderer(BindableProperty property, object value)
+               {
+                       SetValueCore(property, value);
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public void SetValueFromRenderer(BindablePropertyKey property, object value)
+               {
+                       SetValueCore(property, value);
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public bool EffectIsAttached(string name)
+               {
+                       foreach (var effect in Effects)
+                       {
+                               if (effect.ResolveId == name)
+                                       return true;
+                       }
+                       return false;
+               }
+
+               object INameScope.FindByName(string name)
+               {
+                       INameScope namescope = GetNameScope();
+                       if (namescope == null)
+                               throw new InvalidOperationException("this element is not in a namescope");
+                       return namescope.FindByName(name);
+               }
+
+               void INameScope.RegisterName(string name, object scopedElement)
+               {
+                       INameScope namescope = GetNameScope();
+                       if (namescope == null)
+                               throw new InvalidOperationException("this element is not in a namescope");
+                       namescope.RegisterName(name, scopedElement);
+               }
+
+               [Obsolete]
+               void INameScope.RegisterName(string name, object scopedElement, IXmlLineInfo xmlLineInfo)
+               {
+                       INameScope namescope = GetNameScope();
+                       if (namescope == null)
+                               throw new InvalidOperationException("this element is not in a namescope");
+                       namescope.RegisterName(name, scopedElement, xmlLineInfo);
+               }
+
+               void INameScope.UnregisterName(string name)
+               {
+                       INameScope namescope = GetNameScope();
+                       if (namescope == null)
+                               throw new InvalidOperationException("this element is not in a namescope");
+                       namescope.UnregisterName(name);
+               }
+
+               internal event EventHandler<ElementEventArgs> ChildAdded;
+
+               internal event EventHandler<ElementEventArgs> ChildRemoved;
+
+               internal event EventHandler<ElementEventArgs> DescendantAdded;
+
+               internal event EventHandler<ElementEventArgs> DescendantRemoved;
+
+               public new void RemoveDynamicResource(BindableProperty property)
+               {
+                       base.RemoveDynamicResource(property);
+               }
+
+               public new void SetDynamicResource(BindableProperty property, string key)
+               {
+                       base.SetDynamicResource(property, key);
+               }
+
+               protected override void OnBindingContextChanged()
+               {
+                       var gotBindingContext = false;
+                       object bc = null;
+
+                       for (var index = 0; index < LogicalChildrenInternal.Count; index++)
+                       {
+                               Element child = LogicalChildrenInternal[index];
+
+                               if (!gotBindingContext)
+                               {
+                                       bc = BindingContext;
+                                       gotBindingContext = true;
+                               }
+
+                               SetChildInheritedBindingContext(child, bc);
+                       }
+
+                       if (_bindableResources != null)
+                               foreach (BindableObject item in _bindableResources)
+                               {
+                                       SetInheritedBindingContext(item, BindingContext);
+                               }
+
+                       base.OnBindingContextChanged();
+               }
+
+               protected virtual void OnChildAdded(Element child)
+               {
+                       child.Parent = this;
+                       if (Platform != null)
+                               child.Platform = Platform;
+
+                       child.ApplyBindings(skipBindingContext: false, fromBindingContextChanged:true);
+
+                       ChildAdded?.Invoke(this, new ElementEventArgs(child));
+
+                       OnDescendantAdded(child);
+                       foreach (Element element in child.Descendants())
+                               OnDescendantAdded(element);
+               }
+
+               protected virtual void OnChildRemoved(Element child)
+               {
+                       child.Parent = null;
+
+                       ChildRemoved?.Invoke(child, new ElementEventArgs(child));
+
+                       OnDescendantRemoved(child);
+                       foreach (Element element in child.Descendants())
+                               OnDescendantRemoved(element);
+               }
+
+               protected virtual void OnParentSet()
+               {
+                       ParentSet?.Invoke(this, EventArgs.Empty);
+                       // ApplyStyleSheetsOnParentSet();
+               }
+
+               protected override void OnPropertyChanged([CallerMemberName] string propertyName = null)
+               {
+                       base.OnPropertyChanged(propertyName);
+
+                       if (_effects == null || _effects.Count == 0)
+                               return;
+
+                       var args = new PropertyChangedEventArgs(propertyName);
+                       foreach (Effect effect in _effects)
+                       {
+                               effect?.SendOnElementPropertyChanged(args);
+                       }
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public IEnumerable<Element> Descendants()
+               {
+                       var queue = new Queue<Element>(16);
+                       queue.Enqueue(this);
+
+                       while (queue.Count > 0)
+                       {
+                               ReadOnlyCollection<Element> children = queue.Dequeue().LogicalChildrenInternal;
+                               for (var i = 0; i < children.Count; i++)
+                               {
+                                       Element child = children[i];
+                                       yield return child;
+                                       queue.Enqueue(child);
+                               }
+                       }
+               }
+
+               internal virtual void OnParentResourcesChanged(object sender, ResourcesChangedEventArgs e)
+               {
+                       // if (e == ResourcesChangedEventArgs.StyleSheets)
+                       //      // ApplyStyleSheetsOnParentSet();
+                       // else
+                       //      OnParentResourcesChanged(e.Values);
+               }
+
+               internal virtual void OnParentResourcesChanged(IEnumerable<KeyValuePair<string, object>> values)
+               {
+                       OnResourcesChanged(values);
+               }
+
+               internal override void OnRemoveDynamicResource(BindableProperty property)
+               {
+                       DynamicResources.Remove(property);
+
+                       if (DynamicResources.Count == 0)
+                               _dynamicResources = null;
+                       base.OnRemoveDynamicResource(property);
+               }
+
+               internal virtual void OnResourcesChanged(object sender, ResourcesChangedEventArgs e)
+               {
+                       OnResourcesChanged(e.Values);
+               }
+
+               internal void OnResourcesChanged(IEnumerable<KeyValuePair<string, object>> values)
+               {
+                       if (values == null)
+                               return;
+                       if (_changeHandlers != null)
+                               foreach (Action<object, ResourcesChangedEventArgs> handler in _changeHandlers)
+                                       handler(this, new ResourcesChangedEventArgs(values));
+                       if (_dynamicResources == null)
+                               return;
+                       if (_bindableResources == null)
+                               _bindableResources = new List<BindableObject>();
+                       foreach (KeyValuePair<string, object> value in values)
+                       {
+                               List<BindableProperty> changedResources = null;
+                               foreach (KeyValuePair<BindableProperty, string> dynR in DynamicResources)
+                               {
+                                       // when the DynamicResource bound to a BindableProperty is
+                                       // changing then the BindableProperty needs to be refreshed;
+                                       // The .Value is the name of DynamicResouce to which the BindableProperty is bound.
+                                       // The .Key is the name of the DynamicResource whose value is changing.
+                                       if (dynR.Value != value.Key)
+                                               continue;
+                                       changedResources = changedResources ?? new List<BindableProperty>();
+                                       changedResources.Add(dynR.Key);
+                               }
+                               if (changedResources == null)
+                                       continue;
+                               foreach (BindableProperty changedResource in changedResources)
+                                       OnResourceChanged(changedResource, value.Value);
+
+                               var bindableObject = value.Value as BindableObject;
+                               if (bindableObject != null && (bindableObject as Element)?.Parent == null)
+                               {
+                                       if (!_bindableResources.Contains(bindableObject))
+                                               _bindableResources.Add(bindableObject);
+                                       SetInheritedBindingContext(bindableObject, BindingContext);
+                               }
+                       }
+               }
+
+               internal override void OnSetDynamicResource(BindableProperty property, string key)
+               {
+                       base.OnSetDynamicResource(property, key);
+                       DynamicResources[property] = key;
+                       object value;
+                       if (this.TryGetResource(key, out value))
+                               OnResourceChanged(property, value);
+               }
+
+               internal event EventHandler ParentSet;
+
+               internal static void SetFlowDirectionFromParent(Element child)
+               {
+                       // IFlowDirectionController controller = child as IFlowDirectionController;
+                       // if (controller == null)
+                       //      return;
+
+                       // if (controller.EffectiveFlowDirection.IsImplicit())
+                       // {
+                       //      var parentView = child.Parent as IFlowDirectionController;
+                       //      if (parentView == null)
+                       //              return;
+
+                       //      var flowDirection = parentView.EffectiveFlowDirection.ToFlowDirection();
+
+                       //      if (flowDirection != controller.EffectiveFlowDirection.ToFlowDirection())
+                       //      {
+                       //              controller.EffectiveFlowDirection = flowDirection.ToEffectiveFlowDirection();
+                       //      }
+                       // }
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event EventHandler PlatformSet;
+
+               internal virtual void SetChildInheritedBindingContext(Element child, object context)
+               {
+                       SetInheritedBindingContext(child, context);
+               }
+
+               internal IEnumerable<Element> VisibleDescendants()
+               {
+                       var queue = new Queue<Element>(16);
+                       queue.Enqueue(this);
+
+                       while (queue.Count > 0)
+                       {
+                               ReadOnlyCollection<Element> children = queue.Dequeue().LogicalChildrenInternal;
+                               for (var i = 0; i < children.Count; i++)
+                               {
+                                       var child = children[i] as /*VisualElement*/BaseHandle;
+                                       if (child == null /*|| !child.IsVisible*/)
+                                               continue;
+                                       yield return child;
+                                       queue.Enqueue(child);
+                               }
+                       }
+               }
+
+               void AttachEffect(Effect effect)
+               {
+                       if (_effectControlProvider == null)
+                               return;
+                       if (effect.IsAttached)
+                               throw new InvalidOperationException("Cannot attach Effect to multiple sources");
+
+                       Effect effectToRegister = effect;
+                       if (effect is RoutingEffect)
+                               effectToRegister = ((RoutingEffect)effect).Inner;
+                       _effectControlProvider.RegisterEffect(effectToRegister);
+                       effectToRegister.Element = this;
+                       effect.SendAttached();
+               }
+
+               void EffectsOnClearing(object sender, EventArgs eventArgs)
+               {
+                       foreach (Effect effect in _effects)
+                       {
+                               effect?.ClearEffect();
+                       }
+               }
+
+               void EffectsOnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
+               {
+                       switch (e.Action)
+                       {
+                               case NotifyCollectionChangedAction.Add:
+                                       foreach (Effect effect in e.NewItems)
+                                       {
+                                               AttachEffect(effect);
+                                       }
+                                       break;
+                               case NotifyCollectionChangedAction.Move:
+                                       break;
+                               case NotifyCollectionChangedAction.Remove:
+                                       foreach (Effect effect in e.OldItems)
+                                       {
+                                               effect.ClearEffect();
+                                       }
+                                       break;
+                               case NotifyCollectionChangedAction.Replace:
+                                       foreach (Effect effect in e.NewItems)
+                                       {
+                                               AttachEffect(effect);
+                                       }
+                                       foreach (Effect effect in e.OldItems)
+                                       {
+                                               effect.ClearEffect();
+                                       }
+                                       break;
+                               case NotifyCollectionChangedAction.Reset:
+                                       if (e.NewItems != null)
+                                       {
+                                               foreach (Effect effect in e.NewItems)
+                                               {
+                                                       AttachEffect(effect);
+                                               }
+                                       }
+                                       if (e.OldItems != null)
+                                       {
+                                               foreach (Effect effect in e.OldItems)
+                                               {
+                                                       effect.ClearEffect();
+                                               }
+                                       }
+                                       break;
+                               default:
+                                       throw new ArgumentOutOfRangeException();
+                       }
+               }
+
+               INameScope GetNameScope()
+               {
+                       INameScope namescope = NameScope.GetNameScope(this);
+                       Element p = RealParent;
+                       while (namescope == null && p != null)
+                       {
+                               namescope = NameScope.GetNameScope(p);
+                               p = p.RealParent;
+                       }
+                       return namescope;
+               }
+
+               void OnDescendantAdded(Element child)
+               {
+                       DescendantAdded?.Invoke(this, new ElementEventArgs(child));
+
+                       if (RealParent != null)
+                               RealParent.OnDescendantAdded(child);
+               }
+
+               void OnDescendantRemoved(Element child)
+               {
+                       DescendantRemoved?.Invoke(this, new ElementEventArgs(child));
+
+                       if (RealParent != null)
+                               RealParent.OnDescendantRemoved(child);
+               }
+
+               void OnResourceChanged(BindableProperty property, object value)
+               {
+                       SetValueCore(property, value, SetValueFlags.ClearOneWayBindings | SetValueFlags.ClearTwoWayBindings);
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/public/XamlBinding/ElementTemplate.cs b/src/Tizen.NUI/src/public/XamlBinding/ElementTemplate.cs
new file mode 100755 (executable)
index 0000000..c4612b1
--- /dev/null
@@ -0,0 +1,98 @@
+using System;
+using System.Collections.Generic;
+using Tizen.NUI.Internals;
+
+namespace Tizen.NUI.Binding
+{
+       public class ElementTemplate : IElement, IDataTemplate
+       {
+               List<Action<object, ResourcesChangedEventArgs>> _changeHandlers;
+               Element _parent;
+               bool _canRecycle; // aka IsDeclarative
+
+               internal ElementTemplate()
+               {
+               }
+
+               internal ElementTemplate(Type type) : this()
+               {
+                       if (type == null)
+                               throw new ArgumentNullException("type");
+
+                       _canRecycle = true;
+
+                       LoadTemplate = () => Activator.CreateInstance(type);
+               }
+
+               internal ElementTemplate(Func<object> loadTemplate) : this()
+               {
+                       if (loadTemplate == null)
+                               throw new ArgumentNullException("loadTemplate");
+
+                       LoadTemplate = loadTemplate;
+               }
+
+               Func<object> LoadTemplate { get; set; }
+#pragma warning disable 0612
+               Func<object> IDataTemplate.LoadTemplate
+               {
+#pragma warning restore 0612
+                       get { return LoadTemplate; }
+                       set { LoadTemplate = value; }
+               }
+
+               void IElement.AddResourcesChangedListener(Action<object, ResourcesChangedEventArgs> onchanged)
+               {
+                       _changeHandlers = _changeHandlers ?? new List<Action<object, ResourcesChangedEventArgs>>(1);
+                       _changeHandlers.Add(onchanged);
+               }
+
+               internal bool CanRecycle => _canRecycle;
+               Element IElement.Parent
+               {
+                       get { return _parent; }
+                       set
+                       {
+                               if (_parent == value)
+                                       return;
+                               if (_parent != null)
+                                       ((IElement)_parent).RemoveResourcesChangedListener(OnResourcesChanged);
+                               _parent = value;
+                               if (_parent != null)
+                                       ((IElement)_parent).AddResourcesChangedListener(OnResourcesChanged);
+                       }
+               }
+
+               void IElement.RemoveResourcesChangedListener(Action<object, ResourcesChangedEventArgs> onchanged)
+               {
+                       if (_changeHandlers == null)
+                               return;
+                       _changeHandlers.Remove(onchanged);
+               }
+
+               public object CreateContent()
+               {
+                       if (LoadTemplate == null)
+                               throw new InvalidOperationException("LoadTemplate should not be null");
+                       if (this is DataTemplateSelector)
+                               throw new InvalidOperationException("Cannot call CreateContent directly on a DataTemplateSelector");
+
+                       object item = LoadTemplate();
+                       SetupContent(item);
+
+                       return item;
+               }
+
+               internal virtual void SetupContent(object item)
+               {
+               }
+
+               void OnResourcesChanged(object sender, ResourcesChangedEventArgs e)
+               {
+                       if (_changeHandlers == null)
+                               return;
+                       foreach (Action<object, ResourcesChangedEventArgs> handler in _changeHandlers)
+                               handler(this, e);
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/public/XamlBinding/IConfigElement.cs b/src/Tizen.NUI/src/public/XamlBinding/IConfigElement.cs
new file mode 100755 (executable)
index 0000000..e9d7328
--- /dev/null
@@ -0,0 +1,8 @@
+
+namespace Tizen.NUI.Binding
+{
+       public interface IConfigElement<out T> where T : Element
+       {
+               T Element { get; }
+       }
+}
diff --git a/src/Tizen.NUI/src/public/XamlBinding/IConfigPlatform.cs b/src/Tizen.NUI/src/public/XamlBinding/IConfigPlatform.cs
new file mode 100755 (executable)
index 0000000..a584d77
--- /dev/null
@@ -0,0 +1,5 @@
+
+namespace Tizen.NUI.Binding
+{
+       public interface IConfigPlatform { }
+}
diff --git a/src/Tizen.NUI/src/public/XamlBinding/IEffectControlProvider.cs b/src/Tizen.NUI/src/public/XamlBinding/IEffectControlProvider.cs
new file mode 100755 (executable)
index 0000000..a736cda
--- /dev/null
@@ -0,0 +1,7 @@
+namespace Tizen.NUI.Binding
+{
+       public interface IEffectControlProvider
+       {
+               void RegisterEffect(Effect effect);
+       }
+}
diff --git a/src/Tizen.NUI/src/public/XamlBinding/INavigation.cs b/src/Tizen.NUI/src/public/XamlBinding/INavigation.cs
new file mode 100755 (executable)
index 0000000..9132e29
--- /dev/null
@@ -0,0 +1,28 @@
+using System.Collections.Generic;
+using System.Threading.Tasks;
+
+namespace Tizen.NUI.Binding
+{
+       public interface INavigation
+       {
+               IReadOnlyList<Page> ModalStack { get; }
+
+               IReadOnlyList<Page> NavigationStack { get; }
+
+               void InsertPageBefore(Page page, Page before);
+               Task<Page> PopAsync();
+               Task<Page> PopAsync(bool animated);
+               Task<Page> PopModalAsync();
+               Task<Page> PopModalAsync(bool animated);
+               Task PopToRootAsync();
+               Task PopToRootAsync(bool animated);
+
+               Task PushAsync(Page page);
+
+               Task PushAsync(Page page, bool animated);
+               Task PushModalAsync(Page page);
+               Task PushModalAsync(Page page, bool animated);
+
+               void RemovePage(Page page);
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/public/XamlBinding/IPlatform.cs b/src/Tizen.NUI/src/public/XamlBinding/IPlatform.cs
new file mode 100755 (executable)
index 0000000..c56d316
--- /dev/null
@@ -0,0 +1,10 @@
+using System.ComponentModel;
+
+namespace Tizen.NUI.Binding
+{
+       [EditorBrowsable(EditorBrowsableState.Never)]
+       public interface IPlatform
+       {
+               SizeRequest GetNativeSize(BaseHandle view, double widthConstraint, double heightConstraint);
+       }
+}
diff --git a/src/Tizen.NUI/src/public/XamlBinding/IPlatformElementConfiguration.cs b/src/Tizen.NUI/src/public/XamlBinding/IPlatformElementConfiguration.cs
new file mode 100755 (executable)
index 0000000..7d4da8d
--- /dev/null
@@ -0,0 +1,9 @@
+
+namespace Tizen.NUI.Binding
+{
+       public interface IPlatformElementConfiguration<out TPlatform, out TElement> : IConfigElement<TElement>
+                       where TPlatform : IConfigPlatform
+                       where TElement : Element
+       {
+       }
+}
diff --git a/src/Tizen.NUI/src/public/XamlBinding/NavigationEventArgs.cs b/src/Tizen.NUI/src/public/XamlBinding/NavigationEventArgs.cs
new file mode 100755 (executable)
index 0000000..a883cf7
--- /dev/null
@@ -0,0 +1,17 @@
+using System;
+
+namespace Tizen.NUI.Binding
+{
+       public class NavigationEventArgs : EventArgs
+       {
+               public NavigationEventArgs(Page page)
+               {
+                       if (page == null)
+                               throw new ArgumentNullException("page");
+
+                       Page = page;
+               }
+
+               public Page Page { get; private set; }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/public/XamlBinding/NavigationPage.cs b/src/Tizen.NUI/src/public/XamlBinding/NavigationPage.cs
new file mode 100755 (executable)
index 0000000..ee9a004
--- /dev/null
@@ -0,0 +1,469 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.Linq;
+using System.Threading.Tasks;
+using Tizen.NUI.Internals;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI
+{
+       // [RenderWith(typeof(_NavigationPageRenderer))]
+       public class NavigationPage : Page, IPageContainer<Page>, INavigationPageController, IElementConfiguration<NavigationPage> 
+       {
+               public static readonly BindableProperty BackButtonTitleProperty = BindableProperty.CreateAttached("BackButtonTitle", typeof(string), typeof(Page), null);
+
+               public static readonly BindableProperty HasNavigationBarProperty = BindableProperty.CreateAttached("HasNavigationBar", typeof(bool), typeof(Page), true);
+
+               public static readonly BindableProperty HasBackButtonProperty = BindableProperty.CreateAttached("HasBackButton", typeof(bool), typeof(NavigationPage), true);
+
+               [Obsolete("TintProperty is obsolete as of version 1.2.0. Please use BarBackgroundColorProperty and BarTextColorProperty to change NavigationPage bar color properties.")] 
+               public static readonly BindableProperty TintProperty = BindableProperty.Create("Tint", typeof(Color), typeof(NavigationPage), /*Color.Default*/Color.Black);
+
+               public static readonly BindableProperty BarBackgroundColorProperty = BindableProperty.Create("BarBackgroundColor", typeof(Color), typeof(NavigationPage), /*Color.Default*/Color.Black);
+
+               public static readonly BindableProperty BarTextColorProperty = BindableProperty.Create("BarTextColor", typeof(Color), typeof(NavigationPage), /*Color.Default*/Color.Black);
+
+               public static readonly BindableProperty TitleIconProperty = BindableProperty.CreateAttached("TitleIcon", typeof(FileImageSource), typeof(NavigationPage), default(FileImageSource));
+
+               static readonly BindablePropertyKey CurrentPagePropertyKey = BindableProperty.CreateReadOnly("CurrentPage", typeof(Page), typeof(NavigationPage), null);
+               public static readonly BindableProperty CurrentPageProperty = CurrentPagePropertyKey.BindableProperty;
+
+               static readonly BindablePropertyKey RootPagePropertyKey = BindableProperty.CreateReadOnly(nameof(RootPage), typeof(Page), typeof(NavigationPage), null);
+               public static readonly BindableProperty RootPageProperty = RootPagePropertyKey.BindableProperty;
+
+               public NavigationPage()
+               {
+                       _platformConfigurationRegistry = new Lazy<PlatformConfigurationRegistry<NavigationPage>>(() => new PlatformConfigurationRegistry<NavigationPage>(this));
+
+                       Navigation = new NavigationImpl(this);
+               }
+
+               public NavigationPage(Page root) : this()
+               {
+                       PushPage(root);
+               }
+
+               public Color BarBackgroundColor
+               {
+                       get { return (Color)GetValue(BarBackgroundColorProperty); }
+                       set { SetValue(BarBackgroundColorProperty, value); }
+               }
+
+               public Color BarTextColor
+               {
+                       get { return (Color)GetValue(BarTextColorProperty); }
+                       set { SetValue(BarTextColorProperty, value); }
+               }
+
+               [Obsolete("Tint is obsolete as of version 1.2.0. Please use BarBackgroundColor and BarTextColor to change NavigationPage bar color properties.")]
+               public Color Tint
+               {
+                       get { return (Color)GetValue(TintProperty); }
+                       set { SetValue(TintProperty, value); }
+               }
+
+               internal Task CurrentNavigationTask { get; set; }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public Page Peek(int depth)
+               {
+                       if (depth < 0)
+                       {
+                               return null;
+                       }
+
+                       if (InternalChildren.Count <= depth)
+                       {
+                               return null;
+                       }
+
+                       return (Page)InternalChildren[InternalChildren.Count - depth - 1];
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public IEnumerable<Page> Pages => InternalChildren.Cast<Page>();
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public int StackDepth
+               {
+                       get { return InternalChildren.Count; }
+               }
+
+               public Page CurrentPage
+               {
+                       get { return (Page)GetValue(CurrentPageProperty); }
+                       private set { SetValue(CurrentPagePropertyKey, value); }
+               }
+
+               public Page RootPage
+               {
+                       get { return (Page)GetValue(RootPageProperty); }
+                       private set { SetValue(RootPagePropertyKey, value); }
+               }
+
+               public static string GetBackButtonTitle(BindableObject page)
+               {
+                       return (string)page.GetValue(BackButtonTitleProperty);
+               }
+
+               public static bool GetHasBackButton(Page page)
+               {
+                       if (page == null)
+                               throw new ArgumentNullException("page");
+                       return (bool)page.GetValue(HasBackButtonProperty);
+               }
+
+               public static bool GetHasNavigationBar(BindableObject page)
+               {
+                       return (bool)page.GetValue(HasNavigationBarProperty);
+               }
+
+               internal static FileImageSource GetTitleIcon(BindableObject bindable)
+               {
+                       return (FileImageSource)bindable.GetValue(TitleIconProperty);
+               }
+
+               public Task<Page> PopAsync()
+               {
+                       return PopAsync(true);
+               }
+
+               public async Task<Page> PopAsync(bool animated)
+               {
+                       var tcs = new TaskCompletionSource<bool>();
+                       if (CurrentNavigationTask != null && !CurrentNavigationTask.IsCompleted)
+                       {
+                               var oldTask = CurrentNavigationTask;
+                               CurrentNavigationTask = tcs.Task;
+                               await oldTask;
+                       }
+                       else
+                               CurrentNavigationTask = tcs.Task;
+
+                       var result = await PopAsyncInner(animated, false);
+                       tcs.SetResult(true);
+                       return result;
+               }
+
+               public event EventHandler<NavigationEventArgs> Popped;
+
+               public event EventHandler<NavigationEventArgs> PoppedToRoot;
+
+               public Task PopToRootAsync()
+               {
+                       return PopToRootAsync(true);
+               }
+
+               public async Task PopToRootAsync(bool animated)
+               {
+                       if (CurrentNavigationTask != null && !CurrentNavigationTask.IsCompleted)
+                       {
+                               var tcs = new TaskCompletionSource<bool>();
+                               Task oldTask = CurrentNavigationTask;
+                               CurrentNavigationTask = tcs.Task;
+                               await oldTask;
+
+                               await PopToRootAsyncInner(animated);
+                               tcs.SetResult(true);
+                               return;
+                       }
+
+                       Task result = PopToRootAsyncInner(animated);
+                       CurrentNavigationTask = result;
+                       await result;
+               }
+
+               public Task PushAsync(Page page)
+               {
+                       return PushAsync(page, true);
+               }
+
+               public async Task PushAsync(Page page, bool animated)
+               {
+                       if (CurrentNavigationTask != null && !CurrentNavigationTask.IsCompleted)
+                       {
+                               var tcs = new TaskCompletionSource<bool>();
+                               Task oldTask = CurrentNavigationTask;
+                               CurrentNavigationTask = tcs.Task;
+                               await oldTask;
+
+                               await PushAsyncInner(page, animated);
+                               tcs.SetResult(true);
+                               return;
+                       }
+
+                       CurrentNavigationTask = PushAsyncInner(page, animated);
+                       await CurrentNavigationTask;
+               }
+
+               public event EventHandler<NavigationEventArgs> Pushed;
+
+               public static void SetBackButtonTitle(BindableObject page, string value)
+               {
+                       page.SetValue(BackButtonTitleProperty, value);
+               }
+
+               public static void SetHasBackButton(Page page, bool value)
+               {
+                       if (page == null)
+                               throw new ArgumentNullException("page");
+                       page.SetValue(HasBackButtonProperty, value);
+               }
+
+               public static void SetHasNavigationBar(BindableObject page, bool value)
+               {
+                       page.SetValue(HasNavigationBarProperty, value);
+               }
+
+               internal static void SetTitleIcon(BindableObject bindable, FileImageSource value)
+               {
+                       bindable.SetValue(TitleIconProperty, value);
+               }
+
+               protected override bool OnBackButtonPressed()
+               {
+                       if (CurrentPage.SendBackButtonPressed())
+                               return true;
+
+                       if (StackDepth > 1)
+                       {
+                               SafePop();
+                               return true;
+                       }
+
+                       return base.OnBackButtonPressed();
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event EventHandler<NavigationRequestedEventArgs> InsertPageBeforeRequested;
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public async Task<Page> PopAsyncInner(bool animated, bool fast)
+               {
+                       if (StackDepth == 1)
+                       {
+                               return null;
+                       }
+
+                       var page = (Page)InternalChildren.Last();
+
+                       return await (this as INavigationPageController).RemoveAsyncInner(page, animated, fast);
+               }
+
+               async Task<Page> INavigationPageController.RemoveAsyncInner(Page page, bool animated, bool fast)
+               {
+                       if (StackDepth == 1)
+                       {
+                               return null;
+                       }
+
+                       var args = new NavigationRequestedEventArgs(page, animated);
+
+                       var removed = true;
+
+                       EventHandler<NavigationRequestedEventArgs> requestPop = PopRequested;
+                       if (requestPop != null)
+                       {
+                               requestPop(this, args);
+
+                               if (args.Task != null && !fast)
+                                       removed = await args.Task;
+                       }
+
+                       if (!removed && !fast)
+                               return CurrentPage;
+
+                       InternalChildren.Remove(page);
+
+                       CurrentPage = (Page)InternalChildren.Last();
+
+                       if (Popped != null)
+                               Popped(this, args);
+
+                       return page;
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event EventHandler<NavigationRequestedEventArgs> PopRequested;
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event EventHandler<NavigationRequestedEventArgs> PopToRootRequested;
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event EventHandler<NavigationRequestedEventArgs> PushRequested;
+
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event EventHandler<NavigationRequestedEventArgs> RemovePageRequested;
+
+               void InsertPageBefore(Page page, Page before)
+               {
+                       if (page == null)
+                               throw new ArgumentNullException($"{nameof(page)} cannot be null.");
+
+                       if (before == null)
+                               throw new ArgumentNullException($"{nameof(before)} cannot be null.");
+
+                       if (!InternalChildren.Contains(before))
+                               throw new ArgumentException($"{nameof(before)} must be a child of the NavigationPage", nameof(before));
+
+                       if (InternalChildren.Contains(page))
+                               throw new ArgumentException("Cannot insert page which is already in the navigation stack");
+
+                       EventHandler<NavigationRequestedEventArgs> handler = InsertPageBeforeRequested;
+                       handler?.Invoke(this, new NavigationRequestedEventArgs(page, before, false));
+
+                       int index = InternalChildren.IndexOf(before);
+                       InternalChildren.Insert(index, page);
+
+                       if (index == 0)
+                               RootPage = page;
+
+                       // Shouldn't be required?
+                       // if (Width > 0 && Height > 0)
+                               ForceLayout();
+               }
+
+               async Task PopToRootAsyncInner(bool animated)
+               {
+                       if (StackDepth == 1)
+                               return;
+
+                       Element[] childrenToRemove = InternalChildren.Skip(1).ToArray();
+                       foreach (Element child in childrenToRemove)
+                               InternalChildren.Remove(child);
+
+                       CurrentPage = RootPage;
+
+                       var args = new NavigationRequestedEventArgs(RootPage, animated);
+
+                       EventHandler<NavigationRequestedEventArgs> requestPopToRoot = PopToRootRequested;
+                       if (requestPopToRoot != null)
+                       {
+                               requestPopToRoot(this, args);
+
+                               if (args.Task != null)
+                                       await args.Task;
+                       }
+
+                       // PoppedToRoot?.Invoke(this, new PoppedToRootEventArgs(RootPage, childrenToRemove.OfType<Page>().ToList()));
+               }
+
+               async Task PushAsyncInner(Page page, bool animated)
+               {
+                       if (InternalChildren.Contains(page))
+                               return;
+
+                       PushPage(page);
+
+                       var args = new NavigationRequestedEventArgs(page, animated);
+
+                       EventHandler<NavigationRequestedEventArgs> requestPush = PushRequested;
+                       if (requestPush != null)
+                       {
+                               requestPush(this, args);
+
+                               if (args.Task != null)
+                                       await args.Task;
+                       }
+
+                       Pushed?.Invoke(this, args);
+               }
+
+               void PushPage(Page page)
+               {
+                       InternalChildren.Add(page);
+
+                       if (InternalChildren.Count == 1)
+                               RootPage = page;
+
+                       CurrentPage = page;
+               }
+
+               void RemovePage(Page page)
+               {
+                       if (page == null)
+                               throw new ArgumentNullException($"{nameof(page)} cannot be null.");
+
+                       if (page == CurrentPage && CurrentPage == RootPage)
+                               throw new InvalidOperationException("Cannot remove root page when it is also the currently displayed page.");
+                       if (page == CurrentPage)
+                       {
+                               // Log.Warning("NavigationPage", "RemovePage called for CurrentPage object. This can result in undesired behavior, consider calling PopAsync instead.");
+                               PopAsync();
+                               return;
+                       }
+
+                       if (!InternalChildren.Contains(page))
+                               throw new ArgumentException("Page to remove must be contained on this Navigation Page");
+
+                       EventHandler<NavigationRequestedEventArgs> handler = RemovePageRequested;
+                       handler?.Invoke(this, new NavigationRequestedEventArgs(page, true));
+
+                       InternalChildren.Remove(page);
+                       if (RootPage == page)
+                               RootPage = (Page)InternalChildren.First();
+               }
+
+               void SafePop()
+               {
+                       PopAsync(true).ContinueWith(t =>
+                       {
+                               if (t.IsFaulted)
+                                       throw t.Exception;
+                       });
+               }
+
+               class NavigationImpl : NavigationProxy
+               {
+                       // readonly Lazy<ReadOnlyCastingList<Page, Element>> _castingList;
+
+                       public NavigationImpl(NavigationPage owner)
+                       {
+                               Owner = owner;
+                               // _castingList = new Lazy<ReadOnlyCastingList<Page, Element>>(() => new ReadOnlyCastingList<Page, Element>(Owner.InternalChildren));
+                       }
+
+                       NavigationPage Owner { get; }
+
+                       protected override IReadOnlyList<Page> GetNavigationStack()
+                       {
+                               // return _castingList.Value;
+                               return null;
+                       }
+
+                       protected override void OnInsertPageBefore(Page page, Page before)
+                       {
+                               Owner.InsertPageBefore(page, before);
+                       }
+
+                       protected override Task<Page> OnPopAsync(bool animated)
+                       {
+                               return Owner.PopAsync(animated);
+                       }
+
+                       protected override Task OnPopToRootAsync(bool animated)
+                       {
+                               return Owner.PopToRootAsync(animated);
+                       }
+
+                       protected override Task OnPushAsync(Page root, bool animated)
+                       {
+                               return Owner.PushAsync(root, animated);
+                       }
+
+                       protected override void OnRemovePage(Page page)
+                       {
+                               Owner.RemovePage(page);
+                       }
+               }
+
+               readonly Lazy<PlatformConfigurationRegistry<NavigationPage>> _platformConfigurationRegistry;
+
+               public new IPlatformElementConfiguration<T, NavigationPage> On<T>() where T : IConfigPlatform
+               {
+                       return _platformConfigurationRegistry.Value.On<T>();
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/public/XamlBinding/NavigationProxy.cs b/src/Tizen.NUI/src/public/XamlBinding/NavigationProxy.cs
new file mode 100755 (executable)
index 0000000..cf54e48
--- /dev/null
@@ -0,0 +1,235 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace Tizen.NUI.Binding
+{
+       [EditorBrowsable(EditorBrowsableState.Never)]
+       public class NavigationProxy : INavigation
+       {
+               INavigation _inner;
+               Lazy<List<Page>> _modalStack = new Lazy<List<Page>>(() => new List<Page>());
+
+               Lazy<List<Page>> _pushStack = new Lazy<List<Page>>(() => new List<Page>());
+
+               internal INavigation Inner
+               {
+                       get { return _inner; }
+                       set
+                       {
+                               if (_inner == value)
+                                       return;
+                               _inner = value;
+                               // reverse so that things go into the new stack in the same order
+                               // null out to release memory that will likely never be needed again
+
+                               if (ReferenceEquals(_inner, null))
+                               {
+                                       _pushStack = new Lazy<List<Page>>(() => new List<Page>());
+                                       _modalStack = new Lazy<List<Page>>(() => new List<Page>());
+                               }
+                               else
+                               {
+                                       if (_pushStack != null && _pushStack.IsValueCreated)
+                                       {
+                                               foreach (Page page in _pushStack.Value)
+                                               {
+                                                       _inner.PushAsync(page);
+                                               }
+                                       }
+
+                                       if (_modalStack != null && _modalStack.IsValueCreated)
+                                       {
+                                               foreach (Page page in _modalStack.Value)
+                                               {
+                                                       _inner.PushModalAsync(page);
+                                               }
+                                       }
+
+                                       _pushStack = null;
+                                       _modalStack = null;
+                               }
+                       }
+               }
+
+               public void InsertPageBefore(Page page, Page before)
+               {
+                       OnInsertPageBefore(page, before);
+               }
+
+               public IReadOnlyList<Page> ModalStack
+               {
+                       get { return GetModalStack(); }
+               }
+
+               public IReadOnlyList<Page> NavigationStack
+               {
+                       get { return GetNavigationStack(); }
+               }
+
+               public Task<Page> PopAsync()
+               {
+                       return OnPopAsync(true);
+               }
+
+               public Task<Page> PopAsync(bool animated)
+               {
+                       return OnPopAsync(animated);
+               }
+
+               public Task<Page> PopModalAsync()
+               {
+                       return OnPopModal(true);
+               }
+
+               public Task<Page> PopModalAsync(bool animated)
+               {
+                       return OnPopModal(animated);
+               }
+
+               public Task PopToRootAsync()
+               {
+                       return OnPopToRootAsync(true);
+               }
+
+               public Task PopToRootAsync(bool animated)
+               {
+                       return OnPopToRootAsync(animated);
+               }
+
+               public Task PushAsync(Page root)
+               {
+                       return PushAsync(root, true);
+               }
+
+               public Task PushAsync(Page root, bool animated)
+               {
+                       if (root.RealParent != null)
+                               throw new InvalidOperationException("Page must not already have a parent.");
+                       return OnPushAsync(root, animated);
+               }
+
+               public Task PushModalAsync(Page modal)
+               {
+                       return PushModalAsync(modal, true);
+               }
+
+               public Task PushModalAsync(Page modal, bool animated)
+               {
+                       if (modal.RealParent != null)
+                               throw new InvalidOperationException("Page must not already have a parent.");
+                       return OnPushModal(modal, animated);
+               }
+
+               public void RemovePage(Page page)
+               {
+                       OnRemovePage(page);
+               }
+
+               protected virtual IReadOnlyList<Page> GetModalStack()
+               {
+                       INavigation currentInner = Inner;
+                       return currentInner == null ? _modalStack.Value : currentInner.ModalStack;
+               }
+
+               protected virtual IReadOnlyList<Page> GetNavigationStack()
+               {
+                       INavigation currentInner = Inner;
+                       return currentInner == null ? _pushStack.Value : currentInner.NavigationStack;
+               }
+
+               protected virtual void OnInsertPageBefore(Page page, Page before)
+               {
+                       INavigation currentInner = Inner;
+                       if (currentInner == null)
+                       {
+                               int index = _pushStack.Value.IndexOf(before);
+                               if (index == -1)
+                                       throw new ArgumentException("before must be in the pushed stack of the current context");
+                               _pushStack.Value.Insert(index, page);
+                       }
+                       else
+                       {
+                               currentInner.InsertPageBefore(page, before);
+                       }
+               }
+
+               protected virtual Task<Page> OnPopAsync(bool animated)
+               {
+                       INavigation inner = Inner;
+                       return inner == null ? Task.FromResult(Pop()) : inner.PopAsync(animated);
+               }
+
+               protected virtual Task<Page> OnPopModal(bool animated)
+               {
+                       INavigation innerNav = Inner;
+                       return innerNav == null ? Task.FromResult(PopModal()) : innerNav.PopModalAsync(animated);
+               }
+
+               protected virtual Task OnPopToRootAsync(bool animated)
+               {
+                       INavigation currentInner = Inner;
+                       if (currentInner == null)
+                       {
+                               Page root = _pushStack.Value.Last();
+                               _pushStack.Value.Clear();
+                               _pushStack.Value.Add(root);
+                               return Task.FromResult(root);
+                       }
+                       return currentInner.PopToRootAsync(animated);
+               }
+
+               protected virtual Task OnPushAsync(Page page, bool animated)
+               {
+                       INavigation currentInner = Inner;
+                       if (currentInner == null)
+                       {
+                               _pushStack.Value.Add(page);
+                               return Task.FromResult(page);
+                       }
+                       return currentInner.PushAsync(page, animated);
+               }
+
+               protected virtual Task OnPushModal(Page modal, bool animated)
+               {
+                       INavigation currentInner = Inner;
+                       if (currentInner == null)
+                       {
+                               _modalStack.Value.Add(modal);
+                               return Task.FromResult<object>(null);
+                       }
+                       return currentInner.PushModalAsync(modal, animated);
+               }
+
+               protected virtual void OnRemovePage(Page page)
+               {
+                       INavigation currentInner = Inner;
+                       if (currentInner == null)
+                       {
+                               _pushStack.Value.Remove(page);
+                       }
+                       else
+                       {
+                               currentInner.RemovePage(page);
+                       }
+               }
+
+               Page Pop()
+               {
+                       List<Page> list = _pushStack.Value;
+                       Page result = list[list.Count - 1];
+                       list.RemoveAt(list.Count - 1);
+                       return result;
+               }
+
+               Page PopModal()
+               {
+                       List<Page> list = _modalStack.Value;
+                       Page result = list[list.Count - 1];
+                       list.RemoveAt(list.Count - 1);
+                       return result;
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/public/XamlBinding/NavigationRequestedEventArgs.cs b/src/Tizen.NUI/src/public/XamlBinding/NavigationRequestedEventArgs.cs
new file mode 100755 (executable)
index 0000000..8ac7da7
--- /dev/null
@@ -0,0 +1,29 @@
+using System.ComponentModel;
+using System.Threading.Tasks;
+using Tizen.NUI;
+
+namespace Tizen.NUI.Binding
+{
+       [EditorBrowsable(EditorBrowsableState.Never)]
+       public class NavigationRequestedEventArgs : NavigationEventArgs
+       {
+               public NavigationRequestedEventArgs(Page page, bool animated, bool realize = true) : base(page)
+               {
+                       Animated = animated;
+                       Realize = realize;
+               }
+
+               public NavigationRequestedEventArgs(Page page, Page before, bool animated) : this(page, animated)
+               {
+                       BeforePage = before;
+               }
+
+               public bool Animated { get; set; }
+
+               public Page BeforePage { get; set; }
+
+               public bool Realize { get; set; }
+
+               public Task<bool> Task { get; set; }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/public/XamlBinding/Page.cs b/src/Tizen.NUI/src/public/XamlBinding/Page.cs
new file mode 100755 (executable)
index 0000000..6c5a3fd
--- /dev/null
@@ -0,0 +1,441 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Collections.Specialized;
+using System.ComponentModel;
+using System.Linq;
+using System.Threading;
+using System.Threading.Tasks;
+using Tizen.NUI.Internals;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI
+{
+       // [RenderWith(typeof(_PageRenderer))]
+       public class Page : /*VisualElement*/BaseHandle, ILayout, IPageController, IElementConfiguration<Page>, IPaddingElement
+       {
+               public const string BusySetSignalName = "Xamarin.BusySet";
+
+               public const string AlertSignalName = "Xamarin.SendAlert";
+
+               public const string ActionSheetSignalName = "Xamarin.ShowActionSheet";
+
+               internal static readonly BindableProperty IgnoresContainerAreaProperty = BindableProperty.Create("IgnoresContainerArea", typeof(bool), typeof(Page), false);
+
+               public static readonly BindableProperty BackgroundImageProperty = BindableProperty.Create("BackgroundImage", typeof(string), typeof(Page), default(string));
+
+               public static readonly BindableProperty IsBusyProperty = BindableProperty.Create("IsBusy", typeof(bool), typeof(Page), false, propertyChanged: (bo, o, n) => ((Page)bo).OnPageBusyChanged());
+
+               public static readonly BindableProperty PaddingProperty = PaddingElement.PaddingProperty;
+
+               public static readonly BindableProperty TitleProperty = BindableProperty.Create("Title", typeof(string), typeof(Page), null);
+
+               public static readonly BindableProperty IconProperty = BindableProperty.Create("Icon", typeof(FileImageSource), typeof(Page), default(FileImageSource));
+
+               readonly Lazy<PlatformConfigurationRegistry<Page>> _platformConfigurationRegistry;
+
+               bool _allocatedFlag;
+               Rectangle _containerArea;
+
+               bool _containerAreaSet;
+
+               bool _hasAppeared;
+
+               ReadOnlyCollection<Element> _logicalChildren;
+
+               public Page()
+               {
+                       var toolbarItems = new ObservableCollection<ToolbarItem>();
+                       toolbarItems.CollectionChanged += OnToolbarItemsCollectionChanged;
+                       // ToolbarItems = toolbarItems;
+                       InternalChildren.CollectionChanged += InternalChildrenOnCollectionChanged;
+                       _platformConfigurationRegistry = new Lazy<PlatformConfigurationRegistry<Page>>(() => new PlatformConfigurationRegistry<Page>(this));
+               }
+
+               public string BackgroundImage
+               {
+                       get { return (string)GetValue(BackgroundImageProperty); }
+                       set { SetValue(BackgroundImageProperty, value); }
+               }
+
+               internal FileImageSource Icon
+               {
+                       get { return (FileImageSource)GetValue(IconProperty); }
+                       set { SetValue(IconProperty, value); }
+               }
+
+               public bool IsBusy
+               {
+                       get { return (bool)GetValue(IsBusyProperty); }
+                       set { SetValue(IsBusyProperty, value); }
+               }
+
+               public Thickness Padding
+               {
+                       get { return (Thickness)GetValue(PaddingElement.PaddingProperty); }
+                       set { SetValue(PaddingElement.PaddingProperty, value); }
+               }
+
+               Thickness IPaddingElement.PaddingDefaultValueCreator()
+               {
+                       return default(Thickness);
+               }
+
+               void IPaddingElement.OnPaddingPropertyChanged(Thickness oldValue, Thickness newValue)
+               {
+                       UpdateChildrenLayout();
+               }
+
+               public string Title
+               {
+                       get { return (string)GetValue(TitleProperty); }
+                       set { SetValue(TitleProperty, value); }
+               }
+
+               internal IList<ToolbarItem> ToolbarItems { get;/* internal set;*/ }
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public Rectangle ContainerArea
+               {
+                       get { return _containerArea; }
+                       set
+                       {
+                               if (_containerArea == value)
+                                       return;
+                               _containerAreaSet = true;
+                               _containerArea = value;
+                               ForceLayout();
+                       }
+               }
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public bool IgnoresContainerArea
+               {
+                       get { return (bool)GetValue(IgnoresContainerAreaProperty); }
+                       set { SetValue(IgnoresContainerAreaProperty, value); }
+               }
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public ObservableCollection<Element> InternalChildren { get; } = new ObservableCollection<Element>();
+
+               internal override ReadOnlyCollection<Element> LogicalChildrenInternal => 
+                       _logicalChildren ?? (_logicalChildren = new ReadOnlyCollection<Element>(InternalChildren));
+
+               public event EventHandler LayoutChanged;
+
+               public event EventHandler Appearing;
+
+               public event EventHandler Disappearing;
+
+               public Task<string> DisplayActionSheet(string title, string cancel, string destruction, params string[] buttons)
+               {
+                       var args = new ActionSheetArguments(title, cancel, destruction, buttons);
+                       MessagingCenter.Send(this, ActionSheetSignalName, args);
+                       return args.Result.Task;
+               }
+
+               public Task DisplayAlert(string title, string message, string cancel)
+               {
+                       return DisplayAlert(title, message, null, cancel);
+               }
+
+               public Task<bool> DisplayAlert(string title, string message, string accept, string cancel)
+               {
+                       if (string.IsNullOrEmpty(cancel))
+                               throw new ArgumentNullException("cancel");
+
+                       var args = new AlertArguments(title, message, accept, cancel);
+                       MessagingCenter.Send(this, AlertSignalName, args);
+                       return args.Result.Task;
+               }
+
+               public void ForceLayout()
+               {
+                       // SizeAllocated(Width, Height);
+               }
+
+               public bool SendBackButtonPressed()
+               {
+                       return OnBackButtonPressed();
+               }
+
+               protected virtual void LayoutChildren(double x, double y, double width, double height)
+               {
+                       var area = new Rectangle((int)x, (int)y, (int)width, (int)height);
+                       Rectangle originalArea = area;
+                       if (_containerAreaSet)
+                       {
+                               area = ContainerArea;
+                               area.X += (int)Padding.Left;
+                               area.Y += (int)Padding.Right;
+                               area.Width -= (int)Padding.HorizontalThickness;
+                               area.Height -= (int)Padding.VerticalThickness;
+                               area.Width = Math.Max(0, area.Width);
+                               area.Height = Math.Max(0, area.Height);
+                       }
+
+                       List<Element> elements = LogicalChildren.ToList();
+                       foreach (Element element in elements)
+                       {
+                               var child = element as /*VisualElement*/BaseHandle;
+                               if (child == null)
+                                       continue;
+                               var page = child as Page;
+                               // if (page != null && page.IgnoresContainerArea)
+                                       // Forms.Layout.LayoutChildIntoBoundingRegion(child, originalArea);
+                               // else
+                                       // Forms.Layout.LayoutChildIntoBoundingRegion(child, area);
+                       }
+               }
+
+               protected virtual void OnAppearing()
+               {
+               }
+
+               protected virtual bool OnBackButtonPressed()
+               {
+                       var application = RealParent as Application;
+                       // if (application == null || this == application.MainPage)
+                               // return false;
+
+                       var canceled = false;
+                       EventHandler handler = (sender, args) => { canceled = true; };
+                       // application.PopCanceled += handler;
+                       Navigation.PopModalAsync().ContinueWith(t => { throw t.Exception; }, CancellationToken.None, TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.FromCurrentSynchronizationContext());
+
+                       // application.PopCanceled -= handler;
+                       return !canceled;
+               }
+
+               protected override void OnBindingContextChanged()
+               {
+                       base.OnBindingContextChanged();
+                       foreach (ToolbarItem toolbarItem in ToolbarItems)
+                       {
+                               SetInheritedBindingContext(toolbarItem, BindingContext);
+                       }
+               }
+
+               protected virtual void OnChildMeasureInvalidated(object sender, EventArgs e)
+               {
+                       InvalidationTrigger trigger = (e as InvalidationEventArgs)?.Trigger ?? InvalidationTrigger.Undefined;
+                       OnChildMeasureInvalidated((/*VisualElement*/BaseHandle)sender, trigger);
+               }
+
+               protected virtual void OnDisappearing()
+               {
+               }
+
+               protected override void OnParentSet()
+               {
+                       //if (!Application.IsApplicationOrNull(RealParent) && !(RealParent is Page))
+                               // throw new InvalidOperationException("Parent of a Page must also be a Page");
+                       base.OnParentSet();
+               }
+
+               // protected override void OnSizeAllocated(double width, double height)
+               // {
+               //      _allocatedFlag = true;
+               //      //base.OnSizeAllocated(width, height);
+               //      UpdateChildrenLayout();
+               // }
+
+               protected void UpdateChildrenLayout()
+               {
+                       if (!ShouldLayoutChildren())
+                               return;
+
+                       var startingLayout = new List<Rectangle>(LogicalChildren.Count);
+                       foreach (/*VisualElement*/BaseHandle c in LogicalChildren)
+                       {
+                               //startingLayout.Add(c.Bounds);
+                       }
+
+                       double x = Padding.Left;
+                       double y = Padding.Top;
+                       //double w = Math.Max(0, Width - Padding.HorizontalThickness);
+                       //double h = Math.Max(0, Height - Padding.VerticalThickness);
+
+                       //LayoutChildren(x, y, w, h);
+
+                       for (var i = 0; i < LogicalChildren.Count; i++)
+                       {
+                               var c = (/*VisualElement*/BaseHandle)LogicalChildren[i];
+
+                               // if (c.Bounds != startingLayout[i])
+                               // {
+                               //      LayoutChanged?.Invoke(this, EventArgs.Empty);
+                               //      return;
+                               // }
+                       }
+               }
+
+               internal virtual void OnChildMeasureInvalidated(/*VisualElement*/BaseHandle child, InvalidationTrigger trigger)
+               {
+                       var container = this as IPageContainer<Page>;
+                       if (container != null)
+                       {
+                               Page page = container.CurrentPage;
+                               if (page != null /*&& page.IsVisible && (!page.IsPlatformEnabled || !page.IsNativeStateConsistent)*/)
+                                       return;
+                       }
+                       else
+                       {
+                               for (var i = 0; i < LogicalChildren.Count; i++)
+                               {
+                                       var v = LogicalChildren[i] as /*VisualElement*/BaseHandle;
+                                       if (v != null /*&& v.IsVisible && (!v.IsPlatformEnabled || !v.IsNativeStateConsistent)*/)
+                                               return;
+                               }
+                       }
+
+                       _allocatedFlag = false;
+                       // InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged);
+                       if (!_allocatedFlag /*&& Width >= 0 && Height >= 0*/)
+                       {
+                               // SizeAllocated(Width, Height);
+                       }
+               }
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void SendAppearing()
+               {
+                       if (_hasAppeared)
+                               return;
+
+                       _hasAppeared = true;
+
+                       if (IsBusy)
+                               MessagingCenter.Send(this, BusySetSignalName, true);
+
+                       OnAppearing();
+                       Appearing?.Invoke(this, EventArgs.Empty);
+
+                       var pageContainer = this as IPageContainer<Page>;
+                       pageContainer?.CurrentPage?.SendAppearing();
+
+                       //FindApplication(this)?.OnPageAppearing(this);
+               }
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void SendDisappearing()
+               {
+                       if (!_hasAppeared)
+                               return;
+
+                       _hasAppeared = false;
+
+                       if (IsBusy)
+                               MessagingCenter.Send(this, BusySetSignalName, false);
+
+                       var pageContainer = this as IPageContainer<Page>;
+                       pageContainer?.CurrentPage?.SendDisappearing();
+
+                       OnDisappearing();
+                       Disappearing?.Invoke(this, EventArgs.Empty);
+
+                       //FindApplication(this)?.OnPageDisappearing(this);
+               }
+
+               Application FindApplication(Element element)
+               {
+                       if (element == null)
+                               return null;
+
+                       return (element.Parent is Application app) ? app : FindApplication(element.Parent);
+               }
+
+               void InternalChildrenOnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
+               {
+                       if (e.OldItems != null)
+                       {
+                               foreach (/*VisualElement*/BaseHandle item in e.OldItems.OfType</*VisualElement*/BaseHandle>())
+                                       OnInternalRemoved(item);
+                       }
+
+                       if (e.NewItems != null)
+                       {
+                               foreach (/*VisualElement*/BaseHandle item in e.NewItems.OfType</*VisualElement*/BaseHandle>())
+                                       OnInternalAdded(item);
+                       }
+               }
+
+               void OnInternalAdded(/*VisualElement*/BaseHandle view)
+               {
+                       // view.MeasureInvalidated += OnChildMeasureInvalidated;
+
+                       OnChildAdded(view);
+                       // InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged);
+               }
+
+               void OnInternalRemoved(/*VisualElement*/BaseHandle view)
+               {
+                       // view.MeasureInvalidated -= OnChildMeasureInvalidated;
+
+                       OnChildRemoved(view);
+               }
+
+               void OnPageBusyChanged()
+               {
+                       if (!_hasAppeared)
+                               return;
+
+                       MessagingCenter.Send(this, BusySetSignalName, IsBusy);
+               }
+
+               void OnToolbarItemsCollectionChanged(object sender, NotifyCollectionChangedEventArgs args)
+               {
+                       if (args.Action != NotifyCollectionChangedAction.Add)
+                               return;
+                       foreach (IElement item in args.NewItems)
+                               item.Parent = this;
+               }
+
+               bool ShouldLayoutChildren()
+               {
+                       if (!LogicalChildren.Any()/* || Width <= 0 || Height <= 0 || !IsNativeStateConsistent*/)
+                               return false;
+
+                       var container = this as IPageContainer<Page>;
+                       if (container?.CurrentPage != null)
+                       {
+                               // if (InternalChildren.Contains(container.CurrentPage))
+                               //      return container.CurrentPage.IsPlatformEnabled && container.CurrentPage.IsNativeStateConsistent;
+                               return true;
+                       }
+
+                       var any = false;
+                       for (var i = 0; i < LogicalChildren.Count; i++)
+                       {
+                               var v = LogicalChildren[i] as /*VisualElement*/BaseHandle;
+                               if (v != null /*&& (!v.IsPlatformEnabled || !v.IsNativeStateConsistent)*/)
+                               {
+                                       any = true;
+                                       break;
+                               }
+                       }
+                       return !any;
+               }
+
+               public IPlatformElementConfiguration<T, Page> On<T>() where T : IConfigPlatform
+               {
+                       return _platformConfigurationRegistry.Value.On<T>();
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/public/XamlBinding/SizeRequest.cs b/src/Tizen.NUI/src/public/XamlBinding/SizeRequest.cs
new file mode 100755 (executable)
index 0000000..04090aa
--- /dev/null
@@ -0,0 +1,29 @@
+using System.Diagnostics;
+
+namespace Tizen.NUI.Binding
+{
+       [DebuggerDisplay("Request={Request.Width}x{Request.Height}, Minimum={Minimum.Width}x{Minimum.Height}")]
+       public struct SizeRequest
+       {
+               public Size Request { get; set; }
+
+               public Size Minimum { get; set; }
+
+               public SizeRequest(Size request, Size minimum)
+               {
+                       Request = request;
+                       Minimum = minimum;
+               }
+
+               public SizeRequest(Size request)
+               {
+                       Request = request;
+                       Minimum = request;
+               }
+
+               public override string ToString()
+               {
+                       return string.Format("{{Request={0} Minimum={1}}}", Request, Minimum);
+               }
+       }
+}
diff --git a/src/Tizen.NUI/src/public/XamlBinding/TemplatedPage.cs b/src/Tizen.NUI/src/public/XamlBinding/TemplatedPage.cs
new file mode 100755 (executable)
index 0000000..e612064
--- /dev/null
@@ -0,0 +1,48 @@
+using System.Collections.Generic;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI
+{
+       public class TemplatedPage : Page, IControlTemplated
+       {
+               public static readonly BindableProperty ControlTemplateProperty = BindableProperty.Create(nameof(ControlTemplate), typeof(ControlTemplate), typeof(TemplatedPage), null,
+                       propertyChanged: TemplateUtilities.OnControlTemplateChanged);
+
+               public ControlTemplate ControlTemplate
+               {
+                       get { return (ControlTemplate)GetValue(ControlTemplateProperty); }
+                       set { SetValue(ControlTemplateProperty, value); }
+               }
+
+               IList<Element> IControlTemplated.InternalChildren => InternalChildren;
+
+               // internal override void ComputeConstraintForView(View view)
+               // {
+               //      LayoutOptions vOptions = view.VerticalOptions;
+               //      LayoutOptions hOptions = view.HorizontalOptions;
+
+               //      var result = LayoutConstraint.None;
+               //      if (vOptions.Alignment == LayoutAlignment.Fill)
+               //              result |= LayoutConstraint.VerticallyFixed;
+               //      if (hOptions.Alignment == LayoutAlignment.Fill)
+               //              result |= LayoutConstraint.HorizontallyFixed;
+
+               //      view.ComputedConstraint = result;
+               // }
+
+               internal override void SetChildInheritedBindingContext(Element child, object context)
+               {
+                       if (ControlTemplate == null)
+                               base.SetChildInheritedBindingContext(child, context);
+               }
+
+               void IControlTemplated.OnControlTemplateChanged(ControlTemplate oldValue, ControlTemplate newValue)
+               {
+                       OnControlTemplateChanged(oldValue, newValue);
+               }
+
+               internal virtual void OnControlTemplateChanged(ControlTemplate oldValue, ControlTemplate newValue)
+               {
+               }
+       }
+}
\ No newline at end of file
diff --git a/src/Tizen.NUI/src/public/XamlBinding/Thickness.cs b/src/Tizen.NUI/src/public/XamlBinding/Thickness.cs
new file mode 100755 (executable)
index 0000000..430fadd
--- /dev/null
@@ -0,0 +1,100 @@
+using System.Diagnostics;
+
+namespace Tizen.NUI.Binding
+{
+       [DebuggerDisplay("Left={Left}, Top={Top}, Right={Right}, Bottom={Bottom}, HorizontalThickness={HorizontalThickness}, VerticalThickness={VerticalThickness}")]
+       [TypeConverter(typeof(ThicknessTypeConverter))]
+       public struct Thickness
+       {
+               public double Left { get; set; }
+
+               public double Top { get; set; }
+
+               public double Right { get; set; }
+
+               public double Bottom { get; set; }
+
+               public double HorizontalThickness
+               {
+                       get { return Left + Right; }
+               }
+
+               public double VerticalThickness
+               {
+                       get { return Top + Bottom; }
+               }
+
+               internal bool IsDefault
+               {
+                       get { return Left == 0 && Top == 0 && Right == 0 && Bottom == 0; }
+               }
+
+               public Thickness(double uniformSize) : this(uniformSize, uniformSize, uniformSize, uniformSize)
+               {
+               }
+
+               public Thickness(double horizontalSize, double verticalSize) : this(horizontalSize, verticalSize, horizontalSize, verticalSize)
+               {
+               }
+
+               public Thickness(double left, double top, double right, double bottom) : this()
+               {
+                       Left = left;
+                       Top = top;
+                       Right = right;
+                       Bottom = bottom;
+               }
+
+               public static implicit operator Thickness(Size size)
+               {
+                       return new Thickness(size.Width, size.Height, size.Width, size.Height);
+               }
+
+               public static implicit operator Thickness(double uniformSize)
+               {
+                       return new Thickness(uniformSize);
+               }
+
+               bool Equals(Thickness other)
+               {
+                       return Left.Equals(other.Left) && Top.Equals(other.Top) && Right.Equals(other.Right) && Bottom.Equals(other.Bottom);
+               }
+
+               public override bool Equals(object obj)
+               {
+                       if (ReferenceEquals(null, obj))
+                               return false;
+                       return obj is Thickness && Equals((Thickness)obj);
+               }
+
+               public override int GetHashCode()
+               {
+                       unchecked
+                       {
+                               int hashCode = Left.GetHashCode();
+                               hashCode = (hashCode * 397) ^ Top.GetHashCode();
+                               hashCode = (hashCode * 397) ^ Right.GetHashCode();
+                               hashCode = (hashCode * 397) ^ Bottom.GetHashCode();
+                               return hashCode;
+                       }
+               }
+
+               public static bool operator ==(Thickness left, Thickness right)
+               {
+                       return left.Equals(right);
+               }
+
+               public static bool operator !=(Thickness left, Thickness right)
+               {
+                       return !left.Equals(right);
+               }
+
+               public void Deconstruct(out double left, out double top, out double right, out double bottom)
+               {
+                       left = Left;
+                       top = Top;
+                       right = Right;
+                       bottom = Bottom;
+               }
+       }
+}
\ No newline at end of file
diff --git a/test/NUITestSample/NUIXAMLTestSample.sln b/test/NUITestSample/NUIXAMLTestSample.sln
new file mode 100755 (executable)
index 0000000..e199686
--- /dev/null
@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.27004.2006
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NUIXAMLTestSample", "NUIXAMLTestSample\NUIXAMLTestSample.csproj", "{848AFBC8-7318-4856-8FA5-51AFA4919838}"
+EndProject
+Global
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution
+               Debug|Any CPU = Debug|Any CPU
+               Release|Any CPU = Release|Any CPU
+       EndGlobalSection
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution
+               {848AFBC8-7318-4856-8FA5-51AFA4919838}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {848AFBC8-7318-4856-8FA5-51AFA4919838}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {848AFBC8-7318-4856-8FA5-51AFA4919838}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {848AFBC8-7318-4856-8FA5-51AFA4919838}.Release|Any CPU.Build.0 = Release|Any CPU
+       EndGlobalSection
+       GlobalSection(SolutionProperties) = preSolution
+               HideSolutionNode = FALSE
+       EndGlobalSection
+       GlobalSection(ExtensibilityGlobals) = postSolution
+               SolutionGuid = {1121C38F-65D0-4F7B-8097-9A363A641DF2}
+       EndGlobalSection
+EndGlobal
diff --git a/test/NUITestSample/NUIXAMLTestSample/NUIXAMLTestSample.cs b/test/NUITestSample/NUIXAMLTestSample/NUIXAMLTestSample.cs
new file mode 100755 (executable)
index 0000000..8aa94ca
--- /dev/null
@@ -0,0 +1,33 @@
+using System;
+
+namespace NUIXAMLTestSample
+{
+    class Application
+    {
+        /// <summary>
+        /// The main entry point for the application.
+        /// </summary>
+        [STAThread]
+        static void Main(string[] args)
+        {
+             new TempTest().Run(args);
+
+            /* For Sample codes */
+            // new TestAmbient().Run(args);
+            // new TestDetailApps().Run(args);
+            // new TestMyContents().Run(args);
+
+            /* For UTC codes */
+            // new TestButton().Run(args);
+            // new TestFlexContainer().Run(args);
+            // new TestImageView().Run(args);
+            // new TestScrollBar().Run(args);
+            // new TestSlider().Run(args);
+            // new TestTableView().Run(args);
+            // new TestTextEditor().Run(args);
+            // new TestTextField().Run(args);
+            // new TestTextLabel().Run(args);
+
+        }
+    }
+}
diff --git a/test/NUITestSample/NUIXAMLTestSample/NUIXAMLTestSample.csproj b/test/NUITestSample/NUIXAMLTestSample/NUIXAMLTestSample.csproj
new file mode 100755 (executable)
index 0000000..68f5d9a
--- /dev/null
@@ -0,0 +1,40 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <PropertyGroup>
+    <OutputType>Exe</OutputType>
+    <TargetFramework>netcoreapp2.0</TargetFramework>
+  </PropertyGroup>
+
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugType>portable</DebugType>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>None</DebugType>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <Folder Include="lib\" />
+    <Folder Include="res\" />
+  </ItemGroup>
+
+  <ItemGroup>
+    <PackageReference Include="Tizen.NET.Sdk" Version="1.0.0" />
+  </ItemGroup>
+    <ItemGroup>
+    <EmbeddedResource Include="TempTest/TempPage.xaml" />
+    <EmbeddedResource Include="TestAmbient/*.xaml" />
+    <EmbeddedResource Include="TestMyContents/MediaHubPage.xaml" />
+    <EmbeddedResource Include="TestDetailApps/AppDetailPage.xaml" />
+    <EmbeddedResource Include="UTC/TestButton/ButtonTestPage.xaml" />
+    <EmbeddedResource Include="UTC/TestFlexContainer/FlexContainerPage.xaml" />
+    <EmbeddedResource Include="UTC/TestImageView/ImageTestPage.xaml" />
+    <EmbeddedResource Include="UTC/TestScrollBar/ScrollBarTestPage.xaml" />
+    <EmbeddedResource Include="UTC/TestSlider/SliderTestPage.xaml" />
+    <EmbeddedResource Include="UTC/TestTableView/TableTestPage.xaml" />
+    <EmbeddedResource Include="UTC/TestTextEditor/TextEditorTestPage.xaml" />
+    <EmbeddedResource Include="UTC/TestTextField/TextFieldTestPage.xaml" />
+    <EmbeddedResource Include="UTC/TestTextLabel/TextLabelTestPage.xaml" />
+  </ItemGroup>
+
+</Project>
+
diff --git a/test/NUITestSample/NUIXAMLTestSample/TempTest/TempPage.xaml b/test/NUITestSample/NUIXAMLTestSample/TempTest/TempPage.xaml
new file mode 100755 (executable)
index 0000000..673c755
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ContentPage x:Class="Tizen.NUI.Examples.TempPage"
+  xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+  xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
+
+  <PushButton LabelText="Button1" Focusable="true" Position2D="50,50" Size2D="100,50" >
+  </PushButton>
+</ContentPage>
diff --git a/test/NUITestSample/NUIXAMLTestSample/TempTest/TempPage.xaml.cs b/test/NUITestSample/NUIXAMLTestSample/TempTest/TempPage.xaml.cs
new file mode 100755 (executable)
index 0000000..074b6d9
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 Tizen.NUI.BaseComponents;
+using Tizen.NUI.UIComponents;
+
+namespace Tizen.NUI.Examples
+{
+    public class TempPage : ContentPage
+    {
+
+        public TempPage(Window win) : base (win)
+        {
+        }
+
+        /// <summary>
+        /// To make the ContentPage instance be disposed.
+        /// </summary>
+        protected override void Dispose(DisposeTypes type)
+        {
+            if (disposed)
+            {
+                return;
+            }
+
+            if (type == DisposeTypes.Explicit)
+            {
+            }
+
+            base.Dispose(type);
+        }
+
+        public override void SetFocus()
+        {
+            // PushButton button1 = Content.FindChildByName("Button1") as PushButton;
+            // PushButton button2 = Content.FindChildByName("Button2") as PushButton;
+            // button1.DownFocusableView = button2;
+            // button2.UpFocusableView = button1;
+            // FocusManager.Instance.SetCurrentFocusView(button1);
+        }
+
+        private bool OnClicked(object sender, EventArgs e)
+        {
+            if (sender is Button)
+            {
+                Button button = sender as Button;
+                button.LabelText = "Click Me";
+            }
+            return true;
+        }
+
+        private void OnFocusGained(object obj, EventArgs e)
+        {
+            View view = obj as View;
+            view.Scale = new Vector3(1.2f, 1.1f, 1.0f);
+            Console.WriteLine("==================  button focus gained !!!! ==================");
+        }
+
+        private void OnFocusLost(object obj, EventArgs e)
+        {
+            View view = obj as View;
+            view.Scale = new Vector3(1.0f, 1.0f, 1.0f);
+            Console.WriteLine("==================  button focus lost !!!! ==================");
+        }
+
+    }
+}
\ No newline at end of file
diff --git a/test/NUITestSample/NUIXAMLTestSample/TempTest/TempTest.cs b/test/NUITestSample/NUIXAMLTestSample/TempTest/TempTest.cs
new file mode 100755 (executable)
index 0000000..2e20f58
--- /dev/null
@@ -0,0 +1,114 @@
+using System;
+using System.IO;
+using System.Reflection;
+
+using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
+using Tizen.NUI;
+using Tizen.NUI.UIComponents;
+using Tizen.NUI.BaseComponents;
+using System.ComponentModel;
+
+namespace Tizen.NUI.Examples
+{
+    
+    // class MyAppViewModel : INotifyPropertyChanged
+    // {
+
+    //     public event PropertyChangedEventHandler PropertyChanged;
+    //     private Command _firstClick;
+    //     private int count = 0;
+        
+    //     private string[] colors = new string[] {"Black", "Blue", "Gray", "Green", "Purple", "Pink", "Red" };
+    //     public string TextColor = "Red";
+    //     public Command ChangeColor {
+    //         get {
+    //             return _firstClick ?? (_firstClick = new Command (() => {
+    //                 Console.WriteLine ("First button clicked");
+    //                 count += 1;
+    //                 TextColor = colors[count % 7];
+    //             }));
+    //         }
+    //     }
+    
+    //     public MyAppViewModel()
+    //     {
+    //     }
+
+    // }
+    class MyAppViewModel : INotifyPropertyChanged
+    {
+
+        public event PropertyChangedEventHandler PropertyChanged;
+        private Command _firstClick;
+        private int clickCounter = 0;
+        public string message;
+
+        //static readonly BindableProperty MessageProperty = BindableProperty.Create<MyAppViewModel, string> ((MyAppViewModel v) => v.Message, "- - - - - Message - - -");
+        public string Message
+        {
+            set
+            {                
+                Console.WriteLine ("Message : {0}, {1}",message,value);
+                if (message != value)
+                {
+                    message = value;
+
+                    Console.WriteLine ("Message111 : {0}",message);
+
+                    if (PropertyChanged != null)
+                    {
+                        Console.WriteLine ("Message222 : {0}",message);
+                        PropertyChanged(this, 
+                            new PropertyChangedEventArgs("Message"));
+                    }
+                }
+            }
+            get
+            {
+                return message;
+            }
+        }
+
+        public Command ShowClickCount {
+            get {
+                return _firstClick ?? (_firstClick = new Command (() => {
+                    Console.WriteLine ("First button clicked");
+                    clickCounter += 1;
+                    Message = "Clicked " + clickCounter.ToString() + " times";
+                }));
+            }
+        }    
+
+        public MyAppViewModel()
+        {
+            this.message = String.Format("------test-----");
+            this.Message = String.Format("------test111-----");;
+        }
+    }
+
+
+    public class TempTest : NUIApplication
+    {
+
+        protected override void OnCreate() 
+        {
+            base.OnCreate();
+            Window window = Window.Instance;
+            window.BackgroundColor = Color.White;
+
+            TempPage myPage = new TempPage(window);
+            // myPage.InitializeComponents(myPage, typeof(TempPage));
+            Extensions.LoadFromXaml(myPage, typeof(TempPage));
+            // myPage.BindingContext = new MyAppViewModel ();
+            Console.WriteLine("==================  Set BindingContext in Application !!!! ==================");
+            myPage.SetFocus();
+        }
+
+        public static void _Main(string[] args)
+        {
+            TempTest p = new TempTest();
+            p.Run(args);
+        }
+    }
+}
diff --git a/test/NUITestSample/NUIXAMLTestSample/TestAmbient/AmbientDuoPage.xaml b/test/NUITestSample/NUIXAMLTestSample/TestAmbient/AmbientDuoPage.xaml
new file mode 100755 (executable)
index 0000000..b964709
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ContentPage x:Class="Tizen.NUI.Examples.AmbientDuoPage"
+  xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+  xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
+
+  <ImageView Name="photo00" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/default/picture_d_1.jpg" Position2D="287,260" Size2D="560,560" />
+  <ImageView Name="photo01" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/default/picture_d_2.jpg" Position2D="1073,260" Size2D="560,560" />
+</ContentPage>
diff --git a/test/NUITestSample/NUIXAMLTestSample/TestAmbient/AmbientDuoPage.xaml.cs b/test/NUITestSample/NUIXAMLTestSample/TestAmbient/AmbientDuoPage.xaml.cs
new file mode 100755 (executable)
index 0000000..b36142b
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 Tizen.NUI.BaseComponents;
+using Tizen.NUI.UIComponents;
+
+namespace Tizen.NUI.Examples
+{
+    public class AmbientDuoPage : ContentPage
+    {
+
+        public AmbientDuoPage(Window win) : base (win)
+        {
+            Content.BackgroundImage = "/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/photoduo_img_bg_01_no9patch.png";
+            ClearEvent += OnClearEvent;
+            Content.Opacity = 0.0f;
+        }
+
+        /// <summary>
+        /// To make the ContentPage instance be disposed.
+        /// </summary>
+        protected override void Dispose(DisposeTypes type)
+        {
+            if (disposed)
+            {
+                return;
+            }
+
+            if (type == DisposeTypes.Explicit)
+            {
+            }
+
+            ClearEvent -= OnClearEvent;
+
+            base.Dispose(type);
+        }
+
+        public override void SetFocus()
+        {
+            Console.WriteLine("AmbientDuoPage focused.");
+            Animation animation = new Animation(2000);
+            animation.AnimateTo(Content, "Opacity", 1.0f);
+            animation.Play();
+        }
+
+        private void OnClearEvent(object obj, EventArgs e)
+        {
+            Content.BackgroundImage = "/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/photoduo_img_bg_01_no9patch.png";
+        }
+    }
+}
\ No newline at end of file
diff --git a/test/NUITestSample/NUIXAMLTestSample/TestAmbient/AmbientMonoPage.xaml b/test/NUITestSample/NUIXAMLTestSample/TestAmbient/AmbientMonoPage.xaml
new file mode 100755 (executable)
index 0000000..b0a2d19
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ContentPage x:Class="Tizen.NUI.Examples.AmbientMonoPage"
+  xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+  xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
+
+  <ImageView Name="photo" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/default/picture_m_1.jpg" Opacity="0" ParentOrigin="Center" PivotPoint="Center" PositionUsesPivotPoint="true" Size2D="1560,720" />
+  
+</ContentPage>
diff --git a/test/NUITestSample/NUIXAMLTestSample/TestAmbient/AmbientMonoPage.xaml.cs b/test/NUITestSample/NUIXAMLTestSample/TestAmbient/AmbientMonoPage.xaml.cs
new file mode 100755 (executable)
index 0000000..849650e
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 Tizen.NUI.BaseComponents;
+using Tizen.NUI.UIComponents;
+
+namespace Tizen.NUI.Examples
+{
+    public class AmbientMonoPage : ContentPage
+    {
+        public AmbientMonoPage(Window win) : base (win)
+        {
+        }
+
+        /// <summary>
+        /// To make the ContentPage instance be disposed.
+        /// </summary>
+        protected override void Dispose(DisposeTypes type)
+        {
+            if (disposed)
+            {
+                return;
+            }
+
+            if (type == DisposeTypes.Explicit)
+            {
+            }
+            base.Dispose(type);
+        }
+
+        public override void SetFocus()
+        {
+            Console.WriteLine("AmbientMonoPage focused.");
+            ImageView image = Content.FindChildByName("photo") as ImageView;
+            Animation animation = new Animation(2000);
+            animation.AnimateTo(image, "Opacity", 1.0f);
+            animation.Play();
+        }
+    }
+}
\ No newline at end of file
diff --git a/test/NUITestSample/NUIXAMLTestSample/TestAmbient/AmbientMultiPage.xaml b/test/NUITestSample/NUIXAMLTestSample/TestAmbient/AmbientMultiPage.xaml
new file mode 100755 (executable)
index 0000000..ec7b96f
--- /dev/null
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ContentPage x:Class="Tizen.NUI.Examples.AmbientMultiPage"
+  xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+  xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
+
+  <ImageView Name="photo0" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/bg_textbox_w.png" Position2D="50,50" Size2D="440,600" />
+  <View Name="num_area" Size2D="440,160" Position2D="50,50">
+    <ImageView Name="photo0" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/num/num_w_2.png" Position2D="0,0" Size2D="110,160" />
+    <ImageView Name="photo0" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/num/num_w_0.png" Position2D="110,0" Size2D="110,160" />
+    <ImageView Name="photo0" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/num/num_w_th.png" Position2D="220,0" Size2D="220,160" />
+  </View>
+  <View Name="mon_area" Size2D="440,194" Position2D="50,210">
+    <ImageView Name="photo0" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/mon/mon_w_4.png" Position2D="0,0" Size2D="440,194" />
+  </View>
+  <View Name="year_area" Size2D="440,210" Position2D="50,424">
+    <ImageView Name="photo0" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/year/year_w_2.png" Position2D="0,0" Size2D="110,210" />
+    <ImageView Name="photo0" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/year/year_w_0.png" Position2D="110,0" Size2D="110,210" />
+    <ImageView Name="photo0" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/year/year_w_1.png" Position2D="220,0" Size2D="110,210" />
+    <ImageView Name="photo0" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/year/year_w_8.png" Position2D="330,0" Size2D="110,210" />
+  </View>
+  <ImageView Name="photo1" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/default/picture_01.jpg" Position2D="50,670" Size2D="440,360" />
+  <ImageView Name="photo2" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/default/picture_02.jpg" Position2D="510,50" Size2D="440,560" />
+  <ImageView Name="photo3" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/default/picture_03.jpg" Position2D="510,630" Size2D="440,400" />
+  <ImageView Name="photo4" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/default/picture_04.jpg" Position2D="970,50" Size2D="440,280" />
+  <ImageView Name="photo5" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/default/picture_05.jpg" Position2D="970,350" Size2D="440,340" />
+  <ImageView Name="photo6" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/default/picture_06.jpg" Position2D="970,710" Size2D="440,320" />
+  <ImageView Name="photo7" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/default/picture_07.jpg" Position2D="1430,50" Size2D="440,440" />
+  <ImageView Name="photo8" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/default/picture_08.jpg" Position2D="1430,510" Size2D="440,520" />
+</ContentPage>
diff --git a/test/NUITestSample/NUIXAMLTestSample/TestAmbient/AmbientMultiPage.xaml.cs b/test/NUITestSample/NUIXAMLTestSample/TestAmbient/AmbientMultiPage.xaml.cs
new file mode 100755 (executable)
index 0000000..3eba652
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 Tizen.NUI.BaseComponents;
+using Tizen.NUI.UIComponents;
+
+namespace Tizen.NUI.Examples
+{
+    public class AmbientMultiPage : ContentPage
+    {
+
+        public AmbientMultiPage(Window win) : base (win)
+        {
+            Content.BackgroundImage = "/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/photoboard_img_bg_01.png";
+            ClearEvent += OnClearEvent;
+            Content.Opacity = 0.0f;
+        }
+
+        /// <summary>
+        /// To make the ContentPage instance be disposed.
+        /// </summary>
+        protected override void Dispose(DisposeTypes type)
+        {
+            if (disposed)
+            {
+                return;
+            }
+
+            if (type == DisposeTypes.Explicit)
+            {
+            }
+
+            ClearEvent -= OnClearEvent;
+
+            base.Dispose(type);
+        }
+
+        public override void SetFocus()
+        {
+            Console.WriteLine("AmbientMultiPage focused.");
+            Animation animation = new Animation(2000);
+            animation.AnimateTo(Content, "Opacity", 1.0f);
+            animation.Play();
+        }
+
+        private void OnClearEvent(object obj, EventArgs e)
+        {
+            Content.BackgroundImage = "/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/photoboard_img_bg_01.png";
+        }
+    }
+}
\ No newline at end of file
diff --git a/test/NUITestSample/NUIXAMLTestSample/TestAmbient/AmbientMultiPage2.xaml b/test/NUITestSample/NUIXAMLTestSample/TestAmbient/AmbientMultiPage2.xaml
new file mode 100755 (executable)
index 0000000..83885ed
--- /dev/null
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ContentPage x:Class="Tizen.NUI.Examples.AmbientMultiPage2"
+  xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+  xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
+
+
+  <ImageView Name="photo1" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/default/picture_07.jpg" Position2D="47,52" Size2D="440,440" />
+  <ImageView Name="photo2" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/default/picture_08.jpg" Position2D="47,512" Size2D="440,520" />
+  <ImageView Name="photo3" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/default/picture_02.jpg" Position2D="970,50" Size2D="440,560" />
+  <ImageView Name="photo4" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/default/picture_03.jpg" Position2D="970,630" Size2D="440,400" />
+  <ImageView Name="photo5" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/default/picture_04.jpg" Position2D="510,50" Size2D="440,280" />
+  <ImageView Name="photo6" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/default/picture_05.jpg" Position2D="510,350" Size2D="440,340" />
+  <ImageView Name="photo7" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/default/picture_06.jpg" Position2D="510,710" Size2D="440,320" />
+
+  <ImageView Name="photo0" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/bg_textbox_w.png" Position2D="1431,51" Size2D="440,600" />
+  <View Name="num_area" Size2D="440,160" Position2D="1431,51">
+    <ImageView Name="photo01" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/num/num_w_2.png" Position2D="0,0" Size2D="110,160" />
+    <ImageView Name="photo02" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/num/num_w_0.png" Position2D="110,0" Size2D="110,160" />
+    <ImageView Name="photo03" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/num/num_w_th.png" Position2D="220,0" Size2D="220,160" />
+  </View>
+  <View Name="mon_area" Size2D="440,194" Position2D="1431,211">
+    <ImageView Name="photo10" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/mon/mon_w_4.png" Position2D="0,0" Size2D="440,194" />
+  </View>
+  <View Name="year_area" Size2D="440,210" Position2D="1431,425">
+    <ImageView Name="photo21" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/year/year_w_2.png" Position2D="0,0" Size2D="110,210" />
+    <ImageView Name="photo22" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/year/year_w_0.png" Position2D="110,0" Size2D="110,210" />
+    <ImageView Name="photo23" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/year/year_w_1.png" Position2D="220,0" Size2D="110,210" />
+    <ImageView Name="photo24" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/year/year_w_8.png" Position2D="330,0" Size2D="110,210" />
+  </View>
+  <ImageView Name="photo8" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/default/picture_01.jpg" Position2D="1431,671" Size2D="440,360" />
+</ContentPage>
diff --git a/test/NUITestSample/NUIXAMLTestSample/TestAmbient/AmbientMultiPage2.xaml.cs b/test/NUITestSample/NUIXAMLTestSample/TestAmbient/AmbientMultiPage2.xaml.cs
new file mode 100755 (executable)
index 0000000..9ac1162
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 Tizen.NUI.BaseComponents;
+using Tizen.NUI.UIComponents;
+
+namespace Tizen.NUI.Examples
+{
+    public class AmbientMultiPage2 : ContentPage
+    {
+
+        public AmbientMultiPage2(Window win) : base (win)
+        {
+            Content.BackgroundImage = "/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/photoboard_img_bg_02.png";
+            ClearEvent += OnClearEvent;
+            Content.Opacity = 0.0f;
+        }
+
+        /// <summary>
+        /// To make the ContentPage instance be disposed.
+        /// </summary>
+        protected override void Dispose(DisposeTypes type)
+        {
+            if (disposed)
+            {
+                return;
+            }
+
+            if (type == DisposeTypes.Explicit)
+            {
+            }
+
+            ClearEvent -= OnClearEvent;
+
+            base.Dispose(type);
+        }
+
+        public override void SetFocus()
+        {
+            Console.WriteLine("AmbientMulti2Page focused.");
+            Animation animation = new Animation(2000);
+            animation.AnimateTo(Content, "Opacity", 1.0f);
+            animation.Play();
+        }
+
+        private void OnClearEvent(object obj, EventArgs e)
+        {
+            Content.BackgroundImage = "/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/photoboard_img_bg_02.png";
+        }
+    }
+}
\ No newline at end of file
diff --git a/test/NUITestSample/NUIXAMLTestSample/TestAmbient/AmbientMultiPage3.xaml b/test/NUITestSample/NUIXAMLTestSample/TestAmbient/AmbientMultiPage3.xaml
new file mode 100755 (executable)
index 0000000..87d16b0
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ContentPage x:Class="Tizen.NUI.Examples.AmbientMultiPage3"
+  xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+  xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
+
+  <View BackgroundImage="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/photoboard_img_bg_03.png" Position2D="0,0" Size2D="1920,1080" >
+  <!-- <View BackgroundImage="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/photoboard_img_bg_04.png" Position2D="0,0" Size2D="1920,1080" > -->
+    <ImageView Name="photo0" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/bg_textbox_w.png" Position2D="50,50" Size2D="440,600" />
+    <View Name="num_area" Size2D="440,160" Position2D="50,50">
+      <ImageView Name="photo11" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/num/num_w_2.png" Position2D="0,0" Size2D="110,160" />
+      <ImageView Name="photo12" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/num/num_w_0.png" Position2D="110,0" Size2D="110,160" />
+      <ImageView Name="photo13" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/num/num_w_th.png" Position2D="220,0" Size2D="220,160" />
+    </View>
+    <View Name="mon_area" Size2D="440,194" Position2D="50,210">
+      <ImageView Name="photo21" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/mon/mon_w_4.png" Position2D="0,0" Size2D="440,194" />
+    </View>
+    <View Name="year_area" Size2D="440,210" Position2D="50,424">
+      <ImageView Name="photo31" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/year/year_w_2.png" Position2D="0,0" Size2D="110,210" />
+      <ImageView Name="photo32" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/year/year_w_0.png" Position2D="110,0" Size2D="110,210" />
+      <ImageView Name="photo33" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/year/year_w_1.png" Position2D="220,0" Size2D="110,210" />
+      <ImageView Name="photo34" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/year/year_w_8.png" Position2D="330,0" Size2D="110,210" />
+    </View>
+    <ImageView Name="photo1" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/default/picture_01.jpg" Position2D="50,670" Size2D="440,360" />
+    
+    <ImageView Name="photo2" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/default/picture_00.jpg" Position2D="508,50" Size2D="900,560" />
+    <ImageView Name="photo3" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/default/picture_03.jpg" Position2D="508,630" Size2D="440,400" />
+    <ImageView Name="photo6" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/default/picture_09.jpg" Position2D="968,630" Size2D="440,400" />
+    <!--
+    <ImageView Name="photo3" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/default/picture_03.jpg" Position2D="508,50" Size2D="440,400" />
+    <ImageView Name="photo6" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/default/picture_09.jpg" Position2D="966,50" Size2D="440,400" />
+    <ImageView Name="photo2" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/default/picture_00.jpg" Position2D="508,470" Size2D="900,560" />
+    -->
+    <ImageView Name="photo7" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/default/picture_07.jpg" Position2D="1430,50" Size2D="440,440" />
+    <ImageView Name="photo8" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/ambient/default/picture_08.jpg" Position2D="1430,510" Size2D="440,520" />
+  </View>
+</ContentPage>
diff --git a/test/NUITestSample/NUIXAMLTestSample/TestAmbient/AmbientMultiPage3.xaml.cs b/test/NUITestSample/NUIXAMLTestSample/TestAmbient/AmbientMultiPage3.xaml.cs
new file mode 100755 (executable)
index 0000000..c559355
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 Tizen.NUI.BaseComponents;
+using Tizen.NUI.UIComponents;
+
+namespace Tizen.NUI.Examples
+{
+    public class AmbientMultiPage3 : ContentPage
+    {
+
+        public AmbientMultiPage3(Window win) : base (win)
+        {
+            Content.Opacity = 0.0f;
+        }
+
+        /// <summary>
+        /// To make the ContentPage instance be disposed.
+        /// </summary>
+        protected override void Dispose(DisposeTypes type)
+        {
+            if (disposed)
+            {
+                return;
+            }
+
+            if (type == DisposeTypes.Explicit)
+            {
+            }
+
+            base.Dispose(type);
+        }
+
+        public override void SetFocus()
+        {
+            Console.WriteLine("AmbientMulti3Page focused.");
+            Animation animation = new Animation(2000);
+            animation.AnimateTo(Content, "Opacity", 1.0f);
+            animation.Finished += (obj, e) => {Console.WriteLine("animation finished.");};
+            animation.Play();
+        }
+    }
+}
\ No newline at end of file
diff --git a/test/NUITestSample/NUIXAMLTestSample/TestAmbient/AmbientScreenUXControl.cs b/test/NUITestSample/NUIXAMLTestSample/TestAmbient/AmbientScreenUXControl.cs
new file mode 100755 (executable)
index 0000000..1232d5f
--- /dev/null
@@ -0,0 +1,52 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Sample
+{
+    public class AmbientScreenUXControl : NUIApplication
+    {
+        static private string imagePath = "E:\\Dali\\dali-windows-backend\\csharp-demo\\res\\images\\Ambient Screen UX Control\\";
+        private ImageView bgImg;
+
+        protected override void OnCreate()
+        {
+            base.OnCreate();
+            Initialize();
+        }
+
+        public void Initialize()
+        {
+            Window.Instance.BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 1.0f);
+
+            bgImg = new ImageView();
+            bgImg.SetImage(imagePath + "bg.png");
+            bgImg.PivotPoint = PivotPoint.TopLeft;
+            bgImg.ScaleX = 0.5f;
+            bgImg.ScaleY = 0.5f;
+
+            Window.Instance.Add(bgImg);
+
+            Window.Instance.KeyEvent += AppBack;
+        }
+
+        private void AppBack(object source, Window.KeyEventArgs e)
+        {
+            if (e.Key.State == Key.StateType.Up)
+            {
+                if (e.Key.KeyPressedName == "Escape")
+                {
+                    Window.Instance.Dispose();
+                    this.Exit();
+                }
+                else if (e.Key.KeyPressedName == "1")
+                {
+                    new OOBE(bgImg);
+                }
+            }
+        }
+    }
+}
diff --git a/test/NUITestSample/NUIXAMLTestSample/TestAmbient/BixbyFinancePage.xaml b/test/NUITestSample/NUIXAMLTestSample/TestAmbient/BixbyFinancePage.xaml
new file mode 100755 (executable)
index 0000000..ce85b85
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ContentPage x:Class="Tizen.NUI.Examples.BixbyFinancePage"
+  xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+  xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
+
+  <View BackgroundImage="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/bixby/bg.png" Size2D="1920,1080" >
+    <ImageView Name="Finance" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/bixby/finance_content.png" Position2D="1300,0" Size2D="620,1080" >
+      <ImageView Name="ButtonClose" Focusable="true" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/bixby/btn_normal_bg.png"
+                 Size2D="280,63" Position2D="20,990" FocusGained="OnFocusGained" FocusLost="OnFocusLost">
+        <TextLabel Text="Close" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent" HorizontalAlignment="Center" VerticalAlignment="Center" />
+      </ImageView>
+      <ImageView Name="ButtonSend" Focusable="true" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/bixby/btn_normal_bg.png"
+                 Size2D="280,63" Position2D="340,990" FocusGained="OnFocusGained" FocusLost="OnFocusLost">
+        <TextLabel Text="Send to phone" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent" HorizontalAlignment="Center" VerticalAlignment="Center" />
+      </ImageView>
+    </ImageView>
+  </View>
+</ContentPage>
diff --git a/test/NUITestSample/NUIXAMLTestSample/TestAmbient/BixbyFinancePage.xaml.cs b/test/NUITestSample/NUIXAMLTestSample/TestAmbient/BixbyFinancePage.xaml.cs
new file mode 100755 (executable)
index 0000000..8aea20f
--- /dev/null
@@ -0,0 +1,111 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Examples
+{
+    class BixbyFinancePage : ContentPage
+    {
+        private Vector2 bezierPointIn1 = new Vector2(0.21f, 2);
+        private Vector2 bezierPointIn2 = new Vector2(0.14f, 1);
+        private Vector2 bezierPointOut1 = new Vector2(0.19f, 1);
+        private Vector2 bezierPointOut2 = new Vector2(0.22f, 1);
+        private Animation scaleInAni = null;
+        private Animation scaleOutAni = null;
+        private Animation selectedAni = null;
+        private ImageView buttonClose = null;
+        private ImageView buttonSend = null;
+        public BixbyFinancePage(Window win) : base(win)
+        {
+        }
+
+        /// <summary>
+        /// To make the ContentPage instance be disposed.
+        /// </summary>
+        protected override void Dispose(DisposeTypes type)
+        {
+            if (disposed)
+            {
+                return;
+            }
+
+            if (type == DisposeTypes.Explicit)
+            {
+            }
+
+            scaleInAni?.Dispose();
+            scaleInAni = null;
+            scaleOutAni?.Dispose();
+            scaleOutAni = null;
+            FocusManager.Instance.PreFocusChange -= OnPreFocusChange;
+
+            base.Dispose(type);
+        }
+
+        private View OnPreFocusChange(object obj, FocusManager.PreFocusChangeEventArgs e)
+        {
+            if (e.CurrentView != null && !e.ProposedView)
+            {
+                if (e.Direction == View.FocusDirection.Left)
+                {
+                    e.ProposedView = buttonClose;
+                }
+                if (e.Direction == View.FocusDirection.Right)
+                {
+                    e.ProposedView = buttonSend;
+                }
+            }
+            if (!e.ProposedView && !e.CurrentView)
+            {
+                e.ProposedView = buttonSend;
+            }
+            return e.ProposedView;
+        }
+
+        public override void SetFocus()
+        {
+            buttonClose = Content.FindChildByName("ButtonClose") as ImageView;
+            buttonSend = Content.FindChildByName("ButtonSend") as ImageView;
+            FocusManager.Instance.FocusIndicator = new View();
+            FocusManager.Instance.PreFocusChange += OnPreFocusChange;
+        }
+
+        private void OnFocusGained(object obj, EventArgs e)
+        {
+            ImageView view = obj as ImageView;
+            {
+                view.ResourceUrl = "/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/bixby/btn_focused_bg.png";
+                // view.Border = new Rectangle(14,14,20,20);
+            }
+            view.RaiseToTop();
+             if (scaleInAni == null)
+            {
+                scaleInAni = new Animation();
+            }
+            scaleInAni.Clear();
+            scaleInAni.EndAction = Animation.EndActions.StopFinal;
+            scaleInAni.AnimateTo(view, "Scale", new Vector3(1.1f, 1.1f, 0), 0, 1100, new AlphaFunction(bezierPointIn1, bezierPointIn2));
+            scaleInAni.Play();
+        }
+
+        private void OnFocusLost(object obj, EventArgs e)
+        {
+            ImageView view = obj as ImageView;
+            {
+                view.ResourceUrl = "/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/bixby/btn_normal_bg.png";
+                // view.Border = new Rectangle(4,4,5,5);
+            }
+            if (scaleOutAni == null)
+            {
+                scaleOutAni = new Animation();
+            }
+            scaleOutAni.Clear();
+            scaleOutAni.EndAction = Animation.EndActions.StopFinal;
+            scaleOutAni.AnimateTo(view, "Scale", new Vector3(1.0f, 1.0f, 0), 0, 850, new AlphaFunction(bezierPointOut1, bezierPointOut2));
+            scaleOutAni.Play();
+        }
+    }
+}
diff --git a/test/NUITestSample/NUIXAMLTestSample/TestAmbient/BixbyWidgetPage.xaml b/test/NUITestSample/NUIXAMLTestSample/TestAmbient/BixbyWidgetPage.xaml
new file mode 100755 (executable)
index 0000000..64102de
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ContentPage x:Class="Tizen.NUI.Examples.BixbyWidgetPage"
+  xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+  xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
+
+  <View BackgroundImage="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/bixby/bg.png" Size2D="1920,1080">
+    <ImageView Name="Time" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/bixby/time.png" Position2D="25,310" Size2D="880,230"  />
+    <ImageView Name="Date" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/bixby/date_weather.png" Position2D="120,600" Size2D="680,50" />
+    <ImageView Name="Widget" Opacity="0" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/bixby/map_widget1.png" Position2D="1320,20" Size2D="600,380" />
+  </View>
+</ContentPage>
diff --git a/test/NUITestSample/NUIXAMLTestSample/TestAmbient/BixbyWidgetPage.xaml.cs b/test/NUITestSample/NUIXAMLTestSample/TestAmbient/BixbyWidgetPage.xaml.cs
new file mode 100755 (executable)
index 0000000..f6aa9b0
--- /dev/null
@@ -0,0 +1,43 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Examples
+{
+    class BixbyWidgetPage : ContentPage
+    {
+        private ImageView widget = null;
+        public BixbyWidgetPage(Window win) : base(win)
+        {
+        }
+
+        /// <summary>
+        /// To make the ContentPage instance be disposed.
+        /// </summary>
+        protected override void Dispose(DisposeTypes type)
+        {
+            if (disposed)
+            {
+                return;
+            }
+
+            if (type == DisposeTypes.Explicit)
+            {
+            }
+
+            base.Dispose(type);
+        }
+
+        public override void SetFocus()
+        {
+            widget = Content.FindChildByName("Widget") as ImageView;
+            Animation animation = new Animation(2000);
+            animation.AnimateTo(widget, "Opacity", 1.0f);
+            animation.Play();
+        }
+  
+    }
+}
diff --git a/test/NUITestSample/NUIXAMLTestSample/TestAmbient/Finance.cs b/test/NUITestSample/NUIXAMLTestSample/TestAmbient/Finance.cs
new file mode 100755 (executable)
index 0000000..1efa5ba
--- /dev/null
@@ -0,0 +1,71 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Sample
+{
+    class Finance
+    {
+        static private string imagePath = "E:\\Dali\\dali-windows-backend\\csharp-demo\\res\\images\\Ambient Screen UX Control\\";
+
+        private ImageView[] cardImages = null;
+        private Vector2[] positionOfCard = null;
+
+        private Animation[] alphaAni = null;
+        public Finance(View root)
+        {
+            if (null == positionOfCard)
+            {
+                positionOfCard = new Vector2[3];
+
+                positionOfCard[0] = new Vector2(3239.0f, 1762.0f);
+                positionOfCard[1] = new Vector2(3353.0f, 1662.0f);
+                positionOfCard[2] = new Vector2(3430, 1562.0f);
+            }
+
+            if (null == cardImages)
+            {
+                cardImages = new ImageView[3];
+
+                for (int i = 2; i >= 0; i--)
+                {
+                    cardImages[i] = new ImageView();
+                    cardImages[i].BackgroundColor = Color.Transparent;
+                    cardImages[i].SetImage(imagePath + "Cut/card" + (i + 1) + ".png");
+                    cardImages[i].Position2D = positionOfCard[i];
+                    cardImages[i].PivotPoint = PivotPoint.TopLeft;
+                    cardImages[i].Opacity = 0.0f;
+
+                    root.Add(cardImages[i]);
+                }
+            }
+
+            if (null == alphaAni)
+            {
+                alphaAni = new Animation[3];
+
+                for (int i = 0; i < 3; i++)
+                {
+                    alphaAni[i] = new Animation(500);
+                    alphaAni[i].AnimateTo(cardImages[i], "Opacity", 1.0f, 0, i * 100);
+                    alphaAni[i].Play();
+                }
+            }
+        }
+
+        public void Dispose()
+        {
+            for (int i = 0; i < 3; i++)
+            {
+                cardImages[i].Dispose();
+
+                cardImages[i] = null;
+            }
+
+            cardImages = null;
+        }
+    }
+}
diff --git a/test/NUITestSample/NUIXAMLTestSample/TestAmbient/OOBE.cs b/test/NUITestSample/NUIXAMLTestSample/TestAmbient/OOBE.cs
new file mode 100755 (executable)
index 0000000..73610e5
--- /dev/null
@@ -0,0 +1,71 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Sample
+{
+    class OOBE
+    {
+        static private string imagePath = "E:\\Dali\\dali-windows-backend\\csharp-demo\\res\\images\\Ambient Screen UX Control\\";
+
+        private ImageView[] cardImages = null;
+        private Vector2[] positionOfCard = null;
+
+        private Animation[] alphaAni = null;
+        public OOBE(View root)
+        {
+            if (null == positionOfCard)
+            {
+                positionOfCard = new Vector2[3];
+
+                positionOfCard[0] = new Vector2(3239.0f, 1762.0f);
+                positionOfCard[1] = new Vector2(3353.0f, 1662.0f);
+                positionOfCard[2] = new Vector2(3430, 1562.0f);
+            }
+
+            if (null == cardImages)
+            {
+                cardImages = new ImageView[3];
+
+                for (int i = 2; i >= 0; i--)
+                {
+                    cardImages[i] = new ImageView();
+                    cardImages[i].BackgroundColor = Color.Transparent;
+                    cardImages[i].SetImage(imagePath + "Cut/card" + (i + 1) + ".png");
+                    cardImages[i].Position2D = positionOfCard[i];
+                    cardImages[i].PivotPoint = PivotPoint.TopLeft;
+                    cardImages[i].Opacity = 0.0f;
+
+                    root.Add(cardImages[i]);
+                }
+            }
+
+            if (null == alphaAni)
+            {
+                alphaAni = new Animation[3];
+
+                for (int i = 0; i < 3; i++)
+                {
+                    alphaAni[i] = new Animation(500);
+                    alphaAni[i].AnimateTo(cardImages[i], "Opacity", 1.0f, 0, i * 100);
+                    alphaAni[i].Play();
+                }
+            }
+        }
+
+        public void Dispose()
+        {
+            for (int i = 0; i < 3; i++)
+            {
+                cardImages[i].Dispose();
+
+                cardImages[i] = null;
+            }
+
+            cardImages = null;
+        }
+    }
+}
diff --git a/test/NUITestSample/NUIXAMLTestSample/TestAmbient/SearchPage.xaml b/test/NUITestSample/NUIXAMLTestSample/TestAmbient/SearchPage.xaml
new file mode 100755 (executable)
index 0000000..f96e7ce
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<AppDetailPage x:Class="Tizen.NUI.Examples.SearchPage"
+  xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+  xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
+    <View Name="UpperArea" BackgroundColor="Green" SizeWidth="1920" SizeHeight="332" ParentOrigin="TopLeft" PivotPoint="TopLeft" PositionY="30"  PositionUsesPivotPoint="true">
+        <TextLabel Text="TopResults" PointSize="25" SizeWidth="300" SizeHeight="50" PositionX="81" PositionY="0" />
+        <TableView Name="UpperListTable" Focusable="true" SizeWidth="1758" SizeHeight="250" PositionX="81" Rows="1" Columns="5" CellPadding="6,0" ParentOrigin="CenterLeft" PivotPoint="CenterLeft"  PositionUsesPivotPoint="true">
+            <ImageView Name="listItem11" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/youtube/ytb01.png" CellIndex="0,0" Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent" PivotPoint="CenterLeft"/>
+            <ImageView Name="listItem12" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/youtube/ytb02.png" CellIndex="0,1" Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent"/>
+            <ImageView Name="listItem13" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/youtube/ytb03.png" CellIndex="0,2" Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent"/>
+            <ImageView Name="listItem14" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/youtube/ytb04.png" CellIndex="0,3" Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent"/>
+            <ImageView Name="listItem15" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/youtube/ytb05.png" CellIndex="0,4" Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent"/>
+        </TableView>
+    </View>
+    <View Name="MidArea" BackgroundColor="Green" SizeWidth="1920" SizeHeight="332" ParentOrigin="TopLeft" PivotPoint="TopLeft" PositionY="390"  PositionUsesPivotPoint="true">
+        <TextLabel Text="Youtube" PointSize="25" SizeWidth="300" SizeHeight="50" PositionX="81" PositionY="0" />
+        <TableView Name="MidListTable" Focusable="true" SizeWidth="1758" SizeHeight="250" PositionX="81" Rows="1" Columns="5" CellPadding="6,0" ParentOrigin="CenterLeft" PivotPoint="CenterLeft"  PositionUsesPivotPoint="true">
+            <ImageView Name="listItem21" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/youtube/ytb06.png" CellIndex="0,0" Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent" PivotPoint="CenterLeft"/>
+            <ImageView Name="listItem22" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/youtube/ytb07.png" CellIndex="0,1" Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent"/>
+            <ImageView Name="listItem23" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/youtube/ytb08.png" CellIndex="0,2" Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent"/>
+            <ImageView Name="listItem24" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/youtube/ytb09.png" CellIndex="0,3" Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent"/>
+            <ImageView Name="listItem25" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/youtube/ytb010.png" CellIndex="0,4" Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent"/>
+        </TableView>
+    </View>
+    <View Name="BottomArea" BackgroundColor="Green" SizeWidth="1920" SizeHeight="332" ParentOrigin="TopLeft" PivotPoint="TopLeft" PositionY="748"  PositionUsesPivotPoint="true">
+        <TextLabel Text="Facebook" PointSize="25" SizeWidth="300" SizeHeight="50" PositionX="81" PositionY="0" />
+        <TableView Name="BottomListTable" Focusable="true" SizeWidth="1758" SizeHeight="250" PositionX="81" Rows="1" Columns="5" CellPadding="6,0" ParentOrigin="CenterLeft" PivotPoint="CenterLeft"  PositionUsesPivotPoint="true">
+            <ImageView Name="listItem31" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/youtube/ytb011.png" CellIndex="0,0" Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent" PivotPoint="CenterLeft"/>
+            <ImageView Name="listItem32" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/youtube/ytb012.png" CellIndex="0,1" Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent"/>
+            <ImageView Name="listItem33" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/youtube/ytb013.png" CellIndex="0,2" Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent"/>
+            <ImageView Name="listItem34" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/youtube/ytb014.png" CellIndex="0,3" Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent"/>
+            <ImageView Name="listItem35" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/youtube/ytb015.png" CellIndex="0,4" Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent"/>
+        </TableView>
+    </View>
+</AppDetailPage>
diff --git a/test/NUITestSample/NUIXAMLTestSample/TestAmbient/SearchPage.xaml.cs b/test/NUITestSample/NUIXAMLTestSample/TestAmbient/SearchPage.xaml.cs
new file mode 100755 (executable)
index 0000000..50cc820
--- /dev/null
@@ -0,0 +1,145 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 Tizen.NUI.BaseComponents;
+using Tizen.NUI.UIComponents;
+
+namespace Tizen.NUI.Examples
+{
+    public class SearchPage : ContentPage
+    {
+        private Vector2 bezierPointIn1 = new Vector2(0.21f, 2);
+        private Vector2 bezierPointIn2 = new Vector2(0.14f, 1);
+        private Vector2 bezierPointOut1 = new Vector2(0.19f, 1);
+        private Vector2 bezierPointOut2 = new Vector2(0.22f, 1);
+        private Animation scaleInAni = null;
+        private Animation scaleOutAni = null;
+        private TableView upperListTable = null;
+        private TableView midListTable = null;
+        private TableView bottomListTable = null;
+
+        public SearchPage(Window win) : base (win)
+        {
+            Content.BackgroundImage = "/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/store_default_bg_01.png";
+        }
+
+        /// <summary>
+        /// To make the ContentPage instance be disposed.
+        /// </summary>
+        protected override void Dispose(DisposeTypes type)
+        {
+            if (disposed)
+            {
+                return;
+            }
+
+            if (type == DisposeTypes.Explicit)
+            {
+                //Called by User
+                //Release your own managed resources here.
+                //You should release all of your own disposable objects here.
+            }
+
+            //Release your own unmanaged resources here.
+            //You should not access any managed member here except static instance.
+            //because the execution order of Finalizes is non-deterministic.
+            scaleInAni?.Dispose();
+            scaleInAni = null;
+            scaleOutAni?.Dispose();
+            scaleOutAni = null;
+            FocusManager.Instance.PreFocusChange -= OnPreFocusChange;
+
+            base.Dispose(type);
+        }
+
+        public override void SetFocus()
+        {
+            upperListTable = Content.FindChildByName("UpperListTable") as TableView;
+            midListTable = Content.FindChildByName("MidListTable") as TableView;
+            bottomListTable = Content.FindChildByName("BottomListTable") as TableView;
+            FocusManager.Instance.FocusIndicator = new View();
+            FocusManager.Instance.SetCurrentFocusView(upperListTable.GetChildAt(0));
+            FocusManager.Instance.PreFocusChange += OnPreFocusChange;
+        }
+
+        private View OnPreFocusChange(object obj, FocusManager.PreFocusChangeEventArgs e)
+        {
+            if (e.CurrentView != null && !e.ProposedView)
+            {
+                if (e.Direction == View.FocusDirection.Down)
+                {
+                    View view = e.CurrentView.Parent as View;
+                    if (view.Name == "UpperListTable")
+                    {
+                        e.ProposedView = midListTable.GetChildAt(new TableView.CellPosition(0, 0)); ;
+                    }
+                    else if (view.Name == "MidListTable")
+                    {
+                        e.ProposedView = bottomListTable.GetChildAt(new TableView.CellPosition(0, 0)); ;
+                    }
+                }
+                else if (e.Direction == View.FocusDirection.Up)
+                {
+                    View view = e.CurrentView.Parent as View;
+                    if (view.Name == "BottomListTable")
+                    {
+                        e.ProposedView = midListTable.GetChildAt(new TableView.CellPosition(0, 0)); ;
+                    }
+                    else if (view.Name == "MidListTable")
+                    {
+                        e.ProposedView = upperListTable.GetChildAt(new TableView.CellPosition(0, 0)); ;
+                    }
+                }
+            }
+            if (!e.ProposedView && !e.CurrentView)
+            {
+                e.ProposedView = upperListTable.GetChildAt(new TableView.CellPosition(0, 0)); ;
+            }
+            return e.ProposedView;
+        }
+
+        private void OnFocusGained(object obj, EventArgs e)
+        {
+            ImageView view = obj as ImageView;
+
+            view.RaiseToTop();
+             if (scaleInAni == null)
+            {
+                scaleInAni = new Animation();
+            }
+            scaleInAni.Clear();
+            scaleInAni.EndAction = Animation.EndActions.StopFinal;
+            scaleInAni.AnimateTo(view, "Scale", new Vector3(1.2f, 1.2f, 0), 0, 1100, new AlphaFunction(bezierPointIn1, bezierPointIn2));
+            scaleInAni.Play();
+        }
+
+        private void OnFocusLost(object obj, EventArgs e)
+        {
+            ImageView view = obj as ImageView;
+
+            if (scaleOutAni == null)
+            {
+                scaleOutAni = new Animation();
+            }
+            scaleOutAni.Clear();
+            scaleOutAni.EndAction = Animation.EndActions.StopFinal;
+            scaleOutAni.AnimateTo(view, "Scale", new Vector3(1.0f, 1.0f, 0), 0, 850, new AlphaFunction(bezierPointOut1, bezierPointOut2));
+            scaleOutAni.Play();
+        }
+    }
+}
\ No newline at end of file
diff --git a/test/NUITestSample/NUIXAMLTestSample/TestAmbient/TestAmbient.cs b/test/NUITestSample/NUIXAMLTestSample/TestAmbient/TestAmbient.cs
new file mode 100755 (executable)
index 0000000..9d7d214
--- /dev/null
@@ -0,0 +1,164 @@
+using System;
+using System.IO;
+using System.Reflection;
+
+using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
+using Tizen.NUI;
+using Tizen.NUI.UIComponents;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Examples
+{
+    public class TestAmbient : NUIApplication
+    {
+        private ContentPage myPage;
+
+        protected override void OnCreate() 
+        {
+            base.OnCreate();
+            Window window = Window.Instance;
+            window.BackgroundColor = new Color(0.75f, 0.75f, 0.75f, 0.8f);
+
+            myPage = new AmbientMonoPage(window);
+
+            Extensions.LoadFromXaml(myPage, typeof(AmbientMonoPage));
+
+            Console.WriteLine("==================  Set BindingContext in Application !!!! ==================");
+            myPage.SetFocus();
+
+            window.KeyEvent += (obj, e) => {
+                if (e.Key.State == Key.StateType.Down)
+                {
+                    if (e.Key.KeyPressedName == "1")
+                    {
+                        Console.WriteLine("==================  1  ==================");
+                        if ( !myPage.IsEmpty )
+                        {
+                            myPage.ClearContent();
+                            myPage.Dispose();
+                            myPage = null;
+                        }
+                        myPage = new AmbientMonoPage(window);
+                        Extensions.LoadFromXaml(myPage, typeof(AmbientMonoPage));
+                        myPage.SetFocus();
+                    }
+                    else if (e.Key.KeyPressedName == "2")
+                    {
+                        Console.WriteLine("==================  2  ==================");
+                        if ( !myPage.IsEmpty )
+                        {
+                            myPage.ClearContent();
+                            myPage.Dispose();
+                            myPage = null;
+                        }
+                        myPage = new AmbientDuoPage(window);
+                        Extensions.LoadFromXaml(myPage, typeof(AmbientDuoPage));
+                        myPage.SetFocus();
+                    }
+                    else if (e.Key.KeyPressedName == "3")
+                    {
+                        Console.WriteLine("==================  3  ==================");
+                        if ( !myPage.IsEmpty )
+                        {
+                            myPage.ClearContent();
+                            myPage.Dispose();
+                            myPage = null;
+                        }
+                        myPage = new AmbientMultiPage(window);
+                        Extensions.LoadFromXaml(myPage, typeof(AmbientMultiPage));
+                        myPage.SetFocus();
+                    }
+                    else if (e.Key.KeyPressedName == "4")
+                    {
+                        Console.WriteLine("==================  4  ==================");
+                        if ( !myPage.IsEmpty )
+                        {
+                            myPage.ClearContent();
+                            myPage.Dispose();
+                            myPage = null;
+                        }
+                        myPage = new AmbientMultiPage2(window);
+                        Extensions.LoadFromXaml(myPage, typeof(AmbientMultiPage2));
+                        myPage.SetFocus();
+                    }
+                    else if (e.Key.KeyPressedName == "5")
+                    {
+                        Console.WriteLine("==================  5  ==================");
+                        if ( !myPage.IsEmpty )
+                        {
+                            myPage.ClearContent();
+                            myPage.Dispose();
+                            myPage = null;
+                        }
+                        myPage = new AmbientMultiPage3(window);
+                        Extensions.LoadFromXaml(myPage, typeof(AmbientMultiPage3));
+                        myPage.SetFocus();
+                    }
+                    else if (e.Key.KeyPressedName == "6")
+                    {
+                        Console.WriteLine("==================  6  ==================");
+                        if ( !myPage.IsEmpty )
+                        {
+                            myPage.ClearContent();
+                            myPage.Dispose();
+                            myPage = null;
+                        }
+                        myPage = new BixbyWidgetPage(window);
+                        Extensions.LoadFromXaml(myPage, typeof(BixbyWidgetPage));
+                        myPage.SetFocus();
+                    }
+                    else if (e.Key.KeyPressedName == "7")
+                    {
+                        Console.WriteLine("==================  7  ==================");
+                        if ( !myPage.IsEmpty )
+                        {
+                            myPage.ClearContent();
+                            myPage.Dispose();
+                            myPage = null;
+                        }
+                        myPage = new BixbyFinancePage(window);
+                        Extensions.LoadFromXaml(myPage, typeof(BixbyFinancePage));
+                        myPage.SetFocus();
+                    }
+                    else if (e.Key.KeyPressedName == "8")
+                    {
+                        Console.WriteLine("==================  8  ==================");
+                        if ( !myPage.IsEmpty )
+                        {
+                            myPage.ClearContent();
+                            myPage.Dispose();
+                            myPage = null;
+                        }
+                        myPage = new SearchPage(window);
+                        Extensions.LoadFromXaml(myPage, typeof(SearchPage));
+                        myPage.SetFocus();
+                    }
+                    else if (e.Key.KeyPressedName == "9")
+                    {
+                        Console.WriteLine("==================  9  ==================");
+                        if ( !myPage.IsEmpty )
+                        {
+                            myPage.ClearContent();
+                            myPage.Dispose();
+                            myPage = null;
+                        }
+                        myPage = new WeatherPage(window);
+                        Extensions.LoadFromXaml(myPage, typeof(WeatherPage));
+                        myPage.SetFocus();
+                    }
+                    else
+                    {
+                        Console.WriteLine("==================  Input Error !!!! ==================");
+                    }
+                }
+            };
+        }
+
+        public static void _Main(string[] args)
+        {
+            TestAmbient p = new TestAmbient();
+            p.Run(args);
+        }
+    }
+}
diff --git a/test/NUITestSample/NUIXAMLTestSample/TestAmbient/WeatherPage.xaml b/test/NUITestSample/NUIXAMLTestSample/TestAmbient/WeatherPage.xaml
new file mode 100755 (executable)
index 0000000..f45b681
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ContentPage x:Class="Tizen.NUI.Examples.WeatherPage"
+  xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+  xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
+
+  <ImageView Name="title" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/weather/up.bmp" Position2D="53,0" Size2D="1867,461" />
+  <ImageView Name="left" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/weather/left.bmp" Position2D="0,0" Size2D="53,1079" />
+  <View Name="content" Size2D="1920,1080" Position2D="0,0" BackgroundColor="0,0,0,0">
+     <TableView  Name="ListTable" Focusable="true" SizeWidth="1758" SizeHeight="360" PositionX="81" PositionY="560" Rows="1" Columns="5" CellPadding="33.8,0">
+            <ImageView ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/weather/current.bmp" CellIndex="0,0" Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent" />
+            <ImageView ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/weather/1.bmp" CellIndex="0,1" Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent" />
+            <ImageView ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/weather/2.bmp" CellIndex="0,2" Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent" />
+            <ImageView ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/weather/3.bmp" CellIndex="0,3" Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent" />
+            <ImageView ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/weather/4.bmp" CellIndex="0,4" Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent" />
+     </TableView>
+  </View>
+</ContentPage>
diff --git a/test/NUITestSample/NUIXAMLTestSample/TestAmbient/WeatherPage.xaml.cs b/test/NUITestSample/NUIXAMLTestSample/TestAmbient/WeatherPage.xaml.cs
new file mode 100755 (executable)
index 0000000..d55de30
--- /dev/null
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 Tizen.NUI.BaseComponents;
+using Tizen.NUI.UIComponents;
+
+namespace Tizen.NUI.Examples
+{
+    public class WeatherPage : ContentPage
+    {
+        private Vector2 bezierPointIn1 = new Vector2(0.21f, 2);
+        private Vector2 bezierPointIn2 = new Vector2(0.14f, 1);
+        private Vector2 bezierPointOut1 = new Vector2(0.19f, 1);
+        private Vector2 bezierPointOut2 = new Vector2(0.22f, 1);
+        private Animation scaleInAni = null;
+        private Animation scaleOutAni = null;
+        private TableView listTable = null;
+
+        public WeatherPage(Window win) : base (win)
+        {
+            Content.BackgroundImage = "/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/weather/bg.bmp";
+            // Content.BackgroundColor = Color.Green;
+        }
+
+        /// <summary>
+        /// To make the ContentPage instance be disposed.
+        /// </summary>
+        protected override void Dispose(DisposeTypes type)
+        {
+            if (disposed)
+            {
+                return;
+            }
+
+            if (type == DisposeTypes.Explicit)
+            {
+            }
+
+            scaleInAni?.Dispose();
+            scaleInAni = null;
+            scaleOutAni?.Dispose();
+            scaleOutAni = null;
+            FocusManager.Instance.PreFocusChange -= OnPreFocusChange;
+
+            base.Dispose(type);
+        }
+
+        public override void SetFocus()
+        {
+            listTable = Content.FindChildByName("ListTable") as TableView;
+
+            FocusManager.Instance.FocusIndicator = new View();
+            FocusManager.Instance.SetCurrentFocusView(listTable.GetChildAt(0));
+            FocusManager.Instance.PreFocusChange += OnPreFocusChange;
+        }
+
+        private View OnPreFocusChange(object obj, FocusManager.PreFocusChangeEventArgs e)
+        {
+            if (!e.ProposedView && !e.CurrentView)
+            {
+                e.ProposedView = listTable.GetChildAt(new TableView.CellPosition(0, 0)); ;
+            }
+            return e.ProposedView;
+        }
+
+        private void OnFocusGained(object obj, EventArgs e)
+        {
+            ImageView view = obj as ImageView;
+
+            view.RaiseToTop();
+            if (scaleInAni == null)
+            {
+                scaleInAni = new Animation();
+            }
+            scaleInAni.Clear();
+            scaleInAni.EndAction = Animation.EndActions.StopFinal;
+            scaleInAni.AnimateTo(view, "Scale", new Vector3(1.2f, 1.2f, 0), 0, 1100, new AlphaFunction(bezierPointIn1, bezierPointIn2));
+            scaleInAni.Play();
+        }
+
+        private void OnFocusLost(object obj, EventArgs e)
+        {
+            ImageView view = obj as ImageView;
+
+            if (scaleOutAni == null)
+            {
+                scaleOutAni = new Animation();
+            }
+            scaleOutAni.Clear();
+            scaleOutAni.EndAction = Animation.EndActions.StopFinal;
+            scaleOutAni.AnimateTo(view, "Scale", new Vector3(1.0f, 1.0f, 0), 0, 850, new AlphaFunction(bezierPointOut1, bezierPointOut2));
+            scaleOutAni.Play();
+        }
+    }
+}
\ No newline at end of file
diff --git a/test/NUITestSample/NUIXAMLTestSample/TestDetailApps/AppDetailPage.xaml b/test/NUITestSample/NUIXAMLTestSample/TestDetailApps/AppDetailPage.xaml
new file mode 100755 (executable)
index 0000000..3a94d9e
--- /dev/null
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<AppDetailPage x:Class="Tizen.NUI.Examples.AppDetailPage"
+  xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+  xmlns:l="clr-namespace:Tizen.UI_Xaml;assembly=Tizen.UI_Xaml"
+  xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
+
+    <View Name="UpperArea" SizeWidth="1920" SizeHeight="780" ParentOrigin="TopLeft" PivotPoint="TopLeft" PositionUsesPivotPoint="true">
+        <ImageView ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/weather.png" SizeWidth="346" SizeHeight="350"
+                   PositionX="81" PositionY="81" ParentOrigin="TopLeft" PivotPoint="TopLeft" PositionUsesPivotPoint="true"/>
+        <TextLabel Text="The Weather Network" PointSize="60" PositionX="487" PositionY="100" SizeHeight="102" ParentOrigin="TopLeft" PivotPoint="TopLeft" PositionUsesPivotPoint="true"/>
+        <TextLabel Text="Information | The Weather Network | " PointSize="28" PositionX="487" PositionY="204" SizeWidth="670" SizeHeight="44" ParentOrigin="TopLeft" PivotPoint="TopLeft" PositionUsesPivotPoint="true"/>
+        <ImageView ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/r_icon_xs_star.png" PositionX="1160" PositionY="213" SizeWidth="26" SizeHeight="26" ParentOrigin="TopLeft" PivotPoint="TopLeft" PositionUsesPivotPoint="true" />
+        <ImageView ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/r_icon_xs_star.png" PositionX="1188" PositionY="213" SizeWidth="26" SizeHeight="26" ParentOrigin="TopLeft" PivotPoint="TopLeft" PositionUsesPivotPoint="true" />
+        <ImageView ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/r_icon_xs_star.png" PositionX="1216" PositionY="213" SizeWidth="26" SizeHeight="26" ParentOrigin="TopLeft" PivotPoint="TopLeft" PositionUsesPivotPoint="true" />
+        <ImageView ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/r_icon_xs_star.png" Opacity="0.3" PositionX="1244" PositionY="213" SizeWidth="26" SizeHeight="26" ParentOrigin="TopLeft" PivotPoint="TopLeft" PositionUsesPivotPoint="true" />
+        <ImageView ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/r_icon_xs_star.png" Opacity="0.3" PositionX="1272" PositionY="213" SizeWidth="26" SizeHeight="26" ParentOrigin="TopLeft" PivotPoint="TopLeft" PositionUsesPivotPoint="true" />
+        <TextLabel Text="Check the permissions by selecting More in the information area. By selecting Install, you agree to grant those permissions to this app."
+                   PointSize="16" PositionX="487" PositionY="250" SizeHeight="34" ParentOrigin="TopLeft" PivotPoint="TopLeft" PositionUsesPivotPoint="true"/>
+        <ImageView Name="DetailButton" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/c_basic_button_white_bg_normal.9.png" Border="4,4,5,5"  Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" PositionX="487" PositionY="320" SizeWidth="260" SizeHeight="84" ParentOrigin="TopLeft" PivotPoint="Center">
+            <TextLabel Name="ButtonLabel" Text="Install" PointSize="25" HorizontalAlignment="Center" VerticalAlignment="Center" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent" />
+        </ImageView>
+        <TextLabel Text="Rated:All ages | Price:In-App Purchases | Size:11.74MB(Available 3.17GB)" PointSize="20" PositionX="81" PositionY="487" SizeHeight="38"
+                   ParentOrigin="TopLeft" PivotPoint="TopLeft" PositionUsesPivotPoint="true"/>
+        <TextLabel Text="Updated:2018/03/06 | Latest Version:3.0.15 | Language:English" PointSize="20" PositionX="81" PositionY="525" SizeHeight="38"
+                   ParentOrigin="TopLeft" PivotPoint="TopLeft" PositionUsesPivotPoint="true"/>
+        <TextLabel Text="The Weather Network app provides you with on-demand acess to the weather information you need with a click of you TV remote. Scroll through our forecasts to view conditions for the next 14 days. View radar maps to track coming storms. Stay information with notification of active warnings in your area. The app is loaded with features that will become an integral part of planning your ..."
+                   SizeWidth="1320" MultiLine="true" PointSize="20" PositionX="81" PositionY="601" SizeHeight="114"
+                   ParentOrigin="TopLeft" PivotPoint="TopLeft" PositionUsesPivotPoint="true"/>
+    </View>
+    <View Name="BottomArea" BackgroundColor="0,0,0,0.05" SizeWidth="1920" SizeHeight="332" ParentOrigin="TopLeft" PivotPoint="TopLeft" PositionY="748"  PositionUsesPivotPoint="true">
+        <TextLabel Text="ScreenShots" PointSize="25" SizeWidth="300" SizeHeight="50" PositionX="81" PositionY="0" />
+        <TableView Name="ListTable" Focusable="true" SizeWidth="1758" SizeHeight="200" PositionX="81" Rows="1" Columns="5" CellPadding="6,0" ParentOrigin="CenterLeft" PivotPoint="CenterLeft"  PositionUsesPivotPoint="true">
+            <ImageView Name="listItem1" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/weather_ss1.png" CellIndex="0,0" Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent" PivotPoint="CenterLeft"/>
+            <ImageView Name="listItem2" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/weather_ss2.png" CellIndex="0,1" Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent"/>
+            <ImageView Name="listItem3" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/weather_ss3.png" CellIndex="0,2" Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent"/>
+            <ImageView Name="listItem4" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/weather_ss2.png" CellIndex="0,3" Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent"/>
+            <ImageView Name="listItem5" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/weather_ss1.png" CellIndex="0,4" Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent"/>
+        </TableView>
+    </View>
+</AppDetailPage>
diff --git a/test/NUITestSample/NUIXAMLTestSample/TestDetailApps/AppDetailPage.xaml.cs b/test/NUITestSample/NUIXAMLTestSample/TestDetailApps/AppDetailPage.xaml.cs
new file mode 100755 (executable)
index 0000000..b6bc351
--- /dev/null
@@ -0,0 +1,185 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 Tizen.NUI.BaseComponents;
+using Tizen.NUI.UIComponents;
+
+namespace Tizen.NUI.Examples
+{
+    public class AppDetailPage : ContentPage
+    {
+        private Vector2 bezierPointIn1 = new Vector2(0.21f, 2);
+        private Vector2 bezierPointIn2 = new Vector2(0.14f, 1);
+        private Vector2 bezierPointOut1 = new Vector2(0.19f, 1);
+        private Vector2 bezierPointOut2 = new Vector2(0.22f, 1);
+        private Animation scaleInAni = null;
+        private Animation scaleOutAni = null;
+        private Animation selectedAni = null;
+        private TableView listTable = null;
+        private ImageView detailButton = null;
+
+        public AppDetailPage(Window win) : base (win)
+        {
+            Content.BackgroundImage = "/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/store_default_bg_01.png";
+        }
+
+        /// <summary>
+        /// To make the ContentPage instance be disposed.
+        /// </summary>
+        protected override void Dispose(DisposeTypes type)
+        {
+            if (disposed)
+            {
+                return;
+            }
+
+            if (type == DisposeTypes.Explicit)
+            {
+                //Called by User
+                //Release your own managed resources here.
+                //You should release all of your own disposable objects here.
+            }
+
+            //Release your own unmanaged resources here.
+            //You should not access any managed member here except static instance.
+            //because the execution order of Finalizes is non-deterministic.
+            scaleInAni?.Dispose();
+            scaleInAni = null;
+            scaleOutAni?.Dispose();
+            scaleOutAni = null;
+            FocusManager.Instance.PreFocusChange -= OnPreFocusChange;
+            detailButton.KeyEvent -= OnKeyEvent;
+
+            base.Dispose(type);
+        }
+
+        public override void SetFocus()
+        {
+            detailButton = Content.FindChildByName("DetailButton") as ImageView;
+            listTable = Content.FindChildByName("ListTable") as TableView;
+            FocusManager.Instance.FocusIndicator = new View();
+            FocusManager.Instance.SetCurrentFocusView(detailButton);
+            FocusManager.Instance.PreFocusChange += OnPreFocusChange;
+            detailButton.KeyEvent += OnKeyEvent;
+        }
+
+        private View OnPreFocusChange(object obj, FocusManager.PreFocusChangeEventArgs e)
+        {
+            if (e.CurrentView != null && !e.ProposedView)
+            {
+                if (e.Direction == View.FocusDirection.Down)
+                {
+                    e.ProposedView = listTable;
+                }
+                if (e.Direction == View.FocusDirection.Up)
+                {
+                    e.ProposedView = detailButton;
+                }
+            }
+            if (!e.ProposedView && !e.CurrentView)
+            {
+                e.ProposedView = detailButton;
+            }
+            return e.ProposedView;
+        }
+
+        private bool OnKeyEvent(object obj, View.KeyEventArgs e)
+        {
+            if (e.Key.State == Key.StateType.Down)
+            {
+                //Tizen.Log.Fatal("NUISamples", "key name: " + e.Key.KeyPressedName);
+                if (e.Key.KeyPressedName == "Return")
+                {
+                    if (selectedAni == null)
+                    {
+                        selectedAni = new Animation(417)
+                        {
+                            DefaultAlphaFunction = new AlphaFunction(new Vector2(0.3f, 0), new Vector2(0.15f, 1))
+                        };
+                    }
+                    selectedAni.Clear();
+                    selectedAni.AnimateTo(detailButton, "Opacity", 0.8f, 0, 167);
+                    selectedAni.AnimateTo(detailButton, "Scale", new Vector3(1.0f, 1.0f, 1.0f), 0, 167);
+                    selectedAni.AnimateTo(detailButton, "Opacity", 1.0f, 167, 417);
+                    selectedAni.AnimateTo(detailButton, "Scale", new Vector3(1.08f, 1.08f, 1.08f), 167, 417);
+                    selectedAni.Play();
+
+                    TextLabel buttonLabel = Content.FindChildByName("ButtonLabel") as TextLabel;
+                    if (buttonLabel.Text == "Install")
+                    {
+                        buttonLabel.Text = "Open";
+                    }
+                    else if (buttonLabel.Text == "Open")
+                    {
+                        buttonLabel.Text = "Install";
+                    }
+                    
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        private bool OnClicked(object sender, EventArgs e)
+        {
+            if (sender is Button)
+            {
+                Button button = sender as Button;
+                button.LabelText = "Open";
+            }
+            return true;
+        }
+
+        private void OnFocusGained(object obj, EventArgs e)
+        {
+            ImageView view = obj as ImageView;
+            if (view.Name == "DetailButton")
+            {
+                view.ResourceUrl = "/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/r_highlight_bg_focus_9patch.png";
+                view.Border = new Rectangle(14,14,20,20);
+            }
+            view.RaiseToTop();
+             if (scaleInAni == null)
+            {
+                scaleInAni = new Animation();
+            }
+            scaleInAni.Clear();
+            scaleInAni.EndAction = Animation.EndActions.StopFinal;
+            scaleInAni.AnimateTo(view, "Scale", new Vector3(1.2f, 1.2f, 0), 0, 1100, new AlphaFunction(bezierPointIn1, bezierPointIn2));
+            scaleInAni.Play();
+        }
+
+        private void OnFocusLost(object obj, EventArgs e)
+        {
+            ImageView view = obj as ImageView;
+            if (view.Name == "DetailButton")
+            {
+                view.ResourceUrl = "/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/c_basic_button_white_bg_normal.9.png";
+                view.Border = new Rectangle(4,4,5,5);
+            }
+            if (scaleOutAni == null)
+            {
+                scaleOutAni = new Animation();
+            }
+            scaleOutAni.Clear();
+            scaleOutAni.EndAction = Animation.EndActions.StopFinal;
+            scaleOutAni.AnimateTo(view, "Scale", new Vector3(1.0f, 1.0f, 0), 0, 850, new AlphaFunction(bezierPointOut1, bezierPointOut2));
+            scaleOutAni.Play();
+        }
+    }
+}
\ No newline at end of file
diff --git a/test/NUITestSample/NUIXAMLTestSample/TestDetailApps/TestDetailApps.cs b/test/NUITestSample/NUIXAMLTestSample/TestDetailApps/TestDetailApps.cs
new file mode 100755 (executable)
index 0000000..5f9fe26
--- /dev/null
@@ -0,0 +1,35 @@
+using System;
+using System.IO;
+using System.Reflection;
+
+using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
+using Tizen.NUI;
+using Tizen.NUI.UIComponents;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Examples
+{
+    public class TestDetailApps : NUIApplication
+    {
+        protected override void OnCreate() 
+        {
+            base.OnCreate();
+            Window window = Window.Instance;
+            window.BackgroundColor = Color.White;
+
+            AppDetailPage detailPage = new AppDetailPage(window);
+
+            Extensions.LoadFromXaml(detailPage, typeof(AppDetailPage));
+            detailPage.SetFocus();
+
+            Console.WriteLine("==================  Set BindingContext in Application !!!! ==================");
+        }
+
+        public static void _Main(string[] args)
+        {
+            TestDetailApps p = new TestDetailApps();
+            p.Run(args);
+        }
+    }
+}
diff --git a/test/NUITestSample/NUIXAMLTestSample/TestMyContents/MediaHubPage.xaml b/test/NUITestSample/NUIXAMLTestSample/TestMyContents/MediaHubPage.xaml
new file mode 100755 (executable)
index 0000000..65562be
--- /dev/null
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<MediaHubPage x:Class="Tizen.NUI.Examples.MediaHubPage"
+  xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+  xmlns:l="clr-namespace:Tizen.UI_Xaml;assembly=Tizen.UI_Xaml"
+  xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
+
+    <View Name="MainTitleArea" PositionX="0" PositionY="0" BackgroundImage="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/mc_title_bg.png" SizeWidth="1920" SizeHeight="120" ParentOrigin="TopLeft" PivotPoint="TopLeft" PositionUsesPivotPoint="true">
+        <TextLabel Name="MainTitle" Text="DataTraveler 2.0" PointSize="50" TextColor="White" PositionX="30" ParentOrigin="CenterLeft" PivotPoint="CenterLeft" PositionUsesPivotPoint="true" />
+    </View>
+    <View Name="SubTitleArea" PositionX="0" PositionY="120" BackgroundImage="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/mc_shadow_titlebar.png" SizeWidth="1920" SizeHeight="78" ParentOrigin="TopLeft" PivotPoint="TopLeft" PositionUsesPivotPoint="true">
+        <TextLabel Name="SubTitle" Text="DataTraveler 2.0" PointSize="30" TextColor="White" PositionX="40" ParentOrigin="CenterLeft" PivotPoint="CenterLeft" PositionUsesPivotPoint="true" />
+    </View>
+    <View Name="ContentArea" PositionX="0" PositionY="198" SizeWidth="1920" SizeHeight="882" ParentOrigin="TopLeft" PivotPoint="TopLeft" PositionUsesPivotPoint="true">
+        <TableView Name="ContentTable" Focusable="true" SizeWidth="1820" SizeHeight="600" PositionX="50" PositionY="50" Rows="2" Columns="8" CellPadding="4.75,12">
+            <View Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" BackgroundColor="White" CellIndex="0,0" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent">
+                <ImageView ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/mc_folder.png" SizeWidth="218" SizeHeight="226" ParentOrigin="TopCenter" PivotPoint="TopCenter" PositionUsesPivotPoint="true"/>
+                <TextLabel Text="Text" SizeWidth="218" SizeHeight="50" HorizontalAlignment="Center" VerticalAlignment="Center" ParentOrigin="BottomCenter" PivotPoint="BottomCenter" PositionUsesPivotPoint="true" />
+            </View>
+            <View Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" BackgroundColor="White" CellIndex="0,1" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent">
+                <ImageView ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/mc_folder.png" SizeWidth="218" SizeHeight="226" ParentOrigin="TopCenter" PivotPoint="TopCenter" PositionUsesPivotPoint="true"/>
+                <TextLabel Text="Text" SizeWidth="218" SizeHeight="50" HorizontalAlignment="Center" VerticalAlignment="Center" ParentOrigin="BottomCenter" PivotPoint="BottomCenter" PositionUsesPivotPoint="true" />
+            </View>
+            <View Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" BackgroundColor="White" CellIndex="0,2" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent">
+                <ImageView ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/mc_folder.png" SizeWidth="218" SizeHeight="226" ParentOrigin="TopCenter" PivotPoint="TopCenter" PositionUsesPivotPoint="true"/>
+                <TextLabel Text="Text" SizeWidth="218" SizeHeight="50" HorizontalAlignment="Center" VerticalAlignment="Center" ParentOrigin="BottomCenter" PivotPoint="BottomCenter" PositionUsesPivotPoint="true" />
+            </View>
+            <View Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" BackgroundColor="White" CellIndex="0,3" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent">
+                <ImageView ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/mc_folder.png" SizeWidth="218" SizeHeight="226" ParentOrigin="TopCenter" PivotPoint="TopCenter" PositionUsesPivotPoint="true"/>
+                <TextLabel Text="Text" SizeWidth="218" SizeHeight="50" HorizontalAlignment="Center" VerticalAlignment="Center" ParentOrigin="BottomCenter" PivotPoint="BottomCenter" PositionUsesPivotPoint="true" />
+            </View>
+            <View Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" BackgroundColor="White" CellIndex="0,4" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent">
+                <ImageView ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/mc_folder.png" SizeWidth="218" SizeHeight="226" ParentOrigin="TopCenter" PivotPoint="TopCenter" PositionUsesPivotPoint="true"/>
+                <TextLabel Text="Text" SizeWidth="218" SizeHeight="50" HorizontalAlignment="Center" VerticalAlignment="Center" ParentOrigin="BottomCenter" PivotPoint="BottomCenter" PositionUsesPivotPoint="true" />
+            </View>
+            <View Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" BackgroundColor="White" CellIndex="0,5" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent">
+                <ImageView ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/mc_folder.png" SizeWidth="218" SizeHeight="226" ParentOrigin="TopCenter" PivotPoint="TopCenter" PositionUsesPivotPoint="true"/>
+                <TextLabel Text="Text" SizeWidth="218" SizeHeight="50" HorizontalAlignment="Center" VerticalAlignment="Center"  ParentOrigin="BottomCenter" PivotPoint="BottomCenter" PositionUsesPivotPoint="true" />
+            </View>
+            <View Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" BackgroundColor="White" CellIndex="0,6" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent">
+                <ImageView ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/mc_folder.png" SizeWidth="218" SizeHeight="226" ParentOrigin="TopCenter" PivotPoint="TopCenter" PositionUsesPivotPoint="true"/>
+                <TextLabel Text="Text" SizeWidth="218" SizeHeight="50" HorizontalAlignment="Center" VerticalAlignment="Center" ParentOrigin="BottomCenter" PivotPoint="BottomCenter" PositionUsesPivotPoint="true" />
+            </View>
+            <View Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" BackgroundColor="White" CellIndex="0,7" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent">
+                <ImageView ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/mc_folder.png" SizeWidth="218" SizeHeight="226" ParentOrigin="TopCenter" PivotPoint="TopCenter" PositionUsesPivotPoint="true"/>
+                <TextLabel Text="Text" SizeWidth="218" SizeHeight="50" HorizontalAlignment="Center" VerticalAlignment="Center" ParentOrigin="BottomCenter" PivotPoint="BottomCenter" PositionUsesPivotPoint="true" />
+            </View>
+            <View Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" BackgroundColor="White" CellIndex="1,0" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent">
+                <ImageView ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/mc_folder.png" SizeWidth="218" SizeHeight="226" ParentOrigin="TopCenter" PivotPoint="TopCenter" PositionUsesPivotPoint="true"/>
+                <TextLabel Text="Text" SizeWidth="218" SizeHeight="50" HorizontalAlignment="Center" VerticalAlignment="Center" ParentOrigin="BottomCenter" PivotPoint="BottomCenter" PositionUsesPivotPoint="true" />
+            </View>
+            <View Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" BackgroundColor="White" CellIndex="1,1" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent">
+                <ImageView ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/mc_folder.png" SizeWidth="218" SizeHeight="226" ParentOrigin="TopCenter" PivotPoint="TopCenter" PositionUsesPivotPoint="true"/>
+                <TextLabel Text="Text" SizeWidth="218" SizeHeight="50" HorizontalAlignment="Center" VerticalAlignment="Center" ParentOrigin="BottomCenter" PivotPoint="BottomCenter" PositionUsesPivotPoint="true" />
+            </View>
+            <View Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" BackgroundColor="White" CellIndex="1,2" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent">
+                <ImageView ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/mc_folder.png" SizeWidth="218" SizeHeight="226" ParentOrigin="TopCenter" PivotPoint="TopCenter" PositionUsesPivotPoint="true"/>
+                <TextLabel Text="Text" SizeWidth="218" SizeHeight="50" HorizontalAlignment="Center" VerticalAlignment="Center" ParentOrigin="BottomCenter" PivotPoint="BottomCenter" PositionUsesPivotPoint="true" />
+            </View>
+            <View Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" BackgroundColor="White" CellIndex="1,3" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent">
+                <ImageView ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/mc_folder.png" SizeWidth="218" SizeHeight="226" ParentOrigin="TopCenter" PivotPoint="TopCenter" PositionUsesPivotPoint="true"/>
+                <TextLabel Text="Text" SizeWidth="218" SizeHeight="50" HorizontalAlignment="Center" VerticalAlignment="Center" ParentOrigin="BottomCenter" PivotPoint="BottomCenter" PositionUsesPivotPoint="true" />
+            </View>
+            <View Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" BackgroundColor="White" CellIndex="1,4" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent">
+                <ImageView ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/mc_folder.png" SizeWidth="218" SizeHeight="226" ParentOrigin="TopCenter" PivotPoint="TopCenter" PositionUsesPivotPoint="true"/>
+                <TextLabel Text="Text" SizeWidth="218" SizeHeight="50" HorizontalAlignment="Center" VerticalAlignment="Center" ParentOrigin="BottomCenter" PivotPoint="BottomCenter" PositionUsesPivotPoint="true" />
+            </View>
+            <View Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" BackgroundColor="White" CellIndex="1,5" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent">
+                <ImageView ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/mc_folder.png" SizeWidth="218" SizeHeight="226" ParentOrigin="TopCenter" PivotPoint="TopCenter" PositionUsesPivotPoint="true"/>
+                <TextLabel Text="Text" SizeWidth="218" SizeHeight="50" HorizontalAlignment="Center" VerticalAlignment="Center" ParentOrigin="BottomCenter" PivotPoint="BottomCenter" PositionUsesPivotPoint="true" />
+            </View>
+            <View Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" BackgroundColor="White" CellIndex="1,6" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent">
+                <ImageView ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/mc_folder.png" SizeWidth="218" SizeHeight="226" ParentOrigin="TopCenter" PivotPoint="TopCenter" PositionUsesPivotPoint="true"/>
+                <TextLabel Text="Text" SizeWidth="218" SizeHeight="50" HorizontalAlignment="Center" VerticalAlignment="Center" ParentOrigin="BottomCenter" PivotPoint="BottomCenter" PositionUsesPivotPoint="true" />
+            </View>
+            <View Focusable="true" FocusGained="OnFocusGained" FocusLost="OnFocusLost" BackgroundColor="White" CellIndex="1,7" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent">
+                <ImageView ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/mc_folder.png" SizeWidth="218" SizeHeight="226" ParentOrigin="TopCenter" PivotPoint="TopCenter" PositionUsesPivotPoint="true"/>
+                <TextLabel Text="Text" SizeWidth="218" SizeHeight="50" HorizontalAlignment="Center" VerticalAlignment="Center" ParentOrigin="BottomCenter" PivotPoint="BottomCenter" PositionUsesPivotPoint="true" />
+            </View>
+
+        </TableView>
+
+
+        <TableView Name="OptionList" Focusable="true" SizeWidth="1110" SizeHeight="80" PositionX="770" PositionY="760" Rows="1" Columns="3" CellPadding="15, 0">
+            <ImageView Name="Options1" CellIndex="0,0" Focusable="true" FocusGained="OnOptionsFocusGained" FocusLost="OnOptionsFocusLost" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/c_basic_button_white_bg_normal.9.png" Border="4,4,5,5" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent" >
+                <TextLabel Text="Filter By:All" PointSize="25" HorizontalAlignment="Center" VerticalAlignment="Center" ParentOrigin="Center" PivotPoint="Center" PositionUsesPivotPoint="true" />
+            </ImageView>
+            <ImageView Name="Options2" CellIndex="0,1" Focusable="true" FocusGained="OnOptionsFocusGained" FocusLost="OnOptionsFocusLost" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/c_basic_button_white_bg_normal.9.png" Border="4,4,5,5" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent" >
+                <TextLabel Text="Sort By:Title" PointSize="25" HorizontalAlignment="Center" VerticalAlignment="Center" ParentOrigin="Center" PivotPoint="Center" PositionUsesPivotPoint="true" />
+            </ImageView>
+            <ImageView Name="Options3" CellIndex="0,2" Focusable="true" FocusGained="OnOptionsFocusGained" FocusLost="OnOptionsFocusLost" ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/c_basic_button_white_bg_normal.9.png" Border="4,4,5,5" WidthResizePolicy="FillToParent" HeightResizePolicy="FillToParent" >
+                <TextLabel Text="Options" PointSize="25" HorizontalAlignment="Center" VerticalAlignment="Center" ParentOrigin="Center" PivotPoint="Center" PositionUsesPivotPoint="true" />
+            </ImageView>
+        </TableView>
+    </View>
+
+</MediaHubPage>
diff --git a/test/NUITestSample/NUIXAMLTestSample/TestMyContents/MediaHubPage.xaml.cs b/test/NUITestSample/NUIXAMLTestSample/TestMyContents/MediaHubPage.xaml.cs
new file mode 100755 (executable)
index 0000000..9d7d760
--- /dev/null
@@ -0,0 +1,170 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.UIComponents;
+
+namespace Tizen.NUI.Examples
+{
+    public class MediaHubPage : ContentPage
+    {
+        private Vector2 bezierPointIn1 = new Vector2(0.21f, 2);
+        private Vector2 bezierPointIn2 = new Vector2(0.14f, 1);
+        private Vector2 bezierPointOut1 = new Vector2(0.19f, 1);
+        private Vector2 bezierPointOut2 = new Vector2(0.22f, 1);
+        private Animation scaleInAni = null;
+        private Animation scaleOutAni = null;
+        private TableView contentTable = null;
+        private TableView optionList = null;
+
+        public MediaHubPage(Window win) : base (win)
+        {
+            Content.BackgroundImage = "/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/mc_bg.png";
+            ClearEvent += OnClearEvent;
+        }
+
+        /// <summary>
+        /// To make the ContentPage instance be disposed.
+        /// </summary>
+        protected override void Dispose(DisposeTypes type)
+        {
+            if (disposed)
+            {
+                return;
+            }
+
+            if (type == DisposeTypes.Explicit)
+            {
+                //Called by User
+                //Release your own managed resources here.
+                //You should release all of your own disposable objects here.
+            }
+
+            //Release your own unmanaged resources here.
+            //You should not access any managed member here except static instance.
+            //because the execution order of Finalizes is non-deterministic.
+            scaleInAni?.Dispose();
+            scaleInAni = null;
+            scaleOutAni?.Dispose();
+            scaleOutAni = null;
+            FocusManager.Instance.PreFocusChange -= OnPreFocusChange;
+            ClearEvent -= OnClearEvent;
+
+            base.Dispose(type);
+        }
+
+        public override void SetFocus()
+        {
+        }
+
+        private void OnClearEvent(object obj, EventArgs e)
+        {
+            Content.BackgroundImage = "/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/mc_bg.png";
+        }
+
+        private View OnPreFocusChange(object obj, FocusManager.PreFocusChangeEventArgs e)
+        {
+            if (e.CurrentView != null && !e.ProposedView)
+            {
+                if (e.Direction == View.FocusDirection.Down)
+                {
+                    e.ProposedView = optionList;//.GetChildAt(0);
+                }
+                if (e.Direction == View.FocusDirection.Up)
+                {
+                    e.ProposedView = contentTable;//.GetChildAt(0);
+                }
+                Tizen.Log.Fatal("NUISamples", "proposed view is null ");
+                // Console.WriteLine("==================  Proposed view null");
+            }
+            if (!e.ProposedView && !e.CurrentView)
+            {
+                e.ProposedView = contentTable;//.GetChildAt(0);
+            }
+            return e.ProposedView;
+        }
+
+        private bool OnClicked(object sender, EventArgs e)
+        {
+            if (sender is Button)
+            {
+                Button button = sender as Button;
+                button.LabelText = "Click Me";
+            }
+            return true;
+        }
+
+        private void OnFocusGained(object obj, EventArgs e)
+        {
+            View view = obj as View;
+            view.RaiseToTop();
+             if (scaleInAni == null)
+            {
+                scaleInAni = new Animation();
+            }
+            scaleInAni.Clear();
+            scaleInAni.EndAction = Animation.EndActions.StopFinal;
+            scaleInAni.AnimateTo(view, "Scale", new Vector3(1.2f, 1.2f, 0), 0, 1100, new AlphaFunction(bezierPointIn1, bezierPointIn2));
+            scaleInAni.Play();
+        }
+
+        private void OnFocusLost(object obj, EventArgs e)
+        {
+            View view = obj as View;
+            if (scaleOutAni == null)
+            {
+                scaleOutAni = new Animation();
+            }
+            scaleOutAni.Clear();
+            scaleOutAni.EndAction = Animation.EndActions.StopFinal;
+            scaleOutAni.AnimateTo(view, "Scale", new Vector3(1.0f, 1.0f, 0), 0, 850, new AlphaFunction(bezierPointOut1, bezierPointOut2));
+            scaleOutAni.Play();
+        }
+
+        private void OnOptionsFocusGained(object obj, EventArgs e)
+        {
+            ImageView view = obj as ImageView;
+            view.ResourceUrl = "/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/r_highlight_bg_focus_9patch.png";
+            view.Border = new Rectangle(14,14,20,20);
+            view.RaiseToTop();
+             if (scaleInAni == null)
+            {
+                scaleInAni = new Animation();
+            }
+            scaleInAni.Clear();
+            scaleInAni.EndAction = Animation.EndActions.StopFinal;
+            scaleInAni.AnimateTo(view, "Scale", new Vector3(1.2f, 1.2f, 0), 0, 1100, new AlphaFunction(bezierPointIn1, bezierPointIn2));
+            scaleInAni.Play();
+        }
+
+        private void OnOptionsFocusLost(object obj, EventArgs e)
+        {
+            ImageView view = obj as ImageView;
+            view.ResourceUrl = "/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/c_basic_button_white_bg_normal.9.png";
+            view.Border = new Rectangle(4,4,5,5);
+            if (scaleOutAni == null)
+            {
+                scaleOutAni = new Animation();
+            }
+            scaleOutAni.Clear();
+            scaleOutAni.EndAction = Animation.EndActions.StopFinal;
+            scaleOutAni.AnimateTo(view, "Scale", new Vector3(1.0f, 1.0f, 0), 0, 850, new AlphaFunction(bezierPointOut1, bezierPointOut2));
+            scaleOutAni.Play();
+        }
+    }
+}
\ No newline at end of file
diff --git a/test/NUITestSample/NUIXAMLTestSample/TestMyContents/TestMyContents.cs b/test/NUITestSample/NUIXAMLTestSample/TestMyContents/TestMyContents.cs
new file mode 100755 (executable)
index 0000000..d26a61e
--- /dev/null
@@ -0,0 +1,59 @@
+using System;
+using System.IO;
+using System.Reflection;
+
+using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
+using Tizen.NUI;
+using Tizen.NUI.UIComponents;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.Examples
+{
+    public class TestMyContents : NUIApplication
+    {
+        private TableView contentTable;
+        protected override void OnCreate() 
+        {
+            base.OnCreate();
+            Window window = Window.Instance;
+            window.BackgroundColor = Color.Transparent;
+
+            MediaHubPage myPage = new MediaHubPage(window);
+
+            Extensions.LoadFromXaml(myPage, typeof(MediaHubPage));
+
+            Console.WriteLine("==================  Set BindingContext in Application !!!! ==================");
+
+            // FocusManager.Instance.PreFocusChange += OnPreFocusChange;
+            myPage.SetFocus();
+
+            window.KeyEvent += (obj, e) => {
+                if (e.Key.State == Key.StateType.Down)
+                {
+                    if (e.Key.KeyPressedName == "1")
+                    {
+                        if ( !myPage.IsEmpty )
+                        {
+                            myPage.ClearContent();
+                        }
+                    }
+                    if (e.Key.KeyPressedName == "2")
+                    {
+                        if ( myPage.IsEmpty )
+                        {
+                            Extensions.LoadFromXaml(myPage, typeof(MediaHubPage));
+                            myPage.SetFocus();
+                        }
+                    }
+                }
+            };
+        }
+
+        public static void _Main(string[] args)
+        {
+            TestMyContents p = new TestMyContents();
+            p.Run(args);
+        }
+    }
+}
diff --git a/test/NUITestSample/NUIXAMLTestSample/UTC/TestButton/ButtonTestPage.xaml b/test/NUITestSample/NUIXAMLTestSample/UTC/TestButton/ButtonTestPage.xaml
new file mode 100755 (executable)
index 0000000..06159b6
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ContentPage x:Class="Tizen.NUI.Examples.ButtonTestPage"
+  xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+  xmlns:l="clr-namespace:Tizen.NUI;assembly=Tizen.NUI"
+  xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
+      <PushButton PositionX="10" PositionY="10" LabelText="PushButton" ForegroundVisualPadding="40,5,22,22" LabelPadding="5,40,22,22" Togglable="true" Size2D="260, 84" Clicked="OnClicked" Pressed="OnPressed" Released="OnReleased" LabelRelativeAlignment="End" >
+        <PushButton.UnselectedVisual>
+          <PropertyMap>
+            <KeyValue Key="Visual.Property.Type" Value="{VisualType Image}" />
+            <KeyValue Key="ImageVisualProperty.URL" Value="{x:String /home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/star-highlight.png}" />
+          </PropertyMap>
+        </PushButton.UnselectedVisual>
+        <PushButton.SelectedVisual>
+          <PropertyMap>
+            <KeyValue Key="Visual.Property.Type" Value="{VisualType Image}" />
+            <KeyValue Key="ImageVisualProperty.URL" Value="{x:String /home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/star-mod.png}" />
+          </PropertyMap>
+        </PushButton.SelectedVisual>
+        <!-- <PushButton.DisabledSelectedVisual>
+          <PropertyMap>
+          </PropertyMap>
+        </PushButton.DisabledSelectedVisual>
+        <PushButton.DisabledUnselectedVisual>
+          <PropertyMap>
+          </PropertyMap>
+        </PushButton.DisabledUnselectedVisual> -->
+        <PushButton.UnselectedBackgroundVisual>
+          <PropertyMap>
+            <KeyValue Key="Visual.Property.Type" Value="{VisualType NPatch}" />
+            <KeyValue Key="NpatchImageVisualProperty.URL" Value="{x:String /home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/c_basic_button_white_bg_normal.9.png}" />
+            <KeyValue Key="NpatchImageVisualProperty.Border" RectangleValue="4,4,5,5" />
+          </PropertyMap>
+        </PushButton.UnselectedBackgroundVisual>
+        <PushButton.SelectedBackgroundVisual>
+          <PropertyMap>
+            <KeyValue Key="Visual.Property.Type" Value="{VisualType NPatch}" />
+            <KeyValue Key="NpatchImageVisualProperty.URL" Value="{x:String /home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/r_highlight_bg_focus_9patch.png}" />
+            <KeyValue Key="NpatchImageVisualProperty.Border" RectangleValue="14,14,20,20" />
+          </PropertyMap>
+        </PushButton.SelectedBackgroundVisual>
+        <!-- <PushButton.DisabledUnselectedBackgroundVisual>
+          <PropertyMap>
+          </PropertyMap>
+        </PushButton.DisabledUnselectedBackgroundVisual>
+        <PushButton.DisabledSelectedBackgroundVisual>
+          <PropertyMap>
+          </PropertyMap>
+        </PushButton.DisabledSelectedBackgroundVisual> -->
+      </PushButton>
+
+      <CheckBoxButton LabelText="CheckBoxButton1" BackgroundColor="Green" ForegroundVisualPadding="10,5,22,22" PositionX="10" PositionY="120" Size2D="260, 84" StateChanged="OnStateChanged"/>
+      <CheckBoxButton LabelText="CheckBoxButton2" ForegroundVisualPadding="10,5,22,22" PositionX="10" PositionY="220" Size2D="260, 84" StateChanged="OnStateChanged"/>
+
+      <RadioButton LabelText="RadioButton1" ForegroundVisualPadding="10,5,10,10" PositionX="10" PositionY="330" Size2D="260, 84" />
+      <RadioButton LabelText="RadioButton2" ForegroundVisualPadding="10,5,10,10" PositionX="10" PositionY="430" Size2D="260, 84" />
+      <RadioButton LabelText="RadioButton3" ForegroundVisualPadding="10,5,10,10" PositionX="10" PositionY="530" Size2D="260, 84" />
+
+      <ToggleButton PositionX="10" PositionY="630" Size2D="50, 50" CurrentStateIndex="1">
+        <ToggleButton.StateVisuals>
+          <PropertyArray>
+            <KeyValue Value="{x:String /home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/star-highlight.png}" />
+            <KeyValue Value="{x:String /home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/star-mod.png}" />
+            <KeyValue Value="{x:String /home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/star-dim.png}" />
+          </PropertyArray>
+        </ToggleButton.StateVisuals>
+        <ToggleButton.Tooltips>
+          <PropertyArray>
+            <KeyValue Value="{x:String Tooltips1}" />
+            <KeyValue Value="{x:String Tooltips2}" />
+            <KeyValue Value="{x:String Tooltips3}" />
+          </PropertyArray>
+        </ToggleButton.Tooltips>
+      </ToggleButton>
+</ContentPage>
diff --git a/test/NUITestSample/NUIXAMLTestSample/UTC/TestButton/ButtonTestPage.xaml.cs b/test/NUITestSample/NUIXAMLTestSample/UTC/TestButton/ButtonTestPage.xaml.cs
new file mode 100755 (executable)
index 0000000..e6b8dfc
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 Tizen.NUI.BaseComponents;
+using Tizen.NUI.UIComponents;
+
+namespace Tizen.NUI.Examples
+{
+    public class ButtonTestPage : ContentPage
+    {
+
+        public ButtonTestPage(Window win) : base (win)
+        {
+        }
+
+        public override void SetFocus()
+        {
+            // PushButton button1 = Content.FindChildByName("Button1") as PushButton;
+            // PushButton button2 = Content.FindChildByName("Button2") as PushButton;
+            // button1.DownFocusableView = button2;
+            // button2.UpFocusableView = button1;
+            // FocusManager.Instance.SetCurrentFocusView(button1);
+        }
+
+        private bool OnClicked(object sender, EventArgs e)
+        {
+            if (sender is Button)
+            {
+                Button button = sender as Button;
+                button.LabelText = "Click Me";
+            }
+            return true;
+        }
+
+        private bool OnPressed(object sender, EventArgs e)
+        {
+            return true;
+        }
+
+        private bool OnReleased(object sender, EventArgs e)
+        {
+            return true;
+        }
+
+        private bool OnStateChanged(object sender, EventArgs e)
+        {
+            return true;
+        }
+    }
+}
\ No newline at end of file
diff --git a/test/NUITestSample/NUIXAMLTestSample/UTC/TestButton/TestButton.cs b/test/NUITestSample/NUIXAMLTestSample/UTC/TestButton/TestButton.cs
new file mode 100755 (executable)
index 0000000..f44e69f
--- /dev/null
@@ -0,0 +1,64 @@
+using System;
+using System.IO;
+using System.Reflection;
+
+using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
+using Tizen.NUI;
+using Tizen.NUI.UIComponents;
+using Tizen.NUI.BaseComponents;
+//using System.ComponentModel;
+
+namespace Tizen.NUI.Examples
+{
+    
+    // class MyAppViewModel : INotifyPropertyChanged
+    // {
+
+    //     public event PropertyChangedEventHandler PropertyChanged;
+    //     private Command _firstClick;
+    //     private int count = 0;
+        
+    //     private string[] colors = new string[] {"Black", "Blue", "Gray", "Green", "Purple", "Pink", "Red" };
+    //     public string TextColor = "Red";
+    //     public Command ChangeColor {
+    //         get {
+    //             return _firstClick ?? (_firstClick = new Command (() => {
+    //                 Console.WriteLine ("First button clicked");
+    //                 count += 1;
+    //                 TextColor = colors[count % 7];
+    //             }));
+    //         }
+    //     }
+    
+    //     public MyAppViewModel()
+    //     {
+    //     }
+
+    // }
+
+
+    public class TestButton : NUIApplication
+    {
+
+        protected override void OnCreate() 
+        {
+            base.OnCreate();
+            Window window = Window.Instance;
+            window.BackgroundColor = Color.White;
+
+            ButtonTestPage myPage = new ButtonTestPage(window);
+
+            Extensions.LoadFromXaml(myPage, typeof(ButtonTestPage));
+
+            Console.WriteLine("==================  Set BindingContext in Application !!!! ==================");
+            myPage.SetFocus();
+        }
+
+        public static void _Main(string[] args)
+        {
+            TestButton p = new TestButton();
+            p.Run(args);
+        }
+    }
+}
diff --git a/test/NUITestSample/NUIXAMLTestSample/UTC/TestFlexContainer/FlexContainerPage.xaml b/test/NUITestSample/NUIXAMLTestSample/UTC/TestFlexContainer/FlexContainerPage.xaml
new file mode 100755 (executable)
index 0000000..41cbd0b
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ContentPage x:Class="Tizen.NUI.Examples.FlexContainerPage"
+  xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+  xmlns:l="clr-namespace:Tizen.UI_Xaml;assembly=Tizen.UI_Xaml"
+  xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
+
+    <FlexContainer BackgroundColor="Red" SizeWidth="470" SizeHeight="500" PositionX="5" PositionY="100" FlexDirection="Row" ContentDirection="LTR" FlexWrap="Wrap" JustifyContent="JustifyFlexStart">
+      <TextLabel BackgroundColor="Green" Text="Text1" Flex="0.2" FlexMargin="5,0,5,0" HeightResizePolicy="FillToParent"/>
+      <TextLabel BackgroundColor="Blue" Text="Text2" Flex="0.2" FlexMargin="5,0,5,0" HeightResizePolicy="FillToParent"/>
+      <TextLabel BackgroundColor="Blue" Text="Text2" Flex="0.2" FlexMargin="5,0,5,0" HeightResizePolicy="FillToParent"/>
+      <TextLabel BackgroundColor="Green" Text="Text2" Flex="0.2" FlexMargin="5,0,5,0" HeightResizePolicy="FillToParent"/>
+    </FlexContainer>
+</ContentPage>
diff --git a/test/NUITestSample/NUIXAMLTestSample/UTC/TestFlexContainer/FlexContainerPage.xaml.cs b/test/NUITestSample/NUIXAMLTestSample/UTC/TestFlexContainer/FlexContainerPage.xaml.cs
new file mode 100755 (executable)
index 0000000..84589a7
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 Tizen.NUI.BaseComponents;
+using Tizen.NUI.UIComponents;
+
+namespace Tizen.NUI.Examples
+{
+    public class FlexContainerPage : ContentPage
+    {
+
+        public FlexContainerPage(Window win) : base (win)
+        {
+        }
+
+        public override void SetFocus()
+        {
+        }
+    }
+}
\ No newline at end of file
diff --git a/test/NUITestSample/NUIXAMLTestSample/UTC/TestFlexContainer/TestFlexContainer.cs b/test/NUITestSample/NUIXAMLTestSample/UTC/TestFlexContainer/TestFlexContainer.cs
new file mode 100755 (executable)
index 0000000..186a486
--- /dev/null
@@ -0,0 +1,62 @@
+using System;
+using System.IO;
+using System.Reflection;
+
+using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
+using Tizen.NUI;
+//using System.ComponentModel;
+
+
+
+namespace Tizen.NUI.Examples
+{
+    
+    // class MyAppViewModel : INotifyPropertyChanged
+    // {
+
+    //     public event PropertyChangedEventHandler PropertyChanged;
+    //     private Command _firstClick;
+    //     private int count = 0;
+        
+    //     private string[] colors = new string[] {"Black", "Blue", "Gray", "Green", "Purple", "Pink", "Red" };
+    //     public string TextColor = "Red";
+    //     public Command ChangeColor {
+    //         get {
+    //             return _firstClick ?? (_firstClick = new Command (() => {
+    //                 Console.WriteLine ("First button clicked");
+    //                 count += 1;
+    //                 TextColor = colors[count % 7];
+    //             }));
+    //         }
+    //     }
+    
+    //     public MyAppViewModel()
+    //     {
+    //     }
+
+    // }
+
+
+    public class TestFlexContainer : NUIApplication
+    {
+        protected override void OnCreate() 
+        {
+            base.OnCreate();
+            Window window = Window.Instance;
+            window.BackgroundColor = Color.White;
+
+            FlexContainerPage myPage = new FlexContainerPage(window);
+
+            Extensions.LoadFromXaml(myPage, typeof(FlexContainerPage));
+            
+            Console.WriteLine("==================  Set BindingContext in Application !!!! ==================");
+        }
+
+        public static void _Main(string[] args)
+        {
+            TestFlexContainer p = new TestFlexContainer();
+            p.Run(args);
+        }
+    }
+}
diff --git a/test/NUITestSample/NUIXAMLTestSample/UTC/TestImageView/ImageTestPage.xaml b/test/NUITestSample/NUIXAMLTestSample/UTC/TestImageView/ImageTestPage.xaml
new file mode 100755 (executable)
index 0000000..092322d
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ContentPage x:Class="Tizen.NUI.Examples.ImageTestPage"
+  xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+  xmlns:l="clr-namespace:Tizen.UI_Xaml;assembly=Tizen.UI_Xaml"
+  xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
+
+      <ImageView ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/gallery-0.jpg" 
+        PositionX="10" PositionY="10" Size2D="300, 300" ResourceReady="OnResourceReady" />
+      <ImageView PositionX="10" PositionY="320" Size2D="300, 300" PixelArea="0.1,0.0,0.4,0.6" >
+        <ImageView.Image>
+          <PropertyMap>
+            <KeyValue Key="Visual.Property.Type" Value="{VisualType Image}" />
+            <KeyValue Key="ImageVisualProperty.URL" Value="{x:String /home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/gallery-0.jpg}" />
+          </PropertyMap>
+        </ImageView.Image>
+      </ImageView>
+      <ImageView ResourceUrl="/home/tengxb/GitRepo/nui-xaml/TestXaml/res/images/00_popup_bg.9.png" 
+        PositionX="10" PositionY="630" Size2D="300, 160" SynchronosLoading="true" />
+</ContentPage>
diff --git a/test/NUITestSample/NUIXAMLTestSample/UTC/TestImageView/ImageTestPage.xaml.cs b/test/NUITestSample/NUIXAMLTestSample/UTC/TestImageView/ImageTestPage.xaml.cs
new file mode 100755 (executable)
index 0000000..058d82a
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 Tizen.NUI.BaseComponents;
+using Tizen.NUI.UIComponents;
+
+namespace Tizen.NUI.Examples
+{
+    public class ImageTestPage : ContentPage
+    {
+
+        public ImageTestPage(Window win) : base (win)
+        {
+        }
+
+        public override void SetFocus()
+        {
+        }
+
+        private void OnResourceReady(object sender, ImageView.ResourceReadyEventArgs e)
+        {
+        }
+    }
+}
\ No newline at end of file
diff --git a/test/NUITestSample/NUIXAMLTestSample/UTC/TestImageView/TestImageView.cs b/test/NUITestSample/NUIXAMLTestSample/UTC/TestImageView/TestImageView.cs
new file mode 100755 (executable)
index 0000000..400428a
--- /dev/null
@@ -0,0 +1,60 @@
+using System;
+using System.IO;
+using System.Reflection;
+
+using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
+using Tizen.NUI;
+//using System.ComponentModel;
+
+namespace Tizen.NUI.Examples
+{
+    
+    // class MyAppViewModel : INotifyPropertyChanged
+    // {
+
+    //     public event PropertyChangedEventHandler PropertyChanged;
+    //     private Command _firstClick;
+    //     private int count = 0;
+        
+    //     private string[] colors = new string[] {"Black", "Blue", "Gray", "Green", "Purple", "Pink", "Red" };
+    //     public string TextColor = "Red";
+    //     public Command ChangeColor {
+    //         get {
+    //             return _firstClick ?? (_firstClick = new Command (() => {
+    //                 Console.WriteLine ("First button clicked");
+    //                 count += 1;
+    //                 TextColor = colors[count % 7];
+    //             }));
+    //         }
+    //     }
+    
+    //     public MyAppViewModel()
+    //     {
+    //     }
+
+    // }
+
+
+    public class TestImageView : NUIApplication
+    {
+        protected override void OnCreate() 
+        {
+            base.OnCreate();
+            Window window = Window.Instance;
+            window.BackgroundColor = Color.White;
+
+            ImageTestPage myPage = new ImageTestPage(window);
+
+            Extensions.LoadFromXaml(myPage, typeof(ImageTestPage));
+
+            Console.WriteLine("==================  Set BindingContext in Application !!!! ==================");
+        }
+
+        public static void _Main(string[] args)
+        {
+            TestImageView p = new TestImageView();
+            p.Run(args);
+        }
+    }
+}
diff --git a/test/NUITestSample/NUIXAMLTestSample/UTC/TestScrollBar/ScrollBarTestPage.xaml b/test/NUITestSample/NUIXAMLTestSample/UTC/TestScrollBar/ScrollBarTestPage.xaml
new file mode 100755 (executable)
index 0000000..43f9078
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ContentPage x:Class="Tizen.NUI.Examples.ScrollBarTestPage"
+  xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+  xmlns:l="clr-namespace:Tizen.UI_Xaml;assembly=Tizen.UI_Xaml"
+  xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
+
+      <ScrollBar BackgroundColor="Green" ScrollDirection="Horizontal" Size2D="400,80" PositionY="50" ParentOrigin="TopLeft" PivotPoint="TopLeft" PositionUsesPivotPoint="true" />
+
+</ContentPage>
diff --git a/test/NUITestSample/NUIXAMLTestSample/UTC/TestScrollBar/ScrollBarTestPage.xaml.cs b/test/NUITestSample/NUIXAMLTestSample/UTC/TestScrollBar/ScrollBarTestPage.xaml.cs
new file mode 100755 (executable)
index 0000000..dadb7e0
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 Tizen.NUI.BaseComponents;
+using Tizen.NUI.UIComponents;
+
+namespace Tizen.NUI.Examples
+{
+    public class ScrollBarTestPage : ContentPage
+    {
+
+        public ScrollBarTestPage(Window win) : base (win)
+        {
+        }
+
+        public override void SetFocus()
+        {
+        }
+    }
+}
\ No newline at end of file
diff --git a/test/NUITestSample/NUIXAMLTestSample/UTC/TestScrollBar/TestScrollBar.cs b/test/NUITestSample/NUIXAMLTestSample/UTC/TestScrollBar/TestScrollBar.cs
new file mode 100755 (executable)
index 0000000..20d1519
--- /dev/null
@@ -0,0 +1,62 @@
+using System;
+using System.IO;
+using System.Reflection;
+
+using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
+using Tizen.NUI;
+//using System.ComponentModel;
+
+namespace Tizen.NUI.Examples
+{
+    
+    // class MyAppViewModel : INotifyPropertyChanged
+    // {
+
+    //     public event PropertyChangedEventHandler PropertyChanged;
+    //     private Command _firstClick;
+    //     private int count = 0;
+        
+    //     private string[] colors = new string[] {"Black", "Blue", "Gray", "Green", "Purple", "Pink", "Red" };
+    //     public string TextColor = "Red";
+    //     public Command ChangeColor {
+    //         get {
+    //             return _firstClick ?? (_firstClick = new Command (() => {
+    //                 Console.WriteLine ("First button clicked");
+    //                 count += 1;
+    //                 TextColor = colors[count % 7];
+    //             }));
+    //         }
+    //     }
+    
+    //     public MyAppViewModel()
+    //     {
+    //     }
+
+    // }
+
+
+    public class TestScrollBar : NUIApplication
+    {
+        protected override void OnCreate() 
+        {
+            base.OnCreate();
+            Window window = Window.Instance;
+            window.BackgroundColor = Color.White;
+
+            ScrollBarTestPage myPage = new ScrollBarTestPage(window);
+
+            // MyPage myPage = new MyPage(win);
+            Extensions.LoadFromXaml(myPage, typeof(ScrollBarTestPage));
+            
+            Console.WriteLine("==================  Set BindingContext in Application !!!! ==================");
+
+        }
+
+        public static void _Main(string[] args)
+        {
+            TestScrollBar p = new TestScrollBar();
+            p.Run(args);
+        }
+    }
+}
diff --git a/test/NUITestSample/NUIXAMLTestSample/UTC/TestSlider/SliderTestPage.xaml b/test/NUITestSample/NUIXAMLTestSample/UTC/TestSlider/SliderTestPage.xaml
new file mode 100755 (executable)
index 0000000..acc4d85
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ContentPage x:Class="Tizen.NUI.Examples.SliderTestPage"
+  xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+  xmlns:l="clr-namespace:Tizen.UI_Xaml;assembly=Tizen.UI_Xaml"
+  xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
+
+      <Slider BackgroundColor="Green" Value="10.1" PositionY="50" ParentOrigin="TopLeft" PivotPoint="TopLeft" PositionUsesPivotPoint="true"/>
+
+</ContentPage>
diff --git a/test/NUITestSample/NUIXAMLTestSample/UTC/TestSlider/SliderTestPage.xaml.cs b/test/NUITestSample/NUIXAMLTestSample/UTC/TestSlider/SliderTestPage.xaml.cs
new file mode 100755 (executable)
index 0000000..ab2336b
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 Tizen.NUI.BaseComponents;
+using Tizen.NUI.UIComponents;
+
+namespace Tizen.NUI.Examples
+{
+    public class SliderTestPage : ContentPage
+    {
+
+        public SliderTestPage(Window win) : base (win)
+        {
+        }
+
+        public override void SetFocus()
+        {
+        }
+    }
+}
\ No newline at end of file
diff --git a/test/NUITestSample/NUIXAMLTestSample/UTC/TestSlider/TestSlider.cs b/test/NUITestSample/NUIXAMLTestSample/UTC/TestSlider/TestSlider.cs
new file mode 100755 (executable)
index 0000000..77df115
--- /dev/null
@@ -0,0 +1,62 @@
+using System;
+using System.IO;
+using System.Reflection;
+
+using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
+using Tizen.NUI;
+//using System.ComponentModel;
+
+namespace Tizen.NUI.Examples
+{
+    
+    // class MyAppViewModel : INotifyPropertyChanged
+    // {
+
+    //     public event PropertyChangedEventHandler PropertyChanged;
+    //     private Command _firstClick;
+    //     private int count = 0;
+        
+    //     private string[] colors = new string[] {"Black", "Blue", "Gray", "Green", "Purple", "Pink", "Red" };
+    //     public string TextColor = "Red";
+    //     public Command ChangeColor {
+    //         get {
+    //             return _firstClick ?? (_firstClick = new Command (() => {
+    //                 Console.WriteLine ("First button clicked");
+    //                 count += 1;
+    //                 TextColor = colors[count % 7];
+    //             }));
+    //         }
+    //     }
+    
+    //     public MyAppViewModel()
+    //     {
+    //     }
+
+    // }
+
+
+    public class TestSlider : NUIApplication
+    {
+        protected override void OnCreate() 
+        {
+            base.OnCreate();
+            Window window = Window.Instance;
+            window.BackgroundColor = Color.White;
+
+            SliderTestPage myPage = new SliderTestPage(window);
+
+            // MyPage myPage = new MyPage(win);
+            Extensions.LoadFromXaml(myPage, typeof(SliderTestPage));
+            
+            Console.WriteLine("==================  Set BindingContext in Application !!!! ==================");
+
+        }
+
+        public static void _Main(string[] args)
+        {
+            TestSlider p = new TestSlider();
+            p.Run(args);
+        }
+    }
+}
diff --git a/test/NUITestSample/NUIXAMLTestSample/UTC/TestTableView/TableTestPage.xaml b/test/NUITestSample/NUIXAMLTestSample/UTC/TestTableView/TableTestPage.xaml
new file mode 100755 (executable)
index 0000000..d638ab1
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ContentPage x:Class="Tizen.NUI.Examples.TableTestPage"
+  xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+  xmlns:l="clr-namespace:Tizen.UI_Xaml;assembly=Tizen.UI_Xaml"
+  xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
+
+    <TableView BackgroundColor="Red" SizeWidth="300" SizeHeight="100" PositionX="50" PositionY="100" Rows="2" Columns="2">
+      <TextLabel BackgroundColor="Green" Text="Text1" CellIndex="0,0" HeightResizePolicy="FillToParent"/>
+      <TextLabel BackgroundColor="Blue" Text="Text2" CellIndex="0,1" HeightResizePolicy="FillToParent"/>
+      <TextLabel BackgroundColor="Blue" Text="Text2" CellIndex="1,0" HeightResizePolicy="FillToParent"/>
+      <TextLabel BackgroundColor="Green" Text="Text2" CellIndex="1,1" HeightResizePolicy="FillToParent"/>
+    </TableView>
+</ContentPage>
diff --git a/test/NUITestSample/NUIXAMLTestSample/UTC/TestTableView/TableTestPage.xaml.cs b/test/NUITestSample/NUIXAMLTestSample/UTC/TestTableView/TableTestPage.xaml.cs
new file mode 100755 (executable)
index 0000000..2dd3add
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 Tizen.NUI.BaseComponents;
+using Tizen.NUI.UIComponents;
+
+namespace Tizen.NUI.Examples
+{
+    public class TableTestPage : ContentPage
+    {
+
+        public TableTestPage(Window win) : base (win)
+        {
+        }
+
+        public override void SetFocus()
+        {
+        }
+    }
+}
\ No newline at end of file
diff --git a/test/NUITestSample/NUIXAMLTestSample/UTC/TestTableView/TestTableView.cs b/test/NUITestSample/NUIXAMLTestSample/UTC/TestTableView/TestTableView.cs
new file mode 100755 (executable)
index 0000000..10b8eb7
--- /dev/null
@@ -0,0 +1,63 @@
+using System;
+using System.IO;
+using System.Reflection;
+
+using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
+using Tizen.NUI;
+//using System.ComponentModel;
+
+
+
+namespace Tizen.NUI.Examples
+{
+    
+    // class MyAppViewModel : INotifyPropertyChanged
+    // {
+
+    //     public event PropertyChangedEventHandler PropertyChanged;
+    //     private Command _firstClick;
+    //     private int count = 0;
+        
+    //     private string[] colors = new string[] {"Black", "Blue", "Gray", "Green", "Purple", "Pink", "Red" };
+    //     public string TextColor = "Red";
+    //     public Command ChangeColor {
+    //         get {
+    //             return _firstClick ?? (_firstClick = new Command (() => {
+    //                 Console.WriteLine ("First button clicked");
+    //                 count += 1;
+    //                 TextColor = colors[count % 7];
+    //             }));
+    //         }
+    //     }
+    
+    //     public MyAppViewModel()
+    //     {
+    //     }
+
+    // }
+
+
+    public class TestTableView : NUIApplication
+    {
+        protected override void OnCreate() 
+        {
+            base.OnCreate();
+            Window window = Window.Instance;
+            window.BackgroundColor = Color.White;
+
+            TableTestPage myPage = new TableTestPage(window);
+
+            Extensions.LoadFromXaml(myPage, typeof(TableTestPage));
+            
+            Console.WriteLine("==================  Set BindingContext in Application !!!! ==================");
+
+        }
+
+        public static void _Main(string[] args)
+        {
+            TestTableView p = new TestTableView();
+            p.Run(args);
+        }
+    }
+}
diff --git a/test/NUITestSample/NUIXAMLTestSample/UTC/TestTextEditor/TestTextEditor.cs b/test/NUITestSample/NUIXAMLTestSample/UTC/TestTextEditor/TestTextEditor.cs
new file mode 100755 (executable)
index 0000000..8963352
--- /dev/null
@@ -0,0 +1,62 @@
+using System;
+using System.IO;
+using System.Reflection;
+
+using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
+using Tizen.NUI;
+//using System.ComponentModel;
+
+namespace Tizen.NUI.Examples
+{
+    
+    // class MyAppViewModel : INotifyPropertyChanged
+    // {
+
+    //     public event PropertyChangedEventHandler PropertyChanged;
+    //     private Command _firstClick;
+    //     private int count = 0;
+        
+    //     private string[] colors = new string[] {"Black", "Blue", "Gray", "Green", "Purple", "Pink", "Red" };
+    //     public string TextColor = "Red";
+    //     public Command ChangeColor {
+    //         get {
+    //             return _firstClick ?? (_firstClick = new Command (() => {
+    //                 Console.WriteLine ("First button clicked");
+    //                 count += 1;
+    //                 TextColor = colors[count % 7];
+    //             }));
+    //         }
+    //     }
+    
+    //     public MyAppViewModel()
+    //     {
+    //     }
+
+    // }
+
+
+    public class TestTextEditor : NUIApplication
+    {
+        protected override void OnCreate() 
+        {
+            base.OnCreate();
+            Window window = Window.Instance;
+            window.BackgroundColor = Color.White;
+
+            TextEditorTestPage myPage = new TextEditorTestPage(window);
+
+            // MyPage myPage = new MyPage(win);
+            Extensions.LoadFromXaml(myPage, typeof(TextEditorTestPage));
+            
+            Console.WriteLine("==================  Set BindingContext in Application !!!! ==================");
+
+        }
+
+        public static void _Main(string[] args)
+        {
+            TestTextEditor p = new TestTextEditor();
+            p.Run(args);
+        }
+    }
+}
diff --git a/test/NUITestSample/NUIXAMLTestSample/UTC/TestTextEditor/TextEditorTestPage.xaml b/test/NUITestSample/NUIXAMLTestSample/UTC/TestTextEditor/TextEditorTestPage.xaml
new file mode 100755 (executable)
index 0000000..8856a57
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ContentPage x:Class="Tizen.NUI.Examples.TextEditorTestPage"
+  xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+  xmlns:l="clr-namespace:Tizen.UI_Xaml;assembly=Tizen.UI_Xaml"
+  xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
+
+      <TextEditor BackgroundColor="Red" Text="Text1" PositionX="10" PositionY="10" Size2D="460,200" ParentOrigin="TopLeft" PivotPoint="TopLeft" PositionUsesPivotPoint="true"/>
+      <TextEditor BackgroundColor="Cyan" Text="Text1" TextColor="1.0, 0.0, 0.0, 1.0" PositionX="10" PositionY="220" Size2D="460,300" ParentOrigin="TopLeft" PivotPoint="TopLeft" PositionUsesPivotPoint="true"/>
+      <TextEditor BackgroundColor="Green" Text="Text1" TextColor="1.0, 0.0, 0.0, 1.0" PositionX="10" PositionY="530" Size2D="460,250" ParentOrigin="TopLeft" PivotPoint="TopLeft" PositionUsesPivotPoint="true"/>
+
+</ContentPage>
diff --git a/test/NUITestSample/NUIXAMLTestSample/UTC/TestTextEditor/TextEditorTestPage.xaml.cs b/test/NUITestSample/NUIXAMLTestSample/UTC/TestTextEditor/TextEditorTestPage.xaml.cs
new file mode 100755 (executable)
index 0000000..32c0f60
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 Tizen.NUI.BaseComponents;
+using Tizen.NUI.UIComponents;
+
+namespace Tizen.NUI.Examples
+{
+    public class TextEditorTestPage : ContentPage
+    {
+
+        public TextEditorTestPage(Window win) : base (win)
+        {
+        }
+
+        public override void SetFocus()
+        {
+        }
+    }
+}
\ No newline at end of file
diff --git a/test/NUITestSample/NUIXAMLTestSample/UTC/TestTextField/TestTextField.cs b/test/NUITestSample/NUIXAMLTestSample/UTC/TestTextField/TestTextField.cs
new file mode 100755 (executable)
index 0000000..81c5faa
--- /dev/null
@@ -0,0 +1,60 @@
+using System;
+using System.IO;
+using System.Reflection;
+
+using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
+using Tizen.NUI;
+//using System.ComponentModel;
+
+namespace Tizen.NUI.Examples
+{
+    
+    // class MyAppViewModel : INotifyPropertyChanged
+    // {
+
+    //     public event PropertyChangedEventHandler PropertyChanged;
+    //     private Command _firstClick;
+    //     private int count = 0;
+        
+    //     private string[] colors = new string[] {"Black", "Blue", "Gray", "Green", "Purple", "Pink", "Red" };
+    //     public string TextColor = "Red";
+    //     public Command ChangeColor {
+    //         get {
+    //             return _firstClick ?? (_firstClick = new Command (() => {
+    //                 Console.WriteLine ("First button clicked");
+    //                 count += 1;
+    //                 TextColor = colors[count % 7];
+    //             }));
+    //         }
+    //     }
+    
+    //     public MyAppViewModel()
+    //     {
+    //     }
+
+    // }
+
+
+    public class TestTextField : NUIApplication
+    {
+        protected override void OnCreate() 
+        {
+            base.OnCreate();
+            Window window = Window.Instance;
+            window.BackgroundColor = Color.White;
+
+            TextFieldTestPage myPage = new TextFieldTestPage(window);
+
+            Extensions.LoadFromXaml(myPage, typeof(TextFieldTestPage));
+            
+            Console.WriteLine("==================  Set BindingContext in Application !!!! ==================");
+        }
+
+        public static void _Main(string[] args)
+        {
+            TestTextField p = new TestTextField();
+            p.Run(args);
+        }
+    }
+}
diff --git a/test/NUITestSample/NUIXAMLTestSample/UTC/TestTextField/TextFieldTestPage.xaml b/test/NUITestSample/NUIXAMLTestSample/UTC/TestTextField/TextFieldTestPage.xaml
new file mode 100755 (executable)
index 0000000..f7854f3
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ContentPage x:Class="Tizen.NUI.Examples.TextFieldTestPage"
+  xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+  xmlns:l="clr-namespace:Tizen.UI_Xaml;assembly=Tizen.UI_Xaml"
+  xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
+
+      <TextField BackgroundColor="Red" Text="Text1" PositionX="10"  PositionY="50" 
+        ParentOrigin="TopLeft" PivotPoint="TopLeft" PositionUsesPivotPoint="true"
+        MaxLengthReached="OnMaxLengthReached" HorizontalAlignment="Begin" VerticalAlignment="Center" Size2D="460,50" />
+      <TextField BackgroundColor="Cyan" PlaceholderText="Input something.." PositionX="10"  PositionY="150" HorizontalAlignment="End" 
+        ParentOrigin="TopLeft" PivotPoint="TopLeft" PositionUsesPivotPoint="true" TextChanged="OnTextChanged" Size2D="460,50" />
+      <TextField BackgroundColor="Green" PlaceholderText="Input something.." TextColor="Red" PositionX="10"  PositionY="250"
+        ParentOrigin="TopLeft" PivotPoint="TopLeft" PositionUsesPivotPoint="true" Size2D="460,50" />
+
+</ContentPage>
diff --git a/test/NUITestSample/NUIXAMLTestSample/UTC/TestTextField/TextFieldTestPage.xaml.cs b/test/NUITestSample/NUIXAMLTestSample/UTC/TestTextField/TextFieldTestPage.xaml.cs
new file mode 100755 (executable)
index 0000000..87cdb84
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 Tizen.NUI.BaseComponents;
+using Tizen.NUI.UIComponents;
+
+namespace Tizen.NUI.Examples
+{
+    public class TextFieldTestPage : ContentPage
+    {
+
+        public TextFieldTestPage(Window win) : base (win)
+        {
+        }
+
+        public override void SetFocus()
+        {
+        }
+
+        private void OnTextChanged(Object sender, TextField.TextChangedEventArgs e)
+        {
+        }
+
+        private void OnMaxLengthReached(Object sender, TextField.MaxLengthReachedEventArgs e)
+        {
+        }
+    }
+}
\ No newline at end of file
diff --git a/test/NUITestSample/NUIXAMLTestSample/UTC/TestTextLabel/TestTextLabel.cs b/test/NUITestSample/NUIXAMLTestSample/UTC/TestTextLabel/TestTextLabel.cs
new file mode 100755 (executable)
index 0000000..523dd1e
--- /dev/null
@@ -0,0 +1,62 @@
+using System;
+using System.IO;
+using System.Reflection;
+
+using Tizen.NUI.Binding;
+using Tizen.NUI.Xaml;
+using Tizen.NUI;
+//using System.ComponentModel;
+
+namespace Tizen.NUI.Examples
+{
+    
+    // class MyAppViewModel : INotifyPropertyChanged
+    // {
+
+    //     public event PropertyChangedEventHandler PropertyChanged;
+    //     private Command _firstClick;
+    //     private int count = 0;
+        
+    //     private string[] colors = new string[] {"Black", "Blue", "Gray", "Green", "Purple", "Pink", "Red" };
+    //     public string TextColor = "Red";
+    //     public Command ChangeColor {
+    //         get {
+    //             return _firstClick ?? (_firstClick = new Command (() => {
+    //                 Console.WriteLine ("First button clicked");
+    //                 count += 1;
+    //                 TextColor = colors[count % 7];
+    //             }));
+    //         }
+    //     }
+    
+    //     public MyAppViewModel()
+    //     {
+    //     }
+
+    // }
+
+
+    public class TestTextLabel : NUIApplication
+    {
+        protected override void OnCreate() 
+        {
+            base.OnCreate();
+            Window window = Window.Instance;
+            window.BackgroundColor = Color.White;
+
+            TextLabelTestPage myPage = new TextLabelTestPage(window);
+
+            // MyPage myPage = new MyPage(win);
+            Extensions.LoadFromXaml(myPage, typeof(TextLabelTestPage));
+            
+            Console.WriteLine("==================  Set BindingContext in Application !!!! ==================");
+
+        }
+
+        public static void _Main(string[] args)
+        {
+            TestTextLabel p = new TestTextLabel();
+            p.Run(args);
+        }
+    }
+}
diff --git a/test/NUITestSample/NUIXAMLTestSample/UTC/TestTextLabel/TextLabelTestPage.xaml b/test/NUITestSample/NUIXAMLTestSample/UTC/TestTextLabel/TextLabelTestPage.xaml
new file mode 100755 (executable)
index 0000000..38cbfd5
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ContentPage x:Class="Tizen.NUI.Examples.TextLabelTestPage"
+  xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+  xmlns:l="clr-namespace:Tizen.UI_Xaml;assembly=Tizen.UI_Xaml"
+  xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
+
+      <TextLabel BackgroundColor="Green" Text="Text1" TextColor="Red" PositionY="50" ParentOrigin="TopLeft" PivotPoint="TopLeft" PositionUsesPivotPoint="true"/>
+
+</ContentPage>
diff --git a/test/NUITestSample/NUIXAMLTestSample/UTC/TestTextLabel/TextLabelTestPage.xaml.cs b/test/NUITestSample/NUIXAMLTestSample/UTC/TestTextLabel/TextLabelTestPage.xaml.cs
new file mode 100755 (executable)
index 0000000..6c2ebce
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 Tizen.NUI.BaseComponents;
+using Tizen.NUI.UIComponents;
+
+namespace Tizen.NUI.Examples
+{
+    public class TextLabelTestPage : ContentPage
+    {
+
+        public TextLabelTestPage(Window win) : base (win)
+        {
+        }
+
+        public override void SetFocus()
+        {
+        }
+    }
+}
\ No newline at end of file
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/00_popup_bg.9.png b/test/NUITestSample/NUIXAMLTestSample/res/images/00_popup_bg.9.png
new file mode 100755 (executable)
index 0000000..3b4e792
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/00_popup_bg.9.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/Kid1.svg b/test/NUITestSample/NUIXAMLTestSample/res/images/Kid1.svg
new file mode 100755 (executable)
index 0000000..b7d5476
--- /dev/null
@@ -0,0 +1,491 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   version="1.1"
+   id="Layer_1"
+   x="0px"
+   y="0px"
+   viewBox="0 0 306.90988 416.79828"
+   xml:space="preserve"
+   inkscape:version="0.48.4 r9939"
+   width="100%"
+   height="100%"
+   sodipodi:docname="Kid1.svg"><metadata
+     id="metadata185"><rdf:RDF><cc:Work
+         rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
+     id="defs183" /><sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="640"
+     inkscape:window-height="480"
+     id="namedview181"
+     showgrid="false"
+     fit-margin-top="0"
+     fit-margin-left="0"
+     fit-margin-right="0"
+     fit-margin-bottom="0"
+     inkscape:zoom="0.28032166"
+     inkscape:cx="152.20465"
+     inkscape:cy="184.87264"
+     inkscape:window-x="75"
+     inkscape:window-y="34"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="Layer_1" /><path
+     style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     d="m 192.28065,343.14765 c 0,0 -4.5,75.5 37.5,71 42,-4.5 11.5,-75.5 11.5,-75.5 l -49,4.5 z"
+     id="path3"
+     inkscape:connector-curvature="0" /><path
+     style="fill:#666666;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     d="m 229.78065,414.14765 c 24.024,-2.574 24.325,-26.903 20.184,-47.259 l -56.117,5.805 c 3.172,20.614 12.003,44.018 35.933,41.454 z"
+     id="path5"
+     inkscape:connector-curvature="0" /><path
+     style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     d="m 113.60765,343.14765 c 0,0 -23.087995,69 14,73 37.088,4 48,-73 48,-73 h -62 z"
+     id="path7"
+     inkscape:connector-curvature="0" /><path
+     style="fill:#666666;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     d="m 169.15465,370.76265 -60.625,-7.118 c -3.745,20.685 -4.689,49.94 19.078,52.503 21.993,2.372 34.78,-23.738 41.547,-45.385 z"
+     id="path9"
+     inkscape:connector-curvature="0" /><path
+     style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     d="m 117.10565,371.73465 39.895,2.68 c 0,0 -7.065,27.803 -23.798,24.788 -16.733,-3.015 -16.097,-27.468 -16.097,-27.468 z"
+     id="path11"
+     inkscape:connector-curvature="0" /><path
+     style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     d="m 206.27865,381.65765 35.399,-5.164 c 0,0 2.531,26.234 -10.49,26.241 -18.543,0.011 -24.909,-21.077 -24.909,-21.077 z"
+     id="path13"
+     inkscape:connector-curvature="0" /><path
+     style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     d="m 121.49165,210.92765 c -24.560995,5.263 -52.631995,5.263 -52.631995,5.263 l 5.354,60.772 25.859995,-5.032 c 0,0 64.328,-18.197 62.574,-34.16 -2.104,-19.138 -16.595,-32.106 -41.156,-26.843 z"
+     id="path15"
+     inkscape:connector-curvature="0" /><path
+     style="fill:#c1272d;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     d="m 231.14065,228.64765 c -10.143,-34.251 -65.789,-51.053 -65.789,-51.053 0,0 -19.298,28.07 -43.86,33.333 -1.209,0.259 -2.428,0.502 -3.65,0.736 l -20.035995,60.709 2.267995,-0.441 -16.300995,80.54 184.714995,-4.731 c 0,10e-4 -25.566,-79.313 -37.347,-119.093 z"
+     id="path17"
+     inkscape:connector-curvature="0" /><line
+     style="fill:#666666;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     x1="110.72466"
+     y1="311.29565"
+     x2="104.40065"
+     y2="352.30963"
+     id="line19" /><polygon
+     style="fill:#666666;stroke:#000000;stroke-miterlimit:10"
+     points="390.823,464.081 392.798,470.374 237.225,476.667 237.225,468.729 "
+     id="polygon21"
+     transform="translate(-145.43535,-189.01935)" /><linearGradient
+     id="SVGID_1_"
+     gradientUnits="userSpaceOnUse"
+     x1="317.35651"
+     y1="383.66669"
+     x2="317.35651"
+     y2="199.5519"
+     gradientTransform="translate(-145.43535,-189.01935)"><stop
+       offset="0"
+       style="stop-color:#402A04"
+       id="stop24" /><stop
+       offset="1"
+       style="stop-color:#7F5100"
+       id="stop26" /></linearGradient><path
+     style="fill:url(#SVGID_1_);stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     d="M 172.97165,196.01565 H 63.267655 c 0,0 -54.6040005,-192.1050008 109.704995,-188.5960008 164.309,3.5089998 106.414,188.5960008 106.414,188.5960008 h -106.415 z"
+     id="path28"
+     inkscape:connector-curvature="0" /><linearGradient
+     id="SVGID_2_"
+     gradientUnits="userSpaceOnUse"
+     x1="317.6879"
+     y1="298.16669"
+     x2="317.6879"
+     y2="399.66791"
+     gradientTransform="translate(-145.43535,-189.01935)"><stop
+       offset="0.0019"
+       style="stop-color:#FFCA94"
+       id="stop31" /><stop
+       offset="1"
+       style="stop-color:#E2A380"
+       id="stop33" /></linearGradient><path
+     style="fill:url(#SVGID_2_);stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     d="m 93.798655,65.647649 c 0,0 -48.605,145.281001 77.692995,145.281001 126.298,0 80.202,-145.281001 80.202,-145.281001 H 93.798655 z"
+     id="path35"
+     inkscape:connector-curvature="0" /><linearGradient
+     id="SVGID_3_"
+     gradientUnits="userSpaceOnUse"
+     x1="316.33801"
+     y1="383.66669"
+     x2="316.33801"
+     y2="199.5519"
+     gradientTransform="translate(-145.43535,-189.01935)"><stop
+       offset="0"
+       style="stop-color:#402A04"
+       id="stop38" /><stop
+       offset="1"
+       style="stop-color:#7F5100"
+       id="stop40" /></linearGradient><path
+     style="fill:url(#SVGID_3_);stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     d="m 108.82665,29.573649 c 0,0 -37.535995,22.859 -34.316995,82.359001 h 62.920995 c 0,0 7.255,-35.965001 7.255,-31.786001 0,4.179 3.509,31.786001 3.509,31.786001 h 48.246 V 87.833649 l 8.772,24.099001 h 62.281 c 0,0 0,-53.553001 -28.63,-82.359001 -28.072,0.877 -130.037,0 -130.037,0 z"
+     id="path42"
+     inkscape:connector-curvature="0" /><linearGradient
+     id="SVGID_4_"
+     gradientUnits="userSpaceOnUse"
+     x1="195.0862"
+     y1="372.3811"
+     x2="217.894"
+     y2="516.99213"
+     gradientTransform="translate(-145.43535,-189.01935)"><stop
+       offset="0"
+       style="stop-color:#006178"
+       id="stop45" /><stop
+       offset="1"
+       style="stop-color:#00495C"
+       id="stop47" /></linearGradient><path
+     style="fill:url(#SVGID_4_);stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     d="m 111.64765,331.69965 -70.387995,13.196 c -6.487,1.216 -12.79,-3.096 -14.006,-9.583 L 1.8536545,199.83065 c -1.21599995,-6.487 3.096,-12.79 9.5830005,-14.006 l 70.388,-13.196 c 6.487,-1.216 12.79,3.096 14.006,9.583 l 25.399995,135.482 c 1.217,6.487 -3.096,12.79 -9.583,14.006 z"
+     id="path49"
+     inkscape:connector-curvature="0" /><linearGradient
+     id="SVGID_5_"
+     gradientUnits="userSpaceOnUse"
+     x1="197.17931"
+     y1="393.6586"
+     x2="218.5313"
+     y2="505.75641"><stop
+       offset="0"
+       style="stop-color:#6BBBD0"
+       id="stop52" /><stop
+       offset="1"
+       style="stop-color:#ACCCD4"
+       id="stop54" /></linearGradient><polygon
+     style="fill:url(#SVGID_5_);stroke:#000000;stroke-miterlimit:10"
+     points="179.836,514.167 159.336,399.948 236.336,387.667 254.336,498.167 "
+     id="polygon56"
+     transform="translate(-145.43535,-189.01935)" /><linearGradient
+     id="SVGID_6_"
+     gradientUnits="userSpaceOnUse"
+     x1="207.9456"
+     y1="466.41"
+     x2="201.4173"
+     y2="399.4946"><stop
+       offset="0"
+       style="stop-color:#FBCA51"
+       id="stop59" /><stop
+       offset="1"
+       style="stop-color:#FFECBF"
+       id="stop61" /></linearGradient><ellipse
+     style="fill:url(#SVGID_6_);stroke:#000000;stroke-miterlimit:10"
+     cx="205.43201"
+     cy="440.64801"
+     rx="28.959"
+     ry="28.080999"
+     id="ellipse63"
+     sodipodi:cx="205.43201"
+     sodipodi:cy="440.64801"
+     sodipodi:rx="28.959"
+     sodipodi:ry="28.080999"
+     transform="translate(-145.43535,-189.01935)" /><linearGradient
+     id="SVGID_7_"
+     gradientUnits="userSpaceOnUse"
+     x1="190.9269"
+     y1="427.96649"
+     x2="192.52139"
+     y2="436.33749"><stop
+       offset="0"
+       style="stop-color:#6BBBD0"
+       id="stop66" /><stop
+       offset="1"
+       style="stop-color:#ACCCD4"
+       id="stop68" /></linearGradient><line
+     style="fill:url(#SVGID_7_);stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     x1="44.983662"
+     y1="238.97565"
+     x2="47.595661"
+     y2="247.29865"
+     id="line70" /><linearGradient
+     id="SVGID_8_"
+     gradientUnits="userSpaceOnUse"
+     x1="211.39799"
+     y1="423.5397"
+     x2="213.01559"
+     y2="432.0325"><stop
+       offset="0"
+       style="stop-color:#6BBBD0"
+       id="stop73" /><stop
+       offset="1"
+       style="stop-color:#ACCCD4"
+       id="stop75" /></linearGradient><line
+     style="fill:url(#SVGID_8_);stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     x1="66.200653"
+     y1="234.40564"
+     x2="67.343658"
+     y2="243.13666"
+     id="line77" /><path
+     style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     d="m 47.595655,260.51865 c 0,0 0.653,13.22 15.831,9.14 15.178,-4.08 11.229,-15.994 11.229,-15.994"
+     id="path79"
+     inkscape:connector-curvature="0" /><linearGradient
+     id="SVGID_9_"
+     gradientUnits="userSpaceOnUse"
+     x1="247.2587"
+     y1="416.16669"
+     x2="247.2587"
+     y2="464.19009"
+     gradientTransform="translate(-145.43535,-189.01935)"><stop
+       offset="0.0019"
+       style="stop-color:#FFCA94"
+       id="stop82" /><stop
+       offset="1"
+       style="stop-color:#E2A380"
+       id="stop84" /></linearGradient><path
+     style="fill:url(#SVGID_9_);stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     d="m 125.03565,225.81865 c 0,0 -54.844995,-4.046 -54.589995,5.391 0.255,9.437 21.359,3.668 20.849,8.259 -0.51,4.591 -10.173,3.424 -8.763,9.166 1.335,5.436 9.891,0.337 10.485,4.399 0.594,4.062 -7.944,4.738 -7.2,9.587 0.744,4.849 9.437,1.275 9.947,4.081 0.51,2.806 -5.959,4.099 -3.664,7.415 2.296,3.316 25.481995,4.532 36.820995,-0.784 11.531,-5.406 -3.885,-47.514 -3.885,-47.514 z"
+     id="path86"
+     inkscape:connector-curvature="0" /><path
+     style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     d="m 108.82665,147.75265 c 0,0 0.464,-21.64 21.464,-21.14 21,0.5 22,21.14 22,21.14"
+     id="path88"
+     inkscape:connector-curvature="0" /><path
+     style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     d="m 194.78965,147.75265 c 0,0 5.5,-23.64 25,-23.64 19.5,0 21.571,21 21.571,21"
+     id="path90"
+     inkscape:connector-curvature="0" /><path
+     style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     d="M 154.28965,177.59465"
+     id="path92"
+     inkscape:connector-curvature="0" /><path
+     style="fill:none;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     d="m 154.28965,177.59465 c 0,0 0.715,18.789 16.607,18.421 15.893,-0.368 12.893,-18.421 12.893,-18.421"
+     id="path94"
+     inkscape:connector-curvature="0" /><path
+     style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     d="m 228.94765,254.13365 c -2.38,6.629 -9.604,20.319 -44.933,26.513 -37.922,6.649 -56.122,-3.11 -56.122,-3.11 l -10.787,-59.329 c 0,0 37.312,5.696 53.792,4.439 16.48,-1.257 33.346,-5.764 33.346,-5.764 0,0 18.324,-4.366 23.904,8.074 5.579,12.439 3.538,21.552 0.8,29.177 z"
+     id="path96"
+     inkscape:connector-curvature="0" /><linearGradient
+     id="SVGID_10_"
+     gradientUnits="userSpaceOnUse"
+     x1="316.32571"
+     y1="383.66669"
+     x2="316.32571"
+     y2="199.5519"><stop
+       offset="0"
+       style="stop-color:#402A04"
+       id="stop99" /><stop
+       offset="1"
+       style="stop-color:#7F5100"
+       id="stop101" /></linearGradient><polygon
+     style="fill:url(#SVGID_10_)"
+     points="408.426,250.667 394.198,218.593 358.725,207.167 262.541,210.167 237.725,225.136 224.225,247.667 "
+     id="polygon103"
+     transform="translate(-145.43535,-189.01935)" /><polygon
+     style="fill:#c1272d;stroke:#000000;stroke-miterlimit:10"
+     points="399.167,290.713 428.616,269.855 394.694,225.136 365.225,225.136 354.191,247.667 404.225,254.667 "
+     id="polygon105"
+     transform="translate(-145.43535,-189.01935)" /><path
+     style="fill:#c1272d;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     d="m 245.96865,0.64764917 c -6.811,-2.50199997 -41.178,27.49999983 -36.678,36.49999983 4.5,9 39,21.5 39,21.5 l 13.209,-17.558 c -10e-4,0 -4.031,-36.2179998 -15.531,-40.44199983 z"
+     id="path107"
+     inkscape:connector-curvature="0" /><path
+     style="fill:#c1272d;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     d="m 272.19765,55.502649 -13.408,15.144 c 0,0 9,36.500001 17.5,35.500001 8.5,-1 32,-21.720001 30,-31.408001 -2,-9.688 -34.092,-19.236 -34.092,-19.236 z"
+     id="path109"
+     inkscape:connector-curvature="0" /><path
+     style="fill:#c1272d;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     d="m 243.78965,58.647649 c 0,0 13.418,-23.5 17.709,-22.5 4.291,1 15.093,16.043 15.791,19.356 0.698,3.313 -13,20.644 -18.5,19.144 -5.5,-1.5 -12.5,-10 -15,-16 z"
+     id="path111"
+     inkscape:connector-curvature="0" /><line
+     style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     x1="215.78966"
+     y1="36.11665"
+     x2="245.96864"
+     y2="54.967648"
+     id="line113" /><line
+     style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     x1="262.99066"
+     y1="73.483643"
+     x2="277.31567"
+     y2="96.647644"
+     id="line115" /><circle
+     style="opacity:0.2;fill:#d86d44"
+     cx="262.54099"
+     cy="357.16699"
+     r="19.249001"
+     id="circle117"
+     sodipodi:cx="262.54099"
+     sodipodi:cy="357.16699"
+     sodipodi:rx="19.249001"
+     sodipodi:ry="19.249001"
+     transform="translate(-145.43535,-189.01935)" /><circle
+     style="opacity:0.2;fill:#d86d44"
+     cx="372.72501"
+     cy="357.16699"
+     r="19.249001"
+     id="circle119"
+     sodipodi:cx="372.72501"
+     sodipodi:cy="357.16699"
+     sodipodi:rx="19.249001"
+     sodipodi:ry="19.249001"
+     transform="translate(-145.43535,-189.01935)" /><path
+     style="fill:#c1272d;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     d="M 231.14065,228.64765"
+     id="path121"
+     inkscape:connector-curvature="0" /><linearGradient
+     id="SVGID_11_"
+     gradientUnits="userSpaceOnUse"
+     x1="218.8582"
+     y1="511.4505"
+     x2="220.60651"
+     y2="520.62927"
+     gradientTransform="translate(-145.43535,-189.01935)"><stop
+       offset="0"
+       style="stop-color:#006178"
+       id="stop124" /><stop
+       offset="1"
+       style="stop-color:#00495C"
+       id="stop126" /></linearGradient><path
+     style="fill:url(#SVGID_11_);stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     d="m 61.249655,330.25265 c 0.7,3.23 4.623,2.704 4.623,2.704 0,0 14.196,-2.268 16.856,-2.704 2.66,-0.436 5.413,-2.183 4.802,-5.501 -0.611,-3.318 -2.578,-4.334 -4.977,-4.104 -2.143,0.206 -17.811,4.016 -17.811,4.016 0,0 -4.628,0.35 -3.493,5.589 z"
+     id="path128"
+     inkscape:connector-curvature="0" /><linearGradient
+     id="SVGID_12_"
+     gradientUnits="userSpaceOnUse"
+     x1="196.34351"
+     y1="377.0275"
+     x2="197.17529"
+     y2="381.39441"><stop
+       offset="0"
+       style="stop-color:#006178"
+       id="stop131" /><stop
+       offset="1"
+       style="stop-color:#00495C"
+       id="stop133" /></linearGradient><polygon
+     style="fill:url(#SVGID_12_);stroke:#000000;stroke-miterlimit:10"
+     points="186.437,382.911 186.437,379.506 206.978,374.966 207.302,379.506 "
+     id="polygon135"
+     transform="translate(-145.43535,-189.01935)" /><linearGradient
+     id="SVGID_13_"
+     gradientUnits="userSpaceOnUse"
+     x1="152.85809"
+     y1="432.1676"
+     x2="155.30721"
+     y2="445.02539"
+     gradientTransform="translate(-145.43535,-189.01935)"><stop
+       offset="0.0019"
+       style="stop-color:#FFCA94"
+       id="stop138" /><stop
+       offset="1"
+       style="stop-color:#E2A380"
+       id="stop140" /></linearGradient><path
+     style="fill:url(#SVGID_13_);stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     d="m 2.5626545,251.52265 c 0.949,7.344 13.9770005,5.843 12.4400005,-2.53 -1.537,-8.373 -13.8540005,-8.404 -12.4400005,2.53 z"
+     id="path142"
+     inkscape:connector-curvature="0" /><linearGradient
+     id="SVGID_14_"
+     gradientUnits="userSpaceOnUse"
+     x1="150.90849"
+     y1="418.1373"
+     x2="153.3576"
+     y2="430.99509"
+     gradientTransform="translate(-145.43535,-189.01935)"><stop
+       offset="0.0019"
+       style="stop-color:#FFCA94"
+       id="stop145" /><stop
+       offset="1"
+       style="stop-color:#E2A380"
+       id="stop147" /></linearGradient><path
+     style="fill:url(#SVGID_14_);stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     d="m 0.61265455,237.49265 c 0.94899995,7.344 13.97700045,5.843 12.44000045,-2.53 -1.537,-8.373 -13.85300045,-8.404 -12.44000045,2.53 z"
+     id="path149"
+     inkscape:connector-curvature="0" /><linearGradient
+     id="SVGID_15_"
+     gradientUnits="userSpaceOnUse"
+     x1="155.52521"
+     y1="446.19681"
+     x2="157.7338"
+     y2="457.79221"
+     gradientTransform="translate(-145.43535,-189.01935)"><stop
+       offset="0.0019"
+       style="stop-color:#FFCA94"
+       id="stop152" /><stop
+       offset="1"
+       style="stop-color:#E2A380"
+       id="stop154" /></linearGradient><path
+     style="fill:url(#SVGID_15_);stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     d="m 5.7066545,264.72965 c 0.856,6.623 12.6050005,5.269 11.2180005,-2.281 -1.387,-7.55 -12.4920005,-7.58 -11.2180005,2.281 z"
+     id="path156"
+     inkscape:connector-curvature="0" /><linearGradient
+     id="SVGID_16_"
+     gradientUnits="userSpaceOnUse"
+     x1="153.2876"
+     y1="459.8923"
+     x2="155.15581"
+     y2="469.70059"
+     gradientTransform="translate(-145.43535,-189.01935)"><stop
+       offset="0.0019"
+       style="stop-color:#FFCA94"
+       id="stop159" /><stop
+       offset="1"
+       style="stop-color:#E2A380"
+       id="stop161" /></linearGradient><path
+     style="fill:url(#SVGID_16_);stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     d="m 14.738655,269.81365 c 0,0 -14.45200045,0.644 -13.0900005,6.785 1.362,6.141 15.1240005,2.806 15.1240005,2.806 l -2.034,-9.591 z"
+     id="path163"
+     inkscape:connector-curvature="0" /><line
+     style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     x1="103.19666"
+     y1="134.52966"
+     x2="111.07164"
+     y2="138.28766"
+     id="line165" /><line
+     style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     x1="116.44066"
+     y1="121.91666"
+     x2="119.95366"
+     y2="128.63864"
+     id="line167" /><line
+     style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     x1="231.53465"
+     y1="117.39664"
+     x2="227.96065"
+     y2="125.27765"
+     id="line169" /><line
+     style="fill:#ffffff;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     x1="249.61266"
+     y1="127.38266"
+     x2="237.84065"
+     y2="134.52966"
+     id="line171" /><line
+     style="fill:#666666;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     x1="243.72664"
+     y1="311.64764"
+     x2="251.97566"
+     y2="348.16364"
+     id="line173" /><line
+     style="fill:#666666;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     x1="184.01564"
+     y1="310.31366"
+     x2="184.01564"
+     y2="349.90466"
+     id="line175" /><line
+     style="fill:#666666;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     x1="146.45665"
+     y1="311.64764"
+     x2="143.12267"
+     y2="350.95166"
+     id="line177" /><line
+     style="fill:#666666;stroke:#000000;stroke-width:1;stroke-miterlimit:10"
+     x1="218.07564"
+     y1="311.29565"
+     x2="222.05864"
+     y2="348.93066"
+     id="line179" /></svg>
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/Mail.svg b/test/NUITestSample/NUIXAMLTestSample/res/images/Mail.svg
new file mode 100755 (executable)
index 0000000..63fdd1f
--- /dev/null
@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   version="1.1"
+   id="Layer_1"
+   x="0px"
+   y="0px"
+   viewBox="0 0 195.689 195.688"
+   xml:space="preserve"
+   inkscape:version="0.48.4 r9939"
+   width="100%"
+   height="100%"
+   sodipodi:docname="Mail.svg"><metadata
+     id="metadata68"><rdf:RDF><cc:Work
+         rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
+     id="defs66" /><sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1508"
+     inkscape:window-height="982"
+     id="namedview64"
+     showgrid="false"
+     inkscape:zoom="8.970293"
+     inkscape:cx="97.257987"
+     inkscape:cy="98.235009"
+     inkscape:window-x="75"
+     inkscape:window-y="34"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="Layer_1"
+     fit-margin-top="0"
+     fit-margin-left="0"
+     fit-margin-right="0"
+     fit-margin-bottom="0" /><g
+     id="g3"
+     transform="translate(-200.38201,-323.492)"><linearGradient
+       id="SVGID_1_"
+       gradientUnits="userSpaceOnUse"
+       x1="298.22559"
+       y1="324.43469"
+       x2="298.22559"
+       y2="518.20068"><stop
+         offset="0"
+         style="stop-color:#FFFFFF;stop-opacity:0.7"
+         id="stop6" /><stop
+         offset="0.9987"
+         style="stop-color:#D8D9D8;stop-opacity:0.7"
+         id="stop8" /></linearGradient><path
+       style="fill:url(#SVGID_1_);fill-rule:evenodd"
+       d="m 210.005,518.68 c -5.031,0 -9.124,-4.093 -9.124,-9.123 v -176.44 c 0,-5.031 4.093,-9.124 9.124,-9.124 h 176.441 c 5.03,0 9.123,4.093 9.123,9.124 v 176.44 c 0,5.03 -4.093,9.123 -9.123,9.123 H 210.005 z"
+       id="path10"
+       inkscape:connector-curvature="0" /><path
+       style="fill:#d8d8d7"
+       d="m 386.446,324.492 c 4.755,0 8.624,3.868 8.624,8.624 v 176.441 c 0,4.755 -3.868,8.623 -8.624,8.623 h -176.44 c -4.755,0 -8.624,-3.868 -8.624,-8.623 V 333.116 c 0,-4.755 3.868,-8.624 8.624,-8.624 h 176.44 m 0,-1 h -176.44 c -5.315,0 -9.624,4.309 -9.624,9.624 v 176.441 c 0,5.315 4.309,9.623 9.624,9.623 h 176.441 c 5.315,0 9.624,-4.308 9.624,-9.623 V 333.116 c -0.001,-5.315 -4.31,-9.624 -9.625,-9.624 l 0,0 z"
+       id="path12"
+       inkscape:connector-curvature="0" /></g><path
+     style="fill:#e1dfe2;fill-rule:evenodd"
+     d="M 43.775991,58.85 H 148.48299 c 3.322,0 6.015,2.693 6.015,6.015 v 81.128 c 0,3.322 -2.693,6.015 -6.015,6.015 H 43.775991 c -3.322,0 -6.015,-2.693 -6.015,-6.015 V 64.865 c 0,-3.323 2.693,-6.015 6.015,-6.015 z"
+     id="path14"
+     inkscape:connector-curvature="0" /><g
+     id="g16"
+     transform="translate(-200.38201,-323.492)"><linearGradient
+       id="SVGID_2_"
+       gradientUnits="userSpaceOnUse"
+       x1="296.51169"
+       y1="381.51559"
+       x2="296.51169"
+       y2="474.0015"><stop
+         offset="0.0032"
+         style="stop-color:#E6C71E"
+         id="stop19" /><stop
+         offset="1"
+         style="stop-color:#E1BB23"
+         id="stop21" /></linearGradient><path
+       style="fill:url(#SVGID_2_);fill-rule:evenodd"
+       d="m 244.158,474.999 c -3.041,0 -5.515,-2.474 -5.515,-5.515 v -82.699 c 0,-3.041 2.474,-5.515 5.515,-5.515 h 104.707 c 3.041,0 5.515,2.474 5.515,5.515 v 82.699 c 0,3.041 -2.474,5.515 -5.515,5.515 H 244.158 z"
+       id="path23"
+       inkscape:connector-curvature="0" /><path
+       style="fill:#d6b429"
+       d="m 348.865,381.771 c 2.765,0 5.015,2.25 5.015,5.015 v 82.699 c 0,2.765 -2.25,5.015 -5.015,5.015 H 244.158 c -2.765,0 -5.015,-2.25 -5.015,-5.015 v -82.699 c 0,-2.765 2.25,-5.015 5.015,-5.015 h 104.707 m 0,-1 H 244.158 c -3.322,0 -6.015,2.693 -6.015,6.015 v 82.699 c 0,3.322 2.693,6.015 6.015,6.015 h 104.707 c 3.322,0 6.015,-2.693 6.015,-6.015 v -82.699 c 0,-3.322 -2.693,-6.015 -6.015,-6.015 l 0,0 z"
+       id="path25"
+       inkscape:connector-curvature="0" /></g><path
+     style="fill:#c9af2d;fill-rule:evenodd"
+     d="m 39.744991,60.112 -1.026,1.112 58.106,56.862 v -2.652 l -57.08,-55.322 z"
+     id="path27"
+     inkscape:connector-curvature="0" /><path
+     style="fill:#9e8831;fill-rule:evenodd"
+     d="m 39.867991,60.294 0.589,-0.666 56.368,55.16 v 0.646 l -56.957,-55.14 z"
+     id="path29"
+     inkscape:connector-curvature="0" /><polygon
+     style="fill:#eecf32;fill-rule:evenodd"
+     points="239.625,471.413 240.152,471.976 296.94,421.926 296.94,420.907 "
+     id="polygon31"
+     transform="translate(-200.38201,-323.492)" /><path
+     style="fill:#c9af2d;fill-rule:evenodd"
+     d="m 97.159431,118.6434 56.403999,-56.915 -1.09844,-1.5594 -55.638999,55.265 0,2.652 z"
+     id="path33"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="cccccc" /><path
+     style="fill:#968330;fill-rule:evenodd"
+     d="m 96.824991,114.788 55.097999,-55.103 0.542,0.485 -55.638999,55.265 v -0.647 z"
+     id="path35"
+     inkscape:connector-curvature="0" /><path
+     style="fill:#9e8831;fill-rule:evenodd"
+     d="m 148.48299,57.119 -104.706999,0 c -4.82917,1.06976 -6.015,3.82683 -6.015,7.746 0,-3.322 2.693,-6.015 6.015,-6.015 l 104.706999,0 c 3.322,0 6.015,2.693 6.015,6.015 l 0,-1.731 c 0,-3.322 -2.693,-6.015 -6.015,-6.015 z"
+     id="path37"
+     inkscape:connector-curvature="0"
+     sodipodi:nodetypes="sccsscss" /><path
+     style="fill:#bba330;fill-rule:evenodd"
+     d="m 38.470991,146.961 c 0,0 0.246,0.5 0.772,0.959 l 57.316,-50.505 0.02,-1.375 -58.108,50.921 z"
+     id="path39"
+     inkscape:connector-curvature="0" /><path
+     style="fill:#bba330;fill-rule:evenodd"
+     d="m 96.557991,95.891 v 1.524 l 55.750999,51.174 c 0.466,-0.33 0.768,-0.716 0.768,-0.716 L 96.557991,95.891 z"
+     id="path41"
+     inkscape:connector-curvature="0" /><path
+     style="fill:#eecf32;fill-rule:evenodd"
+     d="M 152.30999,148.589 96.558991,97.415 v 0.761 l 55.114999,50.925 c 0.32,-0.151 0.213,-0.212 0.636,-0.512 z"
+     id="path43"
+     inkscape:connector-curvature="0" /><path
+     style="fill:#ac9431;fill-rule:evenodd"
+     d="m 88.629991,88.999 c -3.192,1.17 -4.69,6.312 -6.235,7.829 -1.544,1.517 -4.703,1.544 -6.273,5.029 -1.57,3.485 1.75,4.183 1.675,7.319 -0.076,3.136 -2.91,3.923 -2.368,7.185 0.541,3.262 3.454,2.5 4.846,4.564 1.391,2.064 -0.81,5.496 2.281,6.831 3.091,1.335 5.185,-0.25 8.327,0.084 3.142,0.334 2.986,4.66 7.796,4.18 5.496999,-0.548 4.266999,-4.183 7.267999,-5.811 3.001,-1.628 6.925,1.166 8.397,-2.402 1.472,-3.568 -0.258,-5.944 0.469,-9.521 0.727,-3.577 4.949,-4.005 4.769,-7.767 -0.18,-3.762 -4.779,-6.555 -7.659,-7.681 -1.814,-0.709 -0.625,-7.017 -4.299,-8.084 -3.673,-1.067 -5.597,0.229 -10.023999,0.635 -4.428,0.407 -3.247,-4.488 -8.97,-2.39 z"
+     id="path45"
+     inkscape:connector-curvature="0" /><g
+     id="g47"
+     transform="translate(-200.38201,-323.492)"><linearGradient
+       id="SVGID_3_"
+       gradientUnits="userSpaceOnUse"
+       x1="297.85461"
+       y1="413.6799"
+       x2="297.85461"
+       y2="452.90948"><stop
+         offset="0"
+         style="stop-color:#F9F3D9"
+         id="stop50" /><stop
+         offset="1"
+         style="stop-color:#EAE3CA"
+         id="stop52" /></linearGradient><path
+       style="fill:url(#SVGID_3_);fill-rule:evenodd"
+       d="m 298.342,453.3 c -2.136,0 -3.101,-1.126 -4.034,-2.215 -0.778,-0.908 -1.583,-1.848 -3.018,-2.001 -0.322,-0.034 -0.633,-0.049 -0.936,-0.049 -0.919,0 -1.754,0.136 -2.561,0.267 -0.764,0.124 -1.484,0.241 -2.238,0.241 -0.892,0 -1.693,-0.166 -2.52,-0.523 -1.686,-0.729 -1.654,-2.082 -1.617,-3.649 0.025,-1.077 0.051,-2.191 -0.556,-3.092 -0.607,-0.901 -1.469,-1.292 -2.303,-1.669 -1.183,-0.535 -2.205,-0.997 -2.503,-2.797 -0.275,-1.657 0.375,-2.643 1.063,-3.687 0.625,-0.949 1.272,-1.931 1.309,-3.452 0.034,-1.415 -0.597,-2.379 -1.154,-3.229 -0.744,-1.137 -1.387,-2.118 -0.542,-3.992 0.985,-2.186 2.632,-2.966 4.084,-3.653 0.806,-0.382 1.567,-0.742 2.136,-1.301 0.559,-0.549 1.086,-1.504 1.698,-2.61 1.089,-1.973 2.445,-4.427 4.448,-5.162 0.936,-0.343 1.715,-0.51 2.382,-0.51 1.299,0 1.967,0.656 2.675,1.35 0.759,0.745 1.619,1.589 3.318,1.589 0.167,0 0.344,-0.008 0.53,-0.025 1.51,-0.139 2.74,-0.381 3.824,-0.596 1.225,-0.242 2.282,-0.451 3.415,-0.451 0.894,0 1.749,0.127 2.693,0.402 2.02,0.587 2.468,2.9 2.862,4.941 0.291,1.5 0.542,2.794 1.414,3.136 2.703,1.057 7.325,3.818 7.5,7.46 0.092,1.901 -1.027,2.912 -2.212,3.982 -1.081,0.977 -2.199,1.986 -2.552,3.724 -0.326,1.603 -0.171,2.965 -0.021,4.281 0.189,1.669 0.369,3.246 -0.435,5.193 -0.609,1.478 -1.646,1.78 -3.018,1.78 -0.382,0 -0.779,-0.023 -1.184,-0.047 -0.431,-0.024 -0.869,-0.05 -1.309,-0.05 -1.16,0 -2.017,0.184 -2.774,0.595 -1.227,0.665 -1.782,1.648 -2.319,2.599 -0.832,1.471 -1.617,2.86 -4.854,3.183 -0.242,0.025 -0.472,0.037 -0.691,0.037 z"
+       id="path54"
+       inkscape:connector-curvature="0" /><path
+       style="fill:#fffcf3"
+       d="m 291.481,410.466 c 1.197,0 1.8,0.593 2.499,1.279 0.793,0.778 1.692,1.661 3.493,1.661 0.175,0 0.359,-0.008 0.553,-0.026 1.523,-0.14 2.759,-0.384 3.849,-0.599 1.212,-0.239 2.258,-0.446 3.366,-0.446 0.869,0 1.703,0.125 2.623,0.392 1.873,0.544 2.306,2.778 2.688,4.749 0.305,1.572 0.568,2.93 1.568,3.321 2.647,1.035 7.173,3.725 7.341,7.24 0.085,1.784 -0.941,2.711 -2.13,3.785 -1.059,0.957 -2.26,2.041 -2.629,3.859 -0.334,1.642 -0.176,3.023 -0.024,4.36 0.186,1.636 0.362,3.181 -0.417,5.07 -0.558,1.354 -1.48,1.626 -2.787,1.626 -0.373,0 -0.76,-0.022 -1.17,-0.046 -0.43,-0.025 -0.874,-0.051 -1.323,-0.051 -1.204,0 -2.096,0.193 -2.893,0.625 -1.29,0.7 -1.863,1.714 -2.418,2.695 -0.833,1.474 -1.553,2.748 -4.661,3.058 -0.23,0.023 -0.455,0.035 -0.667,0.035 -2.022,0 -2.907,-1.033 -3.845,-2.128 -0.81,-0.946 -1.648,-1.923 -3.181,-2.087 -0.318,-0.034 -0.633,-0.05 -0.962,-0.05 -0.94,0 -1.784,0.137 -2.601,0.27 -0.753,0.122 -1.464,0.238 -2.198,0.238 -0.857,0 -1.626,-0.16 -2.421,-0.503 -1.457,-0.629 -1.507,-1.707 -1.466,-3.414 0.026,-1.116 0.053,-2.271 -0.598,-3.238 -0.647,-0.96 -1.582,-1.383 -2.408,-1.757 -1.164,-0.527 -2.083,-0.943 -2.359,-2.61 -0.259,-1.561 0.336,-2.463 1.025,-3.508 0.615,-0.933 1.312,-1.99 1.35,-3.584 0.036,-1.493 -0.618,-2.491 -1.195,-3.373 -0.733,-1.12 -1.312,-2.004 -0.524,-3.753 0.947,-2.102 2.48,-2.828 3.963,-3.53 0.826,-0.391 1.606,-0.76 2.205,-1.348 0.585,-0.575 1.121,-1.545 1.741,-2.668 1.069,-1.936 2.4,-4.346 4.315,-5.048 0.909,-0.334 1.66,-0.496 2.298,-0.496 m 0,-0.5 c -0.651,0 -1.451,0.152 -2.468,0.525 -3.192,1.17 -4.69,6.312 -6.235,7.829 -1.544,1.517 -4.703,1.544 -6.273,5.029 -1.57,3.485 1.75,4.183 1.675,7.319 -0.076,3.136 -2.91,3.923 -2.368,7.185 0.541,3.262 3.454,2.5 4.846,4.564 1.391,2.064 -0.81,5.496 2.281,6.831 0.947,0.409 1.801,0.544 2.619,0.544 1.587,0 3.044,-0.507 4.799,-0.507 0.294,0 0.597,0.014 0.91,0.048 2.977,0.317 2.994,4.217 7.079,4.217 0.226,0 0.465,-0.012 0.717,-0.037 5.497,-0.548 4.267,-4.183 7.268,-5.811 0.837,-0.454 1.747,-0.564 2.655,-0.564 0.853,0 1.704,0.097 2.493,0.097 1.382,0 2.574,-0.298 3.249,-1.935 1.472,-3.568 -0.258,-5.944 0.469,-9.521 0.727,-3.577 4.949,-4.005 4.769,-7.767 -0.18,-3.762 -4.779,-6.555 -7.659,-7.681 -1.814,-0.709 -0.625,-7.017 -4.299,-8.084 -1.027,-0.298 -1.917,-0.412 -2.763,-0.412 -2.181,0 -4.071,0.755 -7.261,1.047 -0.178,0.016 -0.347,0.024 -0.507,0.024 -3.128,0 -3.132,-2.939 -5.996,-2.94 l 0,0 z"
+       id="path56"
+       inkscape:connector-curvature="0" /></g><g
+     id="g58"
+     transform="translate(-200.38201,-323.492)"><path
+       style="fill:#2c2c2c"
+       d="m 295.754,427.07 c -0.707,0.492 -1.312,1.11 -1.816,1.854 -0.506,0.744 -0.9,1.554 -1.189,2.43 -0.287,0.876 -0.432,1.71 -0.432,2.502 0,1.008 0.289,1.842 0.863,2.502 0.576,0.66 1.32,0.99 2.232,0.99 0.793,0 1.523,-0.258 2.197,-0.774 0.67,-0.516 1.26,-1.163 1.764,-1.943 0.504,-0.78 0.9,-1.614 1.188,-2.502 0.288,-0.888 0.432,-1.704 0.432,-2.448 0,-0.433 -0.078,-0.852 -0.234,-1.26 -0.156,-0.408 -0.371,-0.762 -0.646,-1.062 -0.277,-0.3 -0.59,-0.546 -0.938,-0.738 -0.348,-0.191 -0.713,-0.288 -1.098,-0.288 -0.84,-0.001 -1.614,0.246 -2.323,0.737 z m 6.157,8.676 c -0.084,0.324 -0.125,0.618 -0.125,0.883 0,0.744 0.287,1.115 0.863,1.115 0.553,0 1.121,-0.252 1.711,-0.756 0.588,-0.504 1.121,-1.151 1.602,-1.943 0.479,-0.792 0.875,-1.68 1.188,-2.664 0.313,-0.984 0.469,-1.956 0.469,-2.916 0,-1.416 -0.271,-2.7 -0.811,-3.853 -0.541,-1.151 -1.266,-2.13 -2.178,-2.934 -0.912,-0.804 -1.951,-1.422 -3.115,-1.854 -1.164,-0.432 -2.381,-0.647 -3.652,-0.647 -1.537,0 -2.971,0.306 -4.303,0.918 -1.332,0.611 -2.49,1.446 -3.475,2.502 -0.984,1.057 -1.758,2.28 -2.322,3.672 -0.562,1.393 -0.846,2.88 -0.846,4.464 0,1.608 0.295,3.108 0.883,4.5 0.588,1.393 1.391,2.599 2.412,3.618 1.02,1.021 2.201,1.824 3.545,2.412 1.344,0.588 2.773,0.882 4.285,0.882 1.727,0 3.389,-0.396 4.986,-1.188 1.596,-0.792 2.908,-1.848 3.941,-3.168 h 2.268 c -0.576,1.009 -1.271,1.902 -2.088,2.683 -0.817,0.781 -1.709,1.439 -2.682,1.98 -0.973,0.54 -2.01,0.948 -3.115,1.225 -1.104,0.275 -2.23,0.414 -3.383,0.414 -1.896,0 -3.666,-0.349 -5.311,-1.044 -1.645,-0.696 -3.072,-1.65 -4.283,-2.862 -1.213,-1.212 -2.166,-2.64 -2.863,-4.284 -0.695,-1.644 -1.043,-3.426 -1.043,-5.346 0,-1.848 0.354,-3.582 1.062,-5.202 0.707,-1.62 1.668,-3.036 2.879,-4.248 1.213,-1.212 2.629,-2.166 4.248,-2.862 1.621,-0.695 3.342,-1.044 5.166,-1.044 1.656,0 3.229,0.276 4.717,0.828 1.488,0.553 2.789,1.314 3.906,2.286 1.115,0.972 1.998,2.137 2.645,3.492 0.648,1.355 0.973,2.85 0.973,4.481 0,1.561 -0.283,2.982 -0.846,4.267 -0.564,1.284 -1.266,2.382 -2.105,3.294 -0.842,0.912 -1.754,1.62 -2.736,2.124 -0.984,0.504 -1.896,0.756 -2.736,0.756 -0.625,0 -1.152,-0.192 -1.584,-0.576 -0.432,-0.384 -0.672,-0.972 -0.721,-1.764 h -0.107 c -0.553,0.624 -1.213,1.182 -1.98,1.674 -0.767,0.492 -1.596,0.738 -2.484,0.738 -0.768,0 -1.469,-0.15 -2.105,-0.45 -0.636,-0.3 -1.176,-0.702 -1.619,-1.206 -0.445,-0.504 -0.793,-1.104 -1.045,-1.8 -0.252,-0.696 -0.377,-1.44 -0.377,-2.232 0,-1.248 0.203,-2.484 0.611,-3.708 0.408,-1.224 0.979,-2.315 1.711,-3.276 0.73,-0.959 1.619,-1.739 2.662,-2.34 1.045,-0.6 2.203,-0.899 3.475,-0.899 0.84,0 1.621,0.222 2.34,0.666 0.721,0.444 1.283,1.206 1.693,2.286 l 0.826,-2.269 h 2.27 l -3.025,10.224 c -0.099,0.309 -0.188,0.628 -0.272,0.951 z"
+       id="path60"
+       inkscape:connector-curvature="0" /></g><path
+     style="fill:#e1dfe2;fill-rule:evenodd"
+     d="M 148.48299,149.755 H 43.775991 c -3.322,0 -6.015,-2.693 -6.015,-6.015 v 2.253 c 0,3.322 2.693,6.015 6.015,6.015 H 148.48299 c 3.322,0 6.015,-2.693 6.015,-6.015 v -2.253 c 0,3.322 -2.693,6.015 -6.015,6.015 z"
+     id="path62"
+     inkscape:connector-curvature="0" /></svg>
\ No newline at end of file
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/World.svg b/test/NUITestSample/NUIXAMLTestSample/res/images/World.svg
new file mode 100755 (executable)
index 0000000..91aef13
--- /dev/null
@@ -0,0 +1,284 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   version="1.1"
+   id="Layer_1"
+   x="0px"
+   y="0px"
+   viewBox="0 0 195.687 195.688"
+   xml:space="preserve"
+   inkscape:version="0.48.4 r9939"
+   width="100%"
+   height="100%"
+   sodipodi:docname="World.svg"><metadata
+     id="metadata129"><rdf:RDF><cc:Work
+         rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
+     id="defs127" /><sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1199"
+     inkscape:window-height="896"
+     id="namedview125"
+     showgrid="false"
+     inkscape:zoom="6.342955"
+     inkscape:cx="97.837987"
+     inkscape:cy="98.236009"
+     inkscape:window-x="75"
+     inkscape:window-y="34"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="Layer_1"
+     fit-margin-top="0"
+     fit-margin-left="0"
+     fit-margin-right="0"
+     fit-margin-bottom="0" /><g
+     id="g3"
+     transform="translate(-199.80201,-323.493)"><linearGradient
+       id="SVGID_1_"
+       gradientUnits="userSpaceOnUse"
+       x1="297.64529"
+       y1="324.43469"
+       x2="297.64529"
+       y2="518.20172"><stop
+         offset="0"
+         style="stop-color:#FFFFFF;stop-opacity:0.7"
+         id="stop6" /><stop
+         offset="0.9987"
+         style="stop-color:#D8D9D8;stop-opacity:0.7"
+         id="stop8" /></linearGradient><path
+       style="fill:url(#SVGID_1_);fill-rule:evenodd"
+       d="m 209.425,518.681 c -5.031,0 -9.124,-4.093 -9.124,-9.124 v -176.44 c 0,-5.031 4.093,-9.124 9.124,-9.124 h 176.44 c 5.031,0 9.124,4.093 9.124,9.124 v 176.44 c 0,5.031 -4.093,9.124 -9.124,9.124 h -176.44 z"
+       id="path10"
+       inkscape:connector-curvature="0" /><path
+       style="fill:#d8d8d7"
+       d="m 385.865,324.493 c 4.755,0 8.623,3.868 8.623,8.624 v 176.441 c 0,4.755 -3.868,8.623 -8.623,8.623 h -176.44 c -4.755,0 -8.623,-3.868 -8.623,-8.623 V 333.116 c 0,-4.755 3.868,-8.624 8.623,-8.624 h 176.44 m 0,-0.999 h -176.44 c -5.315,0 -9.623,4.309 -9.623,9.624 v 176.441 c 0,5.315 4.309,9.623 9.623,9.623 h 176.441 c 5.315,0 9.623,-4.309 9.623,-9.623 V 333.116 c 0,-5.315 -4.309,-9.623 -9.624,-9.623 l 0,0 z"
+       id="path12"
+       inkscape:connector-curvature="0" /></g><g
+     id="g14"
+     transform="translate(-199.80201,-323.493)"><linearGradient
+       id="SVGID_2_"
+       gradientUnits="userSpaceOnUse"
+       x1="295.34409"
+       y1="366.51251"
+       x2="295.34409"
+       y2="477.05319"><stop
+         offset="0"
+         style="stop-color:#537FAF"
+         id="stop17" /><stop
+         offset="1"
+         style="stop-color:#436997"
+         id="stop19" /></linearGradient><path
+       style="fill:url(#SVGID_2_);fill-rule:evenodd"
+       d="m 295.344,365.432 c 30.647,0 55.492,24.845 55.492,55.492 0,30.647 -24.845,55.492 -55.492,55.492 -30.647,0 -55.492,-24.845 -55.492,-55.492 0,-30.647 24.845,-55.492 55.492,-55.492 z"
+       id="path21"
+       inkscape:connector-curvature="0" /></g><g
+     id="g23"
+     transform="translate(-199.80201,-323.493)"><path
+       style="fill:#3d5e86;fill-rule:evenodd"
+       d="m 336.697,448.9 c -1.4466,-17.74544 -6.79574,8.99663 -17.693,-19.639 -0.105,-0.613 -0.158,-1.2 -0.187,-1.775 -0.053,0.99 -0.003,2.033 0.187,3.145 8.478,23.495 15.228,8.439 17.693,18.269 z"
+       id="path25"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="ccccc" /><path
+       style="fill:#3d5e86;fill-rule:evenodd"
+       d="m 322.35931,469.75845 c 11.4669,-11.09759 23.42214,-27.18821 22.63386,-47.49545 -0.009,-0.23982 5.82483,-0.446 5.82183,-0.686 0.33349,21.63904 -14.73709,38.28161 -28.45569,48.18145 z"
+       id="path27"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="cscc" /></g><path
+     style="fill:#3d5e86;fill-rule:evenodd"
+     d="m 142.99999,70.832 c -0.788,3.617 -1.577,7.235 -2.365,10.852 -4.961,-1.349 -8.753,1.731 -13.289,3.095 -0.653,-2.785 -1.305,-5.572 -1.958,-8.357 -0.113,-0.024 -0.223,-0.043 -0.338,-0.074 0.765,3.266 1.531,6.534 2.296,9.801 4.537,-1.363 8.328,-4.444 13.289,-3.095 0.788,-3.617 1.577,-7.235 2.365,-10.852 0.387,-0.052 0.774,-0.104 1.161,-0.156 -0.238,-0.431 -0.502,-0.844 -0.75,-1.268 -0.137,0.017 -0.274,0.035 -0.411,0.054 z"
+     id="path29"
+     inkscape:connector-curvature="0" /><g
+     id="g31"
+     transform="translate(-199.80201,-323.493)"><path
+       style="fill:#3d5e86;fill-rule:evenodd"
+       d="m 329.068,380.749 c -0.243,-1.017 -0.486,-2.033 -0.729,-3.05 -0.135,-0.1 -0.264,-0.207 -0.4,-0.306 0.303,1.267 0.606,2.535 0.909,3.802 0.072,-0.148 0.146,-0.297 0.22,-0.446 z"
+       id="path33"
+       inkscape:connector-curvature="0" /><path
+       style="fill:#3d5e86;fill-rule:evenodd"
+       d="m 327.22,389.512 c -0.489,-0.227 -0.978,-0.455 -1.468,-0.682 -0.183,0.371 -0.367,0.742 -0.55,1.114 0.673,0.313 1.345,0.625 2.018,0.938 3.634,-0.915 5.053,-5.373 4.871,-9.558 -0.155,3.741 -1.633,7.372 -4.871,8.188 z"
+       id="path35"
+       inkscape:connector-curvature="0" /></g><path
+     style="fill:#3d5e86;fill-rule:evenodd"
+     d="m 123.30399,61.978 c -0.543,-0.236 -1.087,-0.471 -1.63,-0.707 -0.179,0.379 -0.358,0.758 -0.537,1.136 0.722,0.313 1.445,0.627 2.167,0.94 0.365,-1.137 0.73,-2.275 1.095,-3.413 -0.129,-0.055 -0.257,-0.111 -0.386,-0.166 -0.236,0.737 -0.473,1.474 -0.709,2.21 z"
+     id="path37"
+     inkscape:connector-curvature="0" /><g
+     id="g39"
+     transform="translate(-199.80201,-323.493)"><path
+       style="fill:#3d5e86;fill-rule:evenodd"
+       d="m 272.087,393.816 c 0.93,-5.339 1.861,-10.68 2.792,-16.019 -0.025,-0.167 -0.072,-0.388 -0.129,-0.63 -0.93,5.334 -1.859,10.669 -2.789,16.003 0.037,0.217 0.085,0.431 0.126,0.646 z"
+       id="path41"
+       inkscape:connector-curvature="0" /><path
+       style="fill:#3d5e86;fill-rule:evenodd"
+       d="m 260.998,417.547 c 0,0.424 0.044,0.842 0.117,1.256 0.455,-0.442 0.911,-0.885 1.366,-1.327 1.956,0 13.993,0.484 15.897,1.198 0,-0.465 -0.021,-0.926 -0.05,-1.385 -2.041,-0.705 -13.906,-1.182 -15.847,-1.182 -0.495,0.479 -0.989,0.96 -1.483,1.44 z"
+       id="path43"
+       inkscape:connector-curvature="0" /><path
+       style="fill:#3d5e86;fill-rule:evenodd"
+       d="m 271.142,443.257 c -0.062,0.322 -0.109,0.664 -0.134,1.038 5.203,13.429 12.196,14.9 12.423,28.805 0.219,-15.067 -6.933,-16.306 -12.289,-29.843 z"
+       id="path45"
+       inkscape:connector-curvature="0" /><path
+       style="fill:#3d5e86;fill-rule:evenodd"
+       d="m 276.572,434.507 c -0.064,-0.093 -8.841,-3.054 -12.462,-5.359 -7.139,-4.544 -14.035,-13.956 -20.542,-26.81 -0.1,0.258 -0.211,0.51 -0.306,0.77 6.597,13.166 13.598,22.794 20.849,27.409 3.571,2.273 12.138,5.178 12.438,5.348 0.136,-0.364 0.169,-0.795 0.023,-1.358 z"
+       id="path49"
+       inkscape:connector-curvature="0" /></g><g
+     id="g51"
+     transform="translate(-217.32904,-322.54707)"><linearGradient
+       id="SVGID_3_"
+       gradientUnits="userSpaceOnUse"
+       x1="334.81161"
+       y1="368.34589"
+       x2="334.81161"
+       y2="475.01251"
+       gradientTransform="translate(17.527034,-0.89641334)"><stop
+         offset="0"
+         style="stop-color:#D1DBE8"
+         id="stop54" /><stop
+         offset="1"
+         style="stop-color:#C4CDDC"
+         id="stop56" /></linearGradient><path
+       style="fill:url(#SVGID_3_);fill-rule:evenodd"
+       d="m 368.20538,422.0761 c 0,-4.224 -0.33035,-10.38051 -1.22335,-14.33451 -9.023,1.521 -33.199,4.524 -30.451,20.622 8.53,23.641 15.312,8.248 17.739,18.45 0.38,4.725 -6.01,12.864 -10.126,19.052 14.62,-9.993 24.06135,-24.74349 24.06135,-43.78949 z"
+       id="path58"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="sccccs" /></g><g
+     id="g60"
+     transform="translate(-199.80201,-323.493)"><linearGradient
+       id="SVGID_4_"
+       gradientUnits="userSpaceOnUse"
+       x1="334.4075"
+       y1="368.34589"
+       x2="334.4075"
+       y2="475.01251"><stop
+         offset="0"
+         style="stop-color:#D1DBE8"
+         id="stop63" /><stop
+         offset="1"
+         style="stop-color:#C4CDDC"
+         id="stop65" /></linearGradient><path
+       style="fill:url(#SVGID_4_);fill-rule:evenodd"
+       d="m 340.438,405.177 c 0.788,-3.617 1.577,-7.235 2.365,-10.852 0.387,-0.052 0.774,-0.104 1.161,-0.156 -2.168,-3.931 -4.798,-7.569 -7.818,-10.845 -1.648,5.677 -4.173,17.083 -11.293,15.147 0.765,3.266 1.531,6.534 2.296,9.801 4.536,-1.364 8.327,-4.444 13.289,-3.095 z"
+       id="path67"
+       inkscape:connector-curvature="0" /></g><g
+     id="g69"
+     transform="translate(-199.80201,-323.493)"><linearGradient
+       id="SVGID_5_"
+       gradientUnits="userSpaceOnUse"
+       x1="328.65619"
+       y1="368.34589"
+       x2="328.65619"
+       y2="475.01251"><stop
+         offset="0"
+         style="stop-color:#D1DBE8"
+         id="stop72" /><stop
+         offset="1"
+         style="stop-color:#C4CDDC"
+         id="stop74" /></linearGradient><path
+       style="fill:url(#SVGID_5_);fill-rule:evenodd"
+       d="m 329.068,380.749 c -1.288,2.608 -2.577,5.217 -3.865,7.824 0.673,0.313 1.345,0.625 2.018,0.938 3.816,-0.96 5.194,-5.829 4.836,-10.184 -1.319,-1.165 -2.692,-2.267 -4.118,-3.304 0.376,1.576 0.752,3.151 1.129,4.726 z"
+       id="path76"
+       inkscape:connector-curvature="0" /></g><linearGradient
+     id="SVGID_6_"
+     gradientUnits="userSpaceOnUse"
+     x1="322.56961"
+     y1="368.34589"
+     x2="322.56961"
+     y2="475.01251"
+     gradientTransform="translate(-199.80201,-323.493)"><stop
+       offset="0"
+       style="stop-color:#D1DBE8"
+       id="stop79" /><stop
+       offset="1"
+       style="stop-color:#C4CDDC"
+       id="stop81" /></linearGradient><path
+     style="fill:url(#SVGID_6_);fill-rule:evenodd"
+     d="m 122.55399,58.04 c -0.472,1 -0.945,1.999 -1.417,2.999 0.722,0.313 1.445,0.627 2.168,0.94 0.365,-1.137 0.73,-2.275 1.095,-3.413 -0.603,-0.26 -1.206,-0.52 -1.809,-0.78 -0.013,0.084 -0.025,0.169 -0.037,0.254 z"
+     id="path83"
+     inkscape:connector-curvature="0" /><g
+     id="g85"
+     transform="translate(-199.80201,-323.493)"><linearGradient
+       id="SVGID_7_"
+       gradientUnits="userSpaceOnUse"
+       x1="272.83749"
+       y1="368.69739"
+       x2="272.83749"
+       y2="474.75171"><stop
+         offset="0"
+         style="stop-color:#D1DBE8"
+         id="stop88" /><stop
+         offset="1"
+         style="stop-color:#C4CDDC"
+         id="stop90" /></linearGradient><path
+       style="fill:url(#SVGID_7_);fill-rule:evenodd"
+       d="m 289.565,475.865 c -1.934,-0.202 -3.929,-0.524 -5.938,-0.96 0.533,-10.776 -2.327,-14.988 -5.941,-20.313 -2.057,-3.029 -4.387,-6.462 -6.424,-11.704 0.232,-3.271 1.997,-4.275 3.555,-5.163 1.275,-0.727 2.479,-1.413 1.998,-3.28 -0.096,-0.164 -0.096,-0.164 -1.222,-0.578 -2.546,-0.935 -8.511,-3.123 -11.348,-4.93 -6.877,-4.377 -13.845,-13.534 -20.711,-27.213 5.141,-13.864 15.829,-25.245 29.361,-31.274 0.786,2.477 1.591,5.021 1.737,6.015 l -1.458,8.292 -1.458,8.372 c 0.583,3.561 1.838,6.961 3.052,10.25 1.614,4.371 3.281,8.887 3.357,13.59 -2.776,-0.693 -14.013,-1.111 -15.644,-1.111 h -0.102 l -1.631,1.585 v 0.105 c 0,6.491 8.881,11.957 14.996,12.867 0.383,0.058 0.781,0.086 1.182,0.086 1.528,0 3.001,-0.416 4.425,-0.817 1.436,-0.405 2.92,-0.824 4.474,-0.824 0.413,0 0.824,0.03 1.22,0.089 13.326,1.986 15.562,6.703 15.026,14.712 -2.567,9.616 -8.209,22.441 -11.942,30.928 l -0.564,1.276 z"
+       id="path92"
+       inkscape:connector-curvature="0" /><path
+       style="fill:#f5fbfd"
+       d="m 272.741,370.792 c 0.736,2.319 1.466,4.644 1.632,5.632 l -2.904,16.661 -0.015,0.084 0.014,0.084 c 0.587,3.499 1.847,6.911 3.065,10.21 1.57,4.253 3.191,8.644 3.335,13.193 -3.276,-0.657 -13.81,-1.05 -15.387,-1.05 h -0.203 l -0.146,0.141 -0.837,0.813 -0.646,0.627 -0.152,0.147 v 0.211 c 0,4.531 5.786,11.712 15.208,13.115 0.395,0.059 0.806,0.089 1.22,0.089 1.563,0 3.053,-0.42 4.493,-0.827 1.419,-0.4 2.886,-0.814 4.405,-0.814 0.401,0 0.799,0.029 1.183,0.086 6.37,0.949 10.356,2.524 12.543,4.956 1.889,2.101 2.57,4.926 2.274,9.443 -2.575,9.637 -8.198,22.421 -11.921,30.884 l -0.492,1.119 c -1.796,-0.194 -3.65,-0.493 -5.523,-0.892 0.49,-10.702 -2.377,-14.926 -5.995,-20.255 -2.042,-3.008 -4.355,-6.415 -6.378,-11.602 0.24,-3.093 1.931,-4.057 3.425,-4.908 1.301,-0.741 2.646,-1.507 2.116,-3.56 l -0.022,-0.087 -0.051,-0.074 c -0.104,-0.149 -0.104,-0.149 -1.306,-0.59 -2.321,-0.852 -8.485,-3.114 -11.299,-4.905 -6.822,-4.343 -13.743,-13.431 -20.573,-27.018 5.101,-13.665 15.618,-24.897 28.937,-30.913 m 0.307,-0.685 c -13.74,6.037 -24.57,17.472 -29.787,31.631 6.597,13.166 13.598,22.794 20.849,27.409 3.621,2.305 12.398,5.266 12.462,5.359 0.955,3.699 -5.15,2.093 -5.564,8.419 5.597,14.445 13.27,15.045 12.359,32.179 2.078,0.457 4.195,0.811 6.354,1.028 3.832,-8.726 9.872,-22.225 12.598,-32.457 0.557,-8.315 -1.871,-12.984 -15.239,-14.975 -0.427,-0.064 -0.846,-0.092 -1.257,-0.092 -3.144,0 -5.88,1.641 -8.898,1.641 -0.377,0 -0.759,-0.026 -1.146,-0.083 -6.077,-0.905 -14.782,-6.232 -14.782,-12.62 0.494,-0.48 0.989,-0.96 1.483,-1.44 1.956,0 13.993,0.484 15.897,1.198 0,-8.417 -5.042,-15.941 -6.416,-24.133 0.972,-5.58 1.945,-11.162 2.918,-16.743 -0.154,-1.05 -1.001,-3.704 -1.831,-6.321 l 0,0 z"
+       id="path94"
+       inkscape:connector-curvature="0" /></g><g
+     id="g96"
+     transform="translate(-199.80201,-323.493)"><linearGradient
+       id="SVGID_8_"
+       gradientUnits="userSpaceOnUse"
+       x1="272.82639"
+       y1="368.33749"
+       x2="272.82639"
+       y2="475.51071"><stop
+         offset="0"
+         style="stop-color:#D1DBE8"
+         id="stop99" /><stop
+         offset="1"
+         style="stop-color:#C4CDDC"
+         id="stop101" /></linearGradient><path
+       style="fill:url(#SVGID_8_);fill-rule:evenodd"
+       d="m 287.081,428.701 c -4.097,-0.61 -7.409,2.046 -11.301,1.466 -6.077,-0.905 -14.782,-6.232 -14.782,-12.62 0.494,-0.48 0.989,-0.96 1.483,-1.44 1.956,0 13.993,0.484 15.897,1.198 0,-8.417 -5.042,-15.941 -6.416,-24.133 0.972,-5.58 1.945,-11.162 2.918,-16.743 -0.154,-1.05 -1.001,-3.704 -1.831,-6.321 -13.74,6.037 -24.57,17.472 -29.787,31.631 6.597,13.166 13.598,22.794 20.849,27.409 3.621,2.305 12.398,5.266 12.462,5.359 0.955,3.699 -5.15,2.093 -5.564,8.419 5.597,14.445 13.187,15.646 12.276,32.78 2.078,0.457 4.047,0.713 6.206,0.93 2.76103,-10.7429 8.89487,-23.77947 12.829,-32.96 0.556,-8.315 -1.871,-12.984 -15.239,-14.975 z"
+       id="path103"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="cccccccccccccccc" /></g><path
+     style="fill:none;stroke:#436997;stroke-width:1;stroke-miterlimit:10"
+     d="m 143.92999,71.247 c -2.151,-3.9 -5.028,-7.893 -8.025,-11.143"
+     id="path105"
+     inkscape:connector-curvature="0" /><path
+     style="fill:none;stroke:#436997;stroke-width:1;stroke-miterlimit:10"
+     d="m 132.77899,56.97 c -1.308,-1.156 -3.383,-3.07 -4.992,-4.109"
+     id="path107"
+     inkscape:connector-curvature="0" /><path
+     style="fill:none;stroke:#436997;stroke-width:1;stroke-miterlimit:10"
+     d="m 73.432991,46.99 c -14.161,6.084 -24.626,17.909 -29.827,32.251"
+     id="path109"
+     inkscape:connector-curvature="0" /><g
+     id="g111"
+     transform="translate(-199.80201,-323.493)"><path
+       style="fill:#e1dfe2;fill-rule:evenodd"
+       d="m 295.344,476.415 c -30.44,0 -55.144,-24.514 -55.476,-54.876 -0.002,0.206 -0.016,0.409 -0.016,0.616 0,30.647 24.844,55.492 55.492,55.492 30.647,0 57.06855,-24.52869 55.492,-55.492 -0.0105,-0.2067 -0.013,-0.41 -0.016,-0.616 -0.48966,30.20434 -25.035,54.876 -55.476,54.876 z"
+       id="path113"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="scssscs" /></g><path
+     style="fill:none;stroke:#436997;stroke-width:1;stroke-miterlimit:10"
+     d="M 90.267991,152.213"
+     id="path115"
+     inkscape:connector-curvature="0" /><path
+     style="fill:none;stroke:#436997;stroke-width:1;stroke-miterlimit:10"
+     d="M 83.481991,151.099"
+     id="path117"
+     inkscape:connector-curvature="0" /><g
+     id="g121"
+     transform="translate(-199.80201,-323.493)"><path
+       style="fill:#37577e;fill-rule:evenodd"
+       d="m 295.344,366.659 c 30.441,0 54.98834,24.98797 55.476,54.878 0.002,-0.205 0.0107,-0.40807 0.016,-0.614 0.78828,-30.647 -24.845,-55.492 -55.492,-55.492 -30.647,0 -55.492,24.845 -55.492,55.492 0,0.206 0.013,0.408 0.016,0.614 0.331,-30.363 25.035,-54.878 55.476,-54.878 z"
+       id="path123"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="scssscs" /></g></svg>
\ No newline at end of file
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/bg_textbox.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/bg_textbox.png
new file mode 100755 (executable)
index 0000000..473f0ea
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/bg_textbox.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/bg_textbox_w.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/bg_textbox_w.png
new file mode 100755 (executable)
index 0000000..cf14760
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/bg_textbox_w.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_00.jpg b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_00.jpg
new file mode 100755 (executable)
index 0000000..609d280
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_00.jpg differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_01.jpg b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_01.jpg
new file mode 100755 (executable)
index 0000000..fbefbc9
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_01.jpg differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_02.jpg b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_02.jpg
new file mode 100755 (executable)
index 0000000..2509db1
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_02.jpg differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_03.jpg b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_03.jpg
new file mode 100755 (executable)
index 0000000..7329456
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_03.jpg differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_04.jpg b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_04.jpg
new file mode 100755 (executable)
index 0000000..f50d103
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_04.jpg differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_05.jpg b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_05.jpg
new file mode 100755 (executable)
index 0000000..7886d68
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_05.jpg differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_06.jpg b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_06.jpg
new file mode 100755 (executable)
index 0000000..2d6208b
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_06.jpg differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_07.jpg b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_07.jpg
new file mode 100755 (executable)
index 0000000..fa0cda7
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_07.jpg differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_08.jpg b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_08.jpg
new file mode 100755 (executable)
index 0000000..f5f9fef
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_08.jpg differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_09.jpg b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_09.jpg
new file mode 100755 (executable)
index 0000000..3f290e7
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_09.jpg differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_d_1.jpg b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_d_1.jpg
new file mode 100755 (executable)
index 0000000..a652f03
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_d_1.jpg differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_d_2.jpg b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_d_2.jpg
new file mode 100755 (executable)
index 0000000..359ab25
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_d_2.jpg differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_m_1.jpg b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_m_1.jpg
new file mode 100755 (executable)
index 0000000..6a11cf2
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/default/picture_m_1.jpg differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_1.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_1.png
new file mode 100755 (executable)
index 0000000..2a994d7
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_1.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_10.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_10.png
new file mode 100755 (executable)
index 0000000..5a672fe
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_10.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_11.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_11.png
new file mode 100755 (executable)
index 0000000..f675769
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_11.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_12.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_12.png
new file mode 100755 (executable)
index 0000000..9b1d2bb
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_12.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_2.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_2.png
new file mode 100755 (executable)
index 0000000..edfc9e3
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_2.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_3.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_3.png
new file mode 100755 (executable)
index 0000000..6f073c7
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_3.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_4.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_4.png
new file mode 100755 (executable)
index 0000000..3e5d62c
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_4.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_5.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_5.png
new file mode 100755 (executable)
index 0000000..ebf85fe
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_5.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_6.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_6.png
new file mode 100755 (executable)
index 0000000..31b90d5
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_6.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_7.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_7.png
new file mode 100755 (executable)
index 0000000..0021296
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_7.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_8.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_8.png
new file mode 100755 (executable)
index 0000000..7761e92
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_8.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_9.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_9.png
new file mode 100755 (executable)
index 0000000..b30633f
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_9.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_1.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_1.png
new file mode 100755 (executable)
index 0000000..573767f
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_1.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_10.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_10.png
new file mode 100755 (executable)
index 0000000..de8f417
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_10.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_11.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_11.png
new file mode 100755 (executable)
index 0000000..8bebaca
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_11.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_12.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_12.png
new file mode 100755 (executable)
index 0000000..78c7a2b
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_12.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_2.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_2.png
new file mode 100755 (executable)
index 0000000..1d1f2fa
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_2.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_3.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_3.png
new file mode 100755 (executable)
index 0000000..b74e355
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_3.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_4.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_4.png
new file mode 100755 (executable)
index 0000000..0057330
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_4.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_5.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_5.png
new file mode 100755 (executable)
index 0000000..c6c0c9c
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_5.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_6.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_6.png
new file mode 100755 (executable)
index 0000000..d61b8f1
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_6.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_7.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_7.png
new file mode 100755 (executable)
index 0000000..76e5bdf
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_7.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_8.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_8.png
new file mode 100755 (executable)
index 0000000..d1cd684
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_8.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_9.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_9.png
new file mode 100755 (executable)
index 0000000..7a8a69b
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/mon/mon_w_9.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_0.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_0.png
new file mode 100755 (executable)
index 0000000..341da90
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_0.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_1.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_1.png
new file mode 100755 (executable)
index 0000000..dc5a565
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_1.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_2.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_2.png
new file mode 100755 (executable)
index 0000000..bace15d
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_2.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_3.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_3.png
new file mode 100755 (executable)
index 0000000..0ca5cf7
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_3.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_4.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_4.png
new file mode 100755 (executable)
index 0000000..6ccdfcf
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_4.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_5.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_5.png
new file mode 100755 (executable)
index 0000000..5afce23
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_5.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_6.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_6.png
new file mode 100755 (executable)
index 0000000..dda8768
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_6.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_7.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_7.png
new file mode 100755 (executable)
index 0000000..e950895
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_7.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_8.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_8.png
new file mode 100755 (executable)
index 0000000..2130a19
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_8.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_9.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_9.png
new file mode 100755 (executable)
index 0000000..4db77f9
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_9.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_nd.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_nd.png
new file mode 100755 (executable)
index 0000000..e1b2bc2
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_nd.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_rd.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_rd.png
new file mode 100755 (executable)
index 0000000..0b241b1
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_rd.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_st.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_st.png
new file mode 100755 (executable)
index 0000000..c4409ba
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_st.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_th.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_th.png
new file mode 100755 (executable)
index 0000000..aabd2a2
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_th.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_0.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_0.png
new file mode 100755 (executable)
index 0000000..316d7cc
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_0.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_1.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_1.png
new file mode 100755 (executable)
index 0000000..d84db28
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_1.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_2.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_2.png
new file mode 100755 (executable)
index 0000000..1f79ffe
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_2.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_3.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_3.png
new file mode 100755 (executable)
index 0000000..e827ab1
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_3.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_4.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_4.png
new file mode 100755 (executable)
index 0000000..c8e6932
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_4.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_5.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_5.png
new file mode 100755 (executable)
index 0000000..ed92bdb
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_5.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_6.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_6.png
new file mode 100755 (executable)
index 0000000..644e0f7
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_6.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_7.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_7.png
new file mode 100755 (executable)
index 0000000..87c8adf
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_7.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_8.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_8.png
new file mode 100755 (executable)
index 0000000..8371621
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_8.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_9.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_9.png
new file mode 100755 (executable)
index 0000000..2d9fc49
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_9.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_nd.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_nd.png
new file mode 100755 (executable)
index 0000000..5c69a78
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_nd.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_rd.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_rd.png
new file mode 100755 (executable)
index 0000000..e561e74
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_rd.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_st.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_st.png
new file mode 100755 (executable)
index 0000000..2731e06
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_st.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_th.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_th.png
new file mode 100755 (executable)
index 0000000..dfeda69
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/num/num_w_th.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/photoboard_img_bg_01.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/photoboard_img_bg_01.png
new file mode 100755 (executable)
index 0000000..c0e930e
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/photoboard_img_bg_01.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/photoboard_img_bg_02.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/photoboard_img_bg_02.png
new file mode 100755 (executable)
index 0000000..415e70d
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/photoboard_img_bg_02.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/photoboard_img_bg_03.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/photoboard_img_bg_03.png
new file mode 100755 (executable)
index 0000000..00bba2c
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/photoboard_img_bg_03.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/photoboard_img_bg_04.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/photoboard_img_bg_04.png
new file mode 100755 (executable)
index 0000000..22440c5
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/photoboard_img_bg_04.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/photoduo_img_bg_01_no9patch.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/photoduo_img_bg_01_no9patch.png
new file mode 100755 (executable)
index 0000000..83869d2
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/photoduo_img_bg_01_no9patch.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_0.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_0.png
new file mode 100755 (executable)
index 0000000..9611e0e
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_0.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_1.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_1.png
new file mode 100755 (executable)
index 0000000..7cfbc1e
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_1.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_2.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_2.png
new file mode 100755 (executable)
index 0000000..078a24f
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_2.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_3.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_3.png
new file mode 100755 (executable)
index 0000000..3025c05
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_3.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_4.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_4.png
new file mode 100755 (executable)
index 0000000..714c876
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_4.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_5.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_5.png
new file mode 100755 (executable)
index 0000000..92e67d6
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_5.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_6.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_6.png
new file mode 100755 (executable)
index 0000000..35a0be4
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_6.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_7.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_7.png
new file mode 100755 (executable)
index 0000000..4becef4
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_7.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_8.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_8.png
new file mode 100755 (executable)
index 0000000..fea9974
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_8.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_9.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_9.png
new file mode 100755 (executable)
index 0000000..a4ba90b
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_9.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_0.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_0.png
new file mode 100755 (executable)
index 0000000..86317d9
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_0.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_1.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_1.png
new file mode 100755 (executable)
index 0000000..b29018f
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_1.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_2.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_2.png
new file mode 100755 (executable)
index 0000000..4484088
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_2.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_3.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_3.png
new file mode 100755 (executable)
index 0000000..2fd0fcf
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_3.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_4.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_4.png
new file mode 100755 (executable)
index 0000000..002845a
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_4.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_5.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_5.png
new file mode 100755 (executable)
index 0000000..dbc725f
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_5.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_6.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_6.png
new file mode 100755 (executable)
index 0000000..7dbb014
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_6.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_7.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_7.png
new file mode 100755 (executable)
index 0000000..ac5d615
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_7.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_8.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_8.png
new file mode 100755 (executable)
index 0000000..4b61040
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_8.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_9.png b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_9.png
new file mode 100755 (executable)
index 0000000..0e18851
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/ambient/year/year_w_9.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/application-icon-0.png b/test/NUITestSample/NUIXAMLTestSample/res/images/application-icon-0.png
new file mode 100755 (executable)
index 0000000..339b19c
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/application-icon-0.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/arrow.png b/test/NUITestSample/NUIXAMLTestSample/res/images/arrow.png
new file mode 100755 (executable)
index 0000000..87abefd
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/arrow.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/background-blocks.jpg b/test/NUITestSample/NUIXAMLTestSample/res/images/background-blocks.jpg
new file mode 100755 (executable)
index 0000000..d8fed65
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/background-blocks.jpg differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/airbnb_icon.png b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/airbnb_icon.png
new file mode 100755 (executable)
index 0000000..5a67d32
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/airbnb_icon.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/bg.png b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/bg.png
new file mode 100755 (executable)
index 0000000..25e95fb
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/bg.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/btn_focused_bg.png b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/btn_focused_bg.png
new file mode 100755 (executable)
index 0000000..44fe13f
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/btn_focused_bg.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/btn_normal_bg.png b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/btn_normal_bg.png
new file mode 100755 (executable)
index 0000000..0869e8f
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/btn_normal_bg.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/card1.png b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/card1.png
new file mode 100755 (executable)
index 0000000..484de02
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/card1.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/card2.png b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/card2.png
new file mode 100755 (executable)
index 0000000..ca39ea6
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/card2.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/card3.png b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/card3.png
new file mode 100755 (executable)
index 0000000..8c603b4
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/card3.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/date_weather.png b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/date_weather.png
new file mode 100755 (executable)
index 0000000..7fd4b6a
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/date_weather.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/finance_content.png b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/finance_content.png
new file mode 100755 (executable)
index 0000000..6f227c1
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/finance_content.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/finance_icon.png b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/finance_icon.png
new file mode 100755 (executable)
index 0000000..bec1727
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/finance_icon.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/health_content.png b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/health_content.png
new file mode 100755 (executable)
index 0000000..d669bfe
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/health_content.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/health_icon.png b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/health_icon.png
new file mode 100755 (executable)
index 0000000..93775e3
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/health_icon.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/map_icon.png b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/map_icon.png
new file mode 100755 (executable)
index 0000000..2d5103d
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/map_icon.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/map_widget.png b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/map_widget.png
new file mode 100755 (executable)
index 0000000..8ff8d8e
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/map_widget.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/map_widget1.png b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/map_widget1.png
new file mode 100755 (executable)
index 0000000..9ab713e
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/map_widget1.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/time.png b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/time.png
new file mode 100755 (executable)
index 0000000..dbd4686
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/time.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/traffic_content.png b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/traffic_content.png
new file mode 100755 (executable)
index 0000000..538bf7e
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/bixby/traffic_content.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/c_basic_button_white_bg_normal.9.png b/test/NUITestSample/NUIXAMLTestSample/res/images/c_basic_button_white_bg_normal.9.png
new file mode 100755 (executable)
index 0000000..05c41d3
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/c_basic_button_white_bg_normal.9.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/c_imageitem_white_bg_normal_9patch.png b/test/NUITestSample/NUIXAMLTestSample/res/images/c_imageitem_white_bg_normal_9patch.png
new file mode 100755 (executable)
index 0000000..22d521f
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/c_imageitem_white_bg_normal_9patch.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/dali-logo-anim.gif b/test/NUITestSample/NUIXAMLTestSample/res/images/dali-logo-anim.gif
new file mode 100755 (executable)
index 0000000..9a085ba
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/dali-logo-anim.gif differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/dog-anim.gif b/test/NUITestSample/NUIXAMLTestSample/res/images/dog-anim.gif
new file mode 100755 (executable)
index 0000000..ddc3312
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/dog-anim.gif differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/echo.gif b/test/NUITestSample/NUIXAMLTestSample/res/images/echo.gif
new file mode 100755 (executable)
index 0000000..31b8040
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/echo.gif differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/gallery-0.jpg b/test/NUITestSample/NUIXAMLTestSample/res/images/gallery-0.jpg
new file mode 100755 (executable)
index 0000000..e42dba7
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/gallery-0.jpg differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/gallery-1.jpg b/test/NUITestSample/NUIXAMLTestSample/res/images/gallery-1.jpg
new file mode 100755 (executable)
index 0000000..6a427ad
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/gallery-1.jpg differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/gallery-2.jpg b/test/NUITestSample/NUIXAMLTestSample/res/images/gallery-2.jpg
new file mode 100755 (executable)
index 0000000..30b1a51
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/gallery-2.jpg differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/gallery-3.jpg b/test/NUITestSample/NUIXAMLTestSample/res/images/gallery-3.jpg
new file mode 100755 (executable)
index 0000000..2da2ceb
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/gallery-3.jpg differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/gallery-4.jpg b/test/NUITestSample/NUIXAMLTestSample/res/images/gallery-4.jpg
new file mode 100755 (executable)
index 0000000..902b711
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/gallery-4.jpg differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/gallery-5.jpg b/test/NUITestSample/NUIXAMLTestSample/res/images/gallery-5.jpg
new file mode 100755 (executable)
index 0000000..490fb56
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/gallery-5.jpg differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/gallery-small-43.jpg b/test/NUITestSample/NUIXAMLTestSample/res/images/gallery-small-43.jpg
new file mode 100755 (executable)
index 0000000..c59b841
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/gallery-small-43.jpg differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/image-1.jpg b/test/NUITestSample/NUIXAMLTestSample/res/images/image-1.jpg
new file mode 100755 (executable)
index 0000000..155ab30
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/image-1.jpg differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/image-2.jpg b/test/NUITestSample/NUIXAMLTestSample/res/images/image-2.jpg
new file mode 100755 (executable)
index 0000000..e855ecf
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/image-2.jpg differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/image-3.jpg b/test/NUITestSample/NUIXAMLTestSample/res/images/image-3.jpg
new file mode 100755 (executable)
index 0000000..8dee462
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/image-3.jpg differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/mc_bg.png b/test/NUITestSample/NUIXAMLTestSample/res/images/mc_bg.png
new file mode 100755 (executable)
index 0000000..ff036ef
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/mc_bg.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/mc_folder.png b/test/NUITestSample/NUIXAMLTestSample/res/images/mc_folder.png
new file mode 100755 (executable)
index 0000000..b65c3f1
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/mc_folder.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/mc_folder_thumb_default.png b/test/NUITestSample/NUIXAMLTestSample/res/images/mc_folder_thumb_default.png
new file mode 100755 (executable)
index 0000000..571f270
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/mc_folder_thumb_default.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/mc_shadow_titlebar.png b/test/NUITestSample/NUIXAMLTestSample/res/images/mc_shadow_titlebar.png
new file mode 100755 (executable)
index 0000000..4fe6479
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/mc_shadow_titlebar.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/mc_title_bg.png b/test/NUITestSample/NUIXAMLTestSample/res/images/mc_title_bg.png
new file mode 100755 (executable)
index 0000000..8cfa805
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/mc_title_bg.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/not_yet_sign.png b/test/NUITestSample/NUIXAMLTestSample/res/images/not_yet_sign.png
new file mode 100755 (executable)
index 0000000..12b48c1
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/not_yet_sign.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/r_highlight_bg_focus_9patch.png b/test/NUITestSample/NUIXAMLTestSample/res/images/r_highlight_bg_focus_9patch.png
new file mode 100755 (executable)
index 0000000..f6cf0dc
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/r_highlight_bg_focus_9patch.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/r_icon_xs_star.png b/test/NUITestSample/NUIXAMLTestSample/res/images/r_icon_xs_star.png
new file mode 100755 (executable)
index 0000000..ae28fd2
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/r_icon_xs_star.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/star-dim.png b/test/NUITestSample/NUIXAMLTestSample/res/images/star-dim.png
new file mode 100755 (executable)
index 0000000..38cc674
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/star-dim.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/star-highlight.png b/test/NUITestSample/NUIXAMLTestSample/res/images/star-highlight.png
new file mode 100755 (executable)
index 0000000..f99ee25
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/star-highlight.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/star-mod.png b/test/NUITestSample/NUIXAMLTestSample/res/images/star-mod.png
new file mode 100755 (executable)
index 0000000..2e3212e
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/star-mod.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/store_default_bg_01.png b/test/NUITestSample/NUIXAMLTestSample/res/images/store_default_bg_01.png
new file mode 100755 (executable)
index 0000000..7ee55b9
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/store_default_bg_01.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/weather.png b/test/NUITestSample/NUIXAMLTestSample/res/images/weather.png
new file mode 100755 (executable)
index 0000000..3f8d21e
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/weather.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/weather/1.bmp b/test/NUITestSample/NUIXAMLTestSample/res/images/weather/1.bmp
new file mode 100755 (executable)
index 0000000..12d760f
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/weather/1.bmp differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/weather/2.bmp b/test/NUITestSample/NUIXAMLTestSample/res/images/weather/2.bmp
new file mode 100755 (executable)
index 0000000..b149ea7
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/weather/2.bmp differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/weather/3.bmp b/test/NUITestSample/NUIXAMLTestSample/res/images/weather/3.bmp
new file mode 100755 (executable)
index 0000000..6fc0eb7
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/weather/3.bmp differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/weather/4.bmp b/test/NUITestSample/NUIXAMLTestSample/res/images/weather/4.bmp
new file mode 100755 (executable)
index 0000000..a6386fa
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/weather/4.bmp differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/weather/bg.bmp b/test/NUITestSample/NUIXAMLTestSample/res/images/weather/bg.bmp
new file mode 100755 (executable)
index 0000000..ac1ce47
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/weather/bg.bmp differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/weather/current.bmp b/test/NUITestSample/NUIXAMLTestSample/res/images/weather/current.bmp
new file mode 100755 (executable)
index 0000000..f5904d1
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/weather/current.bmp differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/weather/left.bmp b/test/NUITestSample/NUIXAMLTestSample/res/images/weather/left.bmp
new file mode 100755 (executable)
index 0000000..6278717
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/weather/left.bmp differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/weather/up.bmp b/test/NUITestSample/NUIXAMLTestSample/res/images/weather/up.bmp
new file mode 100755 (executable)
index 0000000..da99d96
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/weather/up.bmp differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/weather_ss1.png b/test/NUITestSample/NUIXAMLTestSample/res/images/weather_ss1.png
new file mode 100755 (executable)
index 0000000..143401c
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/weather_ss1.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/weather_ss2.png b/test/NUITestSample/NUIXAMLTestSample/res/images/weather_ss2.png
new file mode 100755 (executable)
index 0000000..aa1da4b
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/weather_ss2.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/weather_ss3.png b/test/NUITestSample/NUIXAMLTestSample/res/images/weather_ss3.png
new file mode 100755 (executable)
index 0000000..bdcc2e6
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/weather_ss3.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb01.png b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb01.png
new file mode 100755 (executable)
index 0000000..a82146b
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb01.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb010.png b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb010.png
new file mode 100755 (executable)
index 0000000..065d428
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb010.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb011.png b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb011.png
new file mode 100755 (executable)
index 0000000..85feaa7
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb011.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb012.png b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb012.png
new file mode 100755 (executable)
index 0000000..2bd6f4e
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb012.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb013.png b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb013.png
new file mode 100755 (executable)
index 0000000..7ba8bf2
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb013.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb014.png b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb014.png
new file mode 100755 (executable)
index 0000000..8991928
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb014.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb015.png b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb015.png
new file mode 100755 (executable)
index 0000000..b92c848
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb015.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb016.png b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb016.png
new file mode 100755 (executable)
index 0000000..095049d
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb016.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb017.png b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb017.png
new file mode 100755 (executable)
index 0000000..0bed0c9
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb017.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb018.png b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb018.png
new file mode 100755 (executable)
index 0000000..5414cee
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb018.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb02.png b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb02.png
new file mode 100755 (executable)
index 0000000..927448b
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb02.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb03.png b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb03.png
new file mode 100755 (executable)
index 0000000..679baeb
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb03.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb04.png b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb04.png
new file mode 100755 (executable)
index 0000000..2c7c367
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb04.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb05.png b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb05.png
new file mode 100755 (executable)
index 0000000..3f5c88d
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb05.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb06.png b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb06.png
new file mode 100755 (executable)
index 0000000..949755a
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb06.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb07.png b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb07.png
new file mode 100755 (executable)
index 0000000..2eb7110
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb07.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb08.png b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb08.png
new file mode 100755 (executable)
index 0000000..a35e42f
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb08.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb09.png b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb09.png
new file mode 100755 (executable)
index 0000000..2069ea8
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/res/images/youtube/ytb09.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/shared/res/NUIXAMLTestSample.png b/test/NUITestSample/NUIXAMLTestSample/shared/res/NUIXAMLTestSample.png
new file mode 100755 (executable)
index 0000000..9f3cb98
Binary files /dev/null and b/test/NUITestSample/NUIXAMLTestSample/shared/res/NUIXAMLTestSample.png differ
diff --git a/test/NUITestSample/NUIXAMLTestSample/tizen-manifest.xml b/test/NUITestSample/NUIXAMLTestSample/tizen-manifest.xml
new file mode 100755 (executable)
index 0000000..8d65a8c
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="4" package="org.tizen.example.NUIXAMLTestSample" version="1.0.0">
+  <profile name="common" />
+  <ui-application appid="org.tizen.example.NUIXAMLTestSample"
+                                       exec="NUIXAMLTestSample.dll"
+                                       type="dotnet"
+                                       multiple="false"
+                                       taskmanage="true"
+                                       nodisplay="false"
+                                       launch_mode="single">
+    <label>NUITestSample</label>
+    <icon>NUITestSample.png</icon>
+    <metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
+  </ui-application>
+</manifest>