[NUI] Add Tizen.NUI.LayoutSamples
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Fri, 25 Mar 2022 01:41:08 +0000 (10:41 +0900)
committerJaehyun Cho <jaehyun0cho@gmail.com>
Wed, 20 Apr 2022 08:38:08 +0000 (17:38 +0900)
Tizen.NUI.LayoutSamples is added to test Layout behavior.

Each class is designed based on LayoutSamplesClassDiagram.png.

Tizen.NUI.LayoutSamples is consist of Display Window and Control Window.

DisplayWindow.png shows Display Window.
ControlWindowLayoutTab.png and ControlWindowViewTab.png show Control
Window.

Display Window shows each object view on the screen.

Control Window sets each object view's layout properties and view
properties.

If user selects an object view on Display Window by clicking, its layout
properties and view properties appear on Control Window.

"Add View" button on Control Window adds a child object view to the
selected object view.
"Remove View" button on Control Window removes the selected object view.

42 files changed:
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples.sln [new file with mode: 0755]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/CellPaddingView.xaml [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/CellPaddingView.xaml.cs [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ControlView.xaml [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ControlView.xaml.cs [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ControlWindowLayoutTab.png [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ControlWindowViewTab.png [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/DisplayWindow.png [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/HeightSpecificationView.xaml [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/HeightSpecificationView.xaml.cs [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/HorizontalAlignmentView.xaml [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/HorizontalAlignmentView.xaml.cs [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ILayoutProperty.cs [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/IObjectLayout.cs [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/IObjectProperty.cs [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/IObjectView.cs [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/LayoutSamplesClassDiagram.png [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/LayoutSamplesClassDiagram.txt [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/LayoutTypeView.xaml [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/LayoutTypeView.xaml.cs [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/LinearLayoutControlView.xaml [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/LinearLayoutControlView.xaml.cs [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/LinearOrientationView.xaml [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/LinearOrientationView.xaml.cs [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/MarginView.xaml [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/MarginView.xaml.cs [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ObjectControlView.xaml [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ObjectControlView.xaml.cs [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ObjectLinearLayout.cs [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ObjectView.cs [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ObjectView.xaml [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ObjectView.xaml.cs [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ObjectViewGroup.cs [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/PaddingView.xaml [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/PaddingView.xaml.cs [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples.cs [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples.csproj [new file with mode: 0755]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/VerticalAlignmentView.xaml [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/VerticalAlignmentView.xaml.cs [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/WidthSpecificationView.xaml [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/WidthSpecificationView.xaml.cs [new file with mode: 0644]
test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/tizen-manifest.xml [new file with mode: 0755]

diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples.sln b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples.sln
new file mode 100755 (executable)
index 0000000..f35a807
--- /dev/null
@@ -0,0 +1,121 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29613.14
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.NUI.LayoutSamples", "Tizen.NUI.LayoutSamples\Tizen.NUI.LayoutSamples.csproj", "{B2EC3963-C77F-4D1A-9387-8BA0DB298266}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen", "..\..\src\Tizen\Tizen.csproj", "{F4ADAF15-01AA-477E-A85A-BEB297E6B07E}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.Applications.Common", "..\..\src\Tizen.Applications.Common\Tizen.Applications.Common.csproj", "{0B96B17C-DACA-4745-88B1-6CFC1825A510}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.Log", "..\..\src\Tizen.Log\Tizen.Log.csproj", "{1E8250DB-92C3-44A5-8D57-3CFDE0C0021D}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.NUI", "..\..\src\Tizen.NUI\Tizen.NUI.csproj", "{29B426DA-FFDE-49D2-BD73-FE155F9502E8}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.NUI.Components", "..\..\src\Tizen.NUI.Components\Tizen.NUI.Components.csproj", "{2A669CBF-DFA8-4EA3-852D-3137493DE884}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.System.SystemSettings", "..\..\src\Tizen.System.SystemSettings\Tizen.System.SystemSettings.csproj", "{EC28F259-C790-4FA3-A834-00795E2A7E2F}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.Applications.ComponentBased", "..\..\src\Tizen.Applications.ComponentBased\Tizen.Applications.ComponentBased.csproj", "{E117D074-C23D-41FD-A77D-2E9E6FF85676}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.Multimedia.MediaPlayer", "..\..\src\Tizen.Multimedia.MediaPlayer\Tizen.Multimedia.MediaPlayer.csproj", "{850B0BA6-8C7F-4645-8473-15F378B9A1EB}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.Multimedia", "..\..\src\Tizen.Multimedia\Tizen.Multimedia.csproj", "{8C1CA5FE-EEA0-4353-8735-B49347CF1812}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ElmSharp", "..\..\src\ElmSharp\ElmSharp.csproj", "{CCDA00F7-7BDE-4913-B9F1-1AEE401EE4AD}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.System.Information", "..\..\src\Tizen.System.Information\Tizen.System.Information.csproj", "{02BEE3AD-99A6-44A5-89FC-D9F4132D9ECE}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.NUI.Wearable", "..\..\src\Tizen.NUI.Wearable\Tizen.NUI.Wearable.csproj", "{A2B607F9-5B9B-43AC-A8CA-E0FDF2A6694E}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.System.Feedback", "..\..\src\Tizen.System.Feedback\Tizen.System.Feedback.csproj", "{D422D03E-7E32-4230-8306-B16DFE27E95A}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.Multimedia.Camera", "..\..\src\Tizen.Multimedia.Camera\Tizen.Multimedia.Camera.csproj", "{210C3F38-BD17-4583-816D-550C319FC6CF}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.Applications.ThemeManager", "..\..\src\Tizen.Applications.ThemeManager\Tizen.Applications.ThemeManager.csproj", "{FB8B42D6-76CC-4836-8A80-58A816C6A17F}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.NUI.Extension", "..\..\src\Tizen.NUI.Extension\Tizen.NUI.Extension.csproj", "{47829CA1-0E21-4687-9ABB-0C27E1A67E85}"
+EndProject
+Global
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution
+               Debug|Any CPU = Debug|Any CPU
+               Release|Any CPU = Release|Any CPU
+       EndGlobalSection
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution
+               {B2EC3963-C77F-4D1A-9387-8BA0DB298266}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {B2EC3963-C77F-4D1A-9387-8BA0DB298266}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {B2EC3963-C77F-4D1A-9387-8BA0DB298266}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {B2EC3963-C77F-4D1A-9387-8BA0DB298266}.Release|Any CPU.Build.0 = Release|Any CPU
+               {F4ADAF15-01AA-477E-A85A-BEB297E6B07E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {F4ADAF15-01AA-477E-A85A-BEB297E6B07E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {F4ADAF15-01AA-477E-A85A-BEB297E6B07E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {F4ADAF15-01AA-477E-A85A-BEB297E6B07E}.Release|Any CPU.Build.0 = Release|Any CPU
+               {0B96B17C-DACA-4745-88B1-6CFC1825A510}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {0B96B17C-DACA-4745-88B1-6CFC1825A510}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {0B96B17C-DACA-4745-88B1-6CFC1825A510}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {0B96B17C-DACA-4745-88B1-6CFC1825A510}.Release|Any CPU.Build.0 = Release|Any CPU
+               {1E8250DB-92C3-44A5-8D57-3CFDE0C0021D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {1E8250DB-92C3-44A5-8D57-3CFDE0C0021D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {1E8250DB-92C3-44A5-8D57-3CFDE0C0021D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {1E8250DB-92C3-44A5-8D57-3CFDE0C0021D}.Release|Any CPU.Build.0 = Release|Any CPU
+               {29B426DA-FFDE-49D2-BD73-FE155F9502E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {29B426DA-FFDE-49D2-BD73-FE155F9502E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {29B426DA-FFDE-49D2-BD73-FE155F9502E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {29B426DA-FFDE-49D2-BD73-FE155F9502E8}.Release|Any CPU.Build.0 = Release|Any CPU
+               {2A669CBF-DFA8-4EA3-852D-3137493DE884}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {2A669CBF-DFA8-4EA3-852D-3137493DE884}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {2A669CBF-DFA8-4EA3-852D-3137493DE884}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {2A669CBF-DFA8-4EA3-852D-3137493DE884}.Release|Any CPU.Build.0 = Release|Any CPU
+               {EC28F259-C790-4FA3-A834-00795E2A7E2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {EC28F259-C790-4FA3-A834-00795E2A7E2F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {EC28F259-C790-4FA3-A834-00795E2A7E2F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {EC28F259-C790-4FA3-A834-00795E2A7E2F}.Release|Any CPU.Build.0 = Release|Any CPU
+               {E117D074-C23D-41FD-A77D-2E9E6FF85676}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {E117D074-C23D-41FD-A77D-2E9E6FF85676}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {E117D074-C23D-41FD-A77D-2E9E6FF85676}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {E117D074-C23D-41FD-A77D-2E9E6FF85676}.Release|Any CPU.Build.0 = Release|Any CPU
+               {850B0BA6-8C7F-4645-8473-15F378B9A1EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {850B0BA6-8C7F-4645-8473-15F378B9A1EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {850B0BA6-8C7F-4645-8473-15F378B9A1EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {850B0BA6-8C7F-4645-8473-15F378B9A1EB}.Release|Any CPU.Build.0 = Release|Any CPU
+               {8C1CA5FE-EEA0-4353-8735-B49347CF1812}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {8C1CA5FE-EEA0-4353-8735-B49347CF1812}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {8C1CA5FE-EEA0-4353-8735-B49347CF1812}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {8C1CA5FE-EEA0-4353-8735-B49347CF1812}.Release|Any CPU.Build.0 = Release|Any CPU
+               {CCDA00F7-7BDE-4913-B9F1-1AEE401EE4AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {CCDA00F7-7BDE-4913-B9F1-1AEE401EE4AD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {CCDA00F7-7BDE-4913-B9F1-1AEE401EE4AD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {CCDA00F7-7BDE-4913-B9F1-1AEE401EE4AD}.Release|Any CPU.Build.0 = Release|Any CPU
+               {02BEE3AD-99A6-44A5-89FC-D9F4132D9ECE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {02BEE3AD-99A6-44A5-89FC-D9F4132D9ECE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {02BEE3AD-99A6-44A5-89FC-D9F4132D9ECE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {02BEE3AD-99A6-44A5-89FC-D9F4132D9ECE}.Release|Any CPU.Build.0 = Release|Any CPU
+               {A2B607F9-5B9B-43AC-A8CA-E0FDF2A6694E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {A2B607F9-5B9B-43AC-A8CA-E0FDF2A6694E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {A2B607F9-5B9B-43AC-A8CA-E0FDF2A6694E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {A2B607F9-5B9B-43AC-A8CA-E0FDF2A6694E}.Release|Any CPU.Build.0 = Release|Any CPU
+               {D422D03E-7E32-4230-8306-B16DFE27E95A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {D422D03E-7E32-4230-8306-B16DFE27E95A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {D422D03E-7E32-4230-8306-B16DFE27E95A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {D422D03E-7E32-4230-8306-B16DFE27E95A}.Release|Any CPU.Build.0 = Release|Any CPU
+               {210C3F38-BD17-4583-816D-550C319FC6CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {210C3F38-BD17-4583-816D-550C319FC6CF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {210C3F38-BD17-4583-816D-550C319FC6CF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {210C3F38-BD17-4583-816D-550C319FC6CF}.Release|Any CPU.Build.0 = Release|Any CPU
+               {FB8B42D6-76CC-4836-8A80-58A816C6A17F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {FB8B42D6-76CC-4836-8A80-58A816C6A17F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {FB8B42D6-76CC-4836-8A80-58A816C6A17F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {FB8B42D6-76CC-4836-8A80-58A816C6A17F}.Release|Any CPU.Build.0 = Release|Any CPU
+               {47829CA1-0E21-4687-9ABB-0C27E1A67E85}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {47829CA1-0E21-4687-9ABB-0C27E1A67E85}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {47829CA1-0E21-4687-9ABB-0C27E1A67E85}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {47829CA1-0E21-4687-9ABB-0C27E1A67E85}.Release|Any CPU.Build.0 = Release|Any CPU
+       EndGlobalSection
+       GlobalSection(SolutionProperties) = preSolution
+               HideSolutionNode = FALSE
+       EndGlobalSection
+       GlobalSection(ExtensibilityGlobals) = postSolution
+               SolutionGuid = {118813F7-AD71-497A-B9AB-443A89F48D34}
+       EndGlobalSection
+EndGlobal
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/CellPaddingView.xaml b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/CellPaddingView.xaml
new file mode 100644 (file)
index 0000000..37c5827
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<View x:Class="Tizen.NUI.LayoutSamples.CellPaddingView"
+    xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+    WidthSpecification="{Static LayoutParamPolicies.MatchParent}">
+
+    <View.Layout>
+        <LinearLayout LinearOrientation="Vertical"/>
+    </View.Layout>
+
+    <TextLabel x:Name="cellPaddingText"
+        Text="CellPadding"
+        WidthSpecification="{Static LayoutParamPolicies.MatchParent}"/>
+
+    <View x:Name="cellPaddingValue"
+        WidthSpecification="{Static LayoutParamPolicies.MatchParent}">
+
+        <View.Layout>
+            <LinearLayout LinearOrientation="Horizontal" CellPadding="20,0"/>
+        </View.Layout>
+
+        <TextField x:Name="cellPaddingW"
+            Text="0"
+            WidthSpecification="100"
+            BorderlineColor="Black"
+            BorderlineOffset="-1"
+            BorderlineWidth="1"
+            TextChanged="CellPaddingWTextChanged"/>
+
+        <TextField x:Name="cellPaddingH"
+            Text="0"
+            WidthSpecification="100"
+            BorderlineColor="Black"
+            BorderlineOffset="-1"
+            BorderlineWidth="1"
+            TextChanged="CellPaddingHTextChanged"/>
+    </View>
+</View>
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/CellPaddingView.xaml.cs b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/CellPaddingView.xaml.cs
new file mode 100644 (file)
index 0000000..29e4134
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * Copyright(c) 2022 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 Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.LayoutSamples
+{
+    public partial class CellPaddingView : View, ILayoutProperty<Size2D>
+    {
+        private Text.InputFilter inputFilter;
+        private ObjectLinearLayout linearLayout = null;
+
+        public CellPaddingView()
+        {
+            InitializeComponent();
+
+            inputFilter = new Text.InputFilter();
+            inputFilter.Accepted = "[0-9]";
+            cellPaddingW.SetInputFilter(inputFilter);
+            cellPaddingH.SetInputFilter(inputFilter);
+        }
+
+        public Size2D PropertyValue
+        {
+            get
+            {
+                return (linearLayout != null) ? linearLayout.CellPadding : new Size2D(0, 0);
+            }
+
+            set
+            {
+                if (linearLayout == null) return;
+
+                linearLayout.CellPadding = value;
+            }
+        }
+
+        public void SetLayout(IObjectLayout layout)
+        {
+            if (!(layout is LinearLayout)) return;
+
+            if (linearLayout == layout as ObjectLinearLayout) return;
+
+            linearLayout = layout as ObjectLinearLayout;
+
+            // CellPadding
+            cellPaddingW.Text = linearLayout.CellPadding.Width.ToString();
+            cellPaddingH.Text = linearLayout.CellPadding.Height.ToString();
+
+            linearLayout.CellPaddingChanged += (object sender, CellPaddingChangedEventArgs args) =>
+            {
+                cellPaddingW.Text = args.CellPadding.Width.ToString();
+                cellPaddingH.Text = args.CellPadding.Height.ToString();
+
+                linearLayout.RequestLayout();
+            };
+
+            linearLayout.RequestLayout();
+        }
+
+        private void CellPaddingWTextChanged(object sender, TextField.TextChangedEventArgs args)
+        {
+            if (linearLayout != null)
+            {
+                int changedValue;
+                if (int.TryParse(args.TextField.Text, out changedValue))
+                {
+                    linearLayout.CellPadding = new Size2D(changedValue, linearLayout.CellPadding.Height);
+                    linearLayout.RequestLayout();
+                }
+            }
+        }
+
+        private void CellPaddingHTextChanged(object sender, TextField.TextChangedEventArgs args)
+        {
+            if (linearLayout != null)
+            {
+                int changedValue;
+                if (int.TryParse(args.TextField.Text, out changedValue))
+                {
+                    linearLayout.CellPadding = new Size2D(linearLayout.CellPadding.Width, changedValue);
+                    linearLayout.RequestLayout();
+                }
+            }
+        }
+    }
+}
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ControlView.xaml b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ControlView.xaml
new file mode 100644 (file)
index 0000000..4a99e8d
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<View x:Class="Tizen.NUI.LayoutSamples.ControlView"
+    xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+    xmlns:m="clr-namespace:Tizen.NUI.LayoutSamples"
+    WidthSpecification="{Static LayoutParamPolicies.MatchParent}"
+    HeightSpecification="{Static LayoutParamPolicies.MatchParent}">
+
+    <View.Layout>
+        <LinearLayout LinearOrientation="Vertical" CellPadding="0,0"/>
+    </View.Layout>
+
+    <TabView x:Name="tabView"
+        WidthSpecification="{Static LayoutParamPolicies.MatchParent}"
+        HeightSpecification="{Static LayoutParamPolicies.MatchParent}"
+        BackgroundColor="White">
+    </TabView>
+
+    <View x:Name="buttons"
+        WidthSpecification="{Static LayoutParamPolicies.MatchParent}"
+        BackgroundColor="White">
+
+        <View.Layout>
+            <LinearLayout LinearOrientation="Horizontal" CellPadding="40,0"/>
+        </View.Layout>
+
+        <Button x:Name="addViewButton"
+            Text="Add View"
+            Clicked="AddViewButtonClicked"/>
+
+        <Button x:Name="removeViewButton"
+            Text="Remove View"
+            Clicked="RemoveViewButtonClicked"/>
+    </View>
+</View>
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ControlView.xaml.cs b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ControlView.xaml.cs
new file mode 100644 (file)
index 0000000..03f3978
--- /dev/null
@@ -0,0 +1,132 @@
+/*
+ * Copyright(c) 2022 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.Components;
+
+namespace Tizen.NUI.LayoutSamples
+{
+    public partial class ControlView : View
+    {
+        private ObjectView objectView = null;
+        private LinearLayoutControlView linearLayoutControlView = null;
+        private ObjectControlView objectControlView = null;
+
+        public ControlView()
+        {
+            InitializeComponent();
+
+            SetLayoutControlView();
+            SetObjectControlView();
+        }
+
+        public event EventHandler<EventArgs> ViewAdded;
+        public event EventHandler<EventArgs> ViewRemoved;
+
+        public void SetView(IObjectView view)
+        {
+            if (!(view is View)) return;
+
+            if (objectView == view as ObjectView) return;
+
+            objectView = view as ObjectView;
+
+            linearLayoutControlView.SetLayout(objectView.Layout as IObjectLayout);
+
+            objectControlView.SetView(objectView);
+
+            var parent = objectView.GetParent() as ObjectView;
+            if (parent == null)
+            {
+                removeViewButton.IsEnabled = false;
+            }
+            else
+            {
+                removeViewButton.IsEnabled = true;
+            }
+        }
+
+        private void SetLayoutControlView()
+        {
+            var layoutTab = new TabButton()
+            {
+                Text = "Layout",
+            };
+
+            var layoutContent = new TabContent()
+            {
+                Layout = new LinearLayout()
+                {
+                    LinearOrientation = LinearLayout.Orientation.Vertical,
+                    CellPadding = new Size2D(0, 40),
+                },
+                WidthSpecification = LayoutParamPolicies.MatchParent,
+                HeightSpecification = LayoutParamPolicies.MatchParent,
+            };
+
+            LayoutType selectedLayoutType = LayoutType.LinearLayout;
+
+            var layoutType = new LayoutTypeView();
+            layoutType.LayoutType = selectedLayoutType;
+            layoutType.LayoutTypeChanged += (object sender, LayoutTypeChangedEventArgs args) =>
+            {
+                if (args.LayoutType == LayoutType.LinearLayout)
+                {
+                    if (linearLayoutControlView == null)
+                    {
+                        linearLayoutControlView = new LinearLayoutControlView();
+                    }
+                }
+            };
+            layoutContent.Add(layoutType);
+
+            linearLayoutControlView = new LinearLayoutControlView();
+            layoutContent.Add(linearLayoutControlView);
+
+            tabView.AddTab(layoutTab, layoutContent);
+        }
+
+        private void SetObjectControlView()
+        {
+            var viewTab = new TabButton()
+            {
+                Text = "View",
+            };
+
+            var viewContent = new TabContent()
+            {
+                WidthSpecification = LayoutParamPolicies.MatchParent,
+                HeightSpecification = LayoutParamPolicies.MatchParent,
+            };
+
+            objectControlView = new ObjectControlView();
+            viewContent.Add(objectControlView);
+
+            tabView.AddTab(viewTab, viewContent);
+        }
+
+        private void AddViewButtonClicked(object sender, ClickedEventArgs args)
+        {
+            ViewAdded?.Invoke(objectView, new EventArgs());
+        }
+
+        private void RemoveViewButtonClicked(object sender, ClickedEventArgs args)
+        {
+            ViewRemoved?.Invoke(objectView, new EventArgs());
+        }
+    }
+}
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ControlWindowLayoutTab.png b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ControlWindowLayoutTab.png
new file mode 100644 (file)
index 0000000..e2b6b4f
Binary files /dev/null and b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ControlWindowLayoutTab.png differ
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ControlWindowViewTab.png b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ControlWindowViewTab.png
new file mode 100644 (file)
index 0000000..df8c135
Binary files /dev/null and b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ControlWindowViewTab.png differ
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/DisplayWindow.png b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/DisplayWindow.png
new file mode 100644 (file)
index 0000000..ee983dc
Binary files /dev/null and b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/DisplayWindow.png differ
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/HeightSpecificationView.xaml b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/HeightSpecificationView.xaml
new file mode 100644 (file)
index 0000000..ce5a030
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<View x:Class="Tizen.NUI.LayoutSamples.HeightSpecificationView"
+    xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+    WidthSpecification="{Static LayoutParamPolicies.MatchParent}">
+
+    <View.Layout>
+        <LinearLayout LinearOrientation="Vertical"/>
+    </View.Layout>
+
+    <TextLabel x:Name="heightSpecText"
+        Text="HeightSpecification"
+        WidthSpecification="{Static LayoutParamPolicies.MatchParent}"/>
+
+    <View x:Name="heightSpecOptions"
+        WidthSpecification="{Static LayoutParamPolicies.MatchParent}">
+
+        <View.Layout>
+            <LinearLayout LinearOrientation="Horizontal" CellPadding="20,0"/>
+        </View.Layout>
+
+        <RadioButton x:Name="heightSpecMatchParent"
+            Text="MatchParent"
+            SelectedChanged="HeightSpecMatchParentSelectedChanged"/>
+
+        <RadioButton x:Name="heightSpecWrapContent"
+            Text="WrapContent"
+            SelectedChanged="HeightSpecWrapContentSelectedChanged"/>
+
+        <RadioButton x:Name="heightSpecValue"
+            SelectedChanged="HeightSpecValueSelectedChanged"/>
+
+        <TextField x:Name="heightSpecValueField"
+            Text="-2"
+            WidthSpecification="100"
+            BorderlineColor="Black"
+            BorderlineOffset="-1"
+            BorderlineWidth="1"
+            TextChanged="HeightSpecValueTextChanged"/>
+    </View>
+</View>
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/HeightSpecificationView.xaml.cs b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/HeightSpecificationView.xaml.cs
new file mode 100644 (file)
index 0000000..b6cdfef
--- /dev/null
@@ -0,0 +1,167 @@
+/*
+ * Copyright(c) 2022 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 Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace Tizen.NUI.LayoutSamples
+{
+    public partial class HeightSpecificationView : View, IObjectProperty<int>
+    {
+        private RadioButtonGroup heightSpecGroup;
+        private Text.InputFilter inputFilter;
+        private ObjectView controlView = null;
+
+        public HeightSpecificationView()
+        {
+            InitializeComponent();
+
+            heightSpecGroup = new RadioButtonGroup();
+            heightSpecGroup.Add(heightSpecMatchParent);
+            heightSpecGroup.Add(heightSpecWrapContent);
+            heightSpecGroup.Add(heightSpecValue);
+            heightSpecGroup.EnableMultiSelection = false;
+            heightSpecWrapContent.IsSelected = true;
+            // FIXME: TextField does not support IsEnabled now.
+            heightSpecValueField.EnableEditing = false;
+
+            inputFilter = new Text.InputFilter();
+            inputFilter.Accepted = "[0-9]";
+            heightSpecValueField.SetInputFilter(inputFilter);
+        }
+
+        public int PropertyValue
+        {
+            get
+            {
+                return (controlView != null) ? controlView.HeightSpecification : LayoutParamPolicies.WrapContent;
+            }
+
+            set
+            {
+                if (controlView == null) return;
+
+                controlView.HeightSpecification = value;
+            }
+        }
+
+        public void SetView(IObjectView view)
+        {
+            if (!(view is View)) return;
+
+            if (controlView == view as ObjectView) return;
+
+            controlView = view as ObjectView;
+
+            // HeightSpecification
+            if (controlView.HeightSpecification == LayoutParamPolicies.MatchParent)
+            {
+                heightSpecMatchParent.IsSelected = true;
+            }
+            else if (controlView.HeightSpecification == LayoutParamPolicies.WrapContent)
+            {
+                heightSpecWrapContent.IsSelected = true;
+            }
+            else
+            {
+                heightSpecValueField.Text = controlView.HeightSpecification.ToString();
+                heightSpecValue.IsSelected = true;
+            }
+
+            controlView.HeightSpecificationChanged += (object sender, HeightSpecificationChangedEventArgs args) =>
+            {
+                if (args.HeightSpecification == LayoutParamPolicies.MatchParent)
+                {
+                    heightSpecMatchParent.IsSelected = true;
+                }
+                else if (args.HeightSpecification == LayoutParamPolicies.WrapContent)
+                {
+                    heightSpecWrapContent.IsSelected = true;
+                }
+                else
+                {
+                    heightSpecValueField.Text = controlView.HeightSpecification.ToString();
+                    heightSpecValue.IsSelected = true;
+                }
+
+                (controlView.Layout)?.RequestLayout();
+            };
+
+            (controlView.Layout)?.RequestLayout();
+        }
+
+        private void HeightSpecMatchParentSelectedChanged(object sender, SelectedChangedEventArgs args)
+        {
+            if (args.IsSelected)
+            {
+                heightSpecValueField.Text = LayoutParamPolicies.MatchParent.ToString();
+                if (controlView != null)
+                {
+                    controlView.HeightSpecification = LayoutParamPolicies.MatchParent;
+                }
+            }
+        }
+
+        private void HeightSpecWrapContentSelectedChanged(object sender, SelectedChangedEventArgs args)
+        {
+            if (args.IsSelected)
+            {
+                heightSpecValueField.Text = LayoutParamPolicies.WrapContent.ToString();
+                if (controlView != null)
+                {
+                    controlView.HeightSpecification = LayoutParamPolicies.WrapContent;
+                }
+            }
+        }
+
+        private void HeightSpecValueSelectedChanged(object sender, SelectedChangedEventArgs args)
+        {
+            if (args.IsSelected)
+            {
+                heightSpecValueField.EnableEditing = true;
+                if (controlView != null)
+                {
+                    int changedValue;
+                    if (int.TryParse(heightSpecValueField.Text, out changedValue))
+                    {
+                        if (controlView.HeightSpecification != changedValue)
+                        {
+                            controlView.HeightSpecification = changedValue;
+                            controlView.Layout?.RequestLayout();
+                        }
+                    }
+                }
+            }
+            else
+            {
+                heightSpecValueField.EnableEditing = false;
+            }
+        }
+
+        private void HeightSpecValueTextChanged(object sender, TextField.TextChangedEventArgs args)
+        {
+            if (controlView != null)
+            {
+                int changedValue;
+                if (int.TryParse(heightSpecValueField.Text, out changedValue))
+                {
+                    controlView.HeightSpecification = changedValue;
+                    controlView.Layout?.RequestLayout();
+                }
+            }
+        }
+    }
+}
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/HorizontalAlignmentView.xaml b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/HorizontalAlignmentView.xaml
new file mode 100644 (file)
index 0000000..98ddc9b
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<View x:Class="Tizen.NUI.LayoutSamples.HorizontalAlignmentView"
+    xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+    WidthSpecification="{Static LayoutParamPolicies.MatchParent}">
+
+    <View.Layout>
+        <LinearLayout LinearOrientation="Vertical"/>
+    </View.Layout>
+
+    <TextLabel x:Name="hAlignText"
+        Text="HorizontalAlignment"
+        WidthSpecification="{Static LayoutParamPolicies.MatchParent}"/>
+
+    <View x:Name="hAlignOptions"
+        WidthSpecification="{Static LayoutParamPolicies.MatchParent}">
+
+        <View.Layout>
+            <LinearLayout LinearOrientation="Horizontal" CellPadding="20,0"/>
+        </View.Layout>
+
+        <RadioButton x:Name="hAlignBegin"
+            Text="Begin"
+            SelectedChanged="HAlignBeginSelectedChanged"/>
+
+        <RadioButton x:Name="hAlignCenter"
+            Text="Center"
+            SelectedChanged="HAlignCenterSelectedChanged"/>
+
+        <RadioButton x:Name="hAlignEnd"
+            Text="End"
+            SelectedChanged="HAlignEndSelectedChanged"/>
+    </View>
+</View>
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/HorizontalAlignmentView.xaml.cs b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/HorizontalAlignmentView.xaml.cs
new file mode 100644 (file)
index 0000000..af10e8e
--- /dev/null
@@ -0,0 +1,134 @@
+/*
+ * Copyright(c) 2022 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 Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace Tizen.NUI.LayoutSamples
+{
+    public partial class HorizontalAlignmentView : View, ILayoutProperty<HorizontalAlignment>
+    {
+        private RadioButtonGroup hAlignGroup;
+        private RadioButtonGroup vAlignGroup;
+        private ObjectLinearLayout linearLayout = null;
+
+        public HorizontalAlignmentView()
+        {
+            InitializeComponent();
+
+            hAlignGroup = new RadioButtonGroup();
+            hAlignGroup.Add(hAlignBegin);
+            hAlignGroup.Add(hAlignCenter);
+            hAlignGroup.Add(hAlignEnd);
+            hAlignGroup.EnableMultiSelection = false;
+            hAlignBegin.IsSelected = true;
+        }
+
+        public HorizontalAlignment PropertyValue
+        {
+            get
+            {
+                return (linearLayout != null) ? linearLayout.HorizontalAlignment : HorizontalAlignment.Begin;
+            }
+
+            set
+            {
+                if (linearLayout == null) return;
+                
+                linearLayout.HorizontalAlignment = value;
+            }
+        }
+
+        public void SetLayout(IObjectLayout layout)
+        {
+            if (!(layout is LinearLayout)) return;
+
+            if (linearLayout == layout as ObjectLinearLayout) return;
+
+            linearLayout = layout as ObjectLinearLayout;
+
+            // HorizontalAlignment
+            if (linearLayout.HorizontalAlignment == HorizontalAlignment.Begin)
+            {
+                hAlignBegin.IsSelected = true;
+            }
+            else if (linearLayout.HorizontalAlignment == HorizontalAlignment.Center)
+            {
+                hAlignCenter.IsSelected = true;
+            }
+            else
+            {
+                hAlignEnd.IsSelected = true;
+            }
+
+            linearLayout.HorizontalAlignmentChanged += (object sender, HorizontalAlignmentChangedEventArgs args) =>
+            {
+                if (args.HorizontalAlignment == HorizontalAlignment.Begin)
+                {
+                    hAlignBegin.IsSelected = true;
+                }
+                else if (args.HorizontalAlignment == HorizontalAlignment.Center)
+                {
+                    hAlignCenter.IsSelected = true;
+                }
+                else
+                {
+                    hAlignEnd.IsSelected = true;
+                }
+
+                linearLayout.RequestLayout();
+            };
+
+            linearLayout.RequestLayout();
+        }
+
+        private void HAlignBeginSelectedChanged(object sender, SelectedChangedEventArgs args)
+        {
+            if (args.IsSelected)
+            {
+                if (linearLayout != null)
+                {
+                    linearLayout.HorizontalAlignment = HorizontalAlignment.Begin;
+                    linearLayout.RequestLayout();
+                }
+            }
+        }
+
+        private void HAlignCenterSelectedChanged(object sender, SelectedChangedEventArgs args)
+        {
+            if (args.IsSelected)
+            {
+                if (linearLayout != null)
+                {
+                    linearLayout.HorizontalAlignment = HorizontalAlignment.Center;
+                    linearLayout.RequestLayout();
+                }
+            }
+        }
+
+        private void HAlignEndSelectedChanged(object sender, SelectedChangedEventArgs args)
+        {
+            if (args.IsSelected)
+            {
+                if (linearLayout != null)
+                {
+                    linearLayout.HorizontalAlignment = HorizontalAlignment.End;
+                    linearLayout.RequestLayout();
+                }
+            }
+        }
+    }
+}
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ILayoutProperty.cs b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ILayoutProperty.cs
new file mode 100644 (file)
index 0000000..10e36ed
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * Copyright(c) 2022 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.LayoutSamples
+{
+    public interface ILayoutProperty<T>
+    {
+        public T PropertyValue { get; set; }
+
+        public void SetLayout(IObjectLayout layout);
+    }
+}
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/IObjectLayout.cs b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/IObjectLayout.cs
new file mode 100644 (file)
index 0000000..0d9948d
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * Copyright(c) 2022 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.LayoutSamples
+{
+    public interface IObjectLayout
+    {
+    }
+}
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/IObjectProperty.cs b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/IObjectProperty.cs
new file mode 100644 (file)
index 0000000..7e36ea9
--- /dev/null
@@ -0,0 +1,25 @@
+/*
+ * Copyright(c) 2022 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.LayoutSamples
+{
+    public interface IObjectProperty<T>
+    {
+        public T PropertyValue { get; set; }
+
+        public void SetView(IObjectView view);
+    }
+}
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/IObjectView.cs b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/IObjectView.cs
new file mode 100644 (file)
index 0000000..5d567be
--- /dev/null
@@ -0,0 +1,105 @@
+/*
+ * Copyright(c) 2022 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;
+
+namespace Tizen.NUI.LayoutSamples
+{
+    public class WidthSpecificationChangedEventArgs : EventArgs
+    {
+        private int widthSpecification;
+
+        public WidthSpecificationChangedEventArgs(int changedValue)
+        {
+            widthSpecification = changedValue;
+        }
+
+        public int WidthSpecification
+        {
+            get
+            {
+                return widthSpecification;
+            }
+        }
+    }
+
+    public class HeightSpecificationChangedEventArgs : EventArgs
+    {
+        private int heightSpecification;
+
+        public HeightSpecificationChangedEventArgs(int changedValue)
+        {
+            heightSpecification = changedValue;
+        }
+
+        public int HeightSpecification
+        {
+            get
+            {
+                return heightSpecification;
+            }
+        }
+    }
+
+    public class MarginChangedEventArgs : EventArgs
+    {
+        private Extents margin;
+
+        public MarginChangedEventArgs(Extents changedValue)
+        {
+            margin = new Extents(changedValue);
+        }
+
+        public Extents Margin
+        {
+            get
+            {
+                return margin;
+            }
+        }
+    }
+
+    public class PaddingChangedEventArgs : EventArgs
+    {
+        private Extents padding;
+
+        public PaddingChangedEventArgs(Extents changedValue)
+        {
+            padding = new Extents(changedValue);
+        }
+
+        public Extents Padding
+        {
+            get
+            {
+                return padding;
+            }
+        }
+    }
+
+    public interface IObjectView
+    {
+        public int WidthSpecification { get; set; }
+        public int HeightSpecification { get; set; }
+        public Extents Margin { get; set; }
+        public Extents Padding { get; set; }
+
+        public event EventHandler<WidthSpecificationChangedEventArgs> WidthSpecificationChanged;
+        public event EventHandler<HeightSpecificationChangedEventArgs> HeightSpecificationChanged;
+        public event EventHandler<MarginChangedEventArgs> MarginChanged;
+        public event EventHandler<PaddingChangedEventArgs> PaddingChanged;
+    }
+}
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/LayoutSamplesClassDiagram.png b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/LayoutSamplesClassDiagram.png
new file mode 100644 (file)
index 0000000..b95c039
Binary files /dev/null and b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/LayoutSamplesClassDiagram.png differ
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/LayoutSamplesClassDiagram.txt b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/LayoutSamplesClassDiagram.txt
new file mode 100644 (file)
index 0000000..50bdb48
--- /dev/null
@@ -0,0 +1,101 @@
+@startuml
+
+scale 2
+
+interface IObjectView {
+    +WidthSpecificationView: int
+    +HeightSpecificationView: int
+    +Margin: Extents
+    +Padding: Extents
+    <<event>>
+    +WidthSpecificationChanged: EventHandler<EventArgs>
+    +HeightSpecificationChanged: EventHandler<EventArgs>
+    +MarginSpecificationChanged: EventHandler<EventArgs>
+    +PaddingSpecificationChanged: EventHandler<EventArgs>
+}
+
+class ObjectView {
+}
+
+interface IObjectProperty<T> {
+    +PropertyValue: T
+    +void SetView(IObjectView view)
+}
+
+class ObjectControlView {
+}
+
+class WidthSpecificationView {
+}
+
+class HeightSpecificationView {
+}
+
+class MarginView {
+}
+
+class PaddingView {
+}
+
+IObjectView <|.. ObjectView
+IObjectProperty <|.. ObjectControlView
+IObjectProperty <|.. WidthSpecificationView
+IObjectProperty <|.. HeightSpecificationView
+IObjectProperty <|.. MarginView
+IObjectProperty <|.. PaddingView
+IObjectProperty o-- IObjectView
+ObjectControlView *-- WidthSpecificationView
+ObjectControlView *-- HeightSpecificationView
+ObjectControlView *-- MarginView
+ObjectControlView *-- PaddingView
+
+interface ILayoutProperty<T> {
+    +PropertyValue: T
+    +void SetLayout(IObjectLayout layout)
+}
+
+interface IObjectLayout {
+}
+
+class ObjectLinearLayout {
+    +LinearOrientation: LinearLayout.Orientation
+    +CellPadding: Size2D
+    <<event>>
+    +LinearOrientationChanged: EventHandler<EventArgs>
+    +CellPaddingChanged: EventHandler<EventArgs>
+}
+
+class LinearLayoutControlView {
+}
+
+class LinearOrientationView {
+}
+
+class CellPaddingView {
+}
+
+class HorizontalAlignmentView {
+}
+
+class VerticalAlignmentView {
+}
+
+IObjectLayout <|.. ObjectLinearLayout
+ILayoutProperty <|.. LinearLayoutControlView
+ILayoutProperty <|.. LinearOrientationView
+ILayoutProperty <|.. CellPaddingView
+ILayoutProperty <|.. HorizontalAlignmentView
+ILayoutProperty <|.. VerticalAlignmentView
+ILayoutProperty o-- IObjectLayout
+LinearLayoutControlView *-- LinearOrientationView
+LinearLayoutControlView *-- CellPaddingView
+LinearLayoutControlView *-- HorizontalAlignmentView
+LinearLayoutControlView *-- VerticalAlignmentView
+
+class ControlView {
+}
+
+ControlView *-- LinearLayoutControlView
+ControlView *-- ObjectControlView
+
+@enduml
\ No newline at end of file
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/LayoutTypeView.xaml b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/LayoutTypeView.xaml
new file mode 100644 (file)
index 0000000..7445049
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<View x:Class="Tizen.NUI.LayoutSamples.LayoutTypeView"
+    xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+    WidthSpecification="{Static LayoutParamPolicies.MatchParent}"
+    HeightSpecification="{Static LayoutParamPolicies.WrapContent}">
+
+    <View.Layout>
+        <LinearLayout LinearOrientation="Vertical"/>
+    </View.Layout>
+
+    <TextLabel x:Name="layoutTypeText"
+        Text="Layout Type"
+        WidthSpecification="{Static LayoutParamPolicies.MatchParent}"/>
+
+    <View x:Name="layoutTypeOptions"
+        WidthSpecification="{Static LayoutParamPolicies.MatchParent}">
+
+        <View.Layout>
+            <LinearLayout LinearOrientation="Horizontal" CellPadding="20,0"/>
+        </View.Layout>
+
+        <RadioButton x:Name="layoutTypeLinear"
+            Text="Linear"
+            SelectedChanged="LinearSelectedChanged"/>
+    </View>
+</View>
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/LayoutTypeView.xaml.cs b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/LayoutTypeView.xaml.cs
new file mode 100644 (file)
index 0000000..5059843
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * Copyright(c) 2022 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.Components;
+
+namespace Tizen.NUI.LayoutSamples
+{
+    public enum LayoutType
+    {
+        LinearLayout = 0,
+    }
+
+    public class LayoutTypeChangedEventArgs : EventArgs
+    {
+        public LayoutTypeChangedEventArgs(LayoutType type)
+        {
+            LayoutType = type;
+        }
+
+        public LayoutType LayoutType { get; set; }
+    }
+
+    public partial class LayoutTypeView : View
+    {
+        private RadioButtonGroup layoutTypeGroup;
+        private LayoutType layoutType = LayoutType.LinearLayout;
+
+        public LayoutTypeView()
+        {
+            InitializeComponent();
+
+            layoutTypeGroup = new RadioButtonGroup();
+            layoutTypeGroup.Add(layoutTypeLinear);
+            layoutTypeGroup.EnableMultiSelection = false;
+            layoutTypeLinear.IsSelected = true;
+        }
+
+        public event EventHandler<LayoutTypeChangedEventArgs> LayoutTypeChanged;
+
+        public LayoutType LayoutType
+        {
+            get
+            {
+                return layoutType;
+            }
+
+            set
+            {
+                if (layoutType == value) return;
+                layoutType = value;
+
+                if (layoutType == LayoutType.LinearLayout)
+                {
+                    if (layoutTypeLinear.IsSelected == false)
+                    {
+                        layoutTypeLinear.IsSelected = true;
+                    }
+                }
+                else
+                {
+                    // TODO: Add more layout types
+                }
+
+                LayoutTypeChanged?.Invoke(this, new LayoutTypeChangedEventArgs(layoutType));
+            }
+        }
+
+        private void LinearSelectedChanged(object sender, SelectedChangedEventArgs args)
+        {
+            if (args.IsSelected)
+            {
+                LayoutType = LayoutType.LinearLayout;
+            }
+        }
+    }
+}
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/LinearLayoutControlView.xaml b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/LinearLayoutControlView.xaml
new file mode 100644 (file)
index 0000000..1730f71
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ScrollableBase x:Class="Tizen.NUI.LayoutSamples.LinearLayoutControlView"
+    xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+    xmlns:m="clr-namespace:Tizen.NUI.LayoutSamples"
+    WidthSpecification="{Static LayoutParamPolicies.MatchParent}"
+    HeightSpecification="{Static LayoutParamPolicies.MatchParent}"
+    HideScrollbar="false">
+
+    <ScrollableBase.Layout>
+        <LinearLayout LinearOrientation="Vertical" CellPadding="0,40"/>
+    </ScrollableBase.Layout>
+
+    <m:LinearOrientationView x:Name="linearOrient"/>
+
+    <m:CellPaddingView x:Name="cellPadding"/>
+
+    <m:HorizontalAlignmentView x:Name="hAlign"/>
+
+    <m:VerticalAlignmentView x:Name="vAlign"/>
+</ScrollableBase>
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/LinearLayoutControlView.xaml.cs b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/LinearLayoutControlView.xaml.cs
new file mode 100644 (file)
index 0000000..79775c5
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * Copyright(c) 2022 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 Tizen.NUI.Components;
+
+namespace Tizen.NUI.LayoutSamples
+{
+    public partial class LinearLayoutControlView : ScrollableBase, ILayoutProperty<ObjectLinearLayout>
+    {
+        private ObjectLinearLayout linearLayout = null;
+
+        public LinearLayoutControlView()
+        {
+            InitializeComponent();
+        }
+
+        public ObjectLinearLayout PropertyValue
+        {
+            get
+            {
+                return linearLayout;
+            }
+
+            set
+            {
+                SetLayout(value as IObjectLayout);
+            }
+        }
+
+        public void SetLayout(IObjectLayout layout)
+        {
+            if (!(layout is LinearLayout)) return;
+
+            if (linearLayout == layout as ObjectLinearLayout) return;
+
+            linearLayout = layout as ObjectLinearLayout;
+
+            // LinearOrientation
+            linearOrient.SetLayout(linearLayout);
+
+            // CellPadding
+            cellPadding.SetLayout(linearLayout);
+
+            // HorizontalAlignment
+            hAlign.SetLayout(linearLayout);
+
+            // VerticalAlignment
+            vAlign.SetLayout(linearLayout);
+
+            linearLayout.RequestLayout();
+        }
+    }
+}
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/LinearOrientationView.xaml b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/LinearOrientationView.xaml
new file mode 100644 (file)
index 0000000..08ac809
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<View x:Class="Tizen.NUI.LayoutSamples.LinearOrientationView"
+    xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+    WidthSpecification="{Static LayoutParamPolicies.MatchParent}">
+
+    <View.Layout>
+        <LinearLayout LinearOrientation="Vertical"/>
+    </View.Layout>
+
+    <TextLabel x:Name="linearOrientText"
+        Text="LinearOrientation"
+        WidthSpecification="{Static LayoutParamPolicies.MatchParent}"/>
+
+    <View x:Name="linearOrientOptions"
+        WidthSpecification="{Static LayoutParamPolicies.MatchParent}">
+
+        <View.Layout>
+            <LinearLayout LinearOrientation="Horizontal" CellPadding="20,0"/>
+        </View.Layout>
+
+        <RadioButton x:Name="linearOrientH"
+            Text="Horizontal"
+            SelectedChanged="LinearOrientHSelectedChanged"/>
+
+        <RadioButton x:Name="linearOrientV"
+            Text="Vertical"
+            SelectedChanged="LinearOrientVSelectedChanged"/>
+    </View>
+</View>
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/LinearOrientationView.xaml.cs b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/LinearOrientationView.xaml.cs
new file mode 100644 (file)
index 0000000..37e3bef
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ * Copyright(c) 2022 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 Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace Tizen.NUI.LayoutSamples
+{
+    public partial class LinearOrientationView : View, ILayoutProperty<LinearLayout.Orientation>
+    {
+        private RadioButtonGroup linearOrientGroup;
+        private ObjectLinearLayout linearLayout = null;
+
+        public LinearOrientationView()
+        {
+            InitializeComponent();
+
+            linearOrientGroup = new RadioButtonGroup();
+            linearOrientGroup.Add(linearOrientH);
+            linearOrientGroup.Add(linearOrientV);
+            linearOrientGroup.EnableMultiSelection = false;
+            linearOrientH.IsSelected = true;
+        }
+
+        public LinearLayout.Orientation PropertyValue
+        {
+            get
+            {
+                return (linearLayout != null) ? linearLayout.LinearOrientation : LinearLayout.Orientation.Horizontal;
+            }
+
+            set
+            {
+                if (linearLayout == null) return;
+
+                linearLayout.LinearOrientation = value;
+            }
+        }
+
+        public void SetLayout(IObjectLayout layout)
+        {
+            if (!(layout is LinearLayout)) return;
+
+            if (linearLayout == layout as ObjectLinearLayout) return;
+
+            linearLayout = layout as ObjectLinearLayout;
+
+            // LinearOrientation
+            if (linearLayout.LinearOrientation == LinearLayout.Orientation.Horizontal)
+            {
+                linearOrientH.IsSelected = true;
+            }
+            else
+            {
+                linearOrientV.IsSelected = true;
+            }
+
+            linearLayout.LinearOrientationChanged += (object sender, LinearOrientationChangedEventArgs args) =>
+            {
+                if (args.LinearOrientation == LinearLayout.Orientation.Horizontal)
+                {
+                    linearOrientH.IsSelected = true;
+                }
+                else
+                {
+                    linearOrientV.IsSelected = true;
+                }
+
+                linearLayout.RequestLayout();
+            };
+
+            linearLayout.RequestLayout();
+        }
+
+        private void LinearOrientHSelectedChanged(object sender, SelectedChangedEventArgs args)
+        {
+            if (args.IsSelected)
+            {
+                if (linearLayout != null)
+                {
+                    linearLayout.LinearOrientation = LinearLayout.Orientation.Horizontal;
+                    linearLayout.RequestLayout();
+                }
+            }
+        }
+
+        private void LinearOrientVSelectedChanged(object sender, SelectedChangedEventArgs args)
+        {
+            if (args.IsSelected)
+            {
+                if (linearLayout != null)
+                {
+                    linearLayout.LinearOrientation = LinearLayout.Orientation.Vertical;
+                    linearLayout.RequestLayout();
+                }
+            }
+        }
+    }
+}
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/MarginView.xaml b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/MarginView.xaml
new file mode 100644 (file)
index 0000000..fb85074
--- /dev/null
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<View x:Class="Tizen.NUI.LayoutSamples.MarginView"
+    xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+    WidthSpecification="{Static LayoutParamPolicies.MatchParent}">
+
+    <View.Layout>
+        <LinearLayout LinearOrientation="Vertical"/>
+    </View.Layout>
+
+    <TextLabel x:Name="marginText"
+        Text="Margin"
+        WidthSpecification="{Static LayoutParamPolicies.MatchParent}"/>
+
+    <View x:Name="marginValue"
+        WidthSpecification="{Static LayoutParamPolicies.MatchParent}">
+
+        <View.Layout>
+            <LinearLayout LinearOrientation="Horizontal" CellPadding="20,0"/>
+        </View.Layout>
+
+        <TextField x:Name="marginStart"
+            Text="0"
+            WidthSpecification="100"
+            BorderlineColor="Black"
+            BorderlineOffset="-1"
+            BorderlineWidth="1"
+            TextChanged="MarginStartTextChanged"/>
+
+        <TextField x:Name="marginEnd"
+            Text="0"
+            WidthSpecification="100"
+            BorderlineColor="Black"
+            BorderlineOffset="-1"
+            BorderlineWidth="1"
+            TextChanged="MarginEndTextChanged"/>
+
+        <TextField x:Name="marginTop"
+            Text="0"
+            WidthSpecification="100"
+            BorderlineColor="Black"
+            BorderlineOffset="-1"
+            BorderlineWidth="1"
+            TextChanged="MarginTopTextChanged"/>
+
+        <TextField x:Name="marginBottom"
+            Text="0"
+            WidthSpecification="100"
+            BorderlineColor="Black"
+            BorderlineOffset="-1"
+            BorderlineWidth="1"
+            TextChanged="MarginBottomTextChanged"/>
+    </View>
+</View>
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/MarginView.xaml.cs b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/MarginView.xaml.cs
new file mode 100644 (file)
index 0000000..6c50c9e
--- /dev/null
@@ -0,0 +1,132 @@
+/*
+ * Copyright(c) 2022 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 Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.LayoutSamples
+{
+    public partial class MarginView : View, IObjectProperty<Extents>
+    {
+        private Text.InputFilter inputFilter;
+        private ObjectView controlView = null;
+
+        public MarginView()
+        {
+            InitializeComponent();
+
+            inputFilter = new Text.InputFilter();
+            inputFilter.Accepted = "[0-9]";
+            marginStart.SetInputFilter(inputFilter);
+            marginEnd.SetInputFilter(inputFilter);
+            marginTop.SetInputFilter(inputFilter);
+            marginBottom.SetInputFilter(inputFilter);
+        }
+
+        public Extents PropertyValue
+        {
+            get
+            {
+                return (controlView != null) ? controlView.Margin : new Extents(0, 0, 0, 0);
+            }
+
+            set
+            {
+                if (controlView == null) return;
+
+                controlView.Margin = value;
+            }
+        }
+
+        public void SetView(IObjectView view)
+        {
+            if (!(view is View)) return;
+
+            if (controlView == view as ObjectView) return;
+
+            controlView = view as ObjectView;
+
+            // Margin
+            marginStart.Text = controlView.Margin.Start.ToString();
+            marginEnd.Text = controlView.Margin.End.ToString();
+            marginTop.Text = controlView.Margin.Top.ToString();
+            marginBottom.Text = controlView.Margin.Bottom.ToString();
+
+            controlView.MarginChanged += (object sender, MarginChangedEventArgs args) =>
+            {
+                marginStart.Text = args.Margin.Start.ToString();
+                marginEnd.Text = args.Margin.End.ToString();
+                marginTop.Text = args.Margin.Top.ToString();
+                marginBottom.Text = args.Margin.Bottom.ToString();
+
+                controlView.Layout?.RequestLayout();
+            };
+
+            controlView.Layout?.RequestLayout();
+        }
+
+        private void MarginStartTextChanged(object sender, TextField.TextChangedEventArgs args)
+        {
+            if (controlView != null)
+            {
+                ushort changedValue;
+                if (ushort.TryParse(args.TextField.Text, out changedValue))
+                {
+                    controlView.Margin = new Extents(changedValue, controlView.Margin.End, controlView.Margin.Top, controlView.Margin.Bottom);
+                    controlView.Layout?.RequestLayout();
+                }
+            }
+        }
+
+        private void MarginEndTextChanged(object sender, TextField.TextChangedEventArgs args)
+        {
+            if (controlView != null)
+            {
+                ushort changedValue;
+                if (ushort.TryParse(args.TextField.Text, out changedValue))
+                {
+                    controlView.Margin = new Extents(controlView.Margin.Start, changedValue, controlView.Margin.Top, controlView.Margin.Bottom);
+                    controlView.Layout?.RequestLayout();
+                }
+            }
+        }
+
+        private void MarginTopTextChanged(object sender, TextField.TextChangedEventArgs args)
+        {
+            if (controlView != null)
+            {
+                ushort changedValue;
+                if (ushort.TryParse(args.TextField.Text, out changedValue))
+                {
+                    controlView.Margin = new Extents(controlView.Margin.Start, controlView.Margin.End, changedValue, controlView.Margin.Bottom);
+                    controlView.Layout?.RequestLayout();
+                }
+            }
+        }
+
+        private void MarginBottomTextChanged(object sender, TextField.TextChangedEventArgs args)
+        {
+            if (controlView != null)
+            {
+                ushort changedValue;
+                if (ushort.TryParse(args.TextField.Text, out changedValue))
+                {
+                    controlView.Margin = new Extents(controlView.Margin.Start, controlView.Margin.End, controlView.Margin.Top, changedValue);
+                    controlView.Layout?.RequestLayout();
+                }
+            }
+        }
+    }
+}
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ObjectControlView.xaml b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ObjectControlView.xaml
new file mode 100644 (file)
index 0000000..aadb568
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ScrollableBase x:Class="Tizen.NUI.LayoutSamples.ObjectControlView"
+    xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+    xmlns:m="clr-namespace:Tizen.NUI.LayoutSamples"
+    WidthSpecification="{Static LayoutParamPolicies.MatchParent}"
+    HeightSpecification="{Static LayoutParamPolicies.MatchParent}"
+    HideScrollbar="false">
+
+    <ScrollableBase.Layout>
+        <LinearLayout LinearOrientation="Vertical" CellPadding="0,40"/>
+    </ScrollableBase.Layout>
+
+    <m:WidthSpecificationView x:Name="widthSpec"/>
+
+    <m:HeightSpecificationView x:Name="heightSpec"/>
+
+    <m:MarginView x:Name="margin"/>
+
+    <m:PaddingView x:Name="padding"/>
+</ScrollableBase>
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ObjectControlView.xaml.cs b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ObjectControlView.xaml.cs
new file mode 100644 (file)
index 0000000..6662f9f
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * Copyright(c) 2022 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 Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace Tizen.NUI.LayoutSamples
+{
+    public partial class ObjectControlView : ScrollableBase, IObjectProperty<ObjectView>
+    {
+        private ObjectView controlView = null;
+
+        public ObjectControlView()
+        {
+            InitializeComponent();
+        }
+
+        public ObjectView PropertyValue
+        {
+            get
+            {
+                return controlView;
+            }
+
+            set
+            {
+                SetView(controlView as IObjectView);
+            }
+        }
+
+        public void SetView(IObjectView view)
+        {
+            if (!(view is View)) return;
+
+            if (controlView == view as ObjectView) return;
+
+            controlView = view as ObjectView;
+
+            // WidthSpecification
+            widthSpec.SetView(controlView);
+
+            // HeightSpecification
+            heightSpec.SetView(controlView);
+
+            // Margin
+            margin.SetView(controlView);
+
+            // Padding
+            padding.SetView(controlView);
+        }
+    }
+}
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ObjectLinearLayout.cs b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ObjectLinearLayout.cs
new file mode 100644 (file)
index 0000000..bf12e69
--- /dev/null
@@ -0,0 +1,164 @@
+/*
+ * Copyright(c) 2022 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;
+
+namespace Tizen.NUI.LayoutSamples
+{
+    public class LinearOrientationChangedEventArgs : EventArgs
+    {
+        private LinearLayout.Orientation linearOrientation;
+
+        public LinearOrientationChangedEventArgs(LinearLayout.Orientation changedValue)
+        {
+            linearOrientation = changedValue;
+        }
+
+        public LinearLayout.Orientation LinearOrientation
+        {
+            get
+            {
+                return linearOrientation;
+            }
+        }
+    }
+
+    public class CellPaddingChangedEventArgs : EventArgs
+    {
+        private Size2D cellPadding;
+
+        public CellPaddingChangedEventArgs(Size2D changedValue)
+        {
+            cellPadding = new Size2D(changedValue.Width, changedValue.Height);
+        }
+
+        public Size2D CellPadding
+        {
+            get
+            {
+                return cellPadding;
+            }
+        }
+    }
+
+    public class HorizontalAlignmentChangedEventArgs : EventArgs
+    {
+        private HorizontalAlignment horizontalAlignment;
+
+        public HorizontalAlignmentChangedEventArgs(HorizontalAlignment changedValue)
+        {
+            horizontalAlignment = changedValue;
+        }
+
+        public HorizontalAlignment HorizontalAlignment
+        {
+            get
+            {
+                return horizontalAlignment;
+            }
+        }
+    }
+
+    public class VerticalAlignmentChangedEventArgs : EventArgs
+    {
+        private VerticalAlignment verticalAlignment;
+
+        public VerticalAlignmentChangedEventArgs(VerticalAlignment changedValue)
+        {
+            verticalAlignment = changedValue;
+        }
+
+        public VerticalAlignment VerticalAlignment
+        {
+            get
+            {
+                return verticalAlignment;
+            }
+        }
+    }
+
+    public class ObjectLinearLayout : LinearLayout, IObjectLayout
+    {
+        public new LinearLayout.Orientation LinearOrientation
+        {
+            get
+            {
+                return base.LinearOrientation;
+            }
+
+            set
+            {
+                if (base.LinearOrientation == value) return;
+
+                base.LinearOrientation = value;
+                LinearOrientationChanged?.Invoke(this, new LinearOrientationChangedEventArgs(base.LinearOrientation));
+            }
+        }
+
+        public new Size2D CellPadding
+        {
+            get
+            {
+                return base.CellPadding;
+            }
+
+            set
+            {
+                if (base.CellPadding.EqualTo(value)) return;
+
+                base.CellPadding = new Size2D(value.Width, value.Height);
+                CellPaddingChanged?.Invoke(this, new CellPaddingChangedEventArgs(base.CellPadding));
+            }
+        }
+
+        public new HorizontalAlignment HorizontalAlignment
+        {
+            get
+            {
+                return base.HorizontalAlignment;
+            }
+
+            set
+            {
+                if (base.HorizontalAlignment == value) return;
+
+                base.HorizontalAlignment = value;
+                HorizontalAlignmentChanged?.Invoke(this, new HorizontalAlignmentChangedEventArgs(base.HorizontalAlignment));
+            }
+        }
+
+        public new VerticalAlignment VerticalAlignment
+        {
+            get
+            {
+                return base.VerticalAlignment;
+            }
+
+            set
+            {
+                if (base.VerticalAlignment == value) return;
+
+                base.VerticalAlignment = value;
+                VerticalAlignmentChanged?.Invoke(this, new VerticalAlignmentChangedEventArgs(base.VerticalAlignment));
+            }
+        }
+
+        public event EventHandler<LinearOrientationChangedEventArgs> LinearOrientationChanged;
+        public event EventHandler<CellPaddingChangedEventArgs> CellPaddingChanged;
+        public event EventHandler<HorizontalAlignmentChangedEventArgs> HorizontalAlignmentChanged;
+        public event EventHandler<VerticalAlignmentChangedEventArgs> VerticalAlignmentChanged;
+    }
+}
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ObjectView.cs b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ObjectView.cs
new file mode 100644 (file)
index 0000000..18ddd68
--- /dev/null
@@ -0,0 +1,170 @@
+/*
+ * Copyright(c) 2022 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.Components;
+
+namespace Tizen.NUI.LayoutSamples
+{
+    public partial class ObjectView : SelectButton, IObjectView
+    {
+        private bool selectedAgain = false;
+
+        public new int WidthSpecification
+        {
+            get
+            {
+                return base.WidthSpecification;
+            }
+
+            set
+            {
+                if (base.WidthSpecification == value) return;
+
+                base.WidthSpecification = value;
+                WidthSpecificationChanged?.Invoke(this, new WidthSpecificationChangedEventArgs(base.WidthSpecification));
+            }
+        }
+        public new int HeightSpecification
+        {
+            get
+            {
+                return base.HeightSpecification;
+            }
+
+            set
+            {
+                if (base.HeightSpecification == value) return;
+
+                base.HeightSpecification = value;
+                HeightSpecificationChanged?.Invoke(this, new HeightSpecificationChangedEventArgs(base.HeightSpecification));
+            }
+        }
+        
+        public new Extents Margin
+        {
+            get
+            {
+                return base.Margin;
+            }
+
+            set
+            {
+                if (base.Margin.EqualTo(value)) return;
+
+                base.Margin.CopyFrom(value);
+                MarginChanged?.Invoke(this, new MarginChangedEventArgs(base.Margin));
+            }
+        }
+
+        public new Extents Padding
+        {
+            get
+            {
+                return base.Padding;
+            }
+
+            set
+            {
+                if (base.Padding.EqualTo(value)) return;
+
+                base.Padding.CopyFrom(value);
+                PaddingChanged?.Invoke(this, new PaddingChangedEventArgs(base.Padding));
+            }
+        }
+
+        public event EventHandler<WidthSpecificationChangedEventArgs> WidthSpecificationChanged;
+        public event EventHandler<HeightSpecificationChangedEventArgs> HeightSpecificationChanged;
+        public event EventHandler<MarginChangedEventArgs> MarginChanged;
+        public event EventHandler<PaddingChangedEventArgs> PaddingChanged;
+
+        public override bool OnKey(Key key)
+        {
+            if ((IsEnabled == false) || (key == null))
+            {
+                return false;
+            }
+
+            if (key.State == Key.StateType.Up)
+            {
+                if (key.KeyPressedName == "Return")
+                {
+                    if (IsSelected == true)
+                    {
+                        selectedAgain = true;
+                    }
+                }
+            }
+
+            bool ret = base.OnKey(key);
+
+            if (selectedAgain == true)
+            {
+                IsSelected = true;
+                selectedAgain = false;
+            }
+
+            return ret;
+        }
+
+        protected override bool HandleControlStateOnTouch(Touch touch)
+        {
+            if ((IsEnabled == false) || (touch == null))
+            {
+                return false;
+            }
+
+            PointStateType state = touch.GetState(0);
+            switch (state)
+            {
+                case PointStateType.Up:
+                    if (IsSelected == true)
+                    {
+                        selectedAgain = true;
+                    }
+                    break;
+                default:
+                    break;
+            }
+
+            bool ret = base.HandleControlStateOnTouch(touch);
+
+            if (selectedAgain == true)
+            {
+                IsSelected = true;
+                selectedAgain = false;
+            }
+
+            return ret;
+        }
+
+        protected override void OnControlStateChanged(ControlStateChangedEventArgs info)
+        {
+            if (info.PreviousState.Contains(ControlState.Selected) != info.CurrentState.Contains(ControlState.Selected))
+            {
+                // RadioButton does not invoke SelectedChanged if button or key
+                // is unpressed while its state is selected.
+                if (selectedAgain == true)
+                {
+                    return;
+                }
+
+                base.OnControlStateChanged(info);
+            }
+        }
+    }
+}
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ObjectView.xaml b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ObjectView.xaml
new file mode 100644 (file)
index 0000000..adb646d
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<SelectButton x:Class="Tizen.NUI.LayoutSamples.ObjectView"
+    xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+    xmlns:m="clr-namespace:Tizen.NUI.LayoutSamples"
+    WidthSpecification="100"
+    HeightSpecification="100"
+    TextColor="Black"
+    TextAlignment="Center"
+    BackgroundColor="Transparent"
+    BorderlineColor="Black"
+    BorderlineWidth="1"
+    BorderlineOffset="-1"
+    CornerRadius="0">
+    <View.Layout>
+        <m:ObjectLinearLayout/>
+    </View.Layout>
+</SelectButton>
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ObjectView.xaml.cs b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ObjectView.xaml.cs
new file mode 100644 (file)
index 0000000..8361f21
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Copyright(c) 2022 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 Tizen.NUI.Components;
+
+namespace Tizen.NUI.LayoutSamples
+{
+    public partial class ObjectView : SelectButton, IObjectView
+    {
+        public ObjectView()
+        {
+            InitializeComponent();
+
+            EnableControlStatePropagation = false;
+
+            TextLabel.ExcludeLayouting = true;
+            TextLabel.ParentOrigin = new Position(0.5f, 0.5f, 0.5f);
+            TextLabel.PivotPoint = new Position(0.5f, 0.5f, 0.5f);
+            TextLabel.PositionUsesPivotPoint = true;
+
+            ObjectViewGroup.Instance.Add(this);
+        }
+
+        protected override void OnSelectedChanged()
+        {
+            if (IsSelected)
+            {
+                BorderlineColor = Color.Red;
+                BorderlineOffset = -1.0f;
+                BorderlineWidth = 2;
+            }
+            else
+            {
+                BorderlineColor = Color.Black;
+                BorderlineOffset = -1.0f;
+                BorderlineWidth = 1;
+            }
+        }
+    }
+}
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ObjectViewGroup.cs b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/ObjectViewGroup.cs
new file mode 100644 (file)
index 0000000..27b918f
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Copyright(c) 2022 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 Tizen.NUI.Components;
+
+namespace Tizen.NUI.LayoutSamples
+{
+    public class ObjectViewGroup : SelectGroup
+    {
+        static private ObjectViewGroup instance = new ObjectViewGroup()
+        {
+            EnableMultiSelection = false,
+        };
+
+        static public ObjectViewGroup Instance
+        {
+            get
+            {
+                return instance;
+            }
+        }
+
+        public void Add(ObjectView view)
+        {
+            if (view == null) return;
+            base.AddSelection(view);
+        }
+    }
+}
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/PaddingView.xaml b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/PaddingView.xaml
new file mode 100644 (file)
index 0000000..d39a429
--- /dev/null
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<View x:Class="Tizen.NUI.LayoutSamples.PaddingView"
+    xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+    WidthSpecification="{Static LayoutParamPolicies.MatchParent}">
+
+    <View.Layout>
+        <LinearLayout LinearOrientation="Vertical"/>
+    </View.Layout>
+
+    <TextLabel x:Name="paddingText"
+        Text="Padding"
+        WidthSpecification="{Static LayoutParamPolicies.MatchParent}"/>
+
+    <View x:Name="paddingValue"
+        WidthSpecification="{Static LayoutParamPolicies.MatchParent}">
+
+        <View.Layout>
+            <LinearLayout LinearOrientation="Horizontal" CellPadding="20,0"/>
+        </View.Layout>
+
+        <TextField x:Name="paddingStart"
+            Text="0"
+            WidthSpecification="100"
+            BorderlineColor="Black"
+            BorderlineOffset="-1"
+            BorderlineWidth="1"
+            TextChanged="PaddingStartTextChanged"/>
+
+        <TextField x:Name="paddingEnd"
+            Text="0"
+            WidthSpecification="100"
+            BorderlineColor="Black"
+            BorderlineOffset="-1"
+            BorderlineWidth="1"
+            TextChanged="PaddingEndTextChanged"/>
+
+        <TextField x:Name="paddingTop"
+            Text="0"
+            WidthSpecification="100"
+            BorderlineColor="Black"
+            BorderlineOffset="-1"
+            BorderlineWidth="1"
+            TextChanged="PaddingTopTextChanged"/>
+
+        <TextField x:Name="paddingBottom"
+            Text="0"
+            WidthSpecification="100"
+            BorderlineColor="Black"
+            BorderlineOffset="-1"
+            BorderlineWidth="1"
+            TextChanged="PaddingBottomTextChanged"/>
+    </View>
+</View>
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/PaddingView.xaml.cs b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/PaddingView.xaml.cs
new file mode 100644 (file)
index 0000000..aa6de58
--- /dev/null
@@ -0,0 +1,132 @@
+/*
+ * Copyright(c) 2022 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 Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.LayoutSamples
+{
+    public partial class PaddingView : View, IObjectProperty<Extents>
+    {
+        private Text.InputFilter inputFilter;
+        private ObjectView controlView = null;
+
+        public PaddingView()
+        {
+            InitializeComponent();
+
+            inputFilter = new Text.InputFilter();
+            inputFilter.Accepted = "[0-9]";
+            paddingStart.SetInputFilter(inputFilter);
+            paddingEnd.SetInputFilter(inputFilter);
+            paddingTop.SetInputFilter(inputFilter);
+            paddingBottom.SetInputFilter(inputFilter);
+        }
+
+        public Extents PropertyValue
+        {
+            get
+            {
+                return (controlView != null) ? controlView.Padding : new Extents(0, 0, 0, 0);
+            }
+
+            set
+            {
+                if (controlView == null) return;
+
+                controlView.Padding = value;
+            }
+        }
+
+        public void SetView(IObjectView view)
+        {
+            if (!(view is View)) return;
+
+            if (controlView == view as ObjectView) return;
+
+            controlView = view as ObjectView;
+
+            // Padding
+            paddingStart.Text = controlView.Padding.Start.ToString();
+            paddingEnd.Text = controlView.Padding.End.ToString();
+            paddingTop.Text = controlView.Padding.Top.ToString();
+            paddingBottom.Text = controlView.Padding.Bottom.ToString();
+
+            controlView.PaddingChanged += (object sender, PaddingChangedEventArgs args) =>
+            {
+                paddingStart.Text = args.Padding.Start.ToString();
+                paddingEnd.Text = args.Padding.End.ToString();
+                paddingTop.Text = args.Padding.Top.ToString();
+                paddingBottom.Text = args.Padding.Bottom.ToString();
+
+                controlView.Layout?.RequestLayout();
+            };
+
+            controlView.Layout?.RequestLayout();
+        }
+
+        private void PaddingStartTextChanged(object sender, TextField.TextChangedEventArgs args)
+        {
+            if (controlView != null)
+            {
+                ushort changedValue;
+                if (ushort.TryParse(args.TextField.Text, out changedValue))
+                {
+                    controlView.Padding = new Extents(changedValue, controlView.Padding.End, controlView.Padding.Top, controlView.Padding.Bottom);
+                    controlView.Layout?.RequestLayout();
+                }
+            }
+        }
+
+        private void PaddingEndTextChanged(object sender, TextField.TextChangedEventArgs args)
+        {
+            if (controlView != null)
+            {
+                ushort changedValue;
+                if (ushort.TryParse(args.TextField.Text, out changedValue))
+                {
+                    controlView.Padding = new Extents(controlView.Padding.Start, changedValue, controlView.Padding.Top, controlView.Padding.Bottom);
+                    controlView.Layout?.RequestLayout();
+                }
+            }
+        }
+
+        private void PaddingTopTextChanged(object sender, TextField.TextChangedEventArgs args)
+        {
+            if (controlView != null)
+            {
+                ushort changedValue;
+                if (ushort.TryParse(args.TextField.Text, out changedValue))
+                {
+                    controlView.Padding = new Extents(controlView.Padding.Start, controlView.Padding.End, changedValue, controlView.Padding.Bottom);
+                    controlView.Layout?.RequestLayout();
+                }
+            }
+        }
+
+        private void PaddingBottomTextChanged(object sender, TextField.TextChangedEventArgs args)
+        {
+            if (controlView != null)
+            {
+                ushort changedValue;
+                if (ushort.TryParse(args.TextField.Text, out changedValue))
+                {
+                    controlView.Padding = new Extents(controlView.Padding.Start, controlView.Padding.End, controlView.Padding.Top, changedValue);
+                    controlView.Layout?.RequestLayout();
+                }
+            }
+        }
+    }
+}
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples.cs b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples.cs
new file mode 100644 (file)
index 0000000..e4c8349
--- /dev/null
@@ -0,0 +1,183 @@
+/*
+ * Copyright(c) 2022 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 Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+
+namespace Tizen.NUI.LayoutSamples
+{
+    class Program : NUIApplication
+    {
+        private const int WIN_WIDTH = 720;
+        private const int WIN_HEIGHT = 720;
+        private const int INIT_VIEW_COUNT = 3;
+        private Window displayWindow = null;
+        private Window controlWindow = null;
+
+        private List<ObjectView> objectViewList = new List<ObjectView>();
+        private ObjectView rootObjectView = null;
+        private ObjectView selectedObjectView = null;
+        private ControlView controlView = null;
+
+        public void OnKeyEvent(object sender, Window.KeyEventArgs e)
+        {
+            if (e.Key.State == Key.StateType.Up)
+            {
+                if (e.Key.KeyPressedName == "Escape" || e.Key.KeyPressedName == "XF86Back" || e.Key.KeyPressedName == "BackSpace")
+                {
+                    Exit();
+                }
+            }
+        }
+
+        public ObjectView SelectedObjectView
+        {
+            get
+            {
+                return selectedObjectView;
+            }
+
+            set
+            {
+                if (selectedObjectView != value)
+                {
+                    selectedObjectView = value;
+
+                    if (controlView != null)
+                    {
+                        controlView.SetView(selectedObjectView);
+                    }
+                }
+            }
+        }
+
+        protected override void OnCreate()
+        {
+            base.OnCreate();
+            Initialize();
+        }
+
+        private void Initialize()
+        {
+            SetDisplayView();
+            SetControlView();
+        }
+
+        private void SetDisplayWindow()
+        {
+            if (displayWindow != null) return;
+
+            displayWindow = GetDefaultWindow();
+            displayWindow.Title = "Display Window";
+            displayWindow.WindowSize = new Size2D(WIN_WIDTH, WIN_HEIGHT);
+            displayWindow.KeyEvent += OnKeyEvent;
+        }
+
+        private ObjectView CreateObjectView(string name)
+        {
+            var view = new ObjectView()
+            {
+                Text = name,
+            };
+
+            view.SelectedChanged += (object sender, SelectedChangedEventArgs args) =>
+            {
+                if (args.IsSelected)
+                {
+                    SelectedObjectView = view;
+                }
+            };
+
+            view.ChildRemoved += (object sender, View.ChildRemovedEventArgs args) =>
+            {
+                SelectedObjectView = view;
+            };
+
+            objectViewList.Add(view);
+
+            return view;
+        }
+
+        private void SetDisplayView()
+        {
+            SetDisplayWindow();
+
+            if (rootObjectView != null) return;
+
+            rootObjectView = CreateObjectView("root");
+            rootObjectView.ParentOrigin = new Position(0.5f, 0.5f, 0.5f);
+            rootObjectView.PivotPoint = new Position(0.5f, 0.5f, 0.5f);
+            rootObjectView.PositionUsesPivotPoint = true;
+            rootObjectView.WidthSpecification = 600;
+            rootObjectView.HeightSpecification = 600;
+            rootObjectView.BackgroundColor = Color.White;
+            rootObjectView.IsSelected = true;
+
+            displayWindow.Add(rootObjectView);
+
+            for (int i = 0; i < INIT_VIEW_COUNT; i++)
+            {
+                rootObjectView.Add(CreateObjectView(objectViewList.Count.ToString()));
+            }
+        }
+
+        private void SetControlWindow()
+        {
+            if (controlWindow != null) return;
+
+            controlWindow = new Window();
+            controlWindow.Title = "Control Window";
+            controlWindow.WindowSize = new Size2D(WIN_WIDTH, WIN_HEIGHT);
+            controlWindow.KeyEvent += OnKeyEvent;
+        }
+
+        private void SetControlView()
+        {
+            SetControlWindow();
+
+            if (controlView != null) return;
+
+            controlView = new ControlView();
+            controlView.SetView(rootObjectView);
+
+            controlView.ViewAdded += (object sender, EventArgs args) =>
+            {
+                SelectedObjectView.Add(CreateObjectView(objectViewList.Count.ToString()));
+            };
+
+            controlView.ViewRemoved += (object sender, EventArgs args) =>
+            {
+                var parent = SelectedObjectView.GetParent() as ObjectView;
+                if (parent != null)
+                {
+                    objectViewList.Remove(SelectedObjectView);
+                    parent.Remove(SelectedObjectView);
+                    SelectedObjectView = parent;
+                }
+            };
+
+            controlWindow.Add(controlView);
+        }
+
+        static void Main(string[] args)
+        {
+            var app = new Program();
+            app.Run(args);
+        }
+    }
+}
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples.csproj b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples.csproj
new file mode 100755 (executable)
index 0000000..fccec1a
--- /dev/null
@@ -0,0 +1,30 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <PropertyGroup>
+    <OutputType>Exe</OutputType>
+    <TargetFramework>netcoreapp3.1</TargetFramework>
+  </PropertyGroup>
+
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugType>portable</DebugType>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>None</DebugType>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <EmbeddedResource Include="*.xaml">
+      <Generator>MSBuild:Compile</Generator>
+    </EmbeddedResource>
+  </ItemGroup>
+
+  <ItemGroup>
+    <ProjectReference Include="../../../src/Tizen.NUI.Components/Tizen.NUI.Components.csproj" />
+    <PackageReference Include="Tizen.NUI.XamlBuild" Version="1.0.34" />
+  </ItemGroup>
+
+  <PropertyGroup>
+    <NeedInjection>False</NeedInjection>
+  </PropertyGroup>
+</Project>
+
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/VerticalAlignmentView.xaml b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/VerticalAlignmentView.xaml
new file mode 100644 (file)
index 0000000..7e72619
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<View x:Class="Tizen.NUI.LayoutSamples.VerticalAlignmentView"
+    xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+    WidthSpecification="{Static LayoutParamPolicies.MatchParent}">
+
+    <View.Layout>
+        <LinearLayout LinearOrientation="Vertical"/>
+    </View.Layout>
+
+    <TextLabel x:Name="vAlignText"
+        Text="VerticalAlignment"
+        WidthSpecification="{Static LayoutParamPolicies.MatchParent}"/>
+
+    <View x:Name="vAlignOptions"
+        WidthSpecification="{Static LayoutParamPolicies.MatchParent}">
+
+        <View.Layout>
+            <LinearLayout LinearOrientation="Horizontal" CellPadding="20,0"/>
+        </View.Layout>
+
+        <RadioButton x:Name="vAlignTop"
+            Text="Top"
+            SelectedChanged="VAlignTopSelectedChanged"/>
+
+        <RadioButton x:Name="vAlignCenter"
+            Text="Center"
+            SelectedChanged="VAlignCenterSelectedChanged"/>
+
+        <RadioButton x:Name="vAlignBottom"
+            Text="Bottom"
+            SelectedChanged="VAlignBottomSelectedChanged"/>
+    </View>
+</View>
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/VerticalAlignmentView.xaml.cs b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/VerticalAlignmentView.xaml.cs
new file mode 100644 (file)
index 0000000..d1815b8
--- /dev/null
@@ -0,0 +1,133 @@
+/*
+ * Copyright(c) 2022 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 Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace Tizen.NUI.LayoutSamples
+{
+    public partial class VerticalAlignmentView : View, ILayoutProperty<VerticalAlignment>
+    {
+        private RadioButtonGroup vAlignGroup;
+        private ObjectLinearLayout linearLayout = null;
+
+        public VerticalAlignmentView()
+        {
+            InitializeComponent();
+
+            vAlignGroup = new RadioButtonGroup();
+            vAlignGroup.Add(vAlignTop);
+            vAlignGroup.Add(vAlignCenter);
+            vAlignGroup.Add(vAlignBottom);
+            vAlignGroup.EnableMultiSelection = false;
+            vAlignTop.IsSelected = true;
+        }
+
+        public VerticalAlignment PropertyValue
+        {
+            get
+            {
+                return (linearLayout != null) ? linearLayout.VerticalAlignment : VerticalAlignment.Top;
+            }
+
+            set
+            {
+                if (linearLayout == null) return;
+
+                linearLayout.VerticalAlignment = value;
+            }
+        }
+
+        public void SetLayout(IObjectLayout layout)
+        {
+            if (!(layout is LinearLayout)) return;
+
+            if (linearLayout == layout as ObjectLinearLayout) return;
+
+            linearLayout = layout as ObjectLinearLayout;
+
+            // VerticalAlignment
+            if (linearLayout.VerticalAlignment == VerticalAlignment.Top)
+            {
+                vAlignTop.IsSelected = true;
+            }
+            else if (linearLayout.VerticalAlignment == VerticalAlignment.Center)
+            {
+                vAlignCenter.IsSelected = true;
+            }
+            else
+            {
+                vAlignBottom.IsSelected = true;
+            }
+
+            linearLayout.VerticalAlignmentChanged += (object sender, VerticalAlignmentChangedEventArgs args) =>
+            {
+                if (args.VerticalAlignment == VerticalAlignment.Top)
+                {
+                    vAlignTop.IsSelected = true;
+                }
+                else if (args.VerticalAlignment == VerticalAlignment.Center)
+                {
+                    vAlignCenter.IsSelected = true;
+                }
+                else
+                {
+                    vAlignBottom.IsSelected = true;
+                }
+
+                linearLayout.RequestLayout();
+            };
+
+            linearLayout.RequestLayout();
+        }
+
+        private void VAlignTopSelectedChanged(object sender, SelectedChangedEventArgs args)
+        {
+            if (args.IsSelected)
+            {
+                if (linearLayout != null)
+                {
+                    linearLayout.VerticalAlignment = VerticalAlignment.Top;
+                    linearLayout.RequestLayout();
+                }
+            }
+        }
+
+        private void VAlignCenterSelectedChanged(object sender, SelectedChangedEventArgs args)
+        {
+            if (args.IsSelected)
+            {
+                if (linearLayout != null)
+                {
+                    linearLayout.VerticalAlignment = VerticalAlignment.Center;
+                    linearLayout.RequestLayout();
+                }
+            }
+        }
+
+        private void VAlignBottomSelectedChanged(object sender, SelectedChangedEventArgs args)
+        {
+            if (args.IsSelected)
+            {
+                if (linearLayout != null)
+                {
+                    linearLayout.VerticalAlignment = VerticalAlignment.Bottom;
+                    linearLayout.RequestLayout();
+                }
+            }
+        }
+    }
+}
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/WidthSpecificationView.xaml b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/WidthSpecificationView.xaml
new file mode 100644 (file)
index 0000000..f7b4fb0
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<View x:Class="Tizen.NUI.LayoutSamples.WidthSpecificationView"
+    xmlns="http://tizen.org/Tizen.NUI/2018/XAML"
+    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+    WidthSpecification="{Static LayoutParamPolicies.MatchParent}">
+
+    <View.Layout>
+        <LinearLayout LinearOrientation="Vertical"/>
+    </View.Layout>
+
+    <TextLabel x:Name="widthSpecText"
+        Text="WidthSpecification"
+        WidthSpecification="{Static LayoutParamPolicies.MatchParent}"/>
+
+    <View x:Name="widthSpecOptions"
+        WidthSpecification="{Static LayoutParamPolicies.MatchParent}">
+
+        <View.Layout>
+            <LinearLayout LinearOrientation="Horizontal" CellPadding="20,0"/>
+        </View.Layout>
+
+        <RadioButton x:Name="widthSpecMatchParent"
+            Text="MatchParent"
+            SelectedChanged="WidthSpecMatchParentSelectedChanged"/>
+
+        <RadioButton x:Name="widthSpecWrapContent"
+            Text="WrapContent"
+            SelectedChanged="WidthSpecWrapContentSelectedChanged"/>
+
+        <RadioButton x:Name="widthSpecValue"
+            SelectedChanged="WidthSpecValueSelectedChanged"/>
+
+        <TextField x:Name="widthSpecValueField"
+            Text="-2"
+            WidthSpecification="100"
+            BorderlineColor="Black"
+            BorderlineOffset="-1"
+            BorderlineWidth="1"
+            TextChanged="WidthSpecValueTextChanged"/>
+    </View>
+</View>
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/WidthSpecificationView.xaml.cs b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/WidthSpecificationView.xaml.cs
new file mode 100644 (file)
index 0000000..a916c54
--- /dev/null
@@ -0,0 +1,167 @@
+/*
+ * Copyright(c) 2022 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 Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace Tizen.NUI.LayoutSamples
+{
+    public partial class WidthSpecificationView : View, IObjectProperty<int>
+    {
+        private RadioButtonGroup widthSpecGroup;
+        private Text.InputFilter inputFilter;
+        private ObjectView controlView = null;
+
+        public WidthSpecificationView()
+        {
+            InitializeComponent();
+
+            widthSpecGroup = new RadioButtonGroup();
+            widthSpecGroup.Add(widthSpecMatchParent);
+            widthSpecGroup.Add(widthSpecWrapContent);
+            widthSpecGroup.Add(widthSpecValue);
+            widthSpecGroup.EnableMultiSelection = false;
+            widthSpecWrapContent.IsSelected = true;
+            // FIXME: TextField does not support IsEnabled now.
+            widthSpecValueField.EnableEditing = false;
+
+            inputFilter = new Text.InputFilter();
+            inputFilter.Accepted = "[0-9]";
+            widthSpecValueField.SetInputFilter(inputFilter);
+        }
+
+        public int PropertyValue
+        {
+            get
+            {
+                return (controlView != null) ? controlView.WidthSpecification : LayoutParamPolicies.WrapContent;
+            }
+
+            set
+            {
+                if (controlView == null) return;
+
+                controlView.WidthSpecification = value;
+            }
+        }
+
+        public void SetView(IObjectView view)
+        {
+            if (!(view is View)) return;
+
+            if (controlView == view as ObjectView) return;
+
+            controlView = view as ObjectView;
+
+            // WidthSpecification
+            if (controlView.WidthSpecification == LayoutParamPolicies.MatchParent)
+            {
+                widthSpecMatchParent.IsSelected = true;
+            }
+            else if (controlView.WidthSpecification == LayoutParamPolicies.WrapContent)
+            {
+                widthSpecWrapContent.IsSelected = true;
+            }
+            else
+            {
+                widthSpecValueField.Text = controlView.WidthSpecification.ToString();
+                widthSpecValue.IsSelected = true;
+            }
+
+            controlView.WidthSpecificationChanged += (object sender, WidthSpecificationChangedEventArgs args) =>
+            {
+                if (args.WidthSpecification == LayoutParamPolicies.MatchParent)
+                {
+                    widthSpecMatchParent.IsSelected = true;
+                }
+                else if (args.WidthSpecification == LayoutParamPolicies.WrapContent)
+                {
+                    widthSpecWrapContent.IsSelected = true;
+                }
+                else
+                {
+                    widthSpecValueField.Text = controlView.WidthSpecification.ToString();
+                    widthSpecValue.IsSelected = true;
+                }
+
+                (controlView.Layout)?.RequestLayout();
+            };
+
+            (controlView.Layout)?.RequestLayout();
+        }
+
+        private void WidthSpecMatchParentSelectedChanged(object sender, SelectedChangedEventArgs args)
+        {
+            if (args.IsSelected)
+            {
+                widthSpecValueField.Text = LayoutParamPolicies.MatchParent.ToString();
+                if (controlView != null)
+                {
+                    controlView.WidthSpecification = LayoutParamPolicies.MatchParent;
+                }
+            }
+        }
+
+        private void WidthSpecWrapContentSelectedChanged(object sender, SelectedChangedEventArgs args)
+        {
+            if (args.IsSelected)
+            {
+                widthSpecValueField.Text = LayoutParamPolicies.WrapContent.ToString();
+                if (controlView != null)
+                {
+                    controlView.WidthSpecification = LayoutParamPolicies.WrapContent;
+                }
+            }
+        }
+
+        private void WidthSpecValueSelectedChanged(object sender, SelectedChangedEventArgs args)
+        {
+            if (args.IsSelected)
+            {
+                widthSpecValueField.EnableEditing = true;
+                if (controlView != null)
+                {
+                    int changedValue;
+                    if (int.TryParse(widthSpecValueField.Text, out changedValue))
+                    {
+                        if (controlView.WidthSpecification != changedValue)
+                        {
+                            controlView.WidthSpecification = changedValue;
+                            controlView.Layout?.RequestLayout();
+                        }
+                    }
+                }
+            }
+            else
+            {
+                widthSpecValueField.EnableEditing = false;
+            }
+        }
+
+        private void WidthSpecValueTextChanged(object sender, TextField.TextChangedEventArgs args)
+        {
+            if (controlView != null)
+            {
+                int changedValue;
+                if (int.TryParse(widthSpecValueField.Text, out changedValue))
+                {
+                    controlView.WidthSpecification = changedValue;
+                    controlView.Layout?.RequestLayout();
+                }
+            }
+        }
+    }
+}
diff --git a/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/tizen-manifest.xml b/test/Tizen.NUI.LayoutSamples/Tizen.NUI.LayoutSamples/tizen-manifest.xml
new file mode 100755 (executable)
index 0000000..9a51660
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="5.5" package="org.tizen.example.Tizen.NUI.LayoutSamples" version="1.0.0">
+  <profile name="common" />
+  <ui-application appid="org.tizen.example.Tizen.NUI.LayoutSamples"
+                                       exec="Tizen.NUI.LayoutSamples.dll"
+                                       type="dotnet"
+                                       multiple="false"
+                                       taskmanage="true"
+                                       nodisplay="false"
+                                       launch_mode="single"
+                                       api-version="6">
+    <label>Tizen.NUI.LayoutSamples</label>
+    <icon>Tizen.NUI.LayoutSamples.png</icon>
+    <metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
+  </ui-application>
+       <privileges>
+        <privilege>http://tizen.org/privilege/camera</privilege>
+  </privileges>
+</manifest>