Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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 struct 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.

void RestoreDefaultProperties(object sender, RoutedEventArgs e)
{
    UIElementCollection uic = Sandbox.Children;
    foreach (Shape uie in uic)
    {
        LocalValueEnumerator locallySetProperties = uie.GetLocalValueEnumerator();
        while (locallySetProperties.MoveNext())
        {
            DependencyProperty propertyToClear = locallySetProperties.Current.Property;
            if (!propertyToClear.ReadOnly) { uie.ClearValue(propertyToClear); }
        }
    }
}

.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:
© 2016 Microsoft