Beispiel #1
0
 /// <summary>
 /// Creates a hidden Iframe element.
 /// </summary>
 /// <returns>The IFrameElement created. </returns>
 internal static IFrame CreateHiddenIframeElement()
 {
     IFrame _elmFrame = new IFrame();
     _elmFrame.Style.Position = "absolute";
     _elmFrame.Style.Visibility = "hidden";
     return _elmFrame;
 }
Beispiel #2
0
        /// <summary>
        /// Sets the size and location of a background iframe to cover the area behind the flyout.
        /// </summary>
        /// <remarks>
        /// The background iframe is positioned under a flyout when the flyout is launched in InternetExplorer. Without
        /// this, the flyout appears under ActiveX controls on the page.
        /// </remarks>
        /// <param name="elmFlyout">The flyout to be launched.</param>
        /// <param name="elmBackFrame">The iframe positioned under the flyout.</param>
        internal static void PositionBackFrame(IFrame elmBackFrame, HtmlElement elmFlyout)
        {
            elmBackFrame.Style.Position = "absolute";
            elmBackFrame.Style.Visibility = "hidden";
            elmBackFrame.Style.Left = elmFlyout.Style.Left;
            elmBackFrame.Style.Top = elmFlyout.Style.Top;

            int realWidth = elmFlyout.OffsetWidth;
            int realHeight = elmFlyout.OffsetHeight;
            elmBackFrame.Style.Width = realWidth.ToString() + "px";
            elmBackFrame.Style.Height = realHeight.ToString() + "px";

            elmBackFrame.Style.Visibility = "visible";
        }
Beispiel #3
0
        public override void Dispose()
        {
            base.Dispose();
            if (!CUIUtility.IsNullOrUndefined(_menu))
                _menu.Dispose();

            if (!CUIUtility.IsNullOrUndefined(_cachedMenuVersions))
            {
                // This may have gotten called before if this is the current menu that we are
                // holding but it won't hurt to call it twice.
                foreach (string key in _cachedMenuVersions.Keys)
                    _cachedMenuVersions[key].Dispose();

                _cachedMenuVersions.Clear();
                _cachedMenuVersions = null;
            }

            _selectedControl = null;
            _menu = null;
            _elmBackFrame = null;
        }