File Properties

If you mean FileInfo properties:
VB.NET:
PropertyGrid1.SelectedObject = New IO.FileInfo("filename.ext")
 
PropertyGrid just displays the public properties of the selected object. You can write a class that expose the properties you want. A TypeConverter could in some cases deliver a more dynamic set of properties, but also fast gets very complicated.
 
VB.NET:
Private Class test
    Private newPropertyValue As Integer
    Public Property NewProperty() As Integer
        Get
            Return newPropertyValue
        End Get
        Set(ByVal value As Integer)
            newPropertyValue = value
        End Set
    End Property
End Class
VB.NET:
PropertyGrid1.SelectedObject = New test
 
Back
Top