SilverLight in Window and TabPanel

  1. #1

    SilverLight in Window and TabPanel

    Hi

    I tried to add some Silverlight controls in tabpanel and window, if i do something in silverlight control, for example, i expand a treeview, then i switch tabs or move window, this silverlight control will be reloaded, it happens in IE, but not in Chrome.


    Any settings can avoid this problem?
  2. #2

    RE: SilverLight in Window and TabPanel

    Hi,

    Try setting AnimCollapse="false" or HideMode="Offsets".


    Geoffrey McGill
    Founder
  3. #3

    RE: SilverLight in Window and TabPanel

    Hi

    I tried this setting for tabpanel and window, but it doesn't work for me


    here is code for window
    <ext:Window ID="windowFormBuilder" runat="server" Title="" Height="720" Width="800"
            HideMode="Offsets" AnimCollapse="false" Show&#111;nload="false" Resizable="false"
            Modal="True" Icon="Application">
            <AjaxEvents>
                <Hide OnEvent="Refresh">
                </Hide>
            </AjaxEvents>
            <Listeners>
                <Hide Handler="parent.reloadDataEntryTreeview();" />
            </Listeners>
            <AutoLoad Mode="IFrame" ShowMask="true" />
        </ext:Window>
    
    
        //set URL to load, it includes a simple silverlight control
        public void InitFormBuilder(string formId)
        {
            if (!string.IsNullOrEmpty(formId))
            {
                //Edit 
                this.windowFormBuilder.Title = "Edit Form";
                this.windowFormBuilder.LoadContent("FormBuilder.aspx?FormId=" + formId);
            }
            else
            {
                this.windowFormBuilder.Title = "New Form";
                this.windowFormBuilder.LoadContent("FormBuilder.aspx?FormId=");
            }
        }
    code for open tab:
    tab = tp.add({
                    id: id.toString(),
                    title: config.title,
                    iconCls: config.icon || 'icon-applicationform',
                    closable: true,
                    autoLoad: {
                        showMask: true,
                        url: config.url,
                        mode: 'iframe',
                        noCache: true,
                        maskMsg: "Loading '" + config.title + "'...",
                        scripts: true,
                        passParentSize: config.passParentSize
                    }
                });
    i searched forum in extjs, someone has same problem, but also no answer.
    Thank you very much

  4. #4
    I had a similar issue on one of my projects - when a Window containing a Silverlight control was moved, the Silverlight control was reinitialised after the Window stops being dragged.

    When a Window is dragged, a "ghost" is applied to the window, which hides the contents of the window. It's this hiding of the controls within the window that caused a problem when the Silverlight control still had focus. By calling "document.body.focus()" before dragging the window, the Silverlight control no longer reinitialised itself after moving it.

    The override below has fixed the issue in our particular project:

    Ext.override(Ext.Window.DD,
    {
        startDrag: function ()
        {
            document.body.focus();       // Removes focus from any controls within the Window (e.g. a Silverlight control)
    
            var w = this.win;
            this.proxy = w.ghost(w.initialConfig.cls);
            if (w.constrain !== false)
            {
                var so = w.el.shadowOffset;
                this.constrainTo(w.container, { right: so, left: so, bottom: so });
            } else if (w.constrainHeader !== false)
            {
                var s = this.proxy.getSize();
                this.constrainTo(w.container, { right: -(s.width - this.headerOffsets[0]), bottom: -(s.height - this.headerOffsets[1]) });
            }
        }
    });

Similar Threads

  1. Replies: 2
    Last Post: Oct 13, 2011, 5:02 PM
  2. [CLOSED] Silverlight and Coolite Tabs (v0.8.2.983)
    By niceguymattx in forum 1.x Legacy Premium Help
    Replies: 14
    Last Post: Nov 22, 2010, 11:50 AM
  3. Silverlight and EXT... Loading Issue...
    By bugs in forum 1.x Help
    Replies: 4
    Last Post: Sep 30, 2010, 6:17 PM
  4. How to close tabpanel's tab in other window
    By fenya_616 in forum 1.x Help
    Replies: 1
    Last Post: Aug 05, 2010, 7:19 PM
  5. Replies: 2
    Last Post: May 15, 2009, 9:10 PM

Posting Permissions