2014-11-06 1 views

답변

1

는 따라서 ISOPEN 속성은 /는 AppBar를 개폐하는 (쇼/보조 메뉴 및 라벨 숨 깁니다), 단지 이전 줄을 기억 한 후 난 그냥 null로 BottomAppBar에게 재산 최저치를하고있어, 완전히 AppBar 숨길를 변수에. 그런 다음 AppBar을 반환하려는 경우 해당 변수 인 샘플 코드를 사용합니다.

CommandBar previousBar; 
private void HideBar() 
{ 
    previousBar = BottomAppBar as CommandBar; 
    BottomAppBar = null; 
} 

private void ShowBar() 
{ 
    BottomAppBar = previousBar; 
} 
0

프로그래밍 방식으로 응용 프로그램 막대를 열고 닫을 수 있습니다. by setting the IsOpen property. 열기 및 닫기 이벤트를 처리하여 열거 나 닫히는 앱 표시 줄에 응답 할 수 있습니다.

if (this.BottomAppBar != null) 
{ 
    this.BottomAppBar.IsOpen = true; 
} 
+0

감사합니다. IsOpen 속성을 설정하기 위해 내 코드에서 Appbar에 대한 참조를 얻으려면 어떻게해야합니까? – michael

+0

AppBar는 페이지 개체입니다. this.BottomAppBar – crea7or

관련 문제