Edit

Share via


LocalValueEntry Struct

Definition

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

C#
public struct LocalValueEntry
Inheritance
LocalValueEntry

Examples

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

C#
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); }
        }
    }
}

Remarks

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.

Properties

Property

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

Value

Gets the value of the locally set dependency property.

Methods

Equals(Object)

Determines whether two LocalValueEntry instances are equal.

GetHashCode()

Returns the hash code for this LocalValueEntry.

Operators

Equality(LocalValueEntry, LocalValueEntry)

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

Inequality(LocalValueEntry, LocalValueEntry)

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

Applies to

Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

See also