当前位置: 首页>>代码示例>>C#>>正文


C# Form1.AttachControlTo方法代码示例

本文整理汇总了C#中Form1.AttachControlTo方法的典型用法代码示例。如果您正苦于以下问题:C# Form1.AttachControlTo方法的具体用法?C# Form1.AttachControlTo怎么用?C# Form1.AttachControlTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Form1的用法示例。


在下文中一共展示了Form1.AttachControlTo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Application


//.........这里部分代码省略.........
                    // why do we need this?
                    await Native.window.requestAnimationFrameAsync;

                    Native.document.title += "!";

                    Native.window.history.pushState(
                        state: new { foo = "bar ", __page.sizetarget.value },
                        yield:
                            async scope =>
                            {
                                var page = new App.FromDocument();

                                Native.document.title += ">";

                                page.sizetarget.value = "";
                                page.sizetarget.disabled = true;

                                #region >
                                // Uncaught Error: InvalidOperationException: we can only continue with global methods for now... { Target = [object Object] } 
                                // we could tread the page object special, if it is the only shared reference


                                //await 200;

                                #region Form1
                                var f = new Form1
                                {
                                    Text = "Activity1 ",
                                    BackColor = Color.Transparent
                                    //BackColor = Color.FromArgb(20, 255, 255, 255)
                                };


                                __Form ff = f.AttachControlTo(page.content);


                                // this wont work with maximized mode yet?
                                //ff.ResizeGripElement.Show();

                                ff.HTMLTargetRef.style.bottom = "16px";

                                page.sizetarget.style.minWidth = f.Width + "px";
                                page.sizetarget.style.minHeight = (f.Height + 16) + "px";

                                f.ClientSizeChanged +=
                                    delegate
                                    {
                                        page.sizetarget.style.minWidth = f.Width + "px";
                                        page.sizetarget.style.minHeight = (f.Height + 16) + "px";
                                    };


                                // remove the max blackness. the vista max.
                                ff.InternalStyler.CaptionShadow.style.backgroundColor = "";
                                ff.InternalStyler.Caption.style.backgroundColor = "";

                                // make it large. how large?
                                // liberation of inline style
                                ff.InternalStyler.CaptionContent.style.font = "";
                                ff.InternalStyler.CaptionContent.style.fontSize = "";
                                ff.InternalStyler.CaptionContent.style.lineHeight = "";

                                // magic
                                ff.InternalStyler.CaptionContent.style.height = "47px";
                                ff.CaptionForeground.style.height = "47px";
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:66,代码来源:Application.cs


注:本文中的Form1.AttachControlTo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。