BottomAppBar이 당신이 아마 AppBarButtons을 보유하고있는 PrimaryCommands property을 발견 할 것이다, CommandBar입니다. 당신은 예를 들어 변경하려는 경우 라벨 (아이콘 또는 다른 것), 당신이 이런 식으로 일을 할 수 있어야한다 : 당신은 종종 AppBarButton의 매개 변수를 변경하려면
// change the label of the first button
((BottomAppBar as CommandBar).PrimaryCommands[0] as AppBarButton).Label = "New Label";
, 쉽게 만들려면 , 당신은 간단한 확장 방법을 쓸 수 있습니다 :
는 상기와 동일하지만 만드는 물론
/// <summary>
/// Get AppBarButton of AppBar - extension method
/// </summary>
/// <param name="index">index of target AppBarButton</param>
/// <returns>AppBarButton of desired index</returns>
public static AppBarButton PButton(this AppBar appBar, int index) { return (appBar as CommandBar).PrimaryCommands[index] as AppBarButton; }
쉽게 거의 사용 :
BottomAppBar.PButton(0).Label = "New label";
어떻게 공유 Appbar를 구현 했습니까? –
@IgorKulman이 [link] (http://msdn.microsoft.com/en-us/library/windows/apps/xaml/jj150604.aspx) 다음에 파쇄 된 응용 프로그램 막대를 구현했습니다. – user3736911