public void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
 {
   ListViewItemGenerator icg = (ListViewItemGenerator) source;
   _itemTemplate = copyManager.GetCopy(icg._itemTemplate);
   _itemContainerStyle = copyManager.GetCopy(icg._itemContainerStyle);
   _parent = copyManager.GetCopy(icg._parent);
   if (icg._items == null)
     _items = null;
   else
   {
     _items = new List<object>(icg._items.Count);
     foreach (object item in icg._items)
       _items.Add(copyManager.GetCopy(item));
   }
   _populatedStartIndex = icg._populatedStartIndex;
   _populatedEndIndex = icg._populatedEndIndex;
   if (icg._materializedItems == null)
     _materializedItems = null;
   else
   {
     _materializedItems = new List<FrameworkElement>(icg._materializedItems.Count);
     foreach (FrameworkElement item in icg._materializedItems)
       _materializedItems.Add(copyManager.GetCopy(item));
   }
 }
Пример #2
0
 public override void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
 {
   base.DeepCopy(source, copyManager);
   CheckBox cb = (CheckBox) source;
   IsChecked = cb.IsChecked;
   Checked = copyManager.GetCopy(cb.Checked);
   Unchecked = copyManager.GetCopy(cb.Unchecked);
 }
Пример #3
0
 public override void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
 {
   base.DeepCopy(source, copyManager);
   InvokeCommand ic = (InvokeCommand) source;
   CommandStencil = copyManager.GetCopy(ic.CommandStencil);
   foreach (object o in ic._commandParameters)
     _commandParameters.Add(copyManager.GetCopy(o));
 }
Пример #4
0
 public override void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
 {
   base.DeepCopy(source, copyManager);
   PointAnimation a = (PointAnimation) source;
   From = copyManager.GetCopy(a.From);
   To = copyManager.GetCopy(a.To);
   By = copyManager.GetCopy(a.By);
 }
Пример #5
0
 public override void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
 {
   base.DeepCopy(source, copyManager);
   Grid g = (Grid) source;
   foreach (RowDefinition row in g.RowDefinitions)
     RowDefinitions.Add(copyManager.GetCopy(row));
   foreach (ColumnDefinition col in g.ColumnDefinitions)
     ColumnDefinitions.Add(copyManager.GetCopy(col));
 }
Пример #6
0
 public override void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
 {
   base.DeepCopy(source, copyManager);
   TriggerBase tb = (TriggerBase) source;
   foreach (TriggerAction ac in tb.EnterActions)
     EnterActions.Add(copyManager.GetCopy(ac));
   foreach (TriggerAction ac in tb.ExitActions)
     ExitActions.Add(copyManager.GetCopy(ac));
   foreach (Setter s in tb.Setters)
     Setters.Add(copyManager.GetCopy(s));
 }
 public override void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
 {
   base.DeepCopy(source, copyManager);
   CommandBaseMarkupExtension cbme = (CommandBaseMarkupExtension) source;
   _source.Source = copyManager.GetCopy(cbme._source.Source);
   _source.ElementName = cbme._source.ElementName;
   _source.RelativeSource = cbme._source.RelativeSource;
   _path = cbme._path;
   _compiledPath = cbme._compiledPath;
   _source.Converter = copyManager.GetCopy(cbme._source.Converter);
   _source.ConverterParameter = copyManager.GetCopy(cbme._source.ConverterParameter);
 }
Пример #8
0
 public override void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
 {
   Detach();
   base.DeepCopy(source, copyManager);
   StarRatingPanel p = (StarRatingPanel)source;
   StarTemplate = copyManager.GetCopy(p.StarTemplate);
   StarReadOnlyTemplate = copyManager.GetCopy(p.StarReadOnlyTemplate);
   Maximum = p.Maximum;
   Value = p.Value;
   IsReadOnly = p.IsReadOnly;
   Attach();
 }
 public override void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
 {
   base.DeepCopy(source, copyManager);
   CommandMarkupExtension cme = (CommandMarkupExtension) source;
   foreach (object o in cme._parameters)
     _parameters.Add(copyManager.GetCopy(o));
 }
Пример #10
0
 public override void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
 {
   base.DeepCopy(source, copyManager);
   SoundPlayerAction s = (SoundPlayerAction)source;
   Source = copyManager.GetCopy(s.Source);
   DisableOnAudioOutput = s.DisableOnAudioOutput;
 }
Пример #11
0
    protected IItemProvider _newItemProvider = null; // Store new item provider until next render cylce

    #endregion

    #region Ctor

    public override void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
    {
      base.DeepCopy(source, copyManager);
      VirtualizingStackPanel p = (VirtualizingStackPanel) source;
      _itemProvider = copyManager.GetCopy(p._itemProvider);
      _arrangedItems.Clear();
      _averageItemSize = 0;
    }
Пример #12
0
    public override void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
    {
      base.DeepCopy(source, copyManager);
      Button b = (Button) source;

      IsDefault = b.IsDefault;
      Command = copyManager.GetCopy(b.Command);
    }
