Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ApplicationBarIconButton.IconUri Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets or sets the URI of the icon to use for the button.

Namespace:  Microsoft.Phone.Shell
Assembly:  Microsoft.Phone (in Microsoft.Phone.dll)
XMLNS for XAML: Not mapped to an xmlns.

public Uri IconUri { get; set; }
<object IconUri="Uri" .../>

Property Value

Type: System.Uri
The URI of the icon to use for the button.

Implements

IApplicationBarIconButton.IconUri

ExceptionCondition
ArgumentNullException

The value was set to null while the button belongs to an Application Bar.

ArgumentOutOfRangeException

The URI is not valid.

The URI must point to a file in the application directory. When adding an image file to a project using Windows Phone SDK, you must set the Build Action property to “Content”. Using the default value “Resource” will not allow the image to be accessed or displayed.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show: