1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
5 * Copyright 2007-2009 Novell, Inc. (http://www.novell.com)
7 * See the LICENSE file included with the distribution for details.
11 #ifndef __CONTENT_CONTROL_H__
12 #define __CONTENT_CONTROL_H__
19 class ContentChangedEventArgs
: public EventArgs
{
24 virtual ~ContentChangedEventArgs ();
27 ContentChangedEventArgs (Value
*old_content
, Value
*new_content
);
29 /* @GenerateCBinding,GeneratePInvoke */
30 Value
*GetOldContent ();
32 /* @GenerateCBinding,GeneratePInvoke */
33 Value
*GetNewContent ();
37 /* @ContentProperty="Content" */
38 /* @Namespace=System.Windows.Controls */
40 class ContentControl
: public Control
{
42 virtual ~ContentControl ();
45 /* @PropertyType=object,Validator=ContentControlContentValidator */
46 const static int ContentProperty
;
47 /* @PropertyType=DataTemplate,GenerateAccessors */
48 const static int ContentTemplateProperty
;
50 /* @GenerateCBinding,GeneratePInvoke */
53 virtual UIElement
*GetDefaultTemplate ();
55 virtual void OnPropertyChanged (PropertyChangedEventArgs
*args
, MoonError
*error
);
60 void SetContentTemplate (DataTemplate
*t
);
61 DataTemplate
*GetContentTemplate ();
63 /* @GenerateCBinding,GeneratePInvoke */
64 void SetContentSetsParent (bool value
) { content_sets_parent
= value
; }
65 /* @GenerateCBinding,GeneratePInvoke */
66 bool GetContentSetsParent () { return content_sets_parent
; }
71 /* @GenerateManagedEvent=false */
72 const static int ContentChangedEvent
;
75 bool content_sets_parent
;
78 #endif /* __CONTENT_CONTROL_H__ */