LocalValueEntry Structure

 

Represents a property identifier and the property value for a locally set dependency property.

Namespace:   System.Windows
Assembly:  WindowsBase (in WindowsBase.dll)

Public Structure LocalValueEntry

NameDescription
System_CAPS_pubpropertyProperty

Gets the identifier for the locally set dependency property that is represented by this entry.

System_CAPS_pubpropertyValue

Gets the value of the locally set dependency property.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether two LocalValueEntry instances are equal.(Overrides ValueType.Equals(Object).)

System_CAPS_pubmethodGetHashCode()

Returns the hash code for this LocalValueEntry.(Overrides ValueType.GetHashCode().)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns the fully qualified type name of this instance.(Inherited from ValueType.)

NameDescription
System_CAPS_puboperatorSystem_CAPS_staticEquality(LocalValueEntry, LocalValueEntry)

Compares the specified LocalValueEntry instances to determine whether they are the same.

System_CAPS_puboperatorSystem_CAPS_staticInequality(LocalValueEntry, LocalValueEntry)

Compares the specified LocalValueEnumerator instances to determine whether they are different.

Instances of this class are returned when getting the value of the Current property of a LocalValueEnumerator. All LocalValueEntry properties are read-only.

This class has no public constructor. In order to obtain instances of this class you must call GetLocalValueEnumerator, and then get the value of Current from the returned LocalValueEnumerator.

The following example iterates locally set values of a DependencyObject and queries LocalValueEntry properties.

Private Sub RestoreDefaultProperties(ByVal sender As Object, ByVal e As RoutedEventArgs)
    Dim uic As UIElementCollection = Sandbox.Children
    For Each uie As Shape In uic
        Dim locallySetProperties As LocalValueEnumerator = uie.GetLocalValueEnumerator()
        While locallySetProperties.MoveNext()
            Dim propertyToClear As DependencyProperty = locallySetProperties.Current.Property
            If Not propertyToClear.ReadOnly Then
                uie.ClearValue(propertyToClear)
            End If
        End While
    Next
End Sub

.NET Framework
Available since 3.0

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: