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 void OnPropertyChanged (PropertyChangedEventArgs
*args
, MoonError
*error
);
58 void SetContentTemplate (DataTemplate
*t
);
59 DataTemplate
*GetContentTemplate ();
61 /* @GenerateCBinding,GeneratePInvoke */
62 void SetContentSetsParent (bool value
) { content_sets_parent
= value
; }
63 /* @GenerateCBinding,GeneratePInvoke */
64 bool GetContentSetsParent () { return content_sets_parent
; }
69 const static int ContentChangedEvent
;
72 bool content_sets_parent
;
75 #endif /* __CONTENT_CONTROL_H__ */