windowsforms-devexpress-dot-xtraeditors-dot-windowsformssettings-ebe7456a.md
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.v25.2.dll
NuGet Packages : DevExpress.Utils, DevExpress.Wpf.Core
public static DefaultBoolean OptimizeRemoteConnectionPerformance { get; set; }
Public Shared Property OptimizeRemoteConnectionPerformance As DefaultBoolean
| Type | Description |
|---|---|
| DefaultBoolean |
Specifies whether the remote connection optimization is on. The Default value is equal to false.
|
Available values:
| Name | Description | Return Value |
|---|---|---|
| True |
The value is true.
|
0
| | False |
The value is false.
|
1
| | Default |
The value is specified by a global option or a higher-level object.
|
2
|
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
Shadows
Other effects
Acrylic 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.
Enable the OptimizeRemoteConnectionPerformance property when the SystemInformation.TerminalServerSession property returns true :
WindowsFormsSettings.OptimizeRemoteConnectionPerformance =
SystemInformation.TerminalServerSession ? DefaultBoolean.True : DefaultBoolean.False;
WindowsFormsSettings.OptimizeRemoteConnectionPerformance =
If(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;
}
}
Private DevExpress.LookAndFeel.UserLookAndFeel.Default.StyleChanged += AddressOf Default_StyleChanged
Sub Default_StyleChanged(ByVal sender As Object, ByVal e As EventArgs)
Dim reason = (TryCast(e, LookAndFeelChangedEventArgs)).Reason
If reason Is LookAndFeelChangeReason.OptimizeRemoteConnectionPerformanceChanged Then
'fine-tune animations and effects
'for example
'WindowsFormsSettings.EnableWindowShadows();
'barManager1.Controller.PropertiesBar.AllowLinkLighting = true;
End If
End Sub
See Also