Skip to main content
All docs
V26.1
  • TreeViewControl.FadeSelectionOnLostFocus Property

    Gets or sets whether to fade selected nodes when the TreeViewControl loses focus. This is a dependency property.

    Namespace: DevExpress.Xpf.Grid

    Assembly: DevExpress.Xpf.Grid.v26.1.dll

    Declaration

    public bool FadeSelectionOnLostFocus { get; set; }

    Property Value

    Type Default Description
    Boolean true

    true to fade selected nodes when the TreeViewControl loses focus; otherwise, false.

    Remarks

    Set the FadeSelectionOnLostFocus property to false to keep node selection fully highlighted when TreeViewControl loses focus.

    Example: Highlight Selected Nodes When the TreeViewControl Loses Focus

    The following example highlights selected nodes when TreeViewControl loses focus:

    <dx:ThemedWindow x:Class="TreeViewControlApp.MainWindow"
                     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                     xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
                     xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
                     Title="TreeViewControl" Height="450" Width="600">
            <dxg:TreeViewControl x:Name="tree"
                                 ChildNodesPath="Employees"
                                 TreeViewFieldName="Name"
                                 FadeSelectionOnLostFocus="False"/>
    </dx:ThemedWindow>
    
    See Also