PlaySoundAction Class
Represents an action that will play a sound to completion.
Inheritance Hierarchy
System.Object
DependencyObject
Microsoft.Xaml.Interactions.Media.PlaySoundAction
Namespace: Microsoft.Xaml.Interactions.Media
Assembly: Microsoft.Xaml.Interactions (in Microsoft.Xaml.Interactions.dll)
Syntax
'Declaration
Public NotInheritable Class PlaySoundAction _
Inherits DependencyObject _
Implements IAction
public sealed class PlaySoundAction : DependencyObject,
IAction
public ref class PlaySoundAction sealed : public DependencyObject,
IAction
[<Sealed>]
type PlaySoundAction =
class
inherit DependencyObject
interface IAction
end
public final class PlaySoundAction extends DependencyObject implements IAction
The PlaySoundAction type exposes the following members.
Constructors
Name | Description | |
---|---|---|
PlaySoundAction | Initializes a new instance of the PlaySoundAction class. |
Top
Properties
Name | Description | |
---|---|---|
Dispatcher | (Inherited from DependencyObject.) | |
Source | Gets or sets the location of the sound file. This is used to set the source property of a MediaElement. This is a dependency property. | |
Volume | Gets or set the volume of the sound. This is used to set the Volume property of the MediaElement. This is a dependency property. |
Top
Methods
Name | Description | |
---|---|---|
ClearValue | (Inherited from DependencyObject.) | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Execute | Executes the action. | |
GetAnimationBaseValue | (Inherited from DependencyObject.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetValue | (Inherited from DependencyObject.) | |
ReadLocalValue | (Inherited from DependencyObject.) | |
SetValue | (Inherited from DependencyObject.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Fields
Name | Description | |
---|---|---|
SourceProperty | Specifies the location of the sound file. | |
VolumeProperty | Specifies the volume of the sound. |
Top
Remarks
This action is intended for use with short sound effects that don't need to be stopped or controlled. If you are trying to create a music player or game, it may not meet your needs.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.