Şu anda Windows 10'da çalışıyorum ve AppBar ve Command Bar denetimleri üzerinde çalışıyorum. İçerisinde bar düğmesi içeren bir commandBar ekledim. Şimdi sorun, hem commandBar hem de AppBar için daha fazla simge gösteriyor. Lütfen bunu nasıl kaldırabilirim?Windows 10'da uygulama çubuğu nasıl kaldırılır?
Benim Kod
CommandBar commandBar = new CommandBar();
if (this.BottomAppBar == null)
{
this.BottomAppBar = new AppBar();
this.BottomAppBar.IsOpen = true;
this.BottomAppBar.IsSticky = true;
}
commandBar.PrimaryCommands.Clear();
commandBar.IsSticky = true;
commandBar.IsOpen = true;
commandBar.ClosedDisplayMode = AppBarClosedDisplayMode.Compact;
AppBarButton appBarButton = new AppBarButton();
appBarButton.Foreground = MCSExtensions.GetColorFromHex(foreground_color);
appBarButton.Icon = new BitmapIcon() { UriSource = new Uri("ms-appx:///Images/submit.png", UriKind.Absolute) };
appBarButton.Label = formButton.B_NAME;
commandBar.PrimaryCommands.Add(appBarButton);
this.BottomAppBar.Content=commandBar;
altına Commandbar değil gri kısmıdır yan çubuğunu bırakılır Ne gerçekten istediğiniz yukarıdaki oluşturuyor aşağıdaki çıkış
olduğunu. Birisi yanlış yaptığım şeyi önerebilir mi? Ayrıca CommmandBar'ı ızgaraya eklemeyi denedim ama hiç görüntülenmedi.
Güncelleme ben de aşağıdaki ancak uygun sonuçlar vermediğinin olarak AppBar bir StackPanel ekleyerek çalıştı
CommandBar commandBar=new CommmandBar();
commandBar.IsOpen=true;
commandBar.IsSticky=true;
commandBar.ClosedDisplayMode=AppBarClosedDisplatMode.Compact;
AppBarButton appBarButton = new AppBarButton();
appBarButton.Foreground = MCSExtensions.GetColorFromHex(foreground_color);
appBarButton.Icon = new BitmapIcon() { UriSource = new Uri("ms-appx:///Images/submit.png", UriKind.Absolute) };
appBarButton.Label = formButton.B_NAME;
commandBar.PrimaryCommands.Add(appBarButton);
pageLayoutRootGrid.Children.Add(commandBar);
. xaml için
if (this.BottomAppBar == null)
{
this.BottomAppBar = new AppBar();
this.BottomAppBar.IsOpen = true;
this.BottomAppBar.IsSticky = true;
}
StackPanel appBarPanel=new StackPanel();
appBarPanel.Orientation=Orientation.Horizontal;
AppBarButton appBarButton = new AppBarButton();
appBarButton.Foreground = MCSExtensions.GetColorFromHex(foreground_color);
appBarButton.Icon = new BitmapIcon() { UriSource = new Uri("ms-appx:///Images/submit.png", UriKind.Absolute) };
appBarButton.Label = formButton.B_NAME;
appBarPanel.Children.Add(appBarButton);
this.BottomAppBar.Content=appBarPanel;
Ama dinamik benim söz konusu değildir eklenen neyi gibi CommandBar oluşturmak istiyorum Xaml –
kullanarak dinamik olarak oluşturmak için kod örneği ekledim – thang2410199
Kök anlamına geliyor Sayfa doğru? –