How To Use Microsoft Windows Applications On Os X

broken image


-->

Acrylic is a type of Brush that creates a translucent texture. You can apply acrylic to app surfaces to add depth and help establish a visual hierarchy.

Important APIs: AcrylicBrush class, Background property

Acrylic in dark theme

The Windows UI Library provides official native Windows UI controls and other user interface elements for Windows apps. It maintains down-level compatibility with earlier versions of Windows 10, so your app works even if users don't have the latest OS. Want to run Windows Vista or 7 on your Apple computer without having to install Bootcamp? With virtualization software like Parallels, it's easy! Learn how to run Microsoft Windows within Mac OS X with this free video tutorial from the folks at CNET TV. For specifics, and to get started running your favorite Windows applications and games in OS X, watch this handy how-to. Xbox app feedback. Here at Xbox, we are a passionate team of gamers who are inspired to continue improving the gaming experience on Windows 10. Help us build the app by providing feedback. In the app, go to Settings Feedback and share your thoughts, so you can help us build a gaming client you love.

Acrylic and the Fluent Design System

The Fluent Design System helps you create modern, bold UI that incorporates light, depth, motion, material, and scale. Acrylic is a Fluent Design System component that adds physical texture (material) and depth to your app. To learn more, see the Fluent Design overview.

Video summary

Examples

XAML Controls Gallery
If you have the XAML Controls Gallery app installed, click here to open the app and see acrylic in action.

Get the XAML Controls Gallery app (Microsoft Store)
Get the source code (GitHub)

Acrylic blend types

Acrylic's most noticeable characteristic is its transparency. There are two acrylic blend types that change what's visible through the material:

  • Background acrylic reveals the desktop wallpaper and other windows that are behind the currently active app, adding depth between application windows while celebrating the user's personalization preferences.
  • In-app acrylic adds a sense of depth within the app frame, providing both focus and hierarchy.

Layer multiple acrylic surfaces with caution: multiple layers of background acrylic can create distracting optical illusions.

When to use acrylic

  • Use in-app acrylic for supporting UI, such as on surfaces that may overlap content when scrolled or interacted with.
  • Use background acrylic for transient UI elements, such as context menus, flyouts, and light-dismissable UI.
    Using Acrylic in transient scenarios helps maintain a visual relationship with the content that triggered the transient UI.

If you are using in-app acrylic on navigation surfaces, consider extending content beneath the acrylic pane to improve the flow on your app. Using NavigationView will do this for you automatically. However, to avoid creating a striping effect, try not to place multiple pieces of acrylic edge-to-edge - this can create an unwanted seam between the two blurred surfaces. Acrylic is a tool to bring visual harmony to your designs, but when used incorrectly, can result in visual noise.

Consider the following usage patterns to decide how best to incorporate acrylic into your app:

Vertical Panes

Capitan

For vertical panes or surfaces that help section off content of your app, we recommend you use an opaque background instead of acrylic. If your vertical panes open on top of content, like in NavigationView's Compact or Minimal modes, we suggest you use in-app acrylic to help maintain the page's context when the user has this pane open.

Transient surfaces

For apps with menu flyouts, non-modal popups, or light-dismiss panes, it is recommended to use background acrylic.

Many of our controls will use acrylic by default. MenuFlyouts, AutoSuggestBox, ComboBox and similar controls with light-dismiss popups will all use the transient acrylic when they are invoked.

Note

Rendering acrylic surfaces is GPU-intensive, which can increase device power consumption and shorten battery life. Acrylic effects are automatically disabled when devices enter Battery Saver mode, and users can disable acrylic effects for all apps, if they choose.

Usability and adaptability

Acrylic automatically adapts its appearance for a wide variety of devices and contexts.

In High Contrast mode, users continue to see the familiar background color of their choosing in place of acrylic. In addition, both background acrylic and in-app acrylic appear as a solid color:

  • When the user turns off transparency in Settings > Personalization > Color
  • When Battery Saver mode is activated
  • When the app runs on low-end hardware

In addition, only background acrylic will replace its translucency and texture with a solid color:

  • When an app window on desktop deactivates
  • When the Windows app is running on phone, Xbox, HoloLens or tablet mode

Legibility considerations

It's important to ensure that any text your app presents to users meets contrast ratios. We've optimized the acrylic recipe so that high-color black, white or even medium-color gray text meets contrast ratios on top of acrylic. The theme resources provided by the platform default to contrasting tint colors at 80% opacity. When placing high-color body text on acrylic, you can reduce tint opacity while maintaining legibility. In dark mode, tint opacity can be 70%, while light mode acrylic will meet contrast ratios at 50% opacity.

We don't recommend placing accent-colored text on your acrylic surfaces because these combinations are likely to not pass minimum contrast ratio requirements at 15px font size. Try to avoid placing hyperlinks over acrylic elements. Also, if you choose to customize the acrylic tint color or opacity level outside of the platform defaults provided by the theme resource, keep the impact on legibility in mind.

