Skip to main content
This topic provides example code for handling an event-based stat change. To get notifications about event-based stat changes
  1. Add a Stat-changed handler
  2. Subscribe to a specific stat change
To clean up
  1. Remove a Stat-changed handler
  2. Unsubscribe from a specific stat change

Add a Stat-changed handler

Register an event handler for statistic change notifications by using the following example code. The event handler receives an XblStatisticChangeEventArgs object.

Flat C API

For more information, see the following:

Subscribe to a specific stat change

Subscribe to statistic update notifications via the XblUserStatisticsSubscribeToStatisticChange handler by using the following example code.

Flat C API

Remove a Stat-changed handler

Remove an event handler for statistic change notifications by using the following example code.

Flat C API

Unsubscribe from a specific stat change

Unsubscribe a previously created statistic change subscription by using the following example code.

Flat C API

Last modified on August 20, 2026