2013-05-09 4 views
0

저는 WPF에서 초보자입니다. 그리고 나는이 레이아웃에 붙어 있습니다. Viewbox가 잘 표시되고 ListBox의 공간 (30 %)도 표시되지만 해당 공간에서 ListBox를 볼 수 없습니다. 다음은 문제와 관련된 XAML입니다.Grid 및 ListBox를 사용한 WPF 레이아웃 문제

<Grid> 
    <Grid.RowDefinitions> 
     <RowDefinition Height="70*"/> 
     <RowDefinition Height="30*"/> 
    </Grid.RowDefinitions> 
    <Viewbox Grid.Row="0" Grid.Column="0" DataContext="{Binding ElementName=thisControl}"> 
     <ItemsControl ItemsSource="{Binding Path=SomeProperty}" ItemTemplate="{StaticResource SomeTemplate}" > 
      <ItemsControl.ItemsPanel> 
       <ItemsPanelTemplate> 
        <UniformGrid/> 
       </ItemsPanelTemplate> 
      </ItemsControl.ItemsPanel> 
     </ItemsControl> 
    </Viewbox> 
    <ListBox Grid.Row="1" Grid.Column="0" ItemTemplate="{StaticResource ListBoxItemTemplate}" ItemsSource="{Binding Path=SomeOtherProperty}" Utils:ListBoxExtenders.AutoScrollToEnd="True"/> 
</Grid> 

어떤 도움을 주시면 감사하겠습니다.

답변

0

잘못된 수준으로 정의 된 DataContext입니다. SomeOtherProperty은 ListBox에 바인딩 할 데이터가없는 컨텍스트의 일부입니다. 하지만 출력 창에 바인딩 오류가없는 이유는 아직도 당황 스럽습니다. 음 ...