Acrylic theme resources

You can easily apply acrylic to your app's surfaces using the new XAML AcrylicBrush or predefined AcrylicBrush theme resources. First, you'll need to decide whether to use in-app or background acrylic. Be sure to review common app patterns described earlier in this article for recommendations.

We've created a collection of brush theme resources for both background and in-app acrylic types that respect the app's theme and fall back to solid colors as needed. Resources named AcrylicWindow represent background acrylic, while AcrylicElement refers to in-app acrylic.

How

For vertical panes or surfaces that help section off content of your app, we recommend you use an opaque background instead of acrylic. If your vertical panes open on top of content, like in NavigationView's Compact or Minimal modes, we suggest you use in-app acrylic to help maintain the page's context when the user has this pane open.

Transient surfaces

For apps with menu flyouts, non-modal popups, or light-dismiss panes, it is recommended to use background acrylic.

Many of our controls will use acrylic by default. MenuFlyouts, AutoSuggestBox, ComboBox and similar controls with light-dismiss popups will all use the transient acrylic when they are invoked.

Note

Rendering acrylic surfaces is GPU-intensive, which can increase device power consumption and shorten battery life. Acrylic effects are automatically disabled when devices enter Battery Saver mode, and users can disable acrylic effects for all apps, if they choose.

Usability and adaptability

Acrylic automatically adapts its appearance for a wide variety of devices and contexts.

In High Contrast mode, users continue to see the familiar background color of their choosing in place of acrylic. In addition, both background acrylic and in-app acrylic appear as a solid color:

  • When the user turns off transparency in Settings > Personalization > Color
  • When Battery Saver mode is activated
  • When the app runs on low-end hardware

In addition, only background acrylic will replace its translucency and texture with a solid color:

  • When an app window on desktop deactivates
  • When the Windows app is running on phone, Xbox, HoloLens or tablet mode

Legibility considerations

It's important to ensure that any text your app presents to users meets contrast ratios. We've optimized the acrylic recipe so that high-color black, white or even medium-color gray text meets contrast ratios on top of acrylic. The theme resources provided by the platform default to contrasting tint colors at 80% opacity. When placing high-color body text on acrylic, you can reduce tint opacity while maintaining legibility. In dark mode, tint opacity can be 70%, while light mode acrylic will meet contrast ratios at 50% opacity.

We don't recommend placing accent-colored text on your acrylic surfaces because these combinations are likely to not pass minimum contrast ratio requirements at 15px font size. Try to avoid placing hyperlinks over acrylic elements. Also, if you choose to customize the acrylic tint color or opacity level outside of the platform defaults provided by the theme resource, keep the impact on legibility in mind.

Acrylic theme resources

You can easily apply acrylic to your app's surfaces using the new XAML AcrylicBrush or predefined AcrylicBrush theme resources. First, you'll need to decide whether to use in-app or background acrylic. Be sure to review common app patterns described earlier in this article for recommendations.

We've created a collection of brush theme resources for both background and in-app acrylic types that respect the app's theme and fall back to solid colors as needed. Resources named AcrylicWindow represent background acrylic, while AcrylicElement refers to in-app acrylic.

Resource keyTint opacityFallback color
SystemControlAcrylicWindowBrush, SystemControlAcrylicElementBrush
SystemControlChromeLowAcrylicWindowBrush, SystemControlChromeLowAcrylicElementBrush
SystemControlBaseHighAcrylicWindowBrush, SystemControlBaseHighAcrylicElementBrush
SystemControlBaseLowAcrylicWindowBrush, SystemControlBaseLowAcrylicElementBrush
SystemControlAltHighAcrylicWindowBrush, SystemControlAltHighAcrylicElementBrush
SystemControlAltLowAcrylicWindowBrush, SystemControlAltLowAcrylicElementBrush
80% ChromeMedium
ChromeLow
BaseHigh
BaseLow
AltHigh
AltLow
Recommended usage: These are general-purpose acrylic resources that work well in a wide variety of usages. If your app uses secondary text of AltMedium color with text size smaller than 18px, place an 80% acrylic resource behind the text to meet contrast ratio requirements.
SystemControlAcrylicWindowMediumHighBrush, SystemControlAcrylicElementMediumHighBrush
SystemControlBaseHighAcrylicWindowMediumHighBrush, SystemControlBaseHighAcrylicElementMediumHighBrush
70% ChromeMedium
BaseHigh
Recommended usage: If your app uses secondary text of AltMedium color with a text size of 18px or larger, you can place these more translucent 70% acrylic resources behind the text. We recommend using these resources in your app's top horizontal navigation and commanding areas.
SystemControlChromeHighAcrylicWindowMediumBrush, SystemControlChromeHighAcrylicElementMediumBrush
SystemControlChromeMediumAcrylicWindowMediumBrush, SystemControlChromeMediumAcrylicElementMediumBrush
SystemControlChromeMediumLowAcrylicWindowMediumBrush, SystemControlChromeMediumLowAcrylicElementMediumBrush
SystemControlBaseHighAcrylicWindowMediumBrush, SystemControlBaseHighAcrylicElementMediumBrush
SystemControlBaseMediumLowAcrylicWindowMediumBrush, SystemControlBaseMediumLowAcrylicElementMediumBrush
SystemControlAltMediumLowAcrylicWindowMediumBrush, SystemControlAltMediumLowAcrylicElementMediumBrush
60% ChromeHigh
ChromeMedium
ChromeMediumLow
BaseHigh
BaseLow
AltMediumLow
Recommended usage: When placing only primary text of AltHigh color over acrylic, your app can utilize these 60% resources. We recommend painting your app's vertical navigation pane, i.e. hamburger menu, with 60% acrylic.

