GameBarServices GameBarServices GameBarServices GameBarServices Class

Definition

Manages the state of the Game Bar.

public : sealed class GameBarServices : IGameBarServices
public sealed class GameBarServices : IGameBarServices
Public NotInheritable Class GameBarServices Implements IGameBarServices
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.15063.0)
API contract
Windows.Media.Capture.GameBarContract (introduced v1)
Capabilities
gameBarServices

Properties

AppBroadcastServices AppBroadcastServices AppBroadcastServices AppBroadcastServices

Gets an object that manages app broadcasts.

public : AppBroadcastServices AppBroadcastServices { get; }
public AppBroadcastServices AppBroadcastServices { get; }
Public ReadOnly Property AppBroadcastServices As AppBroadcastServices
var appBroadcastServices = gameBarServices.appBroadcastServices;
Additional features and requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.15063.0)
API contract
Windows.Media.Capture.GameBarContract (introduced v1)
Capabilities
gameBarServices

AppCaptureServices AppCaptureServices AppCaptureServices AppCaptureServices

Gets an object that manages app capture.

public : AppCaptureServices AppCaptureServices { get; }
public AppCaptureServices AppCaptureServices { get; }
Public ReadOnly Property AppCaptureServices As AppCaptureServices
var appCaptureServices = gameBarServices.appCaptureServices;
Additional features and requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.15063.0)
API contract
Windows.Media.Capture.GameBarContract (introduced v1)
Capabilities
gameBarServices

SessionId SessionId SessionId SessionId

Gets a unique identifier for the Game Bar session.

public : Platform::String SessionId { get; }
public string SessionId { get; }
Public ReadOnly Property SessionId As string
var string = gameBarServices.sessionId;
Value
Platform::String string string string

A unique identifier for the Game Bar session.

Additional features and requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.15063.0)
API contract
Windows.Media.Capture.GameBarContract (introduced v1)
Capabilities
gameBarServices

TargetCapturePolicy TargetCapturePolicy TargetCapturePolicy TargetCapturePolicy

Gets the policy for app capture of a target.

public : GameBarTargetCapturePolicy TargetCapturePolicy { get; }
public GameBarTargetCapturePolicy TargetCapturePolicy { get; }
Public ReadOnly Property TargetCapturePolicy As GameBarTargetCapturePolicy
var gameBarTargetCapturePolicy = gameBarServices.targetCapturePolicy;
Additional features and requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.15063.0)
API contract
Windows.Media.Capture.GameBarContract (introduced v1)
Capabilities
gameBarServices

TargetInfo TargetInfo TargetInfo TargetInfo

Gets an object that provides metadata for an app capture target.

public : GameBarServicesTargetInfo TargetInfo { get; }
public GameBarServicesTargetInfo TargetInfo { get; }
Public ReadOnly Property TargetInfo As GameBarServicesTargetInfo
var gameBarServicesTargetInfo = gameBarServices.targetInfo;
Value
GameBarServicesTargetInfo GameBarServicesTargetInfo GameBarServicesTargetInfo GameBarServicesTargetInfo

An object that provides metadata for an app capture target.

Additional features and requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.15063.0)
API contract
Windows.Media.Capture.GameBarContract (introduced v1)
Capabilities
gameBarServices

Methods

DisableCapture() DisableCapture() DisableCapture() DisableCapture()

Disables app capture.

public : void DisableCapture()
public void DisableCapture()
Public Function DisableCapture() As void
gameBarServices.disableCapture();
Additional features and requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.15063.0)
API contract
Windows.Media.Capture.GameBarContract (introduced v1)
Capabilities
gameBarServices

EnableCapture() EnableCapture() EnableCapture() EnableCapture()

Enables app capture.

public : void EnableCapture()
public void EnableCapture()
Public Function EnableCapture() As void
gameBarServices.enableCapture();
Additional features and requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.15063.0)
API contract
Windows.Media.Capture.GameBarContract (introduced v1)
Capabilities
gameBarServices

Events

CommandReceived CommandReceived CommandReceived CommandReceived

Occurs when a Game Bar command is received.

public : event TypedEventHandler CommandReceived<GameBarServices, GameBarServicesCommandEventArgs>
public event TypedEventHandler CommandReceived<GameBarServices, GameBarServicesCommandEventArgs>
Public Event TypedEventHandler CommandReceived( Of ( Of GameBarServices ), ( Of GameBarServicesCommandEventArgs ))
function onCommandReceived(eventArgs){/* Your code */}


gameBarServices.addEventListener("commandReceived", onCommandReceived);
gameBarServices.removeEventListener("commandReceived", onCommandReceived);
Additional features and requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.15063.0)
API contract
Windows.Media.Capture.GameBarContract (introduced v1)
Capabilities
gameBarServices