AndreasEnscape
Topic Author
Posts: 22
Joined: 01 Aug 2017, 07:37

ListView won't clip

07 Aug 2017, 14:55

Hi all,
I have tried everything from canvs to Border with ClipToBounds set tro True, bu I cannot get ListView to NOT draw text, Images, anything, exceeding or covering all top and bottom. Any help welcome, here is the small code snippet. Viewtexture and ViewName are methods returning an image and a string, respectively.
        <ListView ClipToBounds="True" Visibility="{Binding ElementName=ExpanderControl, Converter={StaticResource convBoolVis}, Path=IsChecked}" Name="ViewsList" ItemsSource="{Binding Path=ViewListAccessor, Mode=OneWay}" Foreground="White" Background="Gray">
            <ListView.View>
                <GridView>
                    <GridViewColumn Header="Thumbnail">
                        <GridViewColumn.CellTemplate >
                            <DataTemplate>
                                <StackPanel Orientation="Vertical" Width="{Binding ActualWidth, ElementName=ImgCell}" Height="{Binding ActualHeight, ElementName=ImgCell}" >
                                    <Image Source="{Binding Path=ViewTexture}" MaxHeight="240" MaxWidth="240"/>
                                    <TextBlock Text="{Binding ViewName}" HorizontalAlignment="Center" Margin="2,2,2,2" ClipToBounds="True"/>
                                </StackPanel>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                </GridView>
            </ListView.View>
        </ListView>
        
 
User avatar
sfernandez
Site Admin
Posts: 1918
Joined: 22 Dec 2011, 19:20

Re: ListView won't clip

16 Aug 2017, 11:55

We had a bug related to list clipping that was fixed for the upcoming release 2.0.3.
It was happening if in a list with few items (without scroll required) then items when are added to the source collection so the list needed to enable scroll and clipping.

Who is online

Users browsing this forum: No registered users and 2 guests