Use Nothing when setting default value on a Double in your DependencyProperty
   Public Shared ReadOnly MaximizedPrimaryScreenHeighttProperty As DependencyProperty =
        DependencyProperty.Register("MaximizedPrimaryScreenHeightt", GetType(Double), GetType(Window1), New PropertyMetadata(Nothing))
    Public Property MaximizedPrimaryScreenHeightt() As Double
        Get
            Return DirectCast(GetValue(MaximizedPrimaryScreenHeighttProperty), Double)
        End Get
        Set(ByVal value As Double)
            SetValue(MaximizedPrimaryScreenHeighttProperty, value)
        End Set
    End Property
 
 
No comments:
Post a Comment