Adding an Appbar in xaml (Universal App) - xaml

How do I add an appbar with buttons to a Windows Phone 8.1 app using the Hub template?
I do not see any clear examples of how to do this.
Specifically, using the Hub template, I want to add appbar menu items to the ItemsPage.xaml.

In Windows Phone 8.1 projects you have to use the CommandBar API.
Take a look on this guide, it's for Windows 8.1, but the syntax is exactly same. Note that you have to only use the BottomAppBar where the PrimaryCommands are displayed as standard AppBar buttons as we know them, and the SecondaryCommands are displayed as Menu Items.

Related

Theme resources for Windows Store

In Windows Phone 7/8 we had this handy Theme Resources like PhoneTextTitle1Style that would reflect the users selected Theme.
What is the equivalent in Windows Store apps?
A good way to find the styles that can apply to a control such as TextBlock is to select the control in the designer, go to the properties pane, click on the square next to the "Style" property, and choose the System Resource or Local Resource menus:
They are also documented and demonstrated in the Guidelines for label (or text block)'s XAML style gallery for Windows Store apps
These styles will reflect the app's current theme (dark or light) or high-contrast mode, but are not directly personalized by the user.
Windows doesn't expose the start screen background colour to apps. Windows Store apps are supposed to use their own branded colours and don't have anything analogous to Windows Phone's PhoneAccentBrush.

Switching between Phone/Windows XAML editor preview in VS2013?

I have a universal app for Windows and Phone in VS2013, and I have a page in the shared project of the solution.
When creating pages in the Windows project, the XAML preview window shows a tablet.
When creating pages in the Phone project, the XAML preview window shows a phone.
When creating pages in the shared project, the XAML preview window shows a... tablet.
As I try to put more pages in the shared project, I'd like to have a quick way to sanity-check my UI on both form factors without having to actually run the project. Sadly, there is no option in the Device panel to switch between preview devices.
How can I preview the XAML of a shared project page in the phone without actually running the project?
You don't need to run the project.
There is an easy way to switch between the different design views using the dropdown that is present above the xaml code of the shared project as shown below.
Step 1: Locate the dropdown
Step 2: Click on the dropdown arrow
Step 3: Change the Project to .WindowsPhone
Step 4: Change it back whenever required.
Hope it helps
In your XAML View. Above the XAML code in the top tool bar you can find a dropdown that will let you switch between YourApp.Windows and YourApp.WindowsPhone. This way you can easily switch views.
Hope it helps.

Code for custom taskbar hover-over buttons?

Windows Vista, 7 and 8 all display a preview of the application; when the application icon of an open application is hovered over in the taskbar.
Some developers have added custom options in this tooltip, like Windows Media Player:
Given an application written in C++ which uses the Windows Template Library, how would I code in a custom button to an application tooltip preview?
The feature is known as Taskbar Extensions - Thumbnail Toolbars. WTL does not provide any helper/wrapper classes to implement support for thumbnail toolbars, so you have to use the API directly, using ITaskbarList3 interface.

Overlay over multiple pages on Windows Phone 8

I trying to build a Windows Phone 8 Application which is able to sync data from a webservice.
While I'm syncing the data I want to display a little Popup / overlay / flyout but I still want to be able to navigate between my pages while my overlay persists between this pages.
I did this successfully with a Windows RT App: I simply added a Frame-Control on a RootPage which also display the flyout. I navigated then within this frame and the flyout was always there.
How can I achieve this goal within a Windows Phone 8 Application?
You can do it as you did on Windows8 which is to restyle the ``RootApplicationFrame to add your indicator. For an example see http://www.jeff.wilcox.name/2011/07/creating-a-global-progressindicator-experience-using-the-windows-phone-7-1-sdk-beta-2/
Or you could just use the progress indicator in the system tray of the page to add indication there. This is probably the most common approach taken in apps. See how at http://blog.duc.as/2011/10/08/using-the-system-tray-to-show-progress-in-windows-phone-7-mango/

Use Built In Soft Keyboard in Win 8 DirectX Metro App

Part of my app requires the user to enter text (username/password & chat) and I'd prefer not have to create my own keyboard code.
Is there a way to use the built in software keyboard for DirectX Metro Apps? I just need a way for touch users to enter text.
If it is possible, how do I do it?
I'm not sure if DirectX itself has something built-in, but you can mix DirectX with XAML - e.g. you could use SwapChainBackgroundPanel where all your DirectX rendering would occur and overlay a XAML TextBox where you would capture your text input.