Remarks

Autofocus mode, enabled by using the FocusMode.Continuous value in the FocusSettings object supplied to this method, is only supported while the preview stream is running. Check to make sure that the preview stream is running before turning on continuous autofocus.

public : IAsyncAction SetPresetAsync(FocusPreset preset)public IAsyncAction SetPresetAsync(FocusPreset preset)Public Function SetPresetAsync(preset As FocusPreset) As IAsyncAction// You can use this method in JavaScript.

Asynchronously sets the focus Preset, specifying if the operation must complete before the device is focused.

public : IAsyncAction SetPresetAsync(FocusPreset preset, bool completeBeforeFocus)public IAsyncAction SetPresetAsync(FocusPreset preset, Boolean completeBeforeFocus)Public Function SetPresetAsync(preset As FocusPreset, completeBeforeFocus As Boolean) As IAsyncAction// You can use this method in JavaScript.

public : IAsyncAction SetValueAsync(unsigned int focus)public IAsyncAction SetValueAsync(UInt32 focus)Public Function SetValueAsync(focus As UInt32) As IAsyncAction// You can use this method in JavaScript.

Parameters

focus

unsigned intUInt32UInt32UInt32

The value to set the focus to. The minimum and maximum values are specified by Min and Max.