简体   繁体   中英

Image Upload and Image Slider

  • In my C# WPF windows Application I want to create a control similar to File-Upload in web applications ... of course there won't be server in windows application to save uploaded images
  • I used Text Box and 2 buttons (Browse) and (Upload):
    • I want when I press (Browse) button ...open file dialogue to search for my images in my computer
    • when I choose image ... its path appear in text box
    • when I press (Upload) button ..image is saved in my database and shown in an Images slider
  • also I ask about how to make that Image slider
  • if I have 3 upload controls in the same window but every one is related to certain content .. and all images uploaded by 3 upload controls are shown in image slider .. can I Link each image with its own content when I try to preview a summary for my work??
  • Note: I looked for many questions here related to what I want .. but there is no clear answer with correct code ..so I wish you can help me ..thank you

在此输入图像描述

First you need an Horizontal ListView that is bounded to list of objects, when the object contains path to image, and summary.

you can get direction from here:

wpf-bind-images-horizontally-to-listview

Whenever you click the upload button all you have to do is just to add a new object with the selected path to the bounded list.

about the two arrow buttons - you have to see how to change the listview horizontal scrollbar control template.

Styling-A-ScrollViewer-Scrollbar-In-WPF

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM