Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest DrawingIsland changes #338

Open
wants to merge 31 commits into
base: main
Choose a base branch
from
Open

Conversation

jeffstall
Copy link
Contributor

Description

Add C# sample
Fix UIA usage

Target Release

WASDK 1.5 public.

Checklist

  • Samples build and run using the Visual Studio versions listed in the Windows development docs.
  • Samples build and run on all supported platforms (x64, x86, ARM64) and configurations (Debug, Release).
  • Samples set the minimum supported OS version to Windows 10 version 1809.
  • Samples build clean with no warnings or errors.
  • [TODO] [For new samples]: Samples have completed the sample guidelines checklist and follow standardization/naming guidelines.
  • [N/A] If I am onboarding a new feature, then I must have correctly setup a new CI pipeline for my feature with the correct triggers and path filters laid out in the "Onboarding Samples CI Pipeline for new feature" section in samples-guidelines.md.
  • [N/A] I have commented on my PR /azp run SamplesCI-<FeatureName> to have the CI build run on my branch for each of my FeatureName my PR is modifying. This must be done on the latest commit on the PR before merging to ensure the build is up to date and accurate. Warning: the PR will not block automatically if this is not run due to '/azp run' limitation on triggering more than 10 pipelines.

jeffstall and others added 9 commits May 1, 2024 23:14
Update the DrawingIsland sample using public WASDK 1.5 APIs.
Renamed C++ version into CppTest and created parallel C# / NET CsTest version.

The Cs version is not working correctly with CsWinRT and .NET 8 yet. To get the C++ projects to successfully build, unload the Cs projects from the VS solution:
- DrawingCsTestApp
- DrawingCsTestPackage
- DrawingIslandCsProjection
Thanks to Manodasan, this fixes the CsWinRT support. :-)
Resolve most #if/#endif blocks for either support or not.
Remaining:
- Mica on Win11
- Improve Accessibility
Move feature areas into sub-structs to partition. (Will continue this more.)
Fix word-wrapping at 100 columns.
Members are now in a more readable order, members that are not used have been removed, and everything is better partitioned.
The experimental sample has now been completely superseded by the new WASDK 1.5 public DrawingIsland sample that shows both C++ and C# callers.
* Refactor UIA

* Update UIA when visual ordering changes

* Fix keyboard input and support UIA removal of all children

---------

Co-authored-by: adpa-ms
niklasb-ms and others added 15 commits May 7, 2024 10:02
* Add TextElement and TextRenderer classes.

* Hook up the text element to the drawing island.

* Rename VisualElement to VisualItem.

* Add a margin around text.

* Address code review feedback.
* Show how to consume LottieIsland

* Changed LottieIsland to be based of command line argument

* Rename LottieIslandScenario

* Respond to Jeff's PR feedback

---------

Co-authored-by: Jeffrey Stall <[email protected]>
Ported from SceneGraph Samples.
Co-authored-by: Adib Parkar <[email protected]>
Restore Duck and rename Helmet.

Rewrite Helmet loading code:
1. Share common memory buffer code.
2. Execute file loading / bitmap decoding parallel.
3. Make more common functions to improve readability.
The Cs projects run down-level to RS5. They should not require Win11.
* Add RecreateGraphicsDevice method.

* Implement TextRenderer::RecreateDirect2DDevice.

* Catch device-removed exceptions.

* Add DeviceLostHelper class.

* Handle device lost event.

* DeviceLostHelper cleanup.
- Niklas and Adib created conflict with UIA refactoring.
- Aligned sample "main" steps for Cs and Cpp.
niklasb-ms and others added 2 commits May 9, 2024 16:35
* Snap pixels on text surface brush and visual.

* Disable stretching and alignment in Text's surface brush

* Set visual to size of text surface to disable stretch/alignment

* Correctly set a text item visual's size to match the surface size.

---------

Co-authored-by: achen144 <[email protected]>

This project demonstrates how to get started consuming Windows Runtime
classes directly from standard C++, using platform projection headers
generated from Windows SDK metadata files.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this file either be deleted, or converted to a .md explaining what the test app is doing and why?


<Identity
Name="94c4cb2e-aad6-4713-8ea8-591be99dcbc9"
Publisher="CN=jstall"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a standard Publisher field that the other samples in the repo use?

<OutputType>WinExe</OutputType>

<!-- TODO: Why do we need to specify a specific Windows version? -->
<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it maybe the PSDK version tag here? The 22621 PSDK is backwards compatible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants