Skip to main content
A newer version of this page is available. .
All docs
V22.1

WindowsFormsSettings.OptimizeRemoteConnectionPerformance Property

Gets or sets whether the application should disable various visual effects to enhance the performance when accessed over slow remote connections.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.Utils.v22.1.dll

NuGet Packages: DevExpress.Utils, DevExpress.Wpf.Core

Declaration

public static DefaultBoolean OptimizeRemoteConnectionPerformance { get; set; }

Property Value

Type Description
DefaultBoolean

Specifies whether the remote connection optimization is on. The Default value is equal to false.

Available values:

Name Description
True

true. DefaultBoolean.True has a constant value of 0, while the standard true value corresponds to a value of 1. In Visual Basic, do not use implicit conversion of Boolean values to DefaultBoolean, and vice versa, as the conversion may produce incorrect results.

False

false. DefaultBoolean.False has a constant value of 1, while the standard false value corresponds to a value of 0. In Visual Basic, do not use implicit conversion of Boolean values to DefaultBoolean, and vice versa, as the conversion may produce incorrect results.

Default

The default behavior determined by the control’s logic.

Remarks

When enabled, this property minimizes the amount of visual effects and animations. This allows applications to reduce traffic consumption and improve overall performance in remote environments.

The OptimizeRemoteConnectionPerformance property has the following effects:

Animations

  • Transition animations managed by the TransitionManager.
  • FadeIn and FadeOut effects of splash screens.
  • Bar item link hover animations. Enable the AllowLinkLighting to turn on this animation effect.
  • Various expand/collapse, sort, drag-and-drop, and other animations that follow end-user actions. Enable the static AnimationMode property to turn these animations back on.

Shadows

  • Shadows cast by XtraForm, XtraDialog and XtraMessageBox. Call the static EnableWindowShadows() method to restore them.
  • Bar sub-menu shadows. Enable the SubmenuHasShadow property to display these shadows.

Other effects

  • XtraForms display thick borders for a better drag-and-resize experience. You can disable the FormThickBorder property to keep thin form borders, or modify the ThickBorderWidth property to change their thickness.
  • Scroll paint operations are delayed for 75ms.
  • Acrylic Material and Reveal Highlight effects for Fluent Design Forms are disabled. Set the EnableAcrylicAccent property to true to enable these effects.

Tip

To maximize performance, we recommend that you apply a flat vector skin (for instance, “Bezier” or “Basic”). Skins with gradient bitmaps (such as “Valentine” or “Caramel”) generate more traffic and can negatively impact the user experience.

How to use the property and override its settings

Enable the OptimizeRemoteConnectionPerformance property when the SystemInformation.TerminalServerSession property returns true:

WindowsFormsSettings.OptimizeRemoteConnectionPerformance = 
    SystemInformation.TerminalServerSession ? DefaultBoolean.True : DefaultBoolean.False;

When the OptimizeRemoteConnectionPerformance property changes its value, the LookAndFeel.Default.StyleChanged event fires. You can handle this event to re-enable animations that you wish to keep:

DevExpress.LookAndFeel.UserLookAndFeel.Default.StyleChanged += Default_StyleChanged;

void Default_StyleChanged(object sender, EventArgs e) {
    var reason = (e as LookAndFeelChangedEventArgs).Reason;
    if (reason == LookAndFeelChangeReason.OptimizeRemoteConnectionPerformanceChanged) {
        //fine-tune animations and effects
        //for example
        //WindowsFormsSettings.EnableWindowShadows();
        //barManager1.Controller.PropertiesBar.AllowLinkLighting = true;
    }
}
See Also