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));
   }
 }
Example #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);
 }
Example #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));
 }
 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);
 }
Example #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));
 }
Example #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);
 }
Example #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));
 }
Example #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;
 }
    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;
    }
Example #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);
    }
Example #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));
 }
 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();
 }
 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();
 }
Example #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));
 }
 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;
 }
Example #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();
 }
 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();
 }
Example #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));
   }
 }
Example #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);
            }
        }
Example #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();
        }
Example #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);
 }
Example #27
0
        public virtual void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
        {
            ElementProvider <T> ep = (ElementProvider <T>)source;

            _owner = copyManager.GetCopy(ep._owner);
        }
Example #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();
 }
Example #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);
    }
Example #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);
        }
Example #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();
 }
 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();
 }
Example #34
0
 public override void DeepCopy(IDeepCopyable source, ICopyManager copyManager)
 {
   base.DeepCopy(source, copyManager);
   BindingWrapper bw = (BindingWrapper) source;
   Binding = copyManager.GetCopy(bw.Binding);
 }
Example #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();
 }