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

Guide to Customizing Existing Controls #478

Open
stevemonaco opened this issue May 4, 2024 · 0 comments
Open

Guide to Customizing Existing Controls #478

stevemonaco opened this issue May 4, 2024 · 0 comments
Labels
content request New docs requires

Comments

@stevemonaco
Copy link
Collaborator

stevemonaco commented May 4, 2024

Questions regarding how to customize existing controls are asked more often than probably any other category of Avalonia question. A guide should be created to address this knowledge gap of a reliable process. Most topic pages will have several links to other pages that cover the concept.

Rough list of topics:

  • Locating Relevant Properties using DevTools
    • Visual Tree
    • Active/Inactive Style Selectors
    • TemplatedParent
  • Locating Originating ControlTheme
    • Simple/Fluent
    • Third-party
    • Emphasize General Importance of Reading ControlThemes
  • Types of Possible Visual Modifications Without Copying ControlTheme
    • Style selectors
    • Overriding resources
    • Setter precedence (prerequisite, link to doc)
  • Types of Impossible Visual Modifications Without Copying ControlTheme
    • Customize local set value
    • Changing XAML tree structure
  • Local Inclusion of Copied ControlTheme (when modification is impossible)
  • Create an alternate look for a control that already has a desired default look
  • Modifying or Adding Behavior to Existing Controls
    • Attached behaviors/properties
    • Tunnel events
      • Example with TextBox key input filtering
    • Inherit -> custom control (StyleKeyOverride)
    • Limitations

Docs Location: How-To Guides

Looking for feedback/general interest as I will probably author this.

@maxkatz6 maxkatz6 added the content request New docs requires label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content request New docs requires
Projects
None yet
Development

No branches or pull requests

2 participants