FMRadio.Frequency Property

July 28, 2014

Tunes the FMRadio to a new frequency.

Namespace:  Microsoft.Devices.Radio
Assembly:  Microsoft.Phone (in Microsoft.Phone.dll)

public double Frequency { get; set; }

Property Value

Type: System.Double
Returns Double.

If the FMRadio is not already turned on, setting this property turns it on. Setting the frequency to a value outside of the allowed set for the current region causes an InvalidArgumentException to be thrown.

Frequency is not persistent across sessions. As a best practice, your application can check and verify that the Frequency property returns the intended value when the radio is being tuned.

When setting this property, the assigned value must be in MHz and must be greater than zero.

Caution noteCaution:

FM radio is supported only in apps that target Windows Phone OS 7.1. If you use the FMRadio class in apps that target Windows Phone OS 8.0 or later, a RadioDisabledException indicates that the FM radio feature is not available. On Windows Phone 8 devices with a build of 8.0.10322 or greater, the run-time exception may not occur if you use the FMRadio API. However, the FMRadio API is not supported for apps that target Windows Phone OS 8.0.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2014 Microsoft