Reputation: 2668
is there any way to disable Appbar in snapview state ?! i'm using HTML5 and javascript to build my application
Upvotes: 2
Views: 1321
Reputation: 31
You can do it programmatically on resize event like this:
window.addEventListener("resize", snapAppBar, false);
function snapAppBar() {
var height = <height>;
var condition = (document.querySelector("body").clientWidth < height);
if (condition) {
document.querySelector("#appbar").winControl.disabled = <"true"|| "false">;
}
}
If you still need help that is!
Upvotes: 0
Reputation: 151
Add an ID 'appbar' to it and css
@media screen and (-ms-view-state: snapped) {
#appbar {
display:none;
}
}
Upvotes: 0
Reputation: 33
you can disable the app bar in Snap View. You need to change the visibility in Snap view as "Collapsed" and in other views as "Visible"
Upvotes: 0
Reputation: 102
You can use CSS/JS to disable the Appbar in Snap View; however, if this app is meant for the store then when it comes to certification for the store that can cause an issue as you are supposed to support the appbar in all views.
You can disable/hide particular items in the snapview with CSS (disabled or hidden CSS properties) so that the appbar only has items in it that are meaningful in the snapped view.
Guidelines and checklists for Appbars - http://msdn.microsoft.com/en-us/library/windows/apps/hh465302.aspx
Upvotes: 2
Reputation: 7292
There is no explicit way to disable the app bar. Two things to try:
Upvotes: 0
Reputation: 7024
Snapped view and other view states are an integral part of the Windows 8 user experience and cannot be disabled. Apps need to be prepared to handle snapped, filled, fullscreen-landscape, and fullscreen-portrait.
As for the app bar, just don't declare one in the app. For example, create a new project using the Blank project template in Visual Studio or Blend and you'll see that it has no appbar behavior.
If you're asking whether you can disable the charms bar (swiped in from the right edge), then no, you cannot disable that. Again, it's an integral part of the system.
Upvotes: 0