--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearHMatch : View, IExample
+ {
+ public LinearHMatch()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout(),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H MatchParent", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearHMatchCMargin : View, IExample
+ {
+ public LinearHMatchCMargin()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout(),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = LayoutChildren.Colors[i],
+ Margin = 10,
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H MatchParent ChildMargin", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearHMatchCellPadding : View, IExample
+ {
+ public LinearHMatchCellPadding()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ CellPadding = new Size2D(10, 10),
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H MatchParent CellPadding", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearHMatchMargin : View, IExample
+ {
+ public LinearHMatchMargin()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout(),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ Margin = 50,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H MatchParent Margin", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearHMatchMarginPadding : View, IExample
+ {
+ public LinearHMatchMarginPadding()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout(),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ Margin = 50,
+ Padding = 50,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H MatchParent Margin Padding", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearHMatchMax : View, IExample
+ {
+ public LinearHMatchMax()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout(),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = LayoutChildren.Colors[i],
+ MaximumSize = new Size(50, 50),
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H MatchParent Max", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearHMatchMin : View, IExample
+ {
+ public LinearHMatchMin()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout(),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = LayoutChildren.Colors[i],
+ MinimumSize = new Size(200, 200),
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H MatchParent Min", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearHMatchMinMax : View, IExample
+ {
+ public LinearHMatchMinMax()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout(),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = LayoutChildren.Colors[i],
+ MinimumSize = new Size(200, 200),
+ MaximumSize = new Size(50, 50),
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H MatchParent Min Max", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearHMatchPadding : View, IExample
+ {
+ public LinearHMatchPadding()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout(),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ Padding = 50,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H MatchParent Padding", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearHSize : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearHSize()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout(),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H Size", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearHSizeBeginBottom : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearHSizeBeginBottom()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ HorizontalAlignment = HorizontalAlignment.Begin,
+ VerticalAlignment = VerticalAlignment.Bottom,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H Size Begin Bottom", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearHSizeBeginCenter : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearHSizeBeginCenter()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ HorizontalAlignment = HorizontalAlignment.Begin,
+ VerticalAlignment = VerticalAlignment.Center,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H Size Begin Center", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearHSizeBeginTop : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearHSizeBeginTop()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ HorizontalAlignment = HorizontalAlignment.Begin,
+ VerticalAlignment = VerticalAlignment.Top,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H Size Begin Top", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearHSizeCMargin : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearHSizeCMargin()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout(),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ Margin = 10,
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H Size ChildMargin", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearHSizeCellPadding : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearHSizeCellPadding()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ CellPadding = new Size2D(10, 10),
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H Size CellPadding", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearHSizeCenter : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearHSizeCenter()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ HorizontalAlignment = HorizontalAlignment.Center,
+ VerticalAlignment = VerticalAlignment.Center,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H Size Center", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearHSizeCenterBottom : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearHSizeCenterBottom()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ HorizontalAlignment = HorizontalAlignment.Center,
+ VerticalAlignment = VerticalAlignment.Bottom,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H Size Center Bottom", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearHSizeCenterTop : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearHSizeCenterTop()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ HorizontalAlignment = HorizontalAlignment.Center,
+ VerticalAlignment = VerticalAlignment.Top,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H Size Center Top", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearHSizeEndBottom : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearHSizeEndBottom()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ HorizontalAlignment = HorizontalAlignment.End,
+ VerticalAlignment = VerticalAlignment.Bottom,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H Size End Bottom", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearHSizeEndCenter : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearHSizeEndCenter()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ HorizontalAlignment = HorizontalAlignment.End,
+ VerticalAlignment = VerticalAlignment.Center,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H Size End Center", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearHSizeEndTop : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearHSizeEndTop()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ HorizontalAlignment = HorizontalAlignment.End,
+ VerticalAlignment = VerticalAlignment.Top,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H Size End Top", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearHSizeMargin : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearHSizeMargin()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout(),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ Margin = 50,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H Size Margin", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearHSizeMarginPadding : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearHSizeMarginPadding()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout(),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ Margin = 50,
+ Padding = 50,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H Size Margin Padding", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearHSizeMax : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearHSizeMax()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout(),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ MaximumSize = new Size(50, 50),
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H Size Max", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearHSizeMin : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearHSizeMin()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout(),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ MinimumSize = new Size(200, 200),
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H Size Min", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearHSizeMinMax : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearHSizeMinMax()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout(),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ MinimumSize = new Size(200, 200),
+ MaximumSize = new Size(50, 50),
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H Size Min Max", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearHSizePadding : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearHSizePadding()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout(),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ Padding = 50,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H Size Padding", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearVMatch : View, IExample
+ {
+ public LinearVMatch()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ LinearOrientation = LinearLayout.Orientation.Vertical,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H MatchParent", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearVMatchCMargin : View, IExample
+ {
+ public LinearVMatchCMargin()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ LinearOrientation = LinearLayout.Orientation.Vertical,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = LayoutChildren.Colors[i],
+ Margin = 10,
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H MatchParent ChildMargin", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearVMatchCellPadding : View, IExample
+ {
+ public LinearVMatchCellPadding()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ LinearOrientation = LinearLayout.Orientation.Vertical,
+ CellPadding = new Size2D(10, 10),
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H MatchParent CellPadding", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearVMatchMargin : View, IExample
+ {
+ public LinearVMatchMargin()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ LinearOrientation = LinearLayout.Orientation.Vertical,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ Margin = 50,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H MatchParent Margin", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearVMatchMarginPadding : View, IExample
+ {
+ public LinearVMatchMarginPadding()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ LinearOrientation = LinearLayout.Orientation.Vertical,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ Margin = 50,
+ Padding = 50,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H MatchParent Margin Padding", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearVMatchMax : View, IExample
+ {
+ public LinearVMatchMax()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ LinearOrientation = LinearLayout.Orientation.Vertical,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = LayoutChildren.Colors[i],
+ MaximumSize = new Size(50, 50),
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H MatchParent Max", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearVMatchMin : View, IExample
+ {
+ public LinearVMatchMin()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ LinearOrientation = LinearLayout.Orientation.Vertical,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = LayoutChildren.Colors[i],
+ MinimumSize = new Size(200, 200),
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H MatchParent Min", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearVMatchMinMax : View, IExample
+ {
+ public LinearVMatchMinMax()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ LinearOrientation = LinearLayout.Orientation.Vertical,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = LayoutChildren.Colors[i],
+ MinimumSize = new Size(200, 200),
+ MaximumSize = new Size(50, 50),
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H MatchParent Min Max", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearVMatchPadding : View, IExample
+ {
+ public LinearVMatchPadding()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ LinearOrientation = LinearLayout.Orientation.Vertical,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ Padding = 50,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "H MatchParent Padding", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearVSize : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearVSize()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ LinearOrientation = LinearLayout.Orientation.Vertical,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "V Size", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearVSizeBeginBottom : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearVSizeBeginBottom()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ LinearOrientation = LinearLayout.Orientation.Vertical,
+ HorizontalAlignment = HorizontalAlignment.Begin,
+ VerticalAlignment = VerticalAlignment.Bottom,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "V Size Begin Bottom", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearVSizeBeginCenter : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearVSizeBeginCenter()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ LinearOrientation = LinearLayout.Orientation.Vertical,
+ HorizontalAlignment = HorizontalAlignment.Begin,
+ VerticalAlignment = VerticalAlignment.Center,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "V Size Begin Center", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearVSizeBeginTop : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearVSizeBeginTop()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ LinearOrientation = LinearLayout.Orientation.Vertical,
+ HorizontalAlignment = HorizontalAlignment.Begin,
+ VerticalAlignment = VerticalAlignment.Top,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "V Size Begin Top", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearVSizeCMargin : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearVSizeCMargin()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ LinearOrientation = LinearLayout.Orientation.Vertical,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ Margin = 10,
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "V Size ChildMargin", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearVSizeCellPadding : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearVSizeCellPadding()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ LinearOrientation = LinearLayout.Orientation.Vertical,
+ CellPadding = new Size2D(10, 10),
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "V Size CellPadding", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearVSizeCenter : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearVSizeCenter()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ LinearOrientation = LinearLayout.Orientation.Vertical,
+ HorizontalAlignment = HorizontalAlignment.Center,
+ VerticalAlignment = VerticalAlignment.Center,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "V Size Center", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearVSizeCenterBottom : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearVSizeCenterBottom()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ LinearOrientation = LinearLayout.Orientation.Vertical,
+ HorizontalAlignment = HorizontalAlignment.Center,
+ VerticalAlignment = VerticalAlignment.Bottom,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "V Size Center Bottom", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearVSizeCenterTop : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearVSizeCenterTop()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ LinearOrientation = LinearLayout.Orientation.Vertical,
+ HorizontalAlignment = HorizontalAlignment.Center,
+ VerticalAlignment = VerticalAlignment.Top,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "V Size Center Top", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearVSizeEndBottom : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearVSizeEndBottom()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ LinearOrientation = LinearLayout.Orientation.Vertical,
+ HorizontalAlignment = HorizontalAlignment.End,
+ VerticalAlignment = VerticalAlignment.Bottom,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "V Size End Bottom", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearVSizeEndCenter : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearVSizeEndCenter()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ LinearOrientation = LinearLayout.Orientation.Vertical,
+ HorizontalAlignment = HorizontalAlignment.End,
+ VerticalAlignment = VerticalAlignment.Center,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "V Size End Center", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearVSizeEndTop : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearVSizeEndTop()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ LinearOrientation = LinearLayout.Orientation.Vertical,
+ HorizontalAlignment = HorizontalAlignment.End,
+ VerticalAlignment = VerticalAlignment.Top,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "V Size End Top", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearVSizeMargin : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearVSizeMargin()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ LinearOrientation = LinearLayout.Orientation.Vertical,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ Margin = 50,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "V Size Margin", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearVSizeMarginPadding : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearVSizeMarginPadding()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ LinearOrientation = LinearLayout.Orientation.Vertical,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ Margin = 50,
+ Padding = 50,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "V Size Margin", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearVSizeMax : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearVSizeMax()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ LinearOrientation = LinearLayout.Orientation.Vertical,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ MaximumSize = new Size(50, 50),
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "V Size Max", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearVSizeMin : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearVSizeMin()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ LinearOrientation = LinearLayout.Orientation.Vertical,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ MinimumSize = new Size(200, 200),
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "V Size Min", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearVSizeMinMax : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearVSizeMinMax()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ LinearOrientation = LinearLayout.Orientation.Vertical,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ MinimumSize = new Size(200, 200),
+ MaximumSize = new Size(50, 50),
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "V Size Min Max", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+
+namespace NUILayout
+{
+ internal class LinearVSizePadding : View, IExample
+ {
+ private readonly int _itemSize = 100;
+
+ public LinearVSizePadding()
+ {
+ Layout = new AbsoluteLayout();
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ BackgroundColor = Color.Gray;
+
+ var linearLayout = new View()
+ {
+ Layout = new LinearLayout()
+ {
+ LinearOrientation = LinearLayout.Orientation.Vertical,
+ },
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.DarkGray,
+ Padding = 50,
+ };
+ Add(linearLayout);
+
+ var views = new View[LayoutChildren.Count];
+
+ for (int i = 0; i < LayoutChildren.Count; ++i)
+ {
+ views[i] = new View()
+ {
+ WidthSpecification = _itemSize,
+ HeightSpecification = _itemSize,
+ BackgroundColor = LayoutChildren.Colors[i],
+ };
+ linearLayout.Add(views[i]);
+ }
+
+ var timer = new Tizen.NUI.Timer(1000);
+ timer.Tick += (o, e) =>
+ {
+ foreach (var view in views)
+ {
+ view.Layout.RequestLayout(); // Test if any unexpected behavior occurs.
+ }
+ return true;
+ };
+ timer.Start();
+ }
+
+ public void Activate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Activate()");
+
+ var contentPage = new ContentPage()
+ {
+ AppBar = new AppBar() { Title = "V Size Padding", BackgroundColor = Color.White },
+ Content = this,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ BackgroundColor = Color.LightGray,
+ };
+ Window.Default.GetDefaultNavigator().Push(contentPage);
+ }
+ public void Deactivate()
+ {
+ Console.WriteLine($"@@@ this.GetType().Name={this.GetType().Name}, Deactivate()");
+ Window.Default.GetDefaultNavigator().Pop();
+ }
+ }
+}
--- /dev/null
+using Tizen.NUI;
+
+namespace NUILayout
+{
+ internal class LayoutChildren
+ {
+ public static readonly int Count = 10;
+ public static readonly Color[] Colors = new Color[Count];
+
+ static LayoutChildren()
+ {
+ Colors[0] = Color.Blue;
+ Colors[1] = Color.BlueViolet;
+ Colors[2] = Color.SkyBlue;
+ Colors[3] = Color.DarkBlue;
+ Colors[4] = Color.DodgerBlue;
+ Colors[5] = Color.CadetBlue;
+ Colors[6] = Color.LightBlue;
+ Colors[7] = Color.RoyalBlue;
+ Colors[8] = Color.CadetBlue;
+ Colors[9] = Color.SlateBlue;
+ }
+ }
+}