【发布时间】:2018-02-28 03:10:20
【问题描述】:
我不确定这在 wpf 中是否可行,但假设我在页面上的网格中有多个文本块和其他控件
<TextBlock Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="1" FontSize="30"
Text="Station" HorizontalAlignment="Left" Margin="65.2,0,0,3"
VerticalAlignment="top" Width="104" Height="47" />
<ComboBox Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="1"
HorizontalAlignment="Left" Margin="50.2,2,0,0" VerticalAlignment="Bottom"
Width="120" Height="22" />
<TextBlock Grid.Row="2" Grid.Column="4" Text="Date" FontSize="30"
HorizontalAlignment="Left" Margin="59.8,0,0,5" VerticalAlignment="top"
Height="45" Width="72" />
<DatePicker Grid.Row="2" Grid.Column="4" HorizontalAlignment="Left"
Margin="59.8,0,0,0" VerticalAlignment="Bottom"
RenderTransformOrigin="1.078,0.417" Height="24" Width="102" />
<TextBlock Grid.Row="3" Grid.Column="0" Text="Item" FontSize="30"
HorizontalAlignment="Left" Margin="59.8,0,0,5" VerticalAlignment="top"
Height="45" Width="72" />
<TextBlock Grid.Row="3" Grid.Column="1" Text="UoM" FontSize="30"
HorizontalAlignment="Left" Margin="59.8,0,0,5" VerticalAlignment="top"
Height="45" Width="72" />
...
有没有办法封装这些控件并将它们放在我屏幕顶部的边框中,即使代码下方的文本框向下滚动也是如此。即类似于当您向下滚动页面的其余部分时停留在屏幕顶部的 HTML 标题?
【问题讨论】:
标签: wpf