WPF中的库存布局创建 [英] Inventory Layout Creation in WPF

查看:122
本文介绍了WPF中的库存布局创建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您能帮助我如何在wpf中定义库存的机架和插槽吗,用户可以通过此屏幕选择特定的机架来放置其设备.用户可以查看一种颜色的空插槽并用不同的颜色填充...想知道如何满足此要求...

解决方案

好吧,以不同的颜色显示插槽是一件很琐碎的事情.假设您只需要将空插槽识别为空插槽,您所要做的就是使用值转换器返回不同的颜色,并以此方式设置背景,或者使用DataTrigger并在那里设置背景.

您可以使用两种不同类型的按钮-一种用于空按钮,一种用于填充机架.
分别对每个样式进行样式设置,然后根据机架类型创建应用这些样式.


Can you help me out how to define Racks and slots of an inventory in wpf where the user selects particular rack to place his equipment via this screen.. The user can view empty slots in one color and filled in different... want an idea how to achive this requirement...

解决方案

Well, displaying the slots in different colours is a fairly trivial thing to do. Assuming that you simply need to identify empty slots as ones that are null, all you need do is use a value converter to return a different colour, and set the background that way, or use a DataTrigger and set the background there.


You could use two different types of buttons - one for empty and one for filled racks.
Style each of them separately and create apply these styles based on the rack type.


这篇关于WPF中的库存布局创建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