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


C# TextBox.Show方法代码示例

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


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

示例1: ApplicationCanvas

        public ApplicationCanvas()
        {
            //var logo = new JSCSolutionsNETImage();
            //logo.AttachTo(this);
            var text = new TextBox
            {
                AcceptsReturn = true,
                BorderThickness = new Thickness(0),
                Background = Brushes.Transparent,
                Foreground = Brushes.Blue,
            };
            text.AttachTo(this);


            r.Fill = Brushes.Yellow;
            r.Opacity = 0.3;
            r.AttachTo(this);
            r.MoveTo(8, 8);

            this.SizeChanged += (s, e) =>
            {
                r.SizeTo(this.Width - 16, this.Height - 16);

                //logo.MoveTo(
                //    this.Width - logo.Width,
                //    this.Height - logo.Height
                //);
            };

            r.MouseEnter +=
                (s, e) =>
                {
                    text.Show();
                };

            r.MouseLeave +=
                (s, e) =>
                {
                    text.Hide();
                };


            r.MouseMove +=
                (s, e) =>
                {
                    var p = e.GetPosition(this);

                    text.Text = "jsc-solutions.net\n" + new { p.X, p.Y };

                    text.MoveTo(p.X + 32, p.Y);
                };
        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:52,代码来源:ApplicationCanvas.cs

示例2: Main

        static void Main(string[] args)
        {
            var c = new JSCSolutionsNETCarouselCanvas
                {
                    CloseOnClick = false
                };

            c.HideSattelites();


            //c.Container.Effect = new DropShadowEffect();
            //c.Container.BitmapEffect = new DropShadowBitmapEffect();

            //.MoveTo(0, ImageCarouselCanvas.DefaultHeight - 96).SizeTo(ImageCarouselCanvas.DefaultWidth, 96);

            var cc = new Canvas();


            // http://cloudstore.blogspot.com/2008/05/creating-custom-window-style.html
            var wcam = new Window();
            wcam.Background = Brushes.Transparent;
            wcam.WindowStyle = WindowStyle.None;
            wcam.ResizeMode = ResizeMode.NoResize;
            wcam.SizeTo(200, 200);
            wcam.AllowsTransparency = true;
            //wcam.Opacity = 0.5;
            wcam.ShowInTaskbar = false;
            wcam.Cursor = Cursors.Hand;
            wcam.Focusable = false;
            wcam.Topmost = true;

            var w = cc.ToWindow();


            w.SizeToContent = SizeToContent.Manual;
            //w.SizeTo(400, 400);
            //w.ToTransparentWindow();


            // http://blog.joachim.at/?p=39
            // http://blogs.msdn.com/changov/archive/2009/01/19/webbrowser-control-on-transparent-wpf-window.aspx
            // http://blogs.interknowlogy.com/johnbowen/archive/2007/06/20/20458.aspx
            w.AllowsTransparency = true;
            w.WindowStyle = System.Windows.WindowStyle.None;
            w.Focusable = false;

            //w.Background = new SolidColorBrush(Color.FromArgb(0x20, 0, 0, 0));
            w.Background = Brushes.Transparent;
            w.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
            w.Topmost = true;
            //w.ShowInTaskbar = false;

            var winfoc = new Canvas();



            var winfo = winfoc.ToWindow();

            winfo.AllowsTransparency = true;
            winfo.ShowInTaskbar = false;
            winfo.WindowStyle = WindowStyle.None;
            //winfo.Background = Brushes.Transparent;
            winfo.Background = Brushes.Red;
            winfo.Opacity = 0.3;

            winfo.ResizeMode = ResizeMode.NoResize;

            winfo.SizeToContent = SizeToContent.Manual;
            winfo.Topmost = true;
            // http://www.squidoo.com/youtubehd









            var NextInputModeEnabled = false;
            var NextInputModeKeyDownEnabled = false;

            Action<Key> NextInputModeKeyDown = delegate { };

            var CommandKeysEnabled = false;

            #region TopicText
            var TopicText = new System.Windows.Controls.TextBox
            {
                //IsReadOnly = true,
                Background = Brushes.Transparent,
                BorderThickness = new System.Windows.Thickness(0),
                Foreground = Brushes.White,
                Effect = new DropShadowEffect(),
                Text = "JSC C# Foo Bar",
                //TextDecorations = TextDecorations.Underline,
                FontFamily = new FontFamily("Verdana"),
                FontSize = 24,
                TextAlignment = System.Windows.TextAlignment.Right
            };
//.........这里部分代码省略.........
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:101,代码来源:Program.cs


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