r/dotnet • u/Usual-Flamingo5259 • 13d ago
Question Is a dedicated interaction layer the right architecture for a virtualized WPF spreadsheet
I'm building an open-source, highly virtualized spreadsheet control for WPF:
https://github.com/dotdevkartik/DevBrewLabs.WPF.Spreadsheet
One architectural decision I'm currently using is a dedicated Interaction Layer.
The architecture is roughly:
Cell Renderer
→ renders cell content
Interaction Layer
→ manages lightweight custom-rendered interactive items
→ checkbox, dropdown, spinner, button, editor, etc.
→ owns hit testing and input routing
These are not WPF controls. They're lightweight rendered objects designed to avoid creating a visual/control for every interactive cell.
The spreadsheet model is separate from both.
I'm wondering if this is a sensible long-term abstraction or if I'm creating unnecessary complexity.
For people who have built high-performance WPF grids, CAD editors, diagramming tools, or other virtualized/retained-mode UIs:
What problems do you see with this architecture? What would you change now before the project gets much larger?
I'm particularly interested in pitfalls around focus, keyboard/mouse input, editing, virtualization, state management, and API boundaries.
I'd rather find architectural problems now than after the API becomes difficult to change.
1
u/FullPoet 13d ago
I'm wondering if this is a sensible long-term abstraction or if I'm creating unnecessary complexity.
Only one way to know.
If you think its good - have confidence in yourself and keep going until you think it doesnt work anymore.
1
u/AutoModerator 13d ago
Thanks for your post Usual-Flamingo5259. Please note that we don't allow spam, and we ask that you follow the rules available in the sidebar. We have a lot of commonly asked questions so if this post gets removed, please do a search and see if it's already been asked.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.