コード例 #1
0
        // Token: 0x06001F8A RID: 8074 RVA: 0x00094E40 File Offset: 0x00093040
        internal override void Copy(BamlRecord record)
        {
            base.Copy(record);
            BamlPropertyWithExtensionRecord bamlPropertyWithExtensionRecord = (BamlPropertyWithExtensionRecord)record;

            bamlPropertyWithExtensionRecord._attributeId     = this._attributeId;
            bamlPropertyWithExtensionRecord._extensionTypeId = this._extensionTypeId;
            bamlPropertyWithExtensionRecord._valueId         = this._valueId;
        }
コード例 #2
0
        protected virtual void ReadPropertyWithExtensionRecord(BamlPropertyWithExtensionRecord bamlPropertyRecord)
        { 
            if (null == CurrentContext || 
                (ReaderFlags.DependencyObject != CurrentContext.ContextType &&
                 ReaderFlags.ClrObject != CurrentContext.ContextType)) 
            {
                ThrowException(SRID.ParserUnexpInBAML, "Property");
            }
 
            // Define attrbuteId
            short attributeId = bamlPropertyRecord.AttributeId; 
 
            // Identify the target element
            object element = GetCurrentObjectData(); 

            // Identify the property
            WpfPropertyDefinition propertyDefinition = new WpfPropertyDefinition(this, attributeId, element is DependencyObject);
 
            // Get the value of the property
            object value = GetExtensionValue(bamlPropertyRecord, propertyDefinition.Name); 
 
            // Read and set the value provided by the MarkupExtension on the element's property
            BaseReadOptimizedMarkupExtension(element, attributeId, propertyDefinition, value); 
        }