Compartilhar via


Controls in Silverlight for Windows Phone

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Most Silverlight controls in the runtime can be used in Silverlight for Windows Phone applications. Silverlight controls support touch input that you would expect on a mobile device. This topic contains the following information about Silverlight controls on Windows Phone:

  • Lists the Silverlight controls that are supported on Windows Phone.

  • Describes the differences for controls between Silverlight for the desktop and Silverlight for Windows Phone.

  • Describes the differences for controls on Windows Phone OS 7.1.

  • Lists the Silverlight controls that are not supported on Windows Phone.

  • If available, lists alternatives for the Silverlight controls that are not supported on Windows Phone.

For more information about the Silverlight controls, see the System.Windows.Controls namespace in the .NET Framework Class Library for Silverlight.

Silverlight Controls that are Supported on Windows Phone

The following Silverlight controls are supported on Windows Phone. Controls that have differences on Windows Phone are described in the Compatibility Notes column.

Control

Compatibility Notes

Border

Button

Canvas

CheckBox

ComboBox

Not updated with the Windows Phone theme. Does not display in the Toolbox.

ContentControl

ContentPresenter

Control

Grid

HyperlinkButton

In Silverlight for Windows Phone applications, you must specify a TargetName value for the application to properly navigate to the URI specified by NavigateUri.

Image

In Windows Phone OS 7.1, scrolling performance was improved. However, if you display several Image controls in an ItemsControl, you might notice issues with scrolling. In some cases, the list may scroll faster than the images can load, causing flickering in the UI. If this occurs consider loading the images on a background thread. Make sure that you test the scrolling behavior on a Windows Phone device.

InkPresenter

ListBox

In Windows Phone OS 7.1, scrolling performance was improved. However, if you display several media or image controls in a ListBox or another ItemsControl, you might notice issues with scrolling. In some cases, the list may scroll faster than the images or media files can load, causing flickering in the UI. If this occurs consider loading the images or media on a background thread. Make sure that you test the scrolling behavior on a Windows Phone device.

MediaElement

In Windows Phone OS 7.1, scrolling performance was improved. However, if you display several MediaElement controls in an ItemsControl, you might notice issues with scrolling. In some cases, the list may scroll faster than the media can load, causing flickering in the UI. If this occurs consider loading the media on a background thread. Make sure that you test the scrolling behavior on a Windows Phone device.

MultiScaleImage

Panel

PasswordBox

ProgressBar

RadioButton

RichTextBox

Read-only for Silverlight for Windows Phone.

ScrollBar

Not suitable for use with touch-based applications and therefore not recommend for use. Does not display in the Toolbox

ScrollViewer

In Windows Phone OS 7.1, when you set the content indirectly for the ScrollViewer, such as with a ContentPresenter. You should call UpdateLayout prior to calling ScrollToVerticalOffset or ScrollToHorizontalOffset; otherwise, an exception will occur.

Slider

StackPanel

TextBlock

TextBox

In Windows Phone OS 7.1, when you set the FontFamily property to a font that is downloaded or contained in a file, the TextBox renders at the position (0,0). When the font has finished downloading the application renders again with the TextBox in the correct location.

ToolTip

Not suitable for use with touch-based applications and therefore not recommend for use. Does not display in the Toolbox.

Viewbox

VirtualizingStackPanel

In Windows Phone OS 7.1, when you set a RenderTransform as a child of the VirtualizingStackPanel, it is returned as a CompositeTransform regardless of the type of transform that is actually applied.

UserControl

The UserControl.Content property is a protected member in Silverlight for Windows Phone. In Silverlight 4, this property is public.

Silverlight Controls that are Not Supported on Windows Phone

Some Silverlight controls are not supported on Windows Phone because they are not suitable for a mobile device. In addition, controls in the Silverlight SDK are not supported on Windows Phone. The following list contains Silverlight controls that are not supported on Windows Phone. In some cases, there are alternative controls that are specific to Windows Phone.

Unsupported Control

Windows Phone Alternative

Notes

OpenFileDialog

SaveFileDialog

WebBrowser

WebBrowser specific to Windows Phone

You should use the WebBrowser control that is specific to Windows Phone. For more information, see WebBrowser Control Overview for Windows Phone.

Calendar

ChildWindow

DataGrid

DatePicker

Frame

PhoneApplicationFrame

Silverlight for Windows Phone provides a different page navigation model than Silverlight for the desktop. You should use the PhoneApplicationFrame control that is specific to Windows Phone. For more information, see Frame and Page Navigation.

GridSplitter

Label

Page

PhoneApplicationPage

Silverlight for Windows Phone provides a different page navigation model than Silverlight for the desktop. You should use the PhoneApplicationPage control that is specific to Windows Phone. For more information, see Frame and Page Navigation.

TabControl

TreeView

NoteNote:

The Windows Phone SDK provides additional controls that are specific to Windows Phone and are not supported in Silverlight for the desktop. For more information, see Controls for Windows Phone.

Gesture Support for Silverlight Controls

On Windows Phone, supported Silverlight controls that appear in the Visual Studio Toolbox include native support for input gestures. Users can use gestures to tap or double-tap controls such as the Button control, and hold, pan, and flick items in controls such as the ListBox control.