Skip to content

Platform options#998

Open
MikeCodesDotNET wants to merge 12 commits into
mainfrom
platform-options
Open

Platform options#998
MikeCodesDotNET wants to merge 12 commits into
mainfrom
platform-options

Conversation

@MikeCodesDotNET

Copy link
Copy Markdown
Member

I've had Claude add some information about the various platform options. I had it read the source for each from Master and add the docs. Some of the XML documentation doesn't match the implementation though.

For example:

  • The XML documentation for macOS is wrong. We should fix that.

  • I'm unsure what the situation is with iOS. The docs match the code from Master, which shows OpenGL as being the default, which feels like a mistake given macOS is using Metal. Can we confirm if Metal is genuinely unstable on iOS, or is the XML comment old?

@luke-whos-here luke-whos-here left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Mostly style edits from me. Not being the expert, I can't 100% verify the technical accuracy beyond checking the info against the source code. Although I feel like the "Metal is unstable" one shouldn't be mentioned in any case, to avoid confusion.

Comment thread docs/platform-specific-guides/android/android.md Outdated
Comment thread docs/platform-specific-guides/android/android.md Outdated
Comment thread docs/platform-specific-guides/ios.md Outdated
Comment thread docs/platform-specific-guides/linux.md Outdated
Comment thread docs/platform-specific-guides/linux.md Outdated
| `LowLatencyDxgiSwapChain` | Feature Level 11_3, Windows 8.1 and above. Renders through a low-latency DXGI swap chain for reduced input latency, without the transparency and blur of `WinUIComposition`. Requires `RenderingMode` to include `AngleEgl`. |
| `RedirectionSurface` | Compatibility fallback for older systems. Some Avalonia features may not work. |

Include `RedirectionSurface` as a fallback to support the widest range of devices. If none of the listed modes apply, Avalonia throws an `InvalidOperationException`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
Include `RedirectionSurface` as a fallback to support the widest range of devices. If none of the listed modes apply, Avalonia throws an `InvalidOperationException`.
To support the widest range of devices, include `RedirectionSurface` as a fallback.
If none of the listed modes apply, Avalonia throws an `InvalidOperationException`.


Include `RedirectionSurface` as a fallback to support the widest range of devices. If none of the listed modes apply, Avalonia throws an `InvalidOperationException`.

For how rendering and composition fit together, see [Application Architecture](/docs/fundamentals/architecture#the-rendering-pipeline).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
For how rendering and composition fit together, see [Application Architecture](/docs/fundamentals/architecture#the-rendering-pipeline).
For more information on how rendering and composition fit together, see [Application architecture](/docs/fundamentals/architecture#the-rendering-pipeline).

|---|---|
| `PerMonitorDpiAware` | Adjusts the scale factor whenever DPI changes, such as when a window moves between monitors. |
| `SystemDpiAware` | Queries DPI once at startup and does not adjust to later changes. |
| `Unaware` | The application is DPI unaware, and the system bitmap-scales it. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
| `Unaware` | The application is DPI unaware, and the system bitmap-scales it. |
| `Unaware` | The application is DPI-unaware. The system bitmap-scales it. |

| `SystemDpiAware` | Queries DPI once at startup and does not adjust to later changes. |
| `Unaware` | The application is DPI unaware, and the system bitmap-scales it. |

See [High DPI and per-monitor scaling](#high-dpi-and-per-monitor-scaling) for how scaling affects layout and assets.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
See [High DPI and per-monitor scaling](#high-dpi-and-per-monitor-scaling) for how scaling affects layout and assets.
See [High DPI and per-monitor scaling](#high-dpi-and-per-monitor-scaling) for more information on how scaling affects layout and assets.


### Headless platform options

`AvaloniaHeadlessPlatformOptions` is passed to `.UseHeadless()` and has two properties:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
`AvaloniaHeadlessPlatformOptions` is passed to `.UseHeadless()` and has two properties:
`AvaloniaHeadlessPlatformOptions` is passed to `.UseHeadless()`. It has two properties:

@luke-whos-here luke-whos-here left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Mostly style edits from me. Not being the expert, I can't 100% verify the technical accuracy beyond checking the info against the source code. Although I feel like the "Metal is unstable" one shouldn't be mentioned in any case, to avoid confusion.

MikeCodesDotNET and others added 5 commits June 12, 2026 16:21
Co-authored-by: Luke <55367595+luke-whos-here@users.noreply.github.com>
Co-authored-by: Luke <55367595+luke-whos-here@users.noreply.github.com>
Co-authored-by: Luke <55367595+luke-whos-here@users.noreply.github.com>
Co-authored-by: Luke <55367595+luke-whos-here@users.noreply.github.com>
Co-authored-by: Luke <55367595+luke-whos-here@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants