static VisualFeedback()
        {
            jQuery.OnDocumentReady(delegate()
            {
                jQuery.Select("#draggableVisual1")
                      .Plugin<DraggableObject>()
                      .Draggable(new DraggableOptions(DraggableOption.Helper, "original"));

                jQuery.Select("#draggableVisual2")
                      .Plugin<DraggableObject>()
                      .Draggable(new DraggableOptions(DraggableOption.Opacity, 0.7f
                                                     , DraggableOption.Helper, "clone"));

                DraggableOptions options = new DraggableOptions();
                options.Cursor = "move";
                options.CursorAt = new Dictionary("top", -12, "left", -20);
                options.Helper = new Func<jQueryEvent, jQueryObject>(delegate(jQueryEvent e)
                {
                    return jQuery.FromHtml("<div class='ui-widget-header'>I'm a custom helper</div>");
                });

                jQuery.Select("#draggableVisual3")
                      .Plugin<DraggableObject>()
                      .Draggable(options);

                jQuery.Select("#draggableVisualSet div")
                      .Plugin<DraggableObject>()
                      .Draggable(new DraggableOptions(DraggableOption.Stack, "#draggableVisualSet div"));
            });
        }
Exemplo n.º 2
0
        static Events()
        {
            jQuery.OnDocumentReady(delegate()
            {
                jQueryObject start_counter = jQuery.Select("#event-start");
                jQueryObject drag_counter = jQuery.Select("#event-drag");
                jQueryObject stop_counter = jQuery.Select("#event-stop");
                int[] counts = new int[] { 0, 0, 0 };

                DraggableOptions options = new DraggableOptions();
                options.Start = delegate(jQueryEvent e, DragStartEvent eventData)
                {
                    counts[0]++;
                    UpdateCounterStatus(start_counter, counts[0]);
                };
                options.Drag = delegate(jQueryEvent e, DragEvent eventData)
                {
                    counts[1]++;
                    UpdateCounterStatus(drag_counter, counts[1]);
                };
                options.Stop = delegate(jQueryEvent e, DragStopEvent eventData)
                {
                    counts[2]++;
                    UpdateCounterStatus(stop_counter, counts[2]);
                };

                jQuery.Select("#draggableEvents")
                    .Plugin<DraggableObject>()
                    .Draggable(options);

            });
        }
Exemplo n.º 3
0
        static AutoScroll()
        {
            jQuery.OnDocumentReady(delegate()
            {
                DraggableOptions options;

                options = new DraggableOptions();
                options.Scroll = true;

                jQuery.Select("#draggableAutoScroll1")
                      .Plugin<DraggableObject>()
                      .Draggable(options);

                options = new DraggableOptions();
                options.Scroll = true;
                options.ScrollSensitivity = 100;

                jQuery.Select("#draggableAutoScroll2")
                      .Plugin<DraggableObject>()
                      .Draggable(options);

                options = new DraggableOptions();
                options.Snap = true;
                options.ScrollSpeed = 100;

                jQuery.Select("#draggableAutoScroll3")
                      .Plugin<DraggableObject>()
                      .Draggable(options);
            });
        }
Exemplo n.º 4
0
        //
        public DockableControl(string name)
            : base(name)
        {
            _launcher = new Launcher("launcher"+name);
            _launcher.Remote = this;
            PageManager.Context.dockModule.AddChild(_launcher);
            _header = new Label("Header");
            _headerContainer = new BaseControl("HeaderContainer");

            _headerContainer.CssClass = "ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix";
            _header.CssClass = "ui-dialog-title";
            CssClass = "ui-dialog ui-widget ui-widget-content ui-corner-all";

            draggableOptions = new DraggableOptions()
            {
                Handle = _headerContainer.ControlContainer,
                ZIndex = 10,
                Scope = "draggable",
                Containment = PageManager.Context.panelLayout.ControlContainer

            };
            resizableOptions = new ResizableOptions()
            {
                MinHeight = 100,
                MinWidth = 100,
                MaxHeight = Window.InnerHeight,
                MaxWidth = Window.InnerWidth
            };

            _headerContainer.AddChild(_header);
            AddChild(_headerContainer);
        }
Exemplo n.º 5
0
 public static DraggableObject Draggable(this jQueryObject q, DraggableOptions options)
 {
     return(null);
 }
Exemplo n.º 6
0
 public DraggableObject Draggable(DraggableOptions options)
 {
     return(null);
 }
Exemplo n.º 7
0
 public DraggableObject Draggable(DraggableOptions options) {
     return null;
 }
 public static DraggableObject Draggable(this jQueryObject q, DraggableOptions options) {
     return null;
 }