문제

Ok, another question about Cimbalino appbar.

I have a pivot with several pages as UserControls. What i want is to have different appbars for every UC (page). But i can't define appbar inside UC, because that throws exception "This ApplicationBarBehavior element can only be attached to the LayoutRoot element", but root is Pivot itself.

PS: definitely i'd like to use mvvm way, and keep appbar in UC's viewmodels, not switching through SelectedIndex in Pivot's codebehind.

도움이 되었습니까?

해결책

Ah, looking like MultiApplicationBarBehavior is to the resque. http://www.pedrolamas.com/2013/03/11/cimbalino-windows-phone-toolkit-multiapplicationbarbehavior/

Though, i'm not sure that it is 100% usefull: it is binded to index, but what if i'd like to switch some pages?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top