// Token: 0x06002031 RID: 8241 RVA: 0x00095DF4 File Offset: 0x00093FF4
        internal override void Copy(BamlRecord record)
        {
            base.Copy(record);
            BamlPropertyWithStaticResourceIdRecord bamlPropertyWithStaticResourceIdRecord = (BamlPropertyWithStaticResourceIdRecord)record;

            bamlPropertyWithStaticResourceIdRecord._attributeId = this._attributeId;
        }
Esempio n. 2
0
        /// <summary> 
        /// Read the property node that stores an Id reference to StaticResource records stored in the
        /// front loaded section within the deferred content section in Baml 
        /// </summary>
        protected virtual void ReadPropertyWithStaticResourceIdRecord(
            BamlPropertyWithStaticResourceIdRecord bamlPropertyWithStaticResourceIdRecord)
        { 
            if (null == CurrentContext ||
                (ReaderFlags.DependencyObject != CurrentContext.ContextType && 
                 ReaderFlags.ClrObject != CurrentContext.ContextType)) 
            {
                ThrowException(SRID.ParserUnexpInBAML, "Property"); 
            }

            // Define attrbuteId
            short attributeId = bamlPropertyWithStaticResourceIdRecord.AttributeId; 

            // Identify the target element 
            object element = GetCurrentObjectData(); 

            // Identify the property 
            WpfPropertyDefinition propertyDefinition = new WpfPropertyDefinition(this, attributeId, element is DependencyObject);

            // Find the StaticResourceValue for the given Id
            object value = GetStaticResourceFromId(bamlPropertyWithStaticResourceIdRecord.StaticResourceId); 

            // Read and set the value provided by the MarkupExtension on the element's property 
            BaseReadOptimizedMarkupExtension(element, attributeId, propertyDefinition, value); 
        }