mobilecontrols-devexpress-dot-xamarinforms-dot-charts-6c39d223.md
Stores crosshair line appearance settings.
Namespace : DevExpress.XamarinForms.Charts
Assembly : DevExpress.XamarinForms.Charts.dll
NuGet Package : DevExpress.XamarinForms.Charts
public class CrosshairLineStyle :
TextElementStyleBase
The following members return CrosshairLineStyle objects:
When you set the Hint.Behavior property to the CrosshairHintBehavior object, the ChartView displays a hint for a data point as a crosshair cursor.
A crosshair cursor is a pair of intersecting horizontal and vertical lines ( value line and argument line ) with the corresponding axis labels at the end of these lines. Assign the CrosshairLineStyle object with the specified settings to the HintStyle.ArgumentLineStyle and HintStyle.ValueLineStyle properties to customize the appearance of these lines and their labels. To show or hide them, use the corresponding properties of the CrosshairHintBehavior object.
This example demonstrates how to set the ChartView hint behavior to crosshair, and how to specify the crosshair hint properties.
CrosshairLineStyle class instance with specified LabelBackgroundColor, Stroke, and TextStyle properties to the HintStyle.ArgumentLineStyle and HintStyle.ValueLineStyle properties to modify appearance of the hint lines and hint labels.<dxc:ChartView.Hint>
<dxc:Hint Enabled="True">
<!--...-->
<dxc:Hint.Behavior>
<dxc:CrosshairHintBehavior
GroupHeaderTextPattern="{} Year: {A$YYYY}"
MaxSeriesCount="3" />
</dxc:Hint.Behavior>
<dxc:Hint.Style>
<dxc:HintStyle>
<dxc:HintStyle.ArgumentLineStyle>
<dxc:CrosshairLineStyle LabelBackgroundColor="#383c44"
Stroke="Blue">
<dxc:CrosshairLineStyle.TextStyle>
<dxc:TextStyle Color="White"
Size="30"/>
</dxc:CrosshairLineStyle.TextStyle>
</dxc:CrosshairLineStyle>
</dxc:HintStyle.ArgumentLineStyle>
<dxc:HintStyle.ValueLineStyle>
<dxc:CrosshairLineStyle LabelBackgroundColor="#383c44"
Stroke="Red">
<dxc:CrosshairLineStyle.TextStyle>
<dxc:TextStyle Color="White"
Size="30"/>
</dxc:CrosshairLineStyle.TextStyle>
</dxc:CrosshairLineStyle>
</dxc:HintStyle.ValueLineStyle>
</dxc:HintStyle>
</dxc:Hint.Style>
</dxc:Hint>
</dxc:ChartView.Hint>
Object ChartElement StyleBase TextElementStyleBase CrosshairLineStyle
See Also