Add WebView.CustomCss for CSS style injection
This commit is contained in:
Родитель
58ad6ca587
Коммит
c96158da5b
|
@ -131,6 +131,8 @@ namespace Samples
|
|||
"Lorem ipsum dolor sit amet.</p>" +
|
||||
"</body></html>";
|
||||
wb.LoadHtml (html, "sample.html");
|
||||
wb.CustomCss =
|
||||
"body {\n color: red;\n background-color: black;\n}";
|
||||
}
|
||||
|
||||
public void UpdateProgress (object sender, ElapsedEventArgs args)
|
||||
|
|
|
@ -84,6 +84,8 @@ namespace Xwt.Gtk.Mac
|
|||
|
||||
public bool ContextMenuEnabled { get; set; }
|
||||
|
||||
public string CustomCss { get; set; }
|
||||
|
||||
public void GoBack ()
|
||||
{
|
||||
view.GoBack ();
|
||||
|
|
|
@ -118,6 +118,8 @@ namespace Xwt.Gtk.Windows
|
|||
|
||||
public bool ContextMenuEnabled { get; set; }
|
||||
|
||||
public string CustomCss { get; set; }
|
||||
|
||||
public void GoBack ()
|
||||
{
|
||||
view.GoBack ();
|
||||
|
|
|
@ -82,6 +82,8 @@ namespace Xwt.GtkBackend
|
|||
|
||||
public bool ContextMenuEnabled { get; set; }
|
||||
|
||||
public string CustomCss { get; set; }
|
||||
|
||||
public void GoBack ()
|
||||
{
|
||||
view.GoBack ();
|
||||
|
|
|
@ -82,6 +82,8 @@ namespace Xwt.WPFBackend
|
|||
|
||||
public bool ContextMenuEnabled { get; set; }
|
||||
|
||||
public string CustomCss { get; set; }
|
||||
|
||||
public void GoBack ()
|
||||
{
|
||||
view.GoBack ();
|
||||
|
|
|
@ -97,6 +97,8 @@ namespace Xwt.Mac
|
|||
|
||||
public bool ContextMenuEnabled { get; set; }
|
||||
|
||||
public string CustomCss { get; set; }
|
||||
|
||||
public void GoBack ()
|
||||
{
|
||||
Widget.GoBack ();
|
||||
|
|
|
@ -41,6 +41,7 @@ namespace Xwt.Backends
|
|||
void StopLoading ();
|
||||
void LoadHtml (string content, string base_uri);
|
||||
bool ContextMenuEnabled { get; set; }
|
||||
string CustomCss { get; set; }
|
||||
}
|
||||
|
||||
public interface IWebViewEventSink : IWidgetEventSink
|
||||
|
|
|
@ -132,6 +132,12 @@ namespace Xwt
|
|||
set { Backend.ContextMenuEnabled = value; }
|
||||
}
|
||||
|
||||
[DefaultValue (null)]
|
||||
public string CustomCss {
|
||||
get { return Backend.CustomCss; }
|
||||
set { Backend.CustomCss = value; }
|
||||
}
|
||||
|
||||
public void GoBack ()
|
||||
{
|
||||
Backend.GoBack ();
|
||||
|
|
Загрузка…
Ссылка в новой задаче