我带了一个文本框
<TextBox Height="218" HorizontalAlignment="Stretch" Margin="0,56,0,0" Name="txtBox" VerticalAlignment="Top" TextWrapping="Wrap"
Text="" GotFocus="txtBox_GotFocus" TextChanged="txtBox_TextChanged" IsTabStop="True"
IsEnabled="True" IsHitTestVisible="True" VerticalScrollBarVisibility="Auto" Background="White" FontFamily="Tahoma" />
Run Code Online (Sandbox Code Playgroud)
现在,当我在文本框中输入大量文本时,文本会自动向上滚动.我想显示一个滚动条,用户可以浏览整个文本.这该怎么做.
我在stackpanel中添加了两个按钮,并设置了对齐,如代码所示
<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
<Button Content="Button" Height="64" Name="button1" Width="160" HorizontalAlignment="Left" VerticalAlignment="Top"/>
<Button Content="Button" Height="64" Name="button2" Width="160" HorizontalAlignment="Right" VerticalAlignment="Top"/>
</StackPanel>
Run Code Online (Sandbox Code Playgroud)
但这与我的要求不符.我希望它如下图所示.

那我该怎么做呢?
我使用Silverlight制作了一个演示应用程序,我将某些印地语语言的Unicode作为文本显示在文本框中.ऋऊउईइआ,unicode位置分别为'\ u090B','\ u090A','\ u0909','\ u0908','\ u0907','\ u0906'.
因此,当我将整个事物作为字符串传递给textbox.text它在调试时显示的属性,因为确切的值是文本框,但是当我通过模拟器时,显示器显示空框.
这是否需要在模拟器上安装不同的字体?如果是这样,我该怎么做?是否可以为Windows Phone 7构建一个可以支持不同语言的应用程序?
我遇到了问题.我想在运行时更改按钮的背景图像.我得到了改变颜色的解决方案,但我想改变图像.
代码如下
public void buttonCase(object sender, RoutedEventArgs e)
{
Uri uri = null;
var image = new ImageBrush();
if (((App)App.Current).appControler.m_Mode == Controller.textMode.Letters)
{
((App)App.Current).appControler.buttonCase(sender, e);
switch (((App)App.Current).appControler.m_case)
{
case Controller.caseMode.Upper:
b0.FontSize = b1.FontSize = b2.FontSize = b3.FontSize = b4.FontSize = b5.FontSize = b6.FontSize = b7.FontSize
= b8.FontSize = b9.FontSize = bCornerLower.FontSize = 30.0;
uri = new Uri(@"/SourceCode;component/Images/Lower_Case_p.png", UriKind.Relative);
image.ImageSource = new BitmapImage(uri);
btnCase.Background = image;
break;
case Controller.caseMode.Lower:
b0.FontSize = b1.FontSize = b2.FontSize = b3.FontSize = b4.FontSize = b5.FontSize = …Run Code Online (Sandbox Code Playgroud) 我在WP7中构建了一个应用程序,我需要加载大约20000个硬编码数据({'a',"XYZ"},{'b',"mno"},....)我必须执行搜索.因此,我试图通过创建一个字典,使'a'作为键,值为"XYZ".一旦我的字典被填满,它就会给出Out of memory异常.考虑到我正在构建WP7应用程序,我怎样才能解决这个问题?或者除了使用字典之外还有其他方法吗?
c# dictionary exception-handling silverlight-4.0 windows-phone-7