Esporta (0) Stampa
Espandi tutto

Struttura LocalValueEntry

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

Spazio dei nomi: System.Windows
Assembly: WindowsBase (in windowsbase.dll)
Spazio dei nomi XML:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public struct LocalValueEntry
public final class LocalValueEntry extends ValueType
Non è possibile utilizzare questa struttura gestita in XAML.

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 = (DependencyProperty)locallySetProperties.Current.Property;
            if (!propertyToClear.ReadOnly) { uie.ClearValue(propertyToClear); }
        }
    }
}

I membri statici pubblici (Shared in Visual Basic) di questo tipo sono validi per le operazioni multithreading. I membri di istanza non sono garantiti come thread safe.

Microsoft .NET Framework 3.0 è supportato in Windows Vista, Microsoft Windows XP SP2 e Windows Server 2003 SP1.

.NET Framework

Supportato in:

Aggiunte alla community

AGGIUNGI
Mostra:
© 2014 Microsoft