New to Telerik UI for WPFStart a free 30-day trial

Represents a sound player for playing sounds when a key of a RadVirtualKeyboard is pressed.

Definition

Namespace:Telerik.Windows.Controls.VirtualKeyboard

Assembly:Telerik.Windows.Controls.Navigation.dll

Syntax:

C#
public class DefaultKeySoundPlayer : IKeySoundPlayer, IDisposable

Inheritance: objectDefaultKeySoundPlayer

Implements: IDisposableIKeySoundPlayer

Constructors

Initializes a new instance of the DefaultKeySoundPlayer class.

C#
public DefaultKeySoundPlayer()

Initializes a new instance of the DefaultKeySoundPlayer class.

C#
public DefaultKeySoundPlayer(Stream stream)
Parameters:streamStream

The stream to the sound file to be played on a key press.

Properties

Gets or sets whether sound is enabled.

C#
public bool IsSoundEnabled { get; set; }

Implements: IKeySoundPlayer.IsSoundEnabled

Methods

C#
protected ~DefaultKeySoundPlayer()

Releases all resources used by the DefaultKeySoundPlayer class.

C#
public void Dispose()

Implements: IDisposable.Dispose()

C#
protected virtual void Dispose(bool disposing)
Parameters:disposingbool

Plays the sound base on the BaseKeyViewModel provided.

C#
public void Play(BaseKeyViewModel viewModel)
Parameters:viewModelBaseKeyViewModel

The view model of the key to play a sound for.

Implements: IKeySoundPlayer.Play(BaseKeyViewModel)