Share via


MediaPlaybackCommandManagerCommandBehavior.EnablingRule Property

Definition

Gets or sets a value indicating whether a System Media Transport Controls command should always be enabled, should never be enabled, or if the system should automatically determine whether the command is enabled.

public:
 property MediaCommandEnablingRule EnablingRule { MediaCommandEnablingRule get(); void set(MediaCommandEnablingRule value); };
MediaCommandEnablingRule EnablingRule();

void EnablingRule(MediaCommandEnablingRule value);
public MediaCommandEnablingRule EnablingRule { get; set; }
var mediaCommandEnablingRule = mediaPlaybackCommandManagerCommandBehavior.enablingRule;
mediaPlaybackCommandManagerCommandBehavior.enablingRule = mediaCommandEnablingRule;
Public Property EnablingRule As MediaCommandEnablingRule

Property Value

A value defining the rule for enabling a System Media Transport Controls command.

Remarks

Use this property to override the default behavior for a System Media Transport Controls command managed by a MediaPlaybackCommandManager. If a MediaPlayer has no remaining items to play, the System Media Transport Controls will disable the Next button. If your app uses the Next button to trigger some other action, such as switching to a different playlist of media items, you can set the EnablingRule for the NextBehavior to Always to ensure that the Next button is always enabled. Or, if a MediaPlayer has remaining items to play, the System Media Transport Controls will enable the Next button by default. If your app requires some user action before playing the next media item, you can set the EnablingRule for the NextBehavior to Never to disable the Next button.

Applies to