%define DOTNET_ASSEMBLY_RES_PATH %{DOTNET_ASSEMBLY_PATH}/res
%define DOTNET_NUGET_SOURCE /nuget
+%define DOTNET_TIZEN_API_VERSION 4
+
%define _tizenfx_bin_path Artifacts
Name: csapi-tizenfx
BuildRequires: dotnet-build-tools
BuildArch: noarch
+ExcludeArch: aarch64
AutoReqProv: no
+Requires(post): vconf
+
+
%description
%{summary}
%package full
Summary: All Tizen .NET assemblies
Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
AutoReqProv: no
%description full
%package common
Summary: Tizen .NET assemblies for Common profile
Group: Development/Libraries
-Requires: csapi-tizenfx-dummy
+Requires: %{name} = %{version}-%{release}
+Requires: csapi-tizenfx-dummy = %{version}-%{release}
AutoReqProv: no
%description common
%package mobile
Summary: Tizen .NET assemblies for Mobile profile
Group: Development/Libraries
-Requires: csapi-tizenfx-dummy
+Requires: %{name} = %{version}-%{release}
+Requires: csapi-tizenfx-dummy = %{version}-%{release}
AutoReqProv: no
%description mobile
%package mobile-emul
Summary: Tizen .NET assemblies for Emulator of Mobile profile
Group: Development/Libraries
-Requires: csapi-tizenfx-dummy
+Requires: %{name} = %{version}-%{release}
+Requires: csapi-tizenfx-dummy = %{version}-%{release}
AutoReqProv: no
%description mobile-emul
%package tv
Summary: Tizen .NET assemblies for TV profile
Group: Development/Libraries
-Requires: csapi-tizenfx-dummy
+Requires: %{name} = %{version}-%{release}
+Requires: csapi-tizenfx-dummy = %{version}-%{release}
AutoReqProv: no
%description tv
%package ivi
Summary: Tizen .NET assemblies for IVI profile
Group: Development/Libraries
-Requires: csapi-tizenfx-dummy
+Requires: %{name} = %{version}-%{release}
+Requires: csapi-tizenfx-dummy = %{version}-%{release}
AutoReqProv: no
%description ivi
%package wearable
Summary: Tizen .NET assemblies for Wearable profile
Group: Development/Libraries
-Requires: csapi-tizenfx-dummy
+Requires: %{name} = %{version}-%{release}
+Requires: csapi-tizenfx-dummy = %{version}-%{release}
AutoReqProv: no
%description wearable
install -p -m 644 %{_tizenfx_bin_path}/bin/dummy/*.dll %{buildroot}%{DOTNET_ASSEMBLY_DUMMY_PATH}
install -p -m 644 %{_tizenfx_bin_path}/*.nupkg %{buildroot}%{DOTNET_NUGET_SOURCE}
+%post
+vconftool set -t int "db/dotnet/tizen_api_version" %{DOTNET_TIZEN_API_VERSION} -f
+
+
+%files
+%license LICENSE
+
%files nuget
%{DOTNET_NUGET_SOURCE}/*.nupkg
%files full
%manifest %{name}.manifest
-%license LICENSE
%attr(644,root,root) %{DOTNET_ASSEMBLY_PATH}/*.dll
%attr(644,root,root) %{DOTNET_ASSEMBLY_RES_PATH}/*
%files common -f common.filelist
%manifest %{name}.manifest
-%license LICENSE
%files mobile -f mobile.filelist
%manifest %{name}.manifest
-%license LICENSE
%files mobile-emul -f mobile-emul.filelist
%manifest %{name}.manifest
-%license LICENSE
%files tv -f tv.filelist
%manifest %{name}.manifest
-%license LICENSE
%files ivi -f ivi.filelist
%manifest %{name}.manifest
-%license LICENSE
%files wearable -f wearable.filelist
%manifest %{name}.manifest
-%license LICENSE
OutOfMemory = Tizen.Internals.Errors.ErrorCode.OutOfMemory,
InvalidContext = -0x01100000 | 0x01,
NoSuchFile = Tizen.Internals.Errors.ErrorCode.NoSuchFile,
+ NotSupported = Tizen.Internals.Errors.ErrorCode.NotSupported,
AlreadyRunning = Tizen.Internals.Errors.ErrorCode.AlreadyInProgress
}
[DllImport(Libraries.AppCommon, EntryPoint = "app_event_get_region_format")]
internal static extern Tizen.Internals.Errors.ErrorCode AppEventGetRegionFormat(IntPtr handle, out string region);
-
}
-}
+}
\ No newline at end of file
<ItemGroup>
<ProjectReference Include="..\Tizen.Applications.Common\Tizen.Applications.Common.csproj" />
<ProjectReference Include="..\ElmSharp\ElmSharp.csproj" />
+ <ProjectReference Include="..\Tizen.System.Information\Tizen.System.Information.csproj" />
</ItemGroup>
</Project>
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
-VisualStudioVersion = 15.0.26430.12
+VisualStudioVersion = 15.0.26730.10
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.Applications.WatchApplication", "Tizen.Applications.WatchApplication.csproj", "{8BF860DC-DCBC-4889-938F-7515C5282D95}"
EndProject
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ElmSharp", "..\ElmSharp\ElmSharp.csproj", "{66EC3D92-AD41-4906-A1A9-3C414B2107F5}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.System.Information", "..\Tizen.System.Information\Tizen.System.Information.csproj", "{F3138394-755D-4055-9561-999823C76BD2}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
{66EC3D92-AD41-4906-A1A9-3C414B2107F5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{66EC3D92-AD41-4906-A1A9-3C414B2107F5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{66EC3D92-AD41-4906-A1A9-3C414B2107F5}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F3138394-755D-4055-9561-999823C76BD2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F3138394-755D-4055-9561-999823C76BD2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F3138394-755D-4055-9561-999823C76BD2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F3138394-755D-4055-9561-999823C76BD2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {C24ED662-71DD-4A20-8F6E-C0A16FC8DE1C}
+ EndGlobalSection
EndGlobal
/// Gets the current time
/// </summary>
/// <returns>WatchTime</returns>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
/// <exception cref="InvalidOperationException">Thrown when failed to get current time because of invalid parameter.</exception>
/// <exception cref="OutOfMemoryException">Thrown when failed to get current time because memory is not enough.</exception>
+ /// <exception cref="NotSupportedException">Thrown when the method is not supported.</exception>
/// <example>
/// <code>
/// class MyApp : WatchApplication
throw new InvalidOperationException("Failed to get current time. err : " + err);
else if (err == Interop.Watch.ErrorCode.OutOfMemory)
throw new OutOfMemoryException("Failed to get current time. err : " + err);
+ else if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to get current time. err : " + err);
}
return new WatchTime(handle);
}
/// Gets the type of periodic ambient tick.
/// </summary>
/// <returns>AmbientTickType</returns>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
/// <exception cref="InvalidOperationException">Thrown when failed to get ambient tick type.</exception>
+ /// <exception cref="NotSupportedException">Thrown when the method is not supported.</exception>
/// <example>
/// <code>
/// class MyApp : WatchApplication
if(err != Interop.Watch.ErrorCode.None)
{
- throw new InvalidOperationException("Failed to get ambient tick type. err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to get ambient tick type. err : " + err);
+ else
+ throw new InvalidOperationException("Failed to get ambient tick type. err : " + err);
}
return ambientTickType;
/// If SetAmbientTickType is not called, OnAmbientTick will be called every minute.
/// </summary>
/// <param name="ambientTickType">the type of ambient tick</param>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
/// <exception cref="InvalidOperationException">Thrown when failed to set ambient tick type.</exception>
+ /// <exception cref="NotSupportedException">Thrown when the method is not supported.</exception>
/// <example>
/// <code>
/// class MyApp : WatchApplication
if(err != Interop.Watch.ErrorCode.None)
{
- throw new InvalidOperationException("Failed to set ambient tick type. err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to set ambient tick type. err : " + err);
+ else
+ throw new InvalidOperationException("Failed to set ambient tick type. err : " + err);
}
}
/// </summary>
/// <param name="ticks">Ticks the number of ticks per given resolution type</param>
/// <param name="type">Type of the resolution type</param>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
/// <exception cref="InvalidOperationException">Thrown when failed to set time tick frequency.</exception>
+ /// <exception cref="NotSupportedException">Thrown when the method is not supported.</exception>
/// <example>
/// <code>
/// class MyApp : WatchApplication
if (err != Interop.Watch.ErrorCode.None)
{
- throw new InvalidOperationException("Failed to set time tick frequency. err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to set time tick frequency. err : " + err);
+ else
+ throw new InvalidOperationException("Failed to set time tick frequency. err : " + err);
}
}
/// </summary>
/// <param name="ticks">Ticks the number of ticks per given resolution type</param>
/// <param name="type">Type of the resolution type</param>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
/// <exception cref="InvalidOperationException">Thrown when failed to get time tick frequency.</exception>
+ /// <exception cref="NotSupportedException">Thrown when the method is not supported.</exception>
/// <example>
/// <code>
/// class MyApp : WatchApplication
if (err != Interop.Watch.ErrorCode.None)
{
- throw new InvalidOperationException("Failed to get time tick frequency. err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to get time tick frequency. err : " + err);
+ else
+ throw new InvalidOperationException("Failed to get time tick frequency. err : " + err);
}
}
}
/// <summary>
/// The information of year
/// </summary>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
+ /// <exception cref="NotSupportedException">Thrown when the property is not supported.</exception>
public int Year
{
get
if (err != Interop.Watch.ErrorCode.None)
{
- Log.Error(LOGTAG, "Failed to get Year err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to get Year. err : " + err);
+ else
+ Log.Error(LOGTAG, "Failed to get Year err : " + err);
}
return year;
}
/// <summary>
/// The information fo month
/// </summary>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
+ /// <exception cref="NotSupportedException">Thrown when the property is not supported.</exception>
public int Month
{
get
if (err != Interop.Watch.ErrorCode.None)
{
- Log.Error(LOGTAG, "Failed to get Month err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to get Month. err : " + err);
+ else
+ Log.Error(LOGTAG, "Failed to get Month err : " + err);
}
return month;
}
/// <summary>
/// The information of day
/// </summary>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
+ /// <exception cref="NotSupportedException">Thrown when the property is not supported.</exception>
public int Day
{
get
if (err != Interop.Watch.ErrorCode.None)
{
- Log.Error(LOGTAG, "Failed to get Day err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to get Day. err : " + err);
+ else
+ Log.Error(LOGTAG, "Failed to get Day err : " + err);
}
return day;
}
/// <summary>
/// The information of day of week
/// </summary>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
+ /// <exception cref="NotSupportedException">Thrown when the property is not supported.</exception>
public int DayOfWeek
{
get
if (err != Interop.Watch.ErrorCode.None)
{
- Log.Error(LOGTAG, "Failed to get Second err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to get DayOfWeek. err : " + err);
+ else
+ Log.Error(LOGTAG, "Failed to get DayOfWeek err : " + err);
}
return dayOfWeek;
}
/// <summary>
/// The information of hour
/// </summary>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
+ /// <exception cref="NotSupportedException">Thrown when the property is not supported.</exception>
public int Hour
{
get
if (err != Interop.Watch.ErrorCode.None)
{
- Log.Error(LOGTAG, "Failed to get Hour err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to get Hour. err : " + err);
+ else
+ Log.Error(LOGTAG, "Failed to get Hour err : " + err);
}
return hour;
}
/// <summary>
/// The information of hour for 24 hour form
/// </summary>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
+ /// <exception cref="NotSupportedException">Thrown when the property is not supported.</exception>
public int Hour24
{
get
if (err != Interop.Watch.ErrorCode.None)
{
- Log.Error(LOGTAG, "Failed to get Hour24 err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to get Hour24. err : " + err);
+ else
+ Log.Error(LOGTAG, "Failed to get Hour24 err : " + err);
}
return hour24;
}
/// <summary>
/// The information of Minute
/// </summary>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
+ /// <exception cref="NotSupportedException">Thrown when the property is not supported.</exception>
public int Minute
{
get
if (err != Interop.Watch.ErrorCode.None)
{
- Log.Error(LOGTAG, "Failed to get Minute err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to get Minute. err : " + err);
+ else
+ Log.Error(LOGTAG, "Failed to get Minute err : " + err);
}
return minute;
}
/// <summary>
/// The information of second
/// </summary>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
+ /// <exception cref="NotSupportedException">Thrown when the property is not supported.</exception>
public int Second
{
get
if (err != Interop.Watch.ErrorCode.None)
{
- Log.Error(LOGTAG, "Failed to get Second err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to get Second. err : " + err);
+ else
+ Log.Error(LOGTAG, "Failed to get Second err : " + err);
}
return second;
}
/// <summary>
/// The information of millisecond
/// </summary>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
+ /// <exception cref="NotSupportedException">Thrown when the property is not supported.</exception>
public int Millisecond
{
get
if (err != Interop.Watch.ErrorCode.None)
{
- Log.Error(LOGTAG, "Failed to get Second err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to get Millisecond. err : " + err);
+ else
+ Log.Error(LOGTAG, "Failed to get Millisecond err : " + err);
}
return ms;
}
/// <summary>
/// The information of timezone
/// </summary>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
+ /// <exception cref="NotSupportedException">Thrown when the property is not supported.</exception>
public string TimeZone
{
get
if (err != Interop.Watch.ErrorCode.None)
{
- Log.Error(LOGTAG, "Failed to get Second err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to get TimeZone. err : " + err);
+ else
+ Log.Error(LOGTAG, "Failed to get TimeZone err : " + err);
}
return zone;
}
/// <summary>
/// The information of UTC time stamp
/// </summary>
+ /// <feature>http://tizen.org/feature/watch_app</feature>
+ /// <exception cref="NotSupportedException">Thrown when the property is not supported.</exception>
public DateTime UtcTimestamp
{
get
{
long ts = 0;
-
Interop.Watch.ErrorCode err = Interop.Watch.WatchTimeGetUtcTimestamp(_handle, out ts);
if (err != Interop.Watch.ErrorCode.None)
{
- Log.Error(LOGTAG, "Failed to get UtcTimestamp err : " + err);
+ if (err == Interop.Watch.ErrorCode.NotSupported)
+ throw new NotSupportedException("Failed to get UtcTimestamp. err : " + err);
+ else
+ Log.Error(LOGTAG, "Failed to get UtcTimestamp err : " + err);
}
-
return (new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).AddSeconds(ts).ToLocalTime();
}
}
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * 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 ElmSharp;
+
+namespace ElmSharp.Test
+{
+ public class ScrollerTest5 : TestCaseBase
+ {
+ public override string TestName => "ScrollerTest5";
+ public override string TestDescription => "To test basic operation of Scroller";
+
+ int _currentIndex = 0;
+
+ public override void Run(Window window)
+ {
+ Conformant conformant = new Conformant(window);
+ conformant.Show();
+ Box outterBox = new Box(window)
+ {
+ AlignmentX = -1,
+ AlignmentY = -1,
+ WeightX = 1,
+ WeightY = 1,
+ IsHorizontal = false,
+ };
+ outterBox.Show();
+ conformant.SetContent(outterBox);
+
+ Scroller scroller = new Scroller(window)
+ {
+ AlignmentX = -1,
+ AlignmentY = -1,
+ WeightX = 1,
+ WeightY = 1,
+ ScrollBlock = ScrollBlock.Vertical
+ };
+ scroller.Show();
+
+
+ Box innerBox = new Box(window)
+ {
+ AlignmentX = -1,
+ AlignmentY = -1,
+ WeightX = 1,
+ WeightY = 1,
+ IsHorizontal = true,
+ };
+ innerBox.Show();
+ scroller.SetContent(innerBox);
+
+ Rectangle[] rects = new Rectangle[5];
+ Random rnd = new Random();
+ for(int i = 0; i < 5; i++)
+ {
+ rects[i] = new Rectangle(window)
+ {
+ AlignmentX = -1,
+ AlignmentY = -1,
+ WeightX = 1,
+ WeightY = 1,
+ Color = Color.FromRgb(rnd.Next(0, 255), rnd.Next(0, 255), rnd.Next(0, 255)),
+ };
+ rects[i].Show();
+ rects[i].MinimumWidth = 300;
+ innerBox.PackEnd(rects[i]);
+ }
+ innerBox.MinimumWidth = 300 * 5;
+ _currentIndex = 4;
+
+
+ Button btn = new Button(window)
+ {
+ AlignmentX = -1,
+ WeightX = 1,
+ Text = "Remove"
+ };
+ btn.Clicked += (s, e) =>
+ {
+ System.Console.WriteLine("current index {0}", _currentIndex);
+ System.Console.WriteLine("Before Current Region : {0}", scroller.CurrentRegion);
+ innerBox.UnPack(rects[_currentIndex]);
+ innerBox.MinimumWidth = 300 * _currentIndex;
+ rects[_currentIndex].Hide();
+ _currentIndex--;
+ System.Console.WriteLine("After Current Region : {0}", scroller.CurrentRegion);
+
+ EcoreMainloop.Post(() =>
+ {
+ System.Console.WriteLine("On idler Current Region : {0}", scroller.CurrentRegion);
+ });
+
+ EcoreMainloop.AddTimer(0, () =>
+ {
+ System.Console.WriteLine("After 0 sec Current Region : {0}", scroller.CurrentRegion);
+ return false;
+ });
+ };
+ scroller.Scrolled += (s, e) =>
+ {
+ System.Console.WriteLine("Scrolled to {0}", scroller.CurrentRegion);
+ };
+
+ btn.Show();
+
+ outterBox.PackEnd(btn);
+ outterBox.PackEnd(scroller);
+
+
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * 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 ElmSharp;
+using System.Collections.Generic;
+
+namespace ElmSharp.Test
+{
+ public class ScrollerTest6 : TestCaseBase
+ {
+ public override string TestName => "ScrollerTest6";
+ public override string TestDescription => "To test basic operation of Scroller";
+
+ int _currentIndex = 0;
+
+ public override void Run(Window window)
+ {
+ Conformant conformant = new Conformant(window);
+ conformant.Show();
+ Box outterBox = new Box(window)
+ {
+ AlignmentX = -1,
+ AlignmentY = -1,
+ WeightX = 1,
+ WeightY = 1,
+ IsHorizontal = false,
+ };
+ outterBox.Show();
+ conformant.SetContent(outterBox);
+
+ Scroller scroller = new Scroller(window)
+ {
+ AlignmentX = -1,
+ AlignmentY = -1,
+ WeightX = 1,
+ WeightY = 1,
+ ScrollBlock = ScrollBlock.Vertical
+ };
+ scroller.Show();
+
+
+ Box innerBox = new Box(window)
+ {
+ AlignmentX = -1,
+ AlignmentY = -1,
+ WeightX = 1,
+ WeightY = 1,
+ IsHorizontal = true,
+ };
+ innerBox.Show();
+ scroller.SetContent(innerBox);
+
+ var rects = new List<Rectangle>();
+ Random rnd = new Random();
+ for(int i = 0; i < 30; i++)
+ {
+ var rect = new Rectangle(window)
+ {
+ AlignmentX = -1,
+ AlignmentY = -1,
+ WeightX = 1,
+ WeightY = 1,
+ Color = Color.FromRgb(rnd.Next(0, 255), rnd.Next(0, 255), rnd.Next(0, 255)),
+ };
+ rect.Show();
+ innerBox.PackEnd(rect);
+ rects.Add(rect);
+ };
+
+ innerBox.SetLayoutCallback(() =>
+ {
+ System.Console.WriteLine("!!!! update layout");
+ System.Console.WriteLine("MinimumWith = {0}", innerBox.MinimumWidth);
+
+ });
+ for (int i = 0; i < rects.Count; i++)
+ {
+ rects[i].Geometry = new Rect(i / 3 * 400 + innerBox.Geometry.X, i % 3 * 400 + innerBox.Geometry.Y, 400, 400);
+ }
+ innerBox.MinimumWidth = (int)Math.Ceiling(rects.Count / 3.0) * 400;
+
+ Button btn = new Button(window)
+ {
+ AlignmentX = -1,
+ WeightX = 1,
+ Text = "Remove"
+ };
+ btn.Clicked += (s, e) =>
+ {
+ System.Console.WriteLine("current index {0}", _currentIndex);
+ System.Console.WriteLine("Before Current Region : {0}", scroller.CurrentRegion);
+ int last = rects.Count - 1;
+ innerBox.UnPack(rects[last]);
+ rects[last].Hide();
+ rects.RemoveAt(last);
+
+ System.Console.WriteLine(" innerBox MinimumWith = {0}", innerBox.MinimumWidth);
+ System.Console.WriteLine("After Current Region : {0}", scroller.CurrentRegion);
+
+ EcoreMainloop.Post(() =>
+ {
+ System.Console.WriteLine("On idler Current Region : {0}", scroller.CurrentRegion);
+ });
+
+ EcoreMainloop.AddTimer(0, () =>
+ {
+ System.Console.WriteLine("After 0 sec Current Region : {0}", scroller.CurrentRegion);
+ return false;
+ });
+ };
+ scroller.Scrolled += (s, e) =>
+ {
+ System.Console.WriteLine("Scrolled to {0}", scroller.CurrentRegion);
+ System.Console.WriteLine("in scrolling MinimumWith = {0}", innerBox.MinimumWidth);
+ };
+
+ btn.Show();
+
+ outterBox.PackEnd(btn);
+ outterBox.PackEnd(scroller);
+
+
+ }
+ }
+}
\ No newline at end of file