Universal Windows Platform (UWP) API Reference
Welcome to the Universal Windows Platform (UWP) API reference. This section provides comprehensive documentation for the APIs available to build applications for Windows 10 and Windows 11 across a variety of devices.
UI Elements
APIs for creating user interfaces, handling input, and managing application layout.
Windows.UI.Xaml.Controls.Button
public class Button : ContentControl
Represents a control that triggers an action when clicked.
Properties
Content: Gets or sets the content of the button.Command: Gets or sets the command to invoke when the button is clicked.IsEnabled: Gets or sets a value that indicates whether the control is enabled.
Events
Click: Raised when the button is clicked.
Windows.UI.Xaml.Controls.TextBlock
public class TextBlock : FrameworkElement
Displays a block of text. Supports basic formatting and inline elements.
Properties
Text: Gets or sets the text content to display.FontSize: Gets or sets the font size of the text.Foreground: Gets or sets the brush that paints the foreground of the text.
Windows.UI.Xaml.Media.SolidColorBrush
public class SolidColorBrush : Brush
Represents a brush that is painted with a solid color.
Properties
Color: Gets or sets the color of the brush.
Data Access
APIs for working with data, including data binding, serialization, and database access.
Windows.Foundation.Collections.IObservableVector<T>
public interface IObservableVector<T> : IVector<T>, IObservableMap<K, V>
Represents a collection that supports notifications for changes to its elements.
Device Access
APIs for interacting with various hardware devices, such as cameras, GPS, and Bluetooth.
Windows.Devices.Geolocation.Geolocator
public sealed class Geolocator
Provides access to the device's location services.
Methods
GetGeopositionAsync(): Retrieves the current location asynchronously.
Properties
MovementThreshold: Gets or sets the distance change that triggers a position changed event.DesiredAccuracy: Gets or sets the desired accuracy of the location data.
Networking
APIs for network communication, HTTP requests, and socket programming.
Windows.Web.Http.HttpClient
public sealed class HttpClient
Represents a modern HTTP client that sends HTTP requests and receives responses from a resource identified by a URI.
Methods
GetAsync(Uri): Sends a GET request to the specified URI.PostAsync(Uri, IHttpContent): Sends a POST request to the specified URI.
Notifications
APIs for creating and managing toast notifications and live tiles.
Windows.UI.Notifications.ToastNotificationManager
public static class ToastNotificationManager
Manages the display of toast notifications.
Methods
CreateToastNotifier(): Creates a ToastNotifier object.GetTemplateContent(ToastTemplateType): Retrieves the XML content for a toast notification template.
Storage
APIs for accessing local and roaming storage, files, and folders.
Windows.Storage.StorageFile
public sealed class StorageFile : IStorageFile, IStorageItem
Represents a file in the file system.
Methods
OpenAsync(FileAccessMode): Opens the file for reading or writing.CopyAsync(IStorageFolder): Copies the file to another folder.
Properties
Name: Gets the name of the file.FileType: Gets the file extension.
Media
APIs for handling audio, video, and images.
Windows.Media.Capture.MediaCapture
public sealed class MediaCapture
Provides functionality for capturing photos and videos.
Methods
InitializeAsync(): Initializes the media capture object.StartRecordToStorageFileAsync(MediaEncodingProfile, IStorageFile): Starts recording video to a file.
Sensors
APIs for accessing device sensors like accelerometer, gyrometer, and compass.
Windows.Devices.Sensors.Accelerometer
public sealed class Accelerometer
Represents an accelerometer sensor.
Methods
GetDefault(): Gets the default accelerometer.
Properties
ReadingTransform: Gets or sets the transform to apply to the accelerometer readings.
Events
ReadingChanged: Raised when new accelerometer data is available.
Windows.Foundation
Core types and interfaces used throughout the Windows API.
IAsyncOperation<TResult>PointRectDateTime
Windows.UI
APIs related to the user interface and system settings.
ColorsWindowCoreWindowColor
Windows.Storage
APIs for file and folder management.
StorageFolderFileAccessModeKnownFoldersStorageLibraryChangeTracker
Windows.Networking
APIs for network connectivity and communication.
ConnectionProfileHostNameEndpointPairSockets.StreamSocket
Windows.Devices
APIs for interacting with device hardware.
Enumeration.DeviceInformationGeolocation.GeopointBluetooth.Rfcomm.RfcommDeviceService