Ejemplo n.º 1
0
        /// <summary>
        /// Initializes the HtmlTestPage Control with a specific minimum plugin
        /// size requirement.
        /// </summary>
        /// <param name="minimumPluginWidth">The minimum width that the plugin
        /// can be sized to.</param>
        /// <param name="minimumPluginHeight">The minimum height that the plugin
        /// can be sized to.</param>
        /// <param name="testColumnWidth">The width to allocate for the test
        /// column.</param>
        /// <param name="permitResizing">A value indicating whether to allow
        /// the plugin and page to resize the contents.</param>
        public WebBrowserTestPage(int minimumPluginWidth, int minimumPluginHeight, int testColumnWidth, bool permitResizing)
        {
            PrepareApplicationFonts();

            _testColumnWidth   = testColumnWidth;
            _minimumPluginSize = new Size <int>(minimumPluginWidth, minimumPluginHeight);
            _pluginContainer   = new HtmlControl(HtmlPage.Plugin.Parent);
            _plugin            = new HtmlControl(HtmlPage.Plugin);

            CalculatePreferredPluginSize();

            if (permitResizing)
            {
                ResizeSilverlightPlugin();
            }

            // Appended directly into the document body
            _testColumn = new HtmlTestColumn(_testColumnWidth, ImplicitPadding, _browserClientSize.Height);
            HtmlPage.Document.Body.AppendChild(_testColumn);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes the HtmlTestPage Control with a specific minimum plugin 
        /// size requirement.
        /// </summary>
        /// <param name="minimumPluginWidth">The minimum width that the plugin 
        /// can be sized to.</param>
        /// <param name="minimumPluginHeight">The minimum height that the plugin
        /// can be sized to.</param>
        /// <param name="testColumnWidth">The width to allocate for the test 
        /// column.</param>
        /// <param name="permitResizing">A value indicating whether to allow 
        /// the plugin and page to resize the contents.</param>
        public WebBrowserTestPage(int minimumPluginWidth, int minimumPluginHeight, int testColumnWidth, bool permitResizing)
        {
            PrepareApplicationFonts();

            _testColumnWidth = testColumnWidth;
            _minimumPluginSize = new Size<int>(minimumPluginWidth, minimumPluginHeight);
            _pluginContainer = new HtmlControl(HtmlPage.Plugin.Parent);
            _plugin = new HtmlControl(HtmlPage.Plugin);

            CalculatePreferredPluginSize();

            if (permitResizing)
            {
                ResizeSilverlightPlugin();
            }
            
            // Appended directly into the document body
            _testColumn = new HtmlTestColumn(_testColumnWidth, ImplicitPadding, _browserClientSize.Height);
            HtmlPage.Document.Body.AppendChild(_testColumn);
        }