简体   繁体   English

图像上传和图像滑块

[英]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 在我的C#WPF窗口应用程序中我想创建一个类似于Web应用程序中的文件上传的控件...当然在Windows应用程序中不会有服务器来保存上传的图像
  • I used Text Box and 2 buttons (Browse) and (Upload): 我使用了文本框和2个按钮(浏览)和(上传):
    • 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?? 如果我在同一窗口中有3个上传控件,但每个都与某些内容相关..并且3个上传控件上传的所有图像都显示在图像滑块中..我可以在尝试预览时将每个图像链接到自己的内容我的工作总结?
  • 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. 首先,当对象包含图像路径和摘要时,您需要一个与对象列表绑定的Horizo​​ntal ListView。

you can get direction from here: 你可以从这里获得方向:

wpf-bind-images-horizontally-to-listview WPF绑定图像水平地对列表视图

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. 关于两个箭头按钮 - 你必须看到如何更改listview水平滚动条控件模板。

Styling-A-ScrollViewer-Scrollbar-In-WPF 造型-A-ScrollViewer中,滚动式,WPF

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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