2013-04-26 49 views
0

我使用accrodian下面的xaml代碼。基本問題是我使用兩個嵌套在另一箇中的手風琴家。兩者都由ScrollViewer拼湊而成。如果外部手風琴有超過14個項目,那麼擴展內部手風琴並不可見,這意味着它會擴大,但由於沒有空間,所以不可見。內部手風琴項目有問題擴大,當外部手風琴太多項目

- 一些代碼

<toolkit:AccordionItem x:Name="test2" Style="{StaticResource ContentEditorAccordionItemStyle}" Header="{Binding LogicBlock, Source={StaticResource ResourceString}}" HorizontalAlignment="Stretch"> 
    <ScrollViewer BorderBrush="Red" BorderThickness="2" Grid.Row="3" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Style="{StaticResource ScrollViewerStyle}"> 
     <toolkit:Accordion Grid.Row="1" x:Name="testnew" ItemsSource="{Binding DynamicContentBlocks.Source, Mode=TwoWay}" FontSize="10" BorderBrush="{x:Null}"> 
      <toolkit:Accordion.ItemTemplate> 
       <DataTemplate> 
        <Grid Margin="6,0"> 
         <TextBlock Style="{StaticResource DefaultTextBlockStyle}" Text="{Binding Name}" FontSize="10"/> 
        </Grid> 
       </DataTemplate> 
      </toolkit:Accordion.ItemTemplate> 
      <toolkit:Accordion.ContentTemplate> 
       <DataTemplate> 
        <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" 
          Style="{StaticResource ScrollViewerStyle}"> 
         <ItemsControl ItemsSource="{Binding Blocks}"> 
          <ItemsControl.ItemTemplate> 
           <DataTemplate> 

            <Grid> 
             <Grid.RowDefinitions> 
              <RowDefinition Height="6"/> 
              <RowDefinition/> 
             </Grid.RowDefinitions> 
             <CheckBox Grid.Row="1" x:Name="chkSelectItem" IsChecked="{Binding IsSelected, Mode=TwoWay}" 
            Style="{StaticResource DefaultCheckBoxStyle}" Content="{Binding Name}" FontSize="10" /> 
            </Grid> 

           </DataTemplate> 
          </ItemsControl.ItemTemplate> 
         </ItemsControl> 
        </ScrollViewer> 
       </DataTemplate> 
      </toolkit:Accordion.ContentTemplate> 
     </toolkit:Accordion> 
    </ScrollViewer> 
</toolkit:AccordionItem> 
<toolkit:AccordionItem x:Name="test3" Style="{StaticResource ContentEditorAccordionItemStyle}" Header="{Binding DataR, Source={StaticResource ResourceString}}" HorizontalAlignment="Stretch"> 
    <ScrollViewer Grid.Row="3" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Style="{StaticResource ScrollViewerStyle}"> 
    -- some code 
    </ScrollViewer> 
</toolkit:AccordionItem> 

回答

0

這與手風琴和AccordionItem一個問題,我更換了手風琴與擴展控制和解決問題...

0

請參考以下代碼:

<Accordion> 
    <ScrollViewer> 
      <Accordion> 
      </Accordion> 
    <ScrollViewer> 
</Accordion>