AddItemWithDefaultSize() статический приватный Метод

static private AddItemWithDefaultSize ( DesignItem container, DesignItem createdItem, Point position ) : bool
container DesignItem
createdItem DesignItem
position Point
Результат bool
Пример #1
0
        protected override void OnMouseUp(object sender, MouseButtonEventArgs e)
        {
            if (hasDragStarted)
            {
                if (operation != null)
                {
                    operation.Commit();
                    operation = null;
                }
            }
            else
            {
                CreateComponentTool.AddItemWithDefaultSize(container, createdItem, e.GetPosition(positionRelativeTo));
            }
            if (changeGroup != null)
            {
                changeGroup.Commit();
                changeGroup = null;
            }

            if (designPanel.Context.Services.Component is XamlComponentService)
            {
                ((XamlComponentService)designPanel.Context.Services.Component).RaiseComponentRegisteredAndAddedToContainer(createdItem);
            }

            base.OnMouseUp(sender, e);
        }
 protected override void OnMouseUp(object sender, MouseButtonEventArgs e)
 {
     if (hasDragStarted)
     {
         if (operation != null)
         {
             operation.Commit();
             operation = null;
         }
     }
     else
     {
         CreateComponentTool.AddItemWithDefaultSize(container, createdItem, e.GetPosition(positionRelativeTo));
     }
     if (changeGroup != null)
     {
         changeGroup.Commit();
         changeGroup = null;
     }
     base.OnMouseUp(sender, e);
 }