Пример #13
0
 public override void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
 {
   Detach();
   base.DeepCopy(source, copyManager);
   Setter s = (Setter) source;
   Value = copyManager.GetCopy(s.Value);
   Attach();
 }
 public override void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
 {
   base.DeepCopy(source, copyManager);
   TemplateWithTriggers twt = (TemplateWithTriggers) source;
   IList<TriggerBase> triggers = Triggers;
   foreach (TriggerBase t in twt.Triggers)
     triggers.Add(copyManager.GetCopy(t));
 }
Пример #15
0
 public override void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
 {
   Detach();
   base.DeepCopy(source, copyManager);
   ARRetainingControl c = (ARRetainingControl) source;
   Content = copyManager.GetCopy(c.Content);
   AspectRatio = c.AspectRatio;
   Attach();
 }
Пример #16
0
 public override void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
 {
   Detach();
   base.DeepCopy(source, copyManager);
   SplineDoubleKeyFrame kf = (SplineDoubleKeyFrame) source;
   KeySpline = copyManager.GetCopy(kf.KeySpline);
   Attach();
   InvalidateSpline();
 }
 public override void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
 {
   Detach();
   base.DeepCopy(source, copyManager);
   WorkflowNavigationBarPanel wnbp = (WorkflowNavigationBarPanel) source;
   EllipsisControlStyle = copyManager.GetCopy(wnbp.EllipsisControlStyle);
   Orientation = wnbp.Orientation;
   Attach();
 }
Пример #18
0
 public virtual void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
 {
   NameScope ns = (NameScope) source;
   foreach (KeyValuePair<string, object> kvp in ns._names)
     if (_names.ContainsKey(kvp.Key))
       continue;
     else
       _names.Add(kvp.Key, copyManager.GetCopy(kvp.Value));
 }
Пример #19
0
 public override void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
 {
   base.DeepCopy(source, copyManager);
   VirtualizingWrapPanel p = (VirtualizingWrapPanel)source;
   _itemProvider = copyManager.GetCopy(p._itemProvider);
   _assumedLineExtendsInNonOrientationDirection = 0;
   _arrangedItems = null;
   _firstArrangedLineIndex = -1;
   _lastArrangedLineIndex = -1;
 }
Пример #20
0
 public override void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
 {
   DetachScrolling();
   base.DeepCopy(source, copyManager);
   ItemsPresenter ip = (ItemsPresenter) source;
   _itemsHostPanel = copyManager.GetCopy(ip._itemsHostPanel);
   _doScroll = ip._doScroll;
   _dataStrings = ip._dataStrings;
   AttachScrolling();
 }
Пример #21
0
 public override void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
 {
   Detach();
   base.DeepCopy(source, copyManager);
   ContentPresenter p = (ContentPresenter) source;
   Content = copyManager.GetCopy(p.Content);
   ContentTemplate = copyManager.GetCopy(p.ContentTemplate);
   HorizontalContentAlignment = p.HorizontalContentAlignment;
   VerticalContentAlignment = p.VerticalContentAlignment;
   _templateControl = copyManager.GetCopy(p._templateControl);
   _convertedContent = copyManager.GetCopy(p._convertedContent);
   Attach();
 }
Пример #22
0
 public override void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
 {
   base.DeepCopy(source, copyManager);
   ResourceWrapper rw = (ResourceWrapper) source;
   if (rw._names == null)
     _names = null;
   else
   {
     _names = new Dictionary<string, object>(rw._names.Count);
     foreach (KeyValuePair<string, object> kvp in rw._names)
       if (_names.ContainsKey(kvp.Key))
         continue;
       else
         _names.Add(kvp.Key, copyManager.GetCopy(kvp.Value));
   }
 }
Пример #23
0
        public override void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
        {
            base.DeepCopy(source, copyManager);
            var setterSource = (EventSetter)source;

            // Event property is only a alias for Property which is copied by the base class
            HandledEventsToo = setterSource.HandledEventsToo;
            var disposableHandler = Handler as IDisposable;

            if (disposableHandler != null)
            {
                disposableHandler.Dispose();
            }
            Handler = null;
            if (setterSource.Handler != null)
            {
                Handler = copyManager.GetCopy(setterSource.Handler);
            }
        }
Пример #24
0
        public override void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
        {
            Detach();
            base.DeepCopy(source, copyManager);
            UIElement el = (UIElement)source;
            // We do not copy the focus flag, only one element can have focus
            //HasFocus = el.HasFocus;
            string copyName = el.Name;

            ActualPosition = el.ActualPosition;
            Margin         = new Thickness(el.Margin);
            Visibility     = el.Visibility;
            IsEnabled      = el.IsEnabled;
            // TODO Albert78: Implement Freezing
            Freezable             = el.Freezable;
            Opacity               = el.Opacity;
            OpacityMask           = copyManager.GetCopy(el.OpacityMask);
            LayoutTransform       = copyManager.GetCopy(el.LayoutTransform);
            RenderTransform       = copyManager.GetCopy(el.RenderTransform);
            RenderTransformOrigin = copyManager.GetCopy(el.RenderTransformOrigin);
            Effect            = copyManager.GetCopy(el.Effect);
            TemplateNameScope = copyManager.GetCopy(el.TemplateNameScope);
            _resources        = copyManager.GetCopy(el._resources);

            foreach (TriggerBase t in el.Triggers)
            {
                Triggers.Add(copyManager.GetCopy(t));
            }
            _triggersInitialized = false;

            copyManager.CopyCompleted += (cm =>
            {
                // When copying, the namescopes of our parent objects might not have been initialized yet. This can be the case
                // when the TemplateNamescope property or a LogicalParent property wasn't copied yet, for example.
                // That's why we cannot simply copy the Name property in the DeepCopy method.
                Name = copyName;
                copyName = null;
            });
            Attach();
        }
