I learned how to do it this year when I first started getting into road biking. Trackstanding while standing (supposedly easier) was awkward for me, and I learned how to do it sitting down ("tracksit?"). As a result, I can hold a comfortable seated trackstand for close to a minute now, and even a one-handed seated trackstand. Can't hold a standing trackstand for much more than five seconds or so though.
And yeah, a slight incline is pretty much necessary, there are ways to do it without an incline but I doubt I'll ever have the skill or time to try and master those.