Am trying to display AppBar for entire html page in my Metro app.Whenever I click on the other items of the page, immediately AppBar is disappearing.Can anyone give me advice to set my AppBar remain constant for entire page in Metro App.Here am using appbar.winControl.show();.
For JavaScript: appBar.sticky = true;
For XAML: AppBar.IsSticky = true;
This will keep your AppBar on the screen even if you click elsewhere on the page. But remember that the design guidance is for a transient AppBar that will light-dismiss (disappear when you touch somewhere else). Here is the guidance for when it should be sticky, from the guidelines and checklist for app bars:
Do set the app bar's dismissal mode to sticky when displaying contextual commands.
If you have contextual commands on an app bar, set the mode to sticky while that context exists and turn off the sticky mode when the context is no longer present (such as when a photo is deselected). In sticky mode, the bar doesn't automatically hide when the user interacts with the app. This is useful for multi-select scenarios or when the context involves interaction such as manipulating cropping handles. The bar stays visible while the user performs the actions. The user can still hide the bar by swiping the top or bottom edge of the screen and they can show it again with an edge swipe.
Finally, here is the JS reference for the sticky property.
Related
What is the maximum number of view controllers in UITabBarController for tvOS? It's not documented on developer.apple.com.
The screen is obviously bigger than iOS devices. I know for iOS it will add a "More" button if the number is bigger than 5.
The More Navigation Controller The tab bar has limited space for
displaying your custom items. If you add six or more custom view
controllers to a tab bar controller, the tab bar controller displays
only the first four items plus the standard More item on the tab bar.
Tapping the More item brings up a standard interface for selecting the
remaining items. The interface for the standard More item includes an
Edit button that allows the user to reconfigure the tab bar. By
default, the user is allowed to rearrange all items on the tab bar. If
you do not want the user to modify some items, though, you can remove
the appropriate view controllers from the array in the
customizableViewControllers property.
Note
Tab bar customization and
the More interface is not available in tvOS
Differences in tvOS
Tab bar controllers serve the same purpose in tvOS as in iOS, but
provide slightly different user interface features: The tab bar
interface appears at the top of the window. When focus leaves the tab
bar, the tab bar is hidden. Swiping up on the remote shows the tab bar
again and focuses it. A user can also show and focus the tab bar by
pressing the Menu button. Swiping down from the tab bar moves focus
into the content view; specifically, to the first focusable view that
is visually below the selected tab. Swiping down behaves like a normal
focus-changing gesture—that is, focus moves in the direction the user
swiped. If nothing is focusable immediately below the selected tab,
the closest focusable view is focused instead. Pressing the Select
button while a tab is focused moves focus into the content view.
Because there is no direction associated with this change, focus moves
to the view specified in the content view's preferredFocusedView
property. Tab bar controllers in tvOS do not support customization. A
tab bar controller displays only the number of view controllers from
its viewControllers array that fit on the screen, and does not provide
the More interface seen in iOS.
I found it by adding ViewControllers in StoryBoard. No matter how smaller your buttons are, the answer is 7. It will hide if it's more than 7 ViewController. And no "More" button of course. I added an 8 view controller but it only shows 7 (seven).
The answer is 7
Great, right?!
Solution
Sadly, I wrote my own TabBarController :(
Which is not a subclass of UITabBarController but UIViewController. Hoping Apple will change this (they'll not.). Should be depending on the size of the buttons, and could auto calculate each specific case.
Best.
I'm trying to access page(s) on a website. The pages are loaded via a ribbon navigation across the top of the page (which is always present), which then loads the data in a div container below.
The ribbon/navigation bar SHOULD allow me to scroll left and right - to access other links, and thus other pages - but the scroll button isn't appearing. I can overcome this problem by using Developer Tools and making the navigation bar much wider (editing the width attribute), thus revealing the links that otherwise remain hidden.
Problem: when I change the CSS to allow access to the 'hidden pages', and then click to load a new page (or new set of data, rather), the new page is loaded, and the navigation bar reverts to its shorter, original state.
Is there any way of preserving my change to the page's CSS?
This is NOT my website. I have contacted the owners, but they have not answered yet.
I am developing a windows phone 8.1 universal app and I have placed the application bar at bottom of the page. I have some buttons at bottom of the page and whenever I click buttons at bottom of the page,the app bar is popping out. It becomes a problem while playing with the bottom buttons while app bar is coming.I have made app bar as ClosedDisplayMode="Minimal",but same problem persist.
Is there any way to place app bar on top of the page or to hide the bottom appbar to solve this issue?
The first way to do is just to hide BottomAppBar by setting its visibility:
BottomAppBar.Visibility = Visibility.Collapsed;
The other way may be to set it to null:
create application bar in code,
when you don't want bar to see at all just set BottomAppBar = null; in the code,
as you have created the bar in the code, you have its reference, then when it's needed again just set it BottomAppBar = myCommandBar;.
I'm migrated from iOS dev to WIndows Phone dev and I have stumbled upon a problem.
I need to implement a side menu, that looks like the one in facebook app in ios. It shpuld slide from left to right. It should contain about 10 buttons (ListView). Presign the button should cause chaning the view (navigate to other xaml file)
Because of the huge difference between Windows Phone controls and iOS controls I want to ask an advice on how to better implement such menu. I've heard about aproach using Panorama. But would it look pretty?
I mean I'll have 10 different XAML files with different content. In each of them I'd have to add Panorama control and add the menu. And when I navigate to other XAML would it look nice? because it would close menu without any animation.
So please tell me what is the better approach in impelementing what I want? And how to navigate properly between all the XAMLs without loosing the animation of the menu. And of course how to avoid duplicating code in all the XAMLs? I guess XAML files could not be inherited. And of course I need it to support both WIndows Phone 8 and 8.1.
Thank you very much for you attension!
Here this a blog that will help you implement side menu like Facebook app. Link Hope this helps.
I just implemented something similar in my Dictionary app (http://www.windowsphone.com/s?appId=9f31b733-8c7b-e011-986b-78e7d1fa76f8). You will see that when you click the favorite or history icons on the top, it slides in a panel from the right. I implemented this by adding another Grid to the page whose left margin is set to the width of the page so that it basically sits to the right of the page, out of user's view. When the user taps one of the icons on top, I run a DoubleAnimation with a StoryBoard which does TranslateTransform on the X coordinate of the Grid and runs the StoryBoard for a duration of 3.5 seconds to give the user the perception of slide-in animation.
As far as having the same slide-in menu on each of the pages go, you have 2 options:
(a) Create the sliding panel as a user control and add it to each of the pages and on click of an item inside the panel, go to the second xaml page with the slide-in menu open and start the transition to hide it, or
(b) Create multiple grids within the same xaml page and simply hide/display the right one at the right time.
I believe you are speaking about the popular hamburger menu.
You can very well use the SlideView library. Here is the link,
https://slideview.codeplex.com/
The SlideView, a control allowing to slide between panels (2 or many more)
The SlideApplicationFrame, a control to use at top app level and packaged to display 3 panels with navigation occuring in the middle panel
The AutoHideBar, a control which is displayed when scrolling up in a list, and hidden when scrolling down
In my metro style app (windows 8) I have created an page overlay and a flyout displaying an message. When the user clicks on the page the flyout message goes to hidden. But I want flyout to remain even when the user clicks on the overlay page. I am using HTML5 and WinJS.
Is there anyway I can achieve the above scenario using someother control or can I prevent the page to stop reacting to events when the user taps/clicks on the screen.
This is not really supported -- the Flyout itself doesn't have the concept of being persistent/sticky/modal. If you look at the code in base.js, you'll see that it doesn't expose any code to leverage the inbuilt sticky behavior that is used in the appbar (which is kinda of flyout, it turns out.
There are a couple things you can do:
Pass "_sticky: true" to the constructor of the flyout. e.g <div data-win-control="WinJS.UI.Flyout" data-win-options="{ _sticky: true}">
Attach a click handler to the top of the document, and if it's on the click eating div that the flyout creates, cancel the event
Create your own UI by simply adding a new div to the body, and absolute positioning it.