wpf-devexpress-dot-xpf-dot-treemap-dot-sunburstcontrol-dot-calchitinfo-x28-system-dot-windows-dot-point-x29.md
Returns information about the specified element in the SunburstControl.
Namespace : DevExpress.Xpf.TreeMap
Assembly : DevExpress.Xpf.TreeMap.v25.2.dll
NuGet Package : DevExpress.Wpf.TreeMap
public SunburstHitInfo CalcHitInfo(
Point point
)
Public Function CalcHitInfo(
point As Point
) As SunburstHitInfo
| Name | Type | Description |
|---|---|---|
| point | Point |
Test point coordinates relative to the Sunburst chart’s top-left corner.
|
| Type | Description |
|---|---|
| SunburstHitInfo |
Contains information about the Sunburst chart’s elements at the test point.
|
The following code invokes a message box when a user double-clicks a Sunburst sector:
<dxtm:SunburstControl x:Name="sunburstControl"
MouseDoubleClick="SunburstControl_MouseDoubleClick">
<!--...-->
</dxtm:SunburstControl>
private void SunburstControl_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e) {
SunburstHitInfo hitInfo = sunburstControl.CalcHitInfo(e.GetPosition(sunburstControl));
if (hitInfo != null) {
MessageBox.Show($"Sector value: {hitInfo.ItemInfo.Value}");
}
}
Private Sub SunburstControl_MouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Input.MouseButtonEventArgs)
Dim hitInfo As SunburstHitInfo = sunburstControl.CalcHitInfo(e.GetPosition(sunburstControl))
If hitInfo IsNot Nothing Then
MessageBox.Show($"Sector value: {hitInfo.ItemInfo.Value}")
End If
End Sub
See Also