我想从现有的ItemContainer
对象确定ItemsControl
类型。
var item = control as ItemsControl;
//HOW to get child container Type?
一个如何通过Blend完成的示例:
<< img src =“ https://image.soinside.com/eyJ1cmwiOiAiaHR0cHM6Ly9pLnN0YWNrLmltZ3VyLmNvbS80amRIVC5wbmcifQ==” alt =“在此处输入图像描述”>“ >>
以某种方式混合确定当前TabControl
类型的子项是TabItem
。
如何在代码中做同样的事情?
我想从现有的ItemsControl对象确定ItemContainer类型。 var item = control as ItemsControl; //如何获取子容器类型?混合如何完成的示例:...
从StyleTypedPropertyAttribute
派生的大多数类上都有StyleTypedPropertyAttribute
。得到一个ItemsControl
等于Property
的值。该属性的"ItemContainerStyle"
属性应为您提供商品类型。