jeudi 29 novembre 2018

c# wpf listview checkbox item

I realize Listview for the photo preview.

<xctk:MaterialListBox InkEffectBrush="CornflowerBlue"  IsInkEffectActive="True" Background="Transparent" x:Name="TvBox" ScrollBar.Scroll="TvBox_Scroll" ScrollViewer.ScrollChanged="TvBox_ScrollChanged" GiveFeedback="TvBox_GiveFeedback"  AllowDrop="False" PreviewMouseLeftButtonDown="TvBox_PreviewMouseLeftButtonDown" PreviewMouseMove="TvBox_PreviewMouseMove" Margin="0,0,0,10" HorizontalAlignment="Stretch">
            <xctk:MaterialListBox.ItemContainerStyle>
                <Style TargetType="{x:Type xctk:MaterialListBoxItem}">
                    <Setter Property="Height" Value="100" />
                    <Setter Property="VerticalAlignment" Value="Top" />
                </Style>
            </xctk:MaterialListBox.ItemContainerStyle>
            <xctk:MaterialListBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <UniformGrid Columns="4" Background="#00FFFFFF"/>
                </ItemsPanelTemplate>
            </xctk:MaterialListBox.ItemsPanel>
            <xctk:MaterialListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Vertical" >
                        <Image Height="100" Width="200" Source="{Binding ImageData}"  Stretch="Uniform" />
                        <xctk:MaterialCheckBox Background="BlueViolet" Content="Выбрать" Click="MaterialButton_Click" HorizontalAlignment="Center" Height="35" Margin="0,20" Width="130"/>
                    </StackPanel>
                </DataTemplate>
            </xctk:MaterialListBox.ItemTemplate>
        </xctk:MaterialListBox> 

Screnshoot Listview. I need a checkbox on top of the image. Example as needed Prompt please solve this problem. Thank you in advance.




Aucun commentaire:

Enregistrer un commentaire