In addition to color-neutral acrylic, we've also added resources that tint acrylic using the user-specified accent color. We recommend using colored acrylic sparingly. For the dark1 and dark2 variants provided, place white or light-colored text consistent with dark theme text color over these resources.

Resource keyTint opacityTint and Fallback colors
SystemControlAccentAcrylicWindowAccentMediumHighBrush, SystemControlAccentAcrylicElementAccentMediumHighBrush 70% SystemAccentColor
SystemControlAccentDark1AcrylicWindowAccentDark1Brush, SystemControlAccentDark1AcrylicElementAccentDark1Brush 80% SystemAccentColorDark1
SystemControlAccentDark2AcrylicWindowAccentDark2MediumHighBrush, SystemControlAccentDark2AcrylicElementAccentDark2MediumHighBrush 70% SystemAccentColorDark2

To paint a specific surface, apply one of the above theme resources to element backgrounds just as you would apply any other brush resource.

Custom acrylic brush

You may choose to add a color tint to your app's acrylic to show branding or provide visual balance with other elements on the page. To show color rather than greyscale, you'll need to define your own acrylic brushes using the following properties.

  • TintColor: the color/tint overlay layer. Consider specifying both the RGB color value and alpha channel opacity.
  • TintOpacity: the opacity of the tint layer. We recommend 80% opacity as a starting point, although different colors may look more compelling at other translucencies.
  • TintLuminosityOpacity: controls the amount of saturation that is allowed through the acrylic surface from the background.
  • BackgroundSource: the flag to specify whether you want background or in-app acrylic.
  • FallbackColor: the solid color that replaces acrylic in Battery Saver. For background acrylic, fallback color also replaces acrylic when your app isn't in the active desktop window or when the app is running on phone and Xbox.

To add an acrylic brush, define the three resources for dark, light and high contrast themes. Note that in high contrast, we recommend using a SolidColorBrush with the same x:Key as the dark/light AcrylicBrush.

Note

If you don't specify a TintLuminosityOpacity value, the system will automatically adjust its value based on your TintColor and TintOpacity.

The following sample shows how to declare AcrylicBrush in code. If your app supports multiple OS targets, be sure to check that this API is available on the user's machine.

How To Use Microsoft Windows Applications On Os X El Capitan

Extend acrylic into the title bar

To give your app's window a seamless look, you can use acrylic in the title bar area. This example extends acrylic into the title bar by setting the ApplicationViewTitleBar object's ButtonBackgroundColor and ButtonInactiveBackgroundColor properties to Colors.Transparent.

This code can be placed in your app's OnLaunched method (App.xaml.cs), after the call to Window.Activate, as shown here, or in your app's first page.

In addition, you'll need to draw your app's title, which normally appears automatically in the title bar, with a TextBlock using CaptionTextBlockStyle. For more info, see Title bar customization.

Do's and don'ts

  • Do use acrylic as the background material of non-primary app surfaces like navigation panes.
  • Do extend acrylic to at least one edge of your app to provide a seamless experience by subtly blending with the app's surroundings.
  • Don't put desktop acrylic on large background surfaces of your app - this breaks the mental model of acrylic being used primarily for transient surfaces.
  • Don't place in-app and background acrylics directly adjacent to avoid visual tension at the seams.
  • Don't place multiple acrylic panes with the same tint and opacity next to each other because this results in an undesirable visible seam.
  • Don't place accent-colored text over acrylic surfaces.

How we designed acrylic

We fine-tuned acrylic's key components to arrive at its unique appearance and properties. We started with translucency, blur and noise to add visual depth and dimension to flat surfaces. We added an exclusion blend mode layer to ensure contrast and legibility of UI placed on an acrylic background. Finally, we added color tint for personalization opportunities. In concert these layers add up to a fresh, usable material.


The acrylic recipe: background, blur, exclusion blend, color/tint overlay, noise

Get the sample code

  • XAML Controls Gallery sample - See all the XAML controls in an interactive format.

How To Use Microsoft Windows Applications On Os X 10.7

Related articles





broken image