2010-06-03 85 views

回答

0

有一个StackPanel 1个图像,然后一个文本框,然后另一个图像做这个

<StackPanel Height="100" HorizontalAlignment="Left" Margin="26,164,0,0" Name="stackPanel1" VerticalAlignment="Top" Width="200"> 
    <Image Height="150" Name="image2" Source="Peter-Gfader-head.png" Stretch="Fill" Width="200" /> 
    <TextBox Height="23" Name="textBox2" Text="{Binding MessageFromDataBase}" Width="120" /> 
    <Image Height="150" Name="image1" Source="Peter.png" Stretch="Fill" Width="200" /> 
</StackPanel> 
1

一种方法是把一个文本块,而不是你的文本框{希望在这里,你是不是搜索用户输入} ,将其TextWrapping属性设置为Wrap。

重要的是不要为textblock的height属性指定任何值。

样品的编号:

 <ScrollViewer VerticalScrollBarVisibility="Auto"> 
     <StackPanel HorizontalAlignment="Left" Name="stackPanel1" VerticalAlignment="Top" Width="200" Orientation="Vertical"> 
      <Image Height="150" Name="image2" Source="arrow.png" Stretch="Fill" Width="200" /> 
      <TextBlock Name="textBox2" Width="200" TextWrapping="Wrap" LineStackingStrategy="MaxHeight" Text="The trouble with a lot of software development today I think lies with an incomplete understanding of what Software Development really is, or what kind of work relates to it. Most people in the general populace have very little understanding of software, and tend to concentrate on the layer they can see, which is understandable, the UI; while the UI is very important, most of the work lies beneath. Managers of programmers meanwhile, tend to see them as engineers and some even take the title, Software Engineer. In many cases this title is accurate: building mission critical applications that manage money, space shuttles, or medical equipment are very engineer-oriented work that require attention to detail and much left-brain thinking. However, a lot of Software Development can afford to be more “experimental,” like how GMail was notoriously in beta for years. Without that experimental nature, we wouldn’t have a lot of the great software we have today. 

So if software development isn’t engineering, what is it? Science? Yes, partly. Science implies making a hypothesis and testing it. Every method that is tested could be considered a hypothesis. In most software projects there are teams of Testers who are confirming the hypothesis “the software works as intended” and there are reams of documentation about what “works as intended” means. But when it comes to the UI (or Human-Computer-Interface), it is difficult to test and design becomes a mix of Art and Science. Testing is great, but without creativity, how would you ever devise your interface to begin with? 

Since the beginning of software history, some User-Interface has existed and they have become progressively more beautiful and interactive over time. We’ve gone from the Lisa to the iPad. As the hardware has improved, so has our ability to create more complex interactive interfaces. Art doesn’t stop at the UI either. Programmers are humans too, so I would argue that Art permeates every level of Software Development. That’s why coders often say (or think) “this code is ugly”, “that language is beautiful.” 

Some argue that all software developers should practice engineering, regardless of what happens today, but without Art and Science, software development would be lacking. Would you say Frank Lloyd Wright only practiced engineering?"/> 
      <Image Height="150" Name="image1" Source="arrow.png" Stretch="Fill" Width="200" /> 
     </StackPanel> 
      </ScrollViewer> 
</Grid> 

我已经使用了的ScrollViewer所以可以滚动观看该内容。

希望这可以帮助你。

相关问题