GameBarServices GameBarServices GameBarServices GameBarServices GameBarServices Class

Definition

Manages the state of the Game Bar.

public : sealed class GameBarServices : IGameBarServices
struct winrt::Windows::Media::Capture::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 AppBroadcastServices

Gets an object that manages app broadcasts.

public : AppBroadcastServices AppBroadcastServices { get; }
AppBroadcastServices AppBroadcastServices();
public AppBroadcastServices AppBroadcastServices { get; }
Public ReadOnly Property AppBroadcastServices As AppBroadcastServices
var appBroadcastServices = gameBarServices.appBroadcastServices;
Value
AppBroadcastServices AppBroadcastServices AppBroadcastServices

An object that manages app broadcasts.

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 AppCaptureServices

Gets an object that manages app capture.

public : AppCaptureServices AppCaptureServices { get; }
AppCaptureServices AppCaptureServices();
public AppCaptureServices AppCaptureServices { get; }
Public ReadOnly Property AppCaptureServices As AppCaptureServices
var appCaptureServices = gameBarServices.appCaptureServices;
Value
AppCaptureServices AppCaptureServices AppCaptureServices

An object that manages app capture.

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 SessionId

Gets a unique identifier for the Game Bar session.

public : Platform::String SessionId { get; }
winrt::hstring SessionId();
public string SessionId { get; }
Public ReadOnly Property SessionId As string
var string = gameBarServices.sessionId;
Value
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 TargetCapturePolicy

Gets the policy for app capture of a target.

public : GameBarTargetCapturePolicy TargetCapturePolicy { get; }
GameBarTargetCapturePolicy TargetCapturePolicy();
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 TargetInfo

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

public : GameBarServicesTargetInfo TargetInfo { get; }
GameBarServicesTargetInfo TargetInfo();
public GameBarServicesTargetInfo TargetInfo { get; }
Public ReadOnly Property TargetInfo As GameBarServicesTargetInfo
var gameBarServicesTargetInfo = gameBarServices.targetInfo;
Value
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() DisableCapture()

Disables app capture.

public : void DisableCapture()
void DisableCapture() const;
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() EnableCapture()

Enables app capture.

public : void EnableCapture()
void EnableCapture() const;
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 CommandReceived

Occurs when a Game Bar command is received.

public : event TypedEventHandler CommandReceived<GameBarServices, GameBarServicesCommandEventArgs>
// Register
event_token CommandReceived(TypedEventHandler<GameBarServices, GameBarServicesCommandEventArgs> const& handler) const;

// Revoke with event_token
void CommandReceived(event_token const& cookie) const;

// Revoke with event_revoker
CommandReceived_revoker CommandReceived(auto_revoker_t, TypedEventHandler<GameBarServices, GameBarServicesCommandEventArgs> const& handler) const;
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