Windows.UI.Xaml.DependencyProperty.GetMetadata C# (CSharp) Method

GetMetadata() public method

public GetMetadata ( [ forType ) : PropertyMetadata
forType [
return PropertyMetadata
		public extern PropertyMetadata GetMetadata([In] TypeName forType);
		public static extern DependencyProperty Register([In] string name, [In] TypeName propertyType, [In] TypeName ownerType, [In] PropertyMetadata typeMetadata);

Usage Example

コード例 #1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="defaultValue">The default value of the Dependency Property</param>
        internal DependencyPropertyDetails(DependencyProperty property, Type dependencyObjectType) : this()
        {
            Property        = property;
            _hasWeakStorage = property.HasWeakStorage;

            Array.Copy(_unsetStack, _stack, _stackLength);

            var defaultValue = Property.GetMetadata(dependencyObjectType).DefaultValue;

            // Ensures that the default value of non-nullable properties is not null
            if (defaultValue == null && !Property.IsTypeNullable)
            {
                defaultValue = Property.GetFallbackDefaultValue();
            }

            _stack[MaxIndex] = defaultValue;

            Metadata = property.GetMetadata(dependencyObjectType);
        }
All Usage Examples Of Windows.UI.Xaml.DependencyProperty::GetMetadata