本文整理汇总了C#中ScriptCoreLib.JavaScript.DOM.HTML.IHTMLDiv.WithinContainer方法的典型用法代码示例。如果您正苦于以下问题:C# IHTMLDiv.WithinContainer方法的具体用法?C# IHTMLDiv.WithinContainer怎么用?C# IHTMLDiv.WithinContainer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ScriptCoreLib.JavaScript.DOM.HTML.IHTMLDiv
的用法示例。
在下文中一共展示了IHTMLDiv.WithinContainer方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: VisualStudioView
public VisualStudioView()
{
var ToolbarHeight = "24px";
var Content = new IHTMLDiv();
this.Container = Content;
this.Container.style.position = ScriptCoreLib.JavaScript.DOM.IStyle.PositionEnum.absolute;
this.Container.style.width = "100%";
this.Container.style.height = "100%";
new TwentyTenWorkspace().ToBackground(Content.style, true);
var EditorFrame = VisualStudioView.CreateEditor();
var ToolbarContainerBackground = new IHTMLDiv().With(
k =>
{
k.style.position = ScriptCoreLib.JavaScript.DOM.IStyle.PositionEnum.absolute;
k.style.left = "0px";
k.style.right = "0px";
k.style.top = "0px";
k.style.height = ToolbarHeight;
k.style.backgroundColor = Color.White;
//k.style.Opacity = 0.5;
}
).AttachTo(Content);
var ToolbarContainer = new IHTMLDiv().With(
k =>
{
k.style.position = ScriptCoreLib.JavaScript.DOM.IStyle.PositionEnum.absolute;
k.style.left = "0px";
k.style.right = "0px";
k.style.top = "0px";
k.style.height = ToolbarHeight;
}
).AttachTo(Content);
var ToolbarContent = new IHTMLDiv().AttachTo(ToolbarContainer);
ToolbarContent.style.position = ScriptCoreLib.JavaScript.DOM.IStyle.PositionEnum.relative;
this.PriorityButtons = new IHTMLSpan().AttachTo(ToolbarContent);
this.ApplyToolbarButtonStyle =
k =>
{
k.style.verticalAlign = "top";
k.style.padding = "0";
k.style.margin = "0";
k.style.overflow = ScriptCoreLib.JavaScript.DOM.IStyle.OverflowEnum.hidden;
k.style.SetSize(24, 24);
VisualStudioView.ApplyMouseHoverStyle(k, Color.Transparent);
};
Func<IHTMLImage, IHTMLButton> AddButtonDummy =
(img) =>
{
return new IHTMLButton { img.WithinContainer() }.With(k => ApplyToolbarButtonStyle(k)).AttachTo(ToolbarContent);
};
Func<IHTMLImage, Action, IHTMLButton> AddButtonAction =
(img, command) =>
{
return AddButtonDummy(img).With(
k =>
{
k.onclick +=
delegate
{
command();
};
}
);
};
Func<IHTMLImage, string, IHTMLButton> AddButton =
(img, command) =>
{
return AddButtonAction(img, () =>
EditorFrame.contentWindow.document.execCommand(
command, false, null
)
);
};
var RTAButtons = new Dictionary<string, IHTMLImage>
{
// http://trac.symfony-project.org/browser/plugins/dmCkEditorPlugin/web/js/ckeditor/_source/plugins?rev=27455
{"Bold", new RTA_bold()},
{"Underline", new RTA_underline()},
{"Strikethrough", new RTA_strikethrough()},
//.........这里部分代码省略.........