Skip to main content
A newer version of this page is available. .

FocusBehavior Class

Allows you to set the focus to a UI control without utilizing code-behind.

Namespace: DevExpress.Mvvm.UI

Assembly: DevExpress.Xpf.Core.v19.1.dll

Declaration

[TargetType(typeof(Control))]
public class FocusBehavior :
    EventTriggerBase<Control>

Remarks

See FocusBehavior to learn more.

Example

Note

A complete sample project is available at https://github.com/DevExpress-Examples/how-to-use-focusbehavior-t122987.

using DevExpress.Mvvm;
using DevExpress.Mvvm.DataAnnotations;

namespace Example.ViewModel {
    [POCOViewModel]
    public class MainViewModel {
    }
}

The following code snippets (auto-collected from DevExpress Examples) contain references to the FocusBehavior class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

Inheritance

Show 11 items
Object
DispatcherObject
DependencyObject
Freezable
Animatable
DevExpress.Mvvm.UI.Interactivity.AttachableObjectBase
DevExpress.Mvvm.UI.Interactivity.Behavior
DevExpress.Mvvm.UI.Interactivity.TriggerBase
DevExpress.Mvvm.UI.Interactivity.TriggerBase<Control>
See Also