Export (0) Print
Expand All

CaptureDeviceConfiguration.AllowedDeviceAccess Property

Silverlight

Gets a value that reports whether a user has previously granted device access based on their stored response to the device access UI prompt.

Namespace:  System.Windows.Media
Assembly:  System.Windows (in System.Windows.dll)

public static bool AllowedDeviceAccess { get; }

Property Value

Type: System.Boolean
true if the user has previously granted device access based on their response to the access request dialog box prompt, or if the request is automatically granted in some circumstances. false if the user does not grant access or if the request is denied by other factors. See Remarks.

To specifically request access when you do not already know the value of AllowedDeviceAccess, call RequestDeviceAccess first.

You must have previously requested access if you call capture-related APIs that carry or generate specific capture information (for example, CaptureSource.Start). Lack of user permission for capture device access causes the called API to error or throw an exception (InvalidOperationException or possibly others).

The following additional considerations affect the behavior of RequestDeviceAccess andwhether the request access dialog box displays to a client user at run time:

  • If the client is the Silverlight developer runtime, the request access dialog box never displays; access is considered granted for all sites and AllowedDeviceAccess returns true.

  • Registry key settings that lock down Silverlight configuration for corporate settings can set a key to deny all requests for webcam access. The request access does not display for users of these clients; access is considered denied and AllowedDeviceAccess returns false.

Silverlight

Supported in: 5, 4

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft