LocalValueEntry Struct
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a property identifier and the property value for a locally set dependency property.
public value class LocalValueEntry
public struct LocalValueEntry
type LocalValueEntry = struct
Public Structure LocalValueEntry
- Inheritance
Examples
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); }
}
}
}
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
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
See also
.NET