-
Notifications
You must be signed in to change notification settings - Fork 3
/
WebPageItemMetadata.vb
44 lines (40 loc) · 1.81 KB
/
WebPageItemMetadata.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Imports DevExpress.DashboardCommon
Imports System
Imports System.ComponentModel
Namespace DevExpress.DashboardWin.CustomItemExtension
<DisplayName("Web Page"), CustomItemDescription("Create a Web Page dashboard item and insert it into the dashboard." & vbLf & vbLf & "This item displays the web content. You can specify the URI pattern to create the page address from a data column at run-time."), CustomItemImage("WebPageItem.svg")>
Public Class WebPageItemMetadata
Inherits CustomItemMetadata
<DisplayName("Attribute"), EmptyDataItemPlaceholder("Attribute")>
Public Property Attribute() As Dimension
Get
Return GetPropertyValue(Of Dimension)()
End Get
Set(ByVal value As Dimension)
SetPropertyValue(value)
End Set
End Property
<UrlCustom>
Public Property URI() As String
Get
Return GetCustomPropertyValue(Of String)()
End Get
Set(ByVal value As String)
SetCustomPropertyValue(value)
End Set
End Property
Public Class UrlCustomAttribute
Inherits Attribute
Implements ICustomPropertyValueConverterAttribute(Of String), ICustomPropertyHistoryAttribute(Of String)
Public Function ConvertToString(ByVal value As String) As String Implements ICustomPropertyValueConverterAttribute(Of String).ConvertToString
Return value
End Function
Public Function ConvertFromString(ByVal strValue As String) As String Implements ICustomPropertyValueConverterAttribute(Of String).ConvertFromString
Return strValue
End Function
Public Function GetHistoryMessage(ByVal newValue As String, ByVal oldValue As String, ByVal dashboardItemName As String) As String Implements ICustomPropertyHistoryAttribute(Of String).GetHistoryMessage
Return "URI for the " & dashboardItemName & " changed"
End Function
End Class
End Class
End Namespace