diff --git a/Tutorial/GacUI_Controls/Animation/UI/Resource.xml b/Tutorial/GacUI_Controls/Animation/UI/Resource.xml index d6a9ffac..51438225 100644 --- a/Tutorial/GacUI_Controls/Animation/UI/Resource.xml +++ b/Tutorial/GacUI_Controls/Animation/UI/Resource.xml @@ -111,9 +111,9 @@ var sin = Math::Sin(angle); var cos = Math::Cos(angle); - var cx = (container.Bounds.x2 - container.Bounds.x1) / 2; - var cy = (container.Bounds.y2 - container.Bounds.y1) / 2; - var radiusBall = (ball.Bounds.x2 - ball.Bounds.x1) / 2; + var cx = (container.CachedBounds.x2 - container.CachedBounds.x1) / 2; + var cy = (container.CachedBounds.y2 - container.CachedBounds.y1) / 2; + var radiusBall = (ball.CachedBounds.x2 - ball.CachedBounds.x1) / 2; var radiusOrbit = Math::Min(cx, cy) - radiusBall; var x = cast int Math::Round(cos * radiusOrbit + cx); diff --git a/Tutorial/GacUI_Controls/Animation/UI/Source/DemoPartialClasses.cpp b/Tutorial/GacUI_Controls/Animation/UI/Source/DemoPartialClasses.cpp index 12de2625..6669177c 100644 --- a/Tutorial/GacUI_Controls/Animation/UI/Source/DemoPartialClasses.cpp +++ b/Tutorial/GacUI_Controls/Animation/UI/Source/DemoPartialClasses.cpp @@ -86,9 +86,9 @@ Closures auto angle = (((circleRatio * ::vl::reflection::description::Math::Pi()) * static_cast(static_cast<::vl::vint>(2))) + (::vl::reflection::description::Math::Pi() * static_cast(1.5))); auto sin = ::vl::reflection::description::Math::Sin(angle); auto cos = ::vl::reflection::description::Math::Cos(angle); - auto cx = ((::vl::__vwsn::This(container)->GetBounds().x2 - ::vl::__vwsn::This(container)->GetBounds().x1) / static_cast<::vl::vint>(2)); - auto cy = ((::vl::__vwsn::This(container)->GetBounds().y2 - ::vl::__vwsn::This(container)->GetBounds().y1) / static_cast<::vl::vint>(2)); - auto radiusBall = ((::vl::__vwsn::This(ball)->GetBounds().x2 - ::vl::__vwsn::This(ball)->GetBounds().x1) / static_cast<::vl::vint>(2)); + auto cx = ((::vl::__vwsn::This(container)->GetCachedBounds().x2 - ::vl::__vwsn::This(container)->GetCachedBounds().x1) / static_cast<::vl::vint>(2)); + auto cy = ((::vl::__vwsn::This(container)->GetCachedBounds().y2 - ::vl::__vwsn::This(container)->GetCachedBounds().y1) / static_cast<::vl::vint>(2)); + auto radiusBall = ((::vl::__vwsn::This(ball)->GetCachedBounds().x2 - ::vl::__vwsn::This(ball)->GetCachedBounds().x1) / static_cast<::vl::vint>(2)); auto radiusOrbit = (::vl::reflection::description::Math::Min(cx, cy) - radiusBall); auto x = static_cast<::vl::vint>(::vl::reflection::description::Math::Round(((cos * static_cast(radiusOrbit)) + static_cast(cx)))); auto y = static_cast<::vl::vint>(::vl::reflection::description::Math::Round(((sin * static_cast(radiusOrbit)) + static_cast(cx)))); diff --git a/Tutorial/GacUI_Xml/Instance_MultipleWindows/UI/Resource.xml b/Tutorial/GacUI_Xml/Instance_MultipleWindows/UI/Resource.xml index afdeafe0..58780882 100644 --- a/Tutorial/GacUI_Xml/Instance_MultipleWindows/UI/Resource.xml +++ b/Tutorial/GacUI_Xml/Instance_MultipleWindows/UI/Resource.xml @@ -14,7 +14,7 @@ diff --git a/Tutorial/GacUI_Xml/Instance_MultipleWindows/UI/Source/DemoPartialClasses.cpp b/Tutorial/GacUI_Xml/Instance_MultipleWindows/UI/Source/DemoPartialClasses.cpp index 6f81acb4..a7da3fbe 100644 --- a/Tutorial/GacUI_Xml/Instance_MultipleWindows/UI/Source/DemoPartialClasses.cpp +++ b/Tutorial/GacUI_Xml/Instance_MultipleWindows/UI/Source/DemoPartialClasses.cpp @@ -148,7 +148,7 @@ Class (::demo::MainWindowConstructor) } (this->__vwsn_precompile_2 = ::vl::__vwsn::This(this->__vwsn_precompile_1)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(20); __vwsn_temp__.top = static_cast<::vl::vint>(20); __vwsn_temp__.right = (- static_cast<::vl::vint>(1)); __vwsn_temp__.bottom = (- static_cast<::vl::vint>(1)); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_2)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(20); __vwsn_temp__.top = static_cast<::vl::vint>(20); __vwsn_temp__.right = (- static_cast<::vl::vint>(1)); __vwsn_temp__.bottom = (- static_cast<::vl::vint>(1)); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetText(::vl::WString::Unmanaged(L"Click me to show another window!")); diff --git a/Tutorial/GacUI_Xml/Member_Property/UI/Resource.xml b/Tutorial/GacUI_Xml/Member_Property/UI/Resource.xml index ef9550a7..b66f42a8 100644 --- a/Tutorial/GacUI_Xml/Member_Property/UI/Resource.xml +++ b/Tutorial/GacUI_Xml/Member_Property/UI/Resource.xml @@ -14,7 +14,7 @@ - + @@ -31,8 +31,8 @@ - - + + diff --git a/Tutorial/GacUI_Xml/Member_Property/UI/Source/DemoPartialClasses.cpp b/Tutorial/GacUI_Xml/Member_Property/UI/Source/DemoPartialClasses.cpp index a8576aaf..7c20dc0f 100644 --- a/Tutorial/GacUI_Xml/Member_Property/UI/Source/DemoPartialClasses.cpp +++ b/Tutorial/GacUI_Xml/Member_Property/UI/Source/DemoPartialClasses.cpp @@ -260,7 +260,7 @@ namespace demo (this->myControl = new ::demo::MyControl()); (this->__vwsn_precompile_1 = ::vl::__vwsn::This(this->myControl)->GetBoundsComposition()); { - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(10); __vwsn_temp__.top = static_cast<::vl::vint>(10); return __vwsn_temp__; }()); + ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetAlignmentToParent([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(10); __vwsn_temp__.top = static_cast<::vl::vint>(10); __vwsn_temp__.right = (- static_cast<::vl::vint>(1)); __vwsn_temp__.bottom = (- static_cast<::vl::vint>(1)); return __vwsn_temp__; }()); } { ::vl::__vwsn::This(this->__vwsn_precompile_0)->AddChild(static_cast<::vl::presentation::controls::GuiControl*>(this->myControl)); @@ -317,6 +317,9 @@ Class (::demo::MyControlConstructor) (this->__vwsn_precompile_0 = new ::vl::presentation::controls::GuiControl(::vl::presentation::theme::ThemeName::GroupBox)); } (this->__vwsn_precompile_6 = ::vl::__vwsn::This(this->__vwsn_precompile_0)->GetContainerComposition()); + { + ::vl::__vwsn::This(this->__vwsn_precompile_6)->SetInternalMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(5); __vwsn_temp__.top = static_cast<::vl::vint>(5); __vwsn_temp__.right = static_cast<::vl::vint>(5); __vwsn_temp__.bottom = static_cast<::vl::vint>(5); return __vwsn_temp__; }()); + } { ::vl::__vwsn::This(this->__vwsn_precompile_6)->SetMinSizeLimitation(::vl::presentation::compositions::GuiGraphicsComposition::MinSizeLimitation::LimitToElementAndChildren); } @@ -330,9 +333,6 @@ Class (::demo::MyControlConstructor) { ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetDirection(::vl::presentation::compositions::GuiStackComposition::Direction::Vertical); } - { - ::vl::__vwsn::This(this->__vwsn_precompile_1)->SetMargin([&](){ ::vl::presentation::Margin __vwsn_temp__; __vwsn_temp__.left = static_cast<::vl::vint>(5); __vwsn_temp__.top = static_cast<::vl::vint>(5); __vwsn_temp__.right = static_cast<::vl::vint>(5); __vwsn_temp__.bottom = static_cast<::vl::vint>(5); return __vwsn_temp__; }()); - } (this->__vwsn_precompile_2 = new ::vl::presentation::compositions::GuiStackItemComposition()); { (this->__vwsn_precompile_3 = new ::vl::presentation::controls::GuiSelectableButton(::vl::presentation::theme::ThemeName::RadioButton));