Tim Gabrhel

Auto Aligning Popups on WinRT Apps

Popup‘s in WinRT apps are really powerful to pop up content to prompt a user for some form of input. They are generally pretty straight forward to work with. They could be full screen, pinned to a corner, or you could open them relative to a button (or other element) the user interacts with. What happens when that button is near the edge of the screen, and the pop up opens off screen? Shortly, I’ll introduce the AutoAlignedPopup, but first, let’s start with the basics.

Popup

A Popup is a very basic element. It’s essentialy a container object that has properties for user interaction, and contains a child UIElement.

Continue reading

Flyout on Windows Phone 8.1 Runtime

Windows Runtime Flyout on Windows Phone is extremely versatile.The flyout control is a simple control you can attach to any FrameworkElement, or define as a resource and open it programatically.

Placement

A flyout has five placement modes, Top, Bottom, Left, Right, and Full. However, when working on the phone, only Top (default) and Full will work. This means, either you get a full screen, or pinned to the top. Definitely not ideal when trying to create a menu related to an app bar button. This comes straight from MSDN.

On Windows Phone, a Flyout is shown at the top of the screen by default. You can change the Placement property to FlyoutPlacementMode.Full to make the flyout cover the full screen. The Top, Bottom, Left, and Right values don’t have any effect in Windows Phone apps.

There are numerous ways to interact with a flyout, be it declarative, programmatic, or both.

Continue reading

Uniform grid layouts in WP8.1 Runtime Apps

With the advent of multiple device resolutions on Windows Phone, the challenge to provide a consistent experience across devices and resolutions increases. One of these specific challenges is providing a consistent grid layout, a concept very familiar to Windows Phone. As seen in the screenshot below, it’s not straight forward to fully utilize the full dimensions of the screen, while providing a nicely spaced grid.

Lead image credit goes to MVP Martin Suchan on Twitter

Continue reading

Windows Phone 8.1 WinRT Context Menus

If you search for Windows Phone 8.1 Context Menu, you’ll likely be riddled with Silverlight solutions, just as I did. Luckily, since Windows Phone 8.1 WinRT shares many components of Windows 8, using a context menu on your list data is quite simple, provided you know how to search for it. I was lucky to stumble upon the Menu Flyout so I’m here to share my finding.

WinRT MenuFlyout

MSDN has a great example on Menu Flyouts. A menu flyout in Windows 8 is a simple popup menu relative to the control the user is interacting with. On Windows Phone 8.1, this MenuFlyout control will be displayed as a full width popup, mimicking the context menu known to Windows Phone. Head over to MSDN to see the example.

Hope this helps.

Copyright © 2014 Tim Gabrhel

Theme by Anders NorenUp ↑