Пример #25
0
        public override void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
        {
            _preventItemsPreparation = true;
            Detach();
            base.DeepCopy(source, copyManager);
            ItemsControl c = (ItemsControl)source;

            ItemsSource = copyManager.GetCopy(c.ItemsSource);
            _items.Clear();
            foreach (object item in c.Items)
            {
                _items.Add(copyManager.GetCopy(item));
            }
            ItemContainerStyle = copyManager.GetCopy(c.ItemContainerStyle);
            SelectionChanged   = copyManager.GetCopy(c.SelectionChanged);
            ItemTemplate       = copyManager.GetCopy(c.ItemTemplate);
            ItemsPanel         = copyManager.GetCopy(c.ItemsPanel);
            DataStringProvider = copyManager.GetCopy(c.DataStringProvider);
            _lastSelectedItem  = copyManager.GetCopy(c._lastSelectedItem);
            Attach();
            _preventItemsPreparation   = false;
            copyManager.CopyCompleted += manager => PrepareItems(false); // During the deep copy process, our referenced objects are not initialized yet so defer preparation of items to the end of the copy process
        }
 public void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
 {
   WorkflowSaveRestoreStateAction w = (WorkflowSaveRestoreStateAction) source;
   _targetObject = copyManager.GetCopy(w._targetObject);
 }
Пример #27
0
        public virtual void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
        {
            ElementProvider <T> ep = (ElementProvider <T>)source;

            _owner = copyManager.GetCopy(ep._owner);
        }
Пример #28
0
 public override void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
 {
   Detach();
   base.DeepCopy(source, copyManager);
   KeyBinding kb = (KeyBinding) source;
   Key = kb.Key;
   Command = copyManager.GetCopy(kb.Command);
   Attach();
 }
Пример #29
0
    public override void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
    {
      base.DeepCopy(source, copyManager);
      Timeline t = (Timeline) source;
      BeginTime = t.BeginTime;
      Accelleration = t.Accelleration;
      AutoReverse = t.AutoReverse;
      DecelerationRatio = t.DecelerationRatio;
      _durationProperty.SetValue(t._durationProperty.GetValue()); // Copying of a Nullable<TimeSpan>
      FillBehavior = t.FillBehavior;
      RepeatBehavior = t.RepeatBehavior;

      _owner = copyManager.GetCopy(t._owner);
    }
Пример #30
0
    public override void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
    {
      Detach();

      base.DeepCopy(source, copyManager);

      EpgGrid c = (EpgGrid)source;
      HeaderTemplate = copyManager.GetCopy(c.HeaderTemplate);
      ProgramTemplate = copyManager.GetCopy(c.ProgramTemplate);
      TimeIndicatorTemplate = copyManager.GetCopy(c.TimeIndicatorTemplate);

      Attach();
    }
        public void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
        {
            WorkflowSaveRestoreStateAction w = (WorkflowSaveRestoreStateAction)source;

            _targetObject = copyManager.GetCopy(w._targetObject);
        }
Пример #32
0
 public override void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
 {
   Detach();
   base.DeepCopy(source, copyManager);
   TileBrush b = (TileBrush) source;
   AlignmentX = b.AlignmentX;
   AlignmentY = b.AlignmentY;
   Stretch = b.Stretch;
   Tile = b.Tile;
   ViewPort = copyManager.GetCopy(b.ViewPort);
   _refresh = true;
   Attach();
 }
Пример #33
0
 public override void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
 {
   Detach();
   base.DeepCopy(source, copyManager);
   LinearGradientBrush b = (LinearGradientBrush) source;
   StartPoint = copyManager.GetCopy(b.StartPoint);
   EndPoint = copyManager.GetCopy(b.EndPoint);
   _refresh = true;
   Attach();
 }
Пример #34
0
 public override void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
 {
   base.DeepCopy(source, copyManager);
   BindingWrapper bw = (BindingWrapper) source;
   Binding = copyManager.GetCopy(bw.Binding);
 }
Пример #35
0
 public override void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
 {
   Detach();
   base.DeepCopy(source, copyManager);
   Image i = (Image)source;
   Source = copyManager.GetCopy(i.Source);
   FallbackSource = copyManager.GetCopy(i.FallbackSource);
   StretchDirection = i.StretchDirection;
   Stretch = i.Stretch;
   Thumbnail = i.Thumbnail;
   SkinNeutralAR = i.SkinNeutralAR;
   DisposeImageSources();
   _loadImageSource = true;
   HasImage = false;
   Attach();
 }