[英]Textbox has no ScrollBar Property
Visual Studio's IntelliSense keeps blowing up at me when I try to set a vertical scrollbar on my textbox with C#. 当我尝试使用C#在文本框上设置垂直滚动条时,Visual Studio的IntelliSense总是对我发火。 It says that 'TextBox' has no definition for Scrollbars and suggests that I'm missing something.
它说“ TextBox”没有滚动条的定义,并暗示我缺少一些东西。
I think I must be missing something because everything I find online just assumes it works by typing txtMyTextBox.Scrollbar = true;
我想我一定会错过一些东西,因为我在网上找到的所有东西都假定它可以通过键入
txtMyTextBox.Scrollbar = true;
but it doesn't work for me. 但这对我不起作用。 I don't really know what I'm doing wrong.
我真的不知道我在做什么错。 I haven't added any using statements, just the default that get loaded when using WPF, but no tutorials ever point to me needing to add one.
我没有添加任何using语句,只是添加了使用WPF时加载的默认语句,但是没有教程指向我需要添加一个。
<TextBox
Height="200"
AcceptsReturn="True"
Text="{Binding ... }"
TextWrapping="Wrap"
VerticalScrollBarVisibility="Visible" />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.