항목 사이에 공간이 있으며 제거 할 수 없습니다. 나는 ItemsControl에 대해 하루 종일 인터넷 검색을 해왔으며 아무 것도 발견하지 못했습니다. 또한 listbox에서도 작동하지 않았습니다. 심지어 악화 시켰습니다.ItemsControl에 항목 사이에 공간이 있습니다.
누구나 아이디어가 있습니까?
<ItemsControl BorderThickness="0" ItemsSource="{Binding Items}" VerticalAlignment="Stretch" VerticalContentAlignment="Stretch">
<ItemsControl.ItemContainerStyle>
<Style>
<Setter Property="FrameworkElement.Margin" Value="0,0,0,0"/>
</Style>
</ItemsControl.ItemContainerStyle>
<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type newsSubscriber:Item}">
<Border VerticalAlignment="Stretch" SnapsToDevicePixels="True" BorderThickness="0">
<Border.Background>
<ImageBrush Stretch="Fill" ImageSource="{Binding RepeatImagePath}"/>
</Border.Background>
<StackPanel Cursor="Hand" VerticalAlignment="Stretch">
<StackPanel.InputBindings>
<MouseBinding MouseAction="LeftClick" Gesture="LeftClick" Command="{Binding GoToWebCommand}" />
</StackPanel.InputBindings>
<StackPanel VerticalAlignment="Stretch" FlowDirection="RightToLeft" Height="{Binding hight}" Orientation="Horizontal" HorizontalAlignment="Right">
<StackPanel.Background>
<ImageBrush Stretch="Fill" ImageSource="{Binding RepeatImagePath}"/>
</StackPanel.Background>
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center" Width="70" Text="{Binding time}"/>
<TextBlock Language="he-il" TextWrapping="Wrap" HorizontalAlignment="Right" VerticalAlignment="Center" Width="300" Text="{Binding title}"/>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Width="38">
<Image Stretch="None" Source="{Binding ArrowImagePath}"/>
</StackPanel>
</StackPanel>
</StackPanel>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
출력 그림 :
이미지를 게시하고 공백을 지적하면 도움이 될 수 있습니다. –
가 추가되었습니다. 항목 사이의 작은 흰색을 참조하십시오. 그것의 웹 사이트 프로그램 뒤에. –