I'm afraid this is a noob question...
I'm building an app that needs several controls which aren't (currently) available in xamarin.forms. I looked at third-party control sets, but most of those haven't caught up with MacOS yet. I'm mainly interested in tablet and desktop for this application, so "lowest common denominator" doesn't always fit my needs. At the moment, I need a treelist and a data grid that works on all platforms, and it's starting to look like I need to write them for myself.
I don't really care about native look+feel for these, so it seems to me that it ought to be possible to just write them in C#. I'm stumbling a bit on that conceptually. In abstract, it feels like I ought to be writing a Renderer that works on all platforms, perhaps using some common denominator underlying control as a drawing surface. I've looked at SkiaSharp, and it looks like in a pinch I could do my drawing that way, though the notion of scrolling or RasterBlockMove (for scrolling by hand) doesn't seem to exist in the SkiaSharp concept set.
So three questions:
- What's the right way to think about building this sort of "platform neutral" control implementation? Is there an example or two somewhere that I might want to look at?
- Is there any sort of low-level control for interactive drawing that already exists? In effect, I'm looking for something that exposes the low-level window drawing and event interface through a neutral API - right down to ExposeEvents and such - so that I can do everything in C#.
- [For my curiosity, mainly] Why does there seem to be such an obsession with writing native controls when C# code is pretty much just as fast?
Thanks in advance for any pointers or help you may feel up to providing.