新的wp7,我還沒有最隱晦的想法,爲什麼文本塊文本不包裝?文本塊文本不包裹在wp7應用
<Popup x:Name="EulaPopUp" IsOpen="False">
<Grid Background="White" Width="{Binding ElementName=LayoutRoot, Path=Width}" Height="{Binding ElementName=LayoutRoot, Path=Height}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="70"/>
</Grid.RowDefinitions>
<TextBlock Foreground="Black" Text="End User License Agreement" VerticalAlignment="Top" Grid.Row="0"/>
<ScrollViewer HorizontalAlignment="Left" Name="scrollViewer1" Width="{Binding ElementName=ContentPanel, Path=Width}" VerticalAlignment="Top" Margin="0,30,0,0" Grid.Row="1">
<TextBlock Name="eulaTxt" Width="{Binding ElementName=ContentPanel, Path=Width}" Text="{Binding Path=AppResources.EULA, Source={StaticResource AppResources} }" HorizontalAlignment="Left" VerticalAlignment="Top" TextWrapping="Wrap" />
</ScrollViewer>
<Button Grid.Row="2" Content="I Agree" Background="Green" Height="70" HorizontalAlignment="Center" Margin="0" Name="EulaOK" VerticalAlignment="Bottom" Width="160" />
</Grid>
</Popup>
我綁定了元素的寬度,以便設備重新調整寬度時相應地進行調整。這是錯的嗎?我該如何解決它?謝謝
正確如果我錯了,但MessageBox不是高度可定製的,我甚至不能在按鈕上提供自定義標籤,而且我也認爲可以在消息框中顯示的字符數量有限制? – 2011-12-23 06:50:35
如果您的EULA擴展了此限制,則會出現其他更嚴重的問題。 (另外,沒有向EULA提供「不同意」按鈕,使其無效) – 2011-12-23 07:25:29
老實說,它令人驚訝的wp7的一些限制,但考慮到它的微軟毫不奇怪,我結束了與這傢伙的可滾動文本塊http:// blogs .msdn.com/b/priozersk/archive/2010/09/08/creation-scrollable-textblock-for-wp7.aspx和yeah同意按鈕的邏輯也正在被解決。從應用程序的主要目標這麼多不必要的干擾..嘆息.. – 2011-12-23 07:29:59