小编Mar*_*yad的帖子

scrollviewer属性'content'被设置多次

这是我的代码:

<Grid Style="{StaticResource LayoutRootStyle}">
    <Grid.RowDefinitions>
        <RowDefinition Height="140"/>
        <RowDefinition Height="*"/>
    </Grid.RowDefinitions>

    <ScrollViewer 
            Grid.RowSpan="2" Style="{StaticResource HorizontalScrollViewerStyle}"
            HorizontalScrollBarVisibility="Visible" >
            <!-- The elements you want to be horizontally scrollable goes here -->
            <!-- Horizontal scrolling grid used in most view states -->

        <GridView
            Name="itemGridView"
            AutomationProperties.AutomationId="ItemsGridView"
            AutomationProperties.Name="Items"
            TabIndex="1"
            Padding="100,136,116,46"
            ItemsSource="{Binding Source={StaticResource itemsViewSource}}"
            ItemTemplate="{StaticResource Standard250x250ItemTemplate}"
            SelectionMode="None"
            IsSwipeEnabled="false"
            IsItemClickEnabled="True"
            ItemClick="ItemView_ItemClick"/>

         <Button Hello />  <!-- From here come the Error -->           
    </ScrollViewer>
</Grid>
Run Code Online (Sandbox Code Playgroud)

当我在我之后添加任何东西时GridView,它会给我这个错误(属性content设置不止一次).

wpf xaml microsoft-metro

3
推荐指数
1
解决办法
3156
查看次数

标签 统计

microsoft-metro ×1

wpf ×1

xaml ×1