I'm creating custom ItemsControl
that is derived from DataGrid
. I need to access ItemsHost that is the Panel
that actually holds rows of DataGrid
. I have seen som ugly tricks to do that but I consider them worse then using reflection.
So can I access ItemsHost using reflection ? And how ?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
Yes I can. It is simple - I've just created property in class inheriting from
DataGrid
:It works like a charm :). I can get the value of
ItemsHost
internal property of theItemsControl
class. This way I can access any non-protected properties.