2010-06-03 34 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所以可以滾動觀看該內容。

希望這可以幫助你。

相關問題