c# - Implementing subtle notifications for WinRT apps -
i develop small reusable component closely resembles btprogresshud monotouch. i'm stuck on how inject overlay visual tree without interfering page content.
update:
after experimenting around bit, came idea in order able decouple overlays page content change window content frame grid can host both root frame , notification elements.
app.xaml.cs
protected override async void onlaunched(launchactivatedargs args) { grid rootgrid = window.current.content grid; if(rootgrid == null) { var rootframe = new frame(); rootgrid = new grid(); rootgrid.children.add(rootframe); window.current.content = rootgrid; } }
progresshud.cs
public static class progresshud { static void show(string msg) { grid rootgrid = window.current.content grid; // testing concept rootgrid.children.add(new progressring { isactive = true }; } }
could confirm wether changing window.content root frame grid cause unwanted side effects?
depends on rest of pages like, overlay control can put inside main container on page (whether grid or canvas or whatever) last element (so it'll top-most in z-order) , set not visible/collapsed (until needed). won't interfere other content while collapsed.
Comments
Post a Comment