Missing ItemsControl.IsItemItsOwnContainerOverride
I'm in the need of the ItemsControl.IsItemItsOwnContainerOverride.
I got a couple of UIElements that I want to 'dress up' with a DataTemplate.
Maybe there is some other way to do this? (I don't want to write a specific style for each find of UIElement)
I got a couple of UIElements that I want to 'dress up' with a DataTemplate.
Maybe there is some other way to do this? (I don't want to write a specific style for each find of UIElement)
-
-
sfernandez
Site Admin
- Posts: 3222
- Joined:
Re: Missing ItemsControl.IsItemItsOwnContainerOverride
The method ItemsControl.IsItemItsOwnContainerOverride should be overriden if you are creating a new ItemsControl class to specify its own container class (the default is ContentPresenter for ItemsControl, ListBoxItem for ListBox, etc.).
Unfortunately this virtual method is only available in the native API yet, and not in the C# API. We will fix these as part of the work in 1.2.8 (support for custom user control).
If you only want to specify different data templates depending on the type of data, you can use the DataTemplate.DataType property and let the automatic template selection to choose the right template for your data. An example can be found here: http://www.thejoyofcode.com/different_d ... types.aspx
If this is not your case, could you please elaborate a bit more what you want to do?
Unfortunately this virtual method is only available in the native API yet, and not in the C# API. We will fix these as part of the work in 1.2.8 (support for custom user control).
If you only want to specify different data templates depending on the type of data, you can use the DataTemplate.DataType property and let the automatic template selection to choose the right template for your data. An example can be found here: http://www.thejoyofcode.com/different_d ... types.aspx
If this is not your case, could you please elaborate a bit more what you want to do?
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 3 guests