Example #1
0
        /// <summary>
        /// Removes the owners of this ResourceDictionary from the given
        /// merged dictionary.  The merged dictionary will be left with
        /// whatever owners it had before being merged.
        /// </summary>
        /// <param name="mergedDictionary"></param>
        internal void RemoveParentOwners(ResourceDictionary mergedDictionary)
        {
            if (this._ownerFEs != null)
            {
                foreach (FrameworkElement fe in this._ownerFEs)
                {
                    mergedDictionary.RemoveOwner(fe);
                }
            }

            if (this._ownerApps != null)
            {
                Debug.Assert(this._ownerApps.Count > 0);

                foreach (Application app in this._ownerApps)
                {
                    mergedDictionary.RemoveOwner(app);
                }
            }
        }
Example #2
0
 internal void RemoveParentOwners(ResourceDictionary mergedDictionary)
 {
     if (this.ownerFEs != null)
     {
         for (int i = 0; i < this.ownerFEs.Count; i++)
         {
             mergedDictionary.RemoveOwner(this.ownerFEs[i]);
         }
     }
 }