2014-11-17 3 views
0

안녕하세요. 미리 도움을 주셔서 감사합니다. 저는 두 개의 패널을 가지고 있습니다. 하나는 일련의 버튼이 있고 Telerik RadTreeView는 경계선으로 박스가 있고, 오른쪽에는 그리드와 다른 컨트롤을 포함하는 또 다른 경계가 있습니다. 어떤 이유로 든 페이지 크기를 조정하면 모든 것이 적절하게 크기가 정해지지 만 약 10 픽셀이 잘린 상태이며 이유를 생각할 수 없습니다. 페이지 컨테이너 문제라면 페이지 오른쪽의 테두리에 영향을 미칩니다. 그래서 내가 RadTreeView 나 WrapPanel과 관련이 있다고 생각하고 있습니다. (삶은 다운 코드 바로 아래 이미지 이후)Silverlight WrapPanel RadTreeView 컷오프 10 픽셀

Left black border shows the 10 pixels being cut-off, while the black border on the right shows the border to the grid extending the full length of the page.

<!-- Code --> 
<controls:ViewBase xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
          xmlns:WindowControls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" 
          xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" 
          xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" 
          xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"> 

<Grid.RowDefinitions> 
    <RowDefinition Height="Auto"/> 
    <RowDefinition Height="*"/> 
    </Grid.RowDefinitions> 

    <Grid.ColumnDefinitions> 
    <ColumnDefinition Width="Auto"/> 
    <ColumnDefinition Width="Auto"/> 
    <ColumnDefinition Width="*"/> 
    </Grid.ColumnDefinitions> 

    <TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" x:Name="titleTxt" Text="My Title" Style="{StaticResource textBlockHeaderStyle}"/> 

    <toolkit:WrapPanel Grid.Row="1" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Stretch" MaxWidth="400" Margin="2,2,2,10"> 

     <!-- Some Buttons Here.... --> 

      <telerik:RadTreeView HorizontalAlignment="Stretch" VerticalAlignment="Stretch" SelectionMode="Single" IsLineEnabled="True" 
           ItemsOptionListType="None" IsOptionElementsEnabled="True" IsDragDropEnabled="False" 
           IsRootLinesEnabled="True" Margin="0,5,0,0" IsTriStateMode="True" FontSize="11" BorderThickness="1" BorderBrush="Black"/> 

    </toolkit:WrapPanel> 

    <sdk:GridSplitter Grid.Row="1" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Stretch" Style="{StaticResource gridSplitterStyle}"/> 

    <Border Grid.Row="1" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" 
       Background="Transparent" BorderThickness="1" BorderBrush="Black"> 
    <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> 

     <Grid.RowDefinitions> 
     <RowDefinition Height="*"/> 
     <RowDefinition Height="Auto"/> 
     <RowDefinition Height="Auto"/> 
     </Grid.RowDefinitions> 

     <Grid.ColumnDefinitions> 
     <ColumnDefinition Width="*"/> 
     </Grid.ColumnDefinitions> 

     <Grid Grid.Row="0" Grid.Column="0" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"> 

     <Grid.RowDefinitions> 
      <RowDefinition Height="Auto"/> 
      <RowDefinition Height="*"/> 
     </Grid.RowDefinitions> 

     <Grid.ColumnDefinitions> 
      <ColumnDefinition Width="*"/> 
     </Grid.ColumnDefinitions> 

     <Grid Grid.Row="0" Grid.Column="0"> 
      <Grid.ColumnDefinitions> 
      <ColumnDefinition Width="Auto"/> 
      <ColumnDefinition Width="Auto"/> 
      </Grid.ColumnDefinitions> 

      <!-- Some Buttons Here.... --> 

     </Grid> 

     <telerik:RadGridView Grid.Row="1" Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/> 

     </Grid> 

    </Grid> 
    </Border> 

</Grid> 

+0

그래서 컨트롤 자체에 테두리가 설정되어 있고 그 안에 공간이 있음을 알 수 있습니다. 그것은 당신이 범인을 찾기 위해 파헤쳐 야 할 컨트롤 자체에 대한 스타일 템플릿을 남겨 둡니다. TreeView 스타일 템플릿에는 ToggleButton과 Expander 등 다양한 다른 부분이 있습니다. 공간을 생성하는 것을 찾기 위해 오른쪽 여백을 설정하기 만하면됩니다. 여러 레벨을 찾아서 찾아야 할 수도 있습니다. –

+0

@Chris 나는 내가 따르지 않고, 맞춤 스타일이나 템플릿을 사용하지 않고 있다고 생각합니다. Telerik에서 온 기본 스타일링 (경계선과 경계선을 추가하는 것 제외). –

+0

기본 템플릿의 어딘가에, 아이템으로 작동하는 treeviewitem 또는 ToggleButton 컨텐츠 또는 기본 템플릿의 다른 부분에 여백이 하드 코딩되었거나 스트레칭되지 않아서 파기해야합니다. 제어 템플릿에 위치를 찾을 수 있습니다. –

답변

0
기본으로 볼 시간도 경사를하지 않았나요

RadTreeView 또는 WrapPanel에 대한 템플릿/스타일. RadTreeView를 자체 행에 배치하고 랩 패널에 버튼과 기타 컨트롤 만 남겨 두어 레이아웃을 유지하고 문제를 해결할 수있었습니다. 어쨌든이 방법이 더 간단하다고 가정하십시오.

분명히 해결되지 않을이 두 컨트롤에 대한 버그 또는 호환성 문제 여야합니다.