2013-06-02 14:32:43 +02:00
|
|
|
#ifndef _SYSTEM_WINDOWS_CONTROLS_PRIMITIVES_TOGGLEBUTTON_
|
|
|
|
#define _SYSTEM_WINDOWS_CONTROLS_PRIMITIVES_TOGGLEBUTTON_
|
2013-05-05 18:18:41 +02:00
|
|
|
|
|
|
|
#include <System/Windows/Controls/Primitives/ButtonBase.h>
|
|
|
|
#include <System/Nullable.h>
|
|
|
|
|
|
|
|
namespace System
|
|
|
|
{
|
|
|
|
namespace Windows
|
|
|
|
{
|
|
|
|
namespace Controls
|
|
|
|
{
|
|
|
|
namespace Primitives
|
|
|
|
{
|
|
|
|
// Base class for controls that can switch states, such as System::Windows::Controls::CheckBox and System::Windows::Controls::RadioButton.
|
|
|
|
class ToggleButton : public ButtonBase
|
|
|
|
{
|
|
|
|
protected:
|
|
|
|
void OnClick();
|
|
|
|
void OnContentChanged(Object* oldContent, Object* newContent);
|
|
|
|
virtual void OnToggle();
|
|
|
|
|
|
|
|
public:
|
|
|
|
Nullable<bool> IsChecked;
|
|
|
|
bool IsThreeState;
|
|
|
|
|
|
|
|
ToggleButton();
|
|
|
|
virtual ~ToggleButton();
|
|
|
|
|
2013-07-11 17:25:49 +02:00
|
|
|
static int GetType();
|
2013-06-02 14:32:43 +02:00
|
|
|
const String& ToString() const;
|
2013-05-05 18:18:41 +02:00
|
|
|
|
|
|
|
bool operator==(const ToggleButton& right) const;
|
|
|
|
bool operator!=(const ToggleButton& right) const;
|
|
|
|
|
|
|
|
RoutedEventHandler Checked;
|
|
|
|
RoutedEventHandler Indeterminate;
|
|
|
|
RoutedEventHandler Unchecked;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2013-06-02 14:32:43 +02:00
|
|
|
|
|
|
|
#endif //_SYSTEM_WINDOWS_CONTROLS_PRIMITIVES_TOGGLEBUTTON_
|