I ve 陷入一个奇怪的问题,一些XAML配置在Windows Telephone银灯上。 基本上,我会利用我自己的子弹点,在信.的电网中制造一些文字箱。 问题是,第一个子弹点(见下文)没有明显的理由,有扩展的文本箱。 它看不出案文。 见第一点点以下的间隔。 你也注意到,这削减了第三颗子弹的某些案文:
INCORRECT LAYOUT:
此处为<代码><Canvas/>所有文本和子弹点的标的:
<Canvas Canvas.Left="20.21" Canvas.Top="66" Width="775.96" Height="224.17">
<Grid Canvas.Top="3.6" Canvas.Left="7.2" Width="762.06" Height="216.97">
<Grid VerticalAlignment="Top">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<TextBlock LineHeight="21.6" LineStackingStrategy="BlockLineHeight" TextWrapping="Wrap" TextAlignment="Left" Foreground="#FFFFFF" FontFamily="Segoe WP" FontSize="18">
<Run Text="The Ribbon bar in PowerPoint 2007 and 2010 replaces the menu bar in previous versions. It is designed to provide quick access to the most common features used in PowerPoint." />
</TextBlock>
</Grid>
<Grid Grid.Row="1" Margin="0 0 0 6">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0" />
<ColumnDefinition Width="22.5" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" LineHeight="15.12" Foreground="#D80073" FontFamily="Wingdings" FontSize="12.6" LineStackingStrategy="BlockLineHeight">
<Run Text="" />
</TextBlock>
</Grid>
<TextBlock Grid.Column="2" LineHeight="19.2" LineStackingStrategy="BlockLineHeight" TextWrapping="Wrap" TextAlignment="Left" Foreground="#FFFFFF" FontFamily="Segoe WP">
<Run Text="The " FontSize="16" /><Run Text="R" FontSize="16" /><Run Text="ibbon is " FontSize="16" /><Run Text="made up of various tabs that provide a fast way of performing tasks. For example, if you need to insert a picture, you click the " FontSize="16" /><Run Text="Insert" FontSize="16" FontWeight="Bold" /><Run Text=" tab and then picture. If you need to create an animation, you click on the " FontSize="16" /><Run Text="Animations" FontSize="16" FontWeight="Bold" /><Run Text=" tab and then, with any object selected, simply select the animation you prefer." FontSize="16" />
</TextBlock>
</Grid>
<Grid Grid.Row="2" Margin="0 0 0 6">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0" />
<ColumnDefinition Width="22.5" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" LineHeight="15.12" Foreground="#D80073" FontFamily="Wingdings" FontSize="12.6" LineStackingStrategy="BlockLineHeight">
<Run Text="" />
</TextBlock>
</Grid>
<TextBlock Grid.Column="2" LineHeight="19.2" LineStackingStrategy="BlockLineHeight" TextWrapping="Wrap" TextAlignment="Left" Foreground="#FFFFFF" FontFamily="Segoe WP">
<Run Text="Some " FontSize="16" /><Run Text="R" FontSize="16" /><Run Text="ibbon " FontSize="16" /><Run Text="bars are contextual – meaning they only appear when you’ve selected the corresponding object. The Drawing (shape), Picture (image) and Table (table) tabs become available and highlighted when you’ve selected those objects." FontSize="16" />
</TextBlock>
</Grid>
<Grid Grid.Row="3" Margin="0 0 0 6">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0" />
<ColumnDefinition Width="22.5" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid Grid.Column="1">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" LineHeight="15.12" Foreground="#D80073" FontFamily="Wingdings" FontSize="12.6" LineStackingStrategy="BlockLineHeight">
<Run Text="" />
</TextBlock>
</Grid>
<TextBlock Grid.Column="2" LineHeight="19.2" LineStackingStrategy="BlockLineHeight" TextWrapping="Wrap" TextAlignment="Left" Foreground="#FFFFFF" FontFamily="Segoe WP">
<Run Text="Also" FontSize="16" /><Run Text=", when your PowerPoint application is resized, the Ribbon will minimize or display buttons. This means that the command is still available, but it may look and act slightly different" FontSize="16" /><Run Text="." FontSize="16" />
</TextBlock>
</Grid>
</Grid>
</Grid>
</Canvas>
XAML网页(UserControl)和图片的全文载于DropBox。
我找到了两种手法确定这一点:
- From the first bullet text, remove any three letters. This causes the bottom spacing to be removed. This is a bit weird though as the text in line #2 of the first bullet extends to the width of the grid and in the 3rd one doesn t come as close, so it doesn t make sense why this would "fix" the issue.
- Put a
<RowDefinition Height="*" />
on the second row in the first grid instead of<RowDefinition Height="Auto" />
. This is unpredictable though - if I set it to*
for other rowes, it mis-sizes again. I m doing this coding from automation, so I won t be able to predict a problematic row unless I know exactly what the problem may be in advance in order to set it as*
instead ofAuto
.
如果加以正确表述(采用上文第2号):
CORRECT LAYOUT
是否有任何人知道,在这种“打破文字总结无所作为”和如何确定/预测这种说法究竟有什么错误?