Skip to content

Commit

Permalink
Prepare for //build
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffstall committed May 15, 2024
1 parent cb39eb7 commit a993848
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 27 deletions.
26 changes: 13 additions & 13 deletions Samples/Islands/DrawingIsland/DrawingCppTestApp/WinMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ int __stdcall wWinMain(HINSTANCE, HINSTANCE, PWSTR, int)
window.Show();

#pragma region ...
//// Create a ContentSiteBridge and connect Island content into it.
//auto compositor = winrt::Compositor();
//auto siteBridge = winrt::DesktopChildSiteBridge::Create(compositor, window.Id());
//siteBridge.ResizePolicy(winrt::ContentSizePolicy::ResizeContentToParentWindow);
//siteBridge.Show();

//auto island = winrt::DrawingIsland(compositor).Island();
//siteBridge.Connect(island);

//// Move initial focus to the ContentIsland.
//auto focusNavigationHost = winrt::InputFocusNavigationHost::GetForSiteBridge(siteBridge);
//focusNavigationHost.NavigateFocus(winrt::FocusNavigationRequest::Create(
// winrt::FocusNavigationReason::Programmatic));
// Create a ContentSiteBridge and connect Island content into it.
auto compositor = winrt::Compositor();
auto siteBridge = winrt::DesktopChildSiteBridge::Create(compositor, window.Id());
siteBridge.ResizePolicy(winrt::ContentSizePolicy::ResizeContentToParentWindow);
siteBridge.Show();

auto island = winrt::DrawingIsland(compositor).Island();
siteBridge.Connect(island);

// Move initial focus to the ContentIsland.
auto focusNavigationHost = winrt::InputFocusNavigationHost::GetForSiteBridge(siteBridge);
focusNavigationHost.NavigateFocus(winrt::FocusNavigationRequest::Create(
winrt::FocusNavigationReason::Programmatic));
#pragma endregion

queue.RunEventLoop();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
<Optimize>False</Optimize>
</PropertyGroup>

<ItemGroup>
<Compile Remove="DuckScenario.cs" />
</ItemGroup>

<ItemGroup>
<!-- Added CsWinRT reference to avoid WinMD error as a result of WinMD leaking via project reference. -->
<PackageReference Include="CommunityToolkit.WinAppSDK.LottieWinRT" Version="8.0.230819-rc-LottieIsland.7.g92a87e1883" />
Expand Down
23 changes: 9 additions & 14 deletions Samples/Islands/DrawingIsland/DrawingCsTestApp/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,34 +28,29 @@

#region ...
// Create a ContentSiteBridge and connect Island content into it.
//var compositor = new Compositor();
//var siteBridge = DesktopChildSiteBridge.Create(compositor, window.Id);
//siteBridge.ResizePolicy = ContentSizePolicy.ResizeContentToParentWindow;
//siteBridge.Show();
var compositor = new Compositor();
var siteBridge = DesktopChildSiteBridge.Create(compositor, window.Id);
siteBridge.ResizePolicy = ContentSizePolicy.ResizeContentToParentWindow;
siteBridge.Show();

//var drawing = new DrawingIsland(compositor);
//siteBridge.Connect(drawing.Island);
var drawing = new DrawingIsland(compositor);
siteBridge.Connect(drawing.Island);

#region ...
//var lottie = LottieIslandScenario.CreateLottieIsland(compositor);
//siteBridge.Connect(lottie.Island);

#region ...
//var island = DuckScenario.CreateIsland(compositor);
//siteBridge.Connect(island);

#region ...
//var island = HelmetScenario.CreateIsland(compositor);
//siteBridge.Connect(island);
#endregion

#endregion
#endregion

// Move initial focus to the ContentIsland.
//var focusNavigationHost = InputFocusNavigationHost.GetForSiteBridge(siteBridge);
//focusNavigationHost.NavigateFocus(FocusNavigationRequest.Create(
// FocusNavigationReason.Programmatic));
var focusNavigationHost = InputFocusNavigationHost.GetForSiteBridge(siteBridge);
focusNavigationHost.NavigateFocus(FocusNavigationRequest.Create(
FocusNavigationReason.Programmatic));
#endregion

queue.RunEventLoop();
Expand Down

0 comments on commit a993848

Please sign in to comment.