當前位置: 首頁>>代碼示例>>C#>>正文


C# WebBrowser.SetValue方法代碼示例

本文整理匯總了C#中System.Windows.Controls.WebBrowser.SetValue方法的典型用法代碼示例。如果您正苦於以下問題:C# WebBrowser.SetValue方法的具體用法?C# WebBrowser.SetValue怎麽用?C# WebBrowser.SetValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.Windows.Controls.WebBrowser的用法示例。


在下文中一共展示了WebBrowser.SetValue方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: SetScriptErrorsSuppressed

		public static void SetScriptErrorsSuppressed(WebBrowser browser, bool value)
		{
			browser.SetValue(ScriptErrorsSuppressedProperty, value);
		}
開發者ID:22v2,項目名稱:KanColleViewer,代碼行數:4,代碼來源:WebBrowserHelper.cs

示例2: SetHtml

 public static void SetHtml(WebBrowser d, string value)
 {
     d.SetValue(HtmlProperty, value);
 }
開發者ID:uml-dc2-2016-spring,項目名稱:dc16-MEClient,代碼行數:4,代碼來源:WebBrowserHelper.cs

示例3: TryHookWebBrowser

        private static bool TryHookWebBrowser(WebBrowser webBrowser)
        {
            if (GetSuppressEraseBackground(webBrowser))
            {
                // Try to find the IE window several layers within the WebBrowser.
                IntPtr hwndIEWindow = GetIEWindow(webBrowser);
                if (hwndIEWindow != IntPtr.Zero)
                {
                    // Hook the window messages so we can intercept the
                    // WM_ERASEBKGND message.
                    IEWindowHook hook = new IEWindowHook(new HWND(hwndIEWindow));

                    // Keep our hook alive.
                    webBrowser.SetValue(SuppressEraseBackgroundWindowHookProperty, hook);

                    return true;
                }
            }

            return false;
        }
開發者ID:JazzFisch,項目名稱:AnotherCombatManager,代碼行數:21,代碼來源:WebBrowserExtensions.cs

示例4: SetUrl

 public static void SetUrl(WebBrowser d, string value) => d.SetValue(UrlProperty, value);
開發者ID:pgenfer,項目名稱:YumlFrontEnd,代碼行數:1,代碼來源:BrowserBehavior.cs

示例5: SetSuppressScriptErrors

 /// <summary>
 ///     Attached property setter for the SuppressScriptErrors property.
 /// </summary>
 public static void SetSuppressScriptErrors(WebBrowser webBrowser, bool value)
 {
     webBrowser.SetValue(SuppressScriptErrorsProperty, value);
 }
開發者ID:JazzFisch,項目名稱:AnotherCombatManager,代碼行數:7,代碼來源:WebBrowserExtensions.cs

示例6: generateRightCanvas

        /// <summary>
        /// Generate right page
        /// </summary>
        /// <param name="pageNumber"></param>
        /// <returns>canvas, right canvas to renderBook()</returns>
        private Canvas generateRightCanvas(int pageNumber)
        {
            SolidColorBrush whiteBrush = new SolidColorBrush();
                whiteBrush.Color = Colors.White;
                Canvas canvas = new Canvas();
                canvas.Width = 520;
                canvas.Height = 720;
                canvas.Background = whiteBrush;
                canvas.Margin = new Thickness(520, 0, 0, 0);

                // Amu
                WebBrowser wbRightPage = new WebBrowser();

                // If there is odd number of pages last page in right will be empty (in future it will be filled with next chapter's first page)
                if (!(parser.pageCount < (pageNumber + 1)))
                {
                    wbRightPage.NavigateToString(splittedPages[pageNumber]);
                }
                wbRightPage.Width = 490;
                wbRightPage.Height = 700;
                wbRightPage.Margin = new Thickness(0, 8, 0, 0);
                wbRightPage.Foreground = new SolidColorBrush(Colors.Magenta);

                //   set the padding area to top and to left
                wbRightPage.SetValue(Canvas.LeftProperty, 20.00);
                wbRightPage.SetValue(Canvas.TopProperty, 50.00);
                canvas.Children.Add(wbRightPage);

                Rectangle rectangle = new Rectangle();
                rectangle.Width = 32;
                rectangle.Height = 720;
                rectangle.Fill = this.Resources["RightShadow"] as LinearGradientBrush;
                rectangle.Margin = new Thickness(0, 0, 0, 0);
                canvas.Children.Add(rectangle);

                return canvas;
        }
開發者ID:timextreasures,項目名稱:amu-windows-phone-stuff,代碼行數:42,代碼來源:PageTurnerPage.xaml.cs

示例7: generateLeftCanvas

        /// <summary>
        /// Generate left page
        /// </summary>
        /// <param name="pageNumber"></param>
        /// <returns>canvas, left canvas to renderBook()</returns>
        private Canvas generateLeftCanvas(int pageNumber)
        {
            SolidColorBrush whiteBrush = new SolidColorBrush();
                whiteBrush.Color = Colors.White;
                Canvas canvas = new Canvas();
                canvas.Width = 520;
                canvas.Height = 720;
                canvas.Background = whiteBrush;
                canvas.Margin = new Thickness(0, 0, 0, 0);

                WebBrowser wbLeftPage = new WebBrowser();
                wbLeftPage.NavigateToString(splittedPages[pageNumber]);
                wbLeftPage.Width = 490;
                wbLeftPage.Height = 700;
                wbLeftPage.Margin = new Thickness(8, 8, 0, 0);
                wbLeftPage.Foreground = new SolidColorBrush(Colors.Magenta);

                // set the padding area to top and to left
                wbLeftPage.SetValue(Canvas.LeftProperty, 20.00);
                wbLeftPage.SetValue(Canvas.TopProperty, 50.00);

                canvas.Children.Add(wbLeftPage);

                Rectangle rectangle = new Rectangle();
                rectangle.Width = 32;
                rectangle.Height = 720;
                rectangle.Fill = this.Resources["LeftShadow"] as LinearGradientBrush;
                rectangle.Margin = new Thickness(490, 0, 0, 0);
                canvas.Children.Add(rectangle);

                return canvas;
        }
開發者ID:timextreasures,項目名稱:amu-windows-phone-stuff,代碼行數:37,代碼來源:PageTurnerPage.xaml.cs

示例8: SetWebContent

 public static void SetWebContent(WebBrowser web_browser, Stream value) { web_browser.SetValue(WebContentProperty, value); }
開發者ID:DarkDare,項目名稱:wincompose,代碼行數:1,代碼來源:AboutBox.xaml.cs

示例9: SetBindableSource

 /// <summary>
 /// Sets the bind-able version of the source property.
 /// </summary>
 /// <param name="webBrowser">The web browser.</param>
 /// <param name="value">The source value.</param>
 public static void SetBindableSource(WebBrowser webBrowser, string value)
 {
     webBrowser.SetValue(BindableSourceProperty, value);
 }
開發者ID:ruisebastiao,項目名稱:Elysium-Extra,代碼行數:9,代碼來源:WebBrowserAttached.cs


注:本文中的System.Windows.Controls.WebBrowser.SetValue方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。