//////////////////////////////////////////////////////////////////////////////////////////////////// // NoesisGUI - http://www.noesisengine.com // Copyright (c) 2013 Noesis Technologies S.L. All Rights Reserved. //////////////////////////////////////////////////////////////////////////////////////////////////// #ifndef __GUI_HIERARCHICALDATATEMPLATE_H__ #define __GUI_HIERARCHICALDATATEMPLATE_H__ #include #include #include namespace Noesis { class Style; class BaseBinding; class DataTemplateSelector; NS_WARNING_PUSH NS_MSVC_WARNING_DISABLE(4251 4275) //////////////////////////////////////////////////////////////////////////////////////////////////// /// Represents a DataTemplate that supports HeaderedItemsControl, such as TreeViewItem or MenuItem. /// /// .. code-block:: xml /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// http://msdn.microsoft.com/en-us/library/system.windows.hierarchicaldatatemplate.aspx //////////////////////////////////////////////////////////////////////////////////////////////////// class NS_GUI_CORE_API HierarchicalDataTemplate: public DataTemplate { public: HierarchicalDataTemplate(); ~HierarchicalDataTemplate(); /// Gets or sets the Style that is applied to the item container for each child item //@{ Style* GetItemContainerStyle() const; void SetItemContainerStyle(Style* style); //@} /// Gets or sets the binding for this data template, which indicates where to find the /// collection that represents the next level in the data hierarchy //@{ BaseBinding* GetItemsSource() const; void SetItemsSource(BaseBinding* source); //@} /// Gets or sets the DataTemplate to apply to the ItemTemplate property on a generated /// HeaderedItemsControl (such as a MenuItem or a TreeViewItem), to indicate how to display /// items from the next level in the data hierarchy //@{ DataTemplate* GetItemTemplate() const; void SetItemTemplate(DataTemplate* templat); //@} /// Gets or sets the DataTemplateSelector to apply to the ItemTemplateSelector property on a /// generated HeaderedItemsControl (such as a MenuItem or a TreeViewItem), to indicate how to /// select a template to display items from the next level in the data hierarchy //@{ DataTemplateSelector* GetItemTemplateSelector() const; void SetItemTemplateSelector(DataTemplateSelector* selector); //@} private: Ptr