当前位置: 首页>>代码示例>>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;未经允许,请勿转载。