Hello,
I've created a class WindowEX to extend the capabilities of System.Windows.window (adding new behaviors, properties...) in which I declared the attached property as below (VB):
Public Class WindowEX
Public Shared Function GetKeepSize(ByVal element As DependencyObject) As Boolean
If element Is Nothing Then
Throw New ArgumentNullException("element")
End If
Return CBool(element.GetValue(KeepSizeProperty))
End Function
Public Shared Sub SetKeepSize(ByVal element As DependencyObject, ByVal value As Boolean)
If element Is Nothing Then
Throw New ArgumentNullException("element")
End If
element.SetValue(KeepSizeProperty, value)
End Sub
<System.ComponentModel.Category("IHM")> _
Public Shared ReadOnly KeepSizeProperty As _
DependencyProperty = DependencyProperty.RegisterAttached("KeepSize", _
GetType(Boolean), GetType(System.Windows.Window), _
New UIPropertyMetadata(False))
End ClassI want this property to be displayed into the pane property of VS, but it doesn't, in spite of the attribute:
<System.ComponentModel.Category("IHM")> _I can't understand why...
Where am I wrong ?