c# - Add ProgressBar programmatically winRT -
i have created metro apps , have created view base view this
public class viewbase : page,iview { public object parameter { get; private set; } private progressbar _progressring; public viewbase() { parameter = null; _progressring = new progressbar { isindeterminate = true, height = 25, width = 100, flowdirection = flowdirection.lefttoright, foreground = new solidcolorbrush(colors.blue), horizontalalignment = horizontalalignment.center, verticalalignment = verticalalignment.top, margin = new thickness(0,12,0,0) }; } public viewbase(object parameter) { parameter = parameter; _progressring = new progressbar { isindeterminate = true, height = 25, width = 100, flowdirection = flowdirection.lefttoright, foreground = new solidcolorbrush(colors.blue), horizontalalignment = horizontalalignment.center, verticalalignment = verticalalignment.top, margin = new thickness(0, 12, 0, 0) }; } #region properties public virtual string title { { return ""; } } #endregion #region iview public async void displaymessage(messagehandler handler) { await messageboxhelper.showasync(handler); } public void setasbusy() { _progressring.visibility = visibility.visible; frame.isenabled = false; } public void setasidle() { _progressring.visibility=visibility.collapsed; frame.isenabled = true; } #endregion } }
so need whenever view call setasbusy()
need show progressbar
. seems can not add it. frame.addchild()
not exist winrt api. how do that? can add progressbar manually in view much
"that means need add in of view? need in view base don't recreate progressbar"
well default yes. have "shell" page around regular frame, , set navigation interact inner frame.
Comments
Post a Comment