-
Notifications
You must be signed in to change notification settings - Fork 0
/
Form1.vb
28 lines (25 loc) · 1009 Bytes
/
Form1.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Imports DevExpress.XtraCharts
Imports System
Imports System.Drawing
Imports System.Windows.Forms
Namespace CustomLegendItemSample
Partial Public Class Form1
Inherits Form
Public Sub New()
InitializeComponent()
End Sub
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
' #Region "#CustomLegendItems"
' Create a new custom item.
Dim item As New CustomLegendItem()
chart.Legend.CustomItems.Add(item)
' Specify its text and marker.
item.Text = "Custom Legend Item"
Dim bitmap As New Bitmap("Image\DXLogo_16x16.png")
item.MarkerImage.Image = bitmap
' Set a value indicating that both autogenerated and custom items are displayed.
chart.Legend.ItemVisibilityMode = LegendItemVisibilityMode.AutoGeneratedAndCustom
' #End Region ' #CustomLegendItems
End Sub
End Class
End Namespace