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

ChartRangeControlClient.LayoutChanged Event

Occurs when the ChartRangeControlClient layout is changed.

Namespace: DevExpress.WinUI.Charts

Assembly: DevExpress.WinUI.Charts.v22.1.dll

NuGet Package: DevExpress.WinUI

Declaration

public event EventHandler<LayoutChangedEventArgs> LayoutChanged

Event Data

The LayoutChanged event's data class is LayoutChangedEventArgs. The following properties provide information specific to this event:

Property Description
ChangeType Returns the type of changes applied to ChartRangeControlClient.
End Returns the end value of the bound chart’s whole range (X-axis).
Start Returns the start value of the bound chart’s whole range (X-axis).

Remarks

Use the e.ChangeType property to determine what type of changes occur.

The following example obtains the start and end values of the chart’s visual range when a user changes the selected data range in ChartRangeControlClient.

<Controls:RangeControl Background="Transparent" 
                       ShowRangeThumbs="True" 
                       Margin="30,-10,30,15" 
                       Grid.Row="2">
   <Charts:ChartRangeControlClient  Chart="{Binding ElementName=chart}"  
                                    LayoutChanged="rangeControlClient_LayoutChanged"/>
</Controls:RangeControl>
using DevExpress.WinUI.Controls.Core;
//...
private void rangeControlClient_LayoutChanged(object sender, LayoutChangedEventArgs e) {
  if (e.ChangeType == LayoutChangedType.Data) {
    object startValue = chart.AxisX.ActualVisualRange.StartValueInternal;
    object endValue = chart.AxisX.ActualVisualRange.EndValueInternal;
  }
}
See Also