我想像下面的代码一样使用<ScrollViewer>
<ScrollViewer.TopHeader>
<Grid Width="800" Height="75" Background="Green" />
</ScrollViewer.TopHeader>
<StackPanel HorizontalAlignment="Left" VerticalAlignment="Top">
<TextBlock Text="hello" FontSize="75" />
<TextBlock Text="hello" FontSize="75" />
<TextBlock Text="hello" FontSize="75" />
<TextBlock Text="hello" FontSize="75" />
<TextBlock Text="hello" FontSize="75" />
<TextBlock Text="hello" FontSize="75" />
<TextBlock Text="hello" FontSize="75" />
<TextBlock Text="hello" FontSize="75" />
<TextBlock Text="hello" FontSize="75" />
<TextBlock Text="hello" FontSize="75" />
<TextBlock Text="hello" FontSize="75" />
<TextBlock Text="hello" FontSize="75" />
<TextBlock Text="hello" FontSize="75" />
<TextBlock Text="hello" FontSize="75" />
</StackPanel>
</ScrollViewer>
,是否可能?
parentController
答案 0 :(得分:0)
是的,但你需要一个父州。例如;
$stateProvider
.state('main', {
template: '<ui-view/>',
controller: 'ParentController as parentCtrl'
})
.state('main.base', {
// your views
});
如果您有视图,则控制器不能处于相同状态,但您始终可以在层次结构中添加状态以获得相同的结果。