InkToolbar: honour CornerRadius and Padding in the control template - #11872
Open
Nitin Chaudhary (Nitin-100) wants to merge 1 commit into
Open
Nitin Chaudhary (Nitin-100) wants to merge 1 commit into
Nitin Chaudhary (Nitin-100) wants to merge 1 commit into
Conversation
The InkToolbar template root binds Background, BorderBrush and BorderThickness but not CornerRadius or Padding, so setting either on an InkToolbar had no effect. StackPanel supports both, so bind them through. Note this is a deliberate deviation from strict UWP parity rather than a port regression: the UWP template omits the same two bindings (verified in SDK 19041 and 26100). Control.CornerRadius postdates InkToolbar, and WinUI 3's rounded design language makes callers reasonably expect it to work. Verified with the template applied: InkToolbar.CornerRadius="12" now reaches the template root (previously 0) and the border renders rounded.
Pranav Gupta (pranav-gupta-msft)
approved these changes
Sep 14, 2026
Pranav Gupta (pranav-gupta-msft)
left a comment
Member
There was a problem hiding this comment.
For Accessibility
Hitesh Kumar (hiteshkrmsft)
approved these changes
Sep 14, 2026
Contributor
Author
|
/azp run |
|
Azure Pipelines: 1 pipeline(s) were filtered out due to trigger conditions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
CornerRadiushas no effect onInkToolbar. Reported against the experimental release.The template root binds
Background,BorderBrushandBorderThickness, but notCornerRadius— so the property is silently ignored.Paddinghas the same latent gap and is fixed here too.https://github.com/microsoft/microsoft-ui-xaml/blob/main/controls/dev/InkToolbar/InkToolbar.xaml#L1549
Fix
Bind both through on the template root.
StackPanelsupportsCornerRadiusandPadding(seemicrosoft.ui.xaml.controls.controls.idl), so no structural change is needed.Note for reviewers: this deviates from UWP
Worth calling out explicitly, since the inking work has been held to strict UWP parity.
The UWP
InkToolbartemplate omits these same two bindings — verified identical in Windows SDK 10.0.19041.0 and 10.0.26100.0:So this is not a port regression — it is a long-standing UWP gap we inherited faithfully.
Control.CornerRadiuspostdatesInkToolbar(RS5 vs 1607), which is likely why it was never wired up. WinUI 3's rounded design language makes callers reasonably expect it to work, so fixing it here is an intentional improvement rather than an oversight.The change is purely additive: templates that never set
CornerRadius/Paddingare unaffected, since both default to zero.Validation
With the template applied to an
InkToolbarwithCornerRadius="12":InkToolbar.CornerRadius→12and the template root now receives 12 (previously 0)Verified on an unpackaged WinUI 3 desktop app against a local product build.