Widget Application
This is the widgets core. Your widget's App.xaml.cs has to inherit this class. It handles widget to BeWidgets communication and widget's initialization.
This class enables you to change widget's menu. You can use the WidgetApplication constructor to set default main options or set your own CustomSettings, PreferencesPage, AppearancePage or WidgetPage, but changing these is not neccessary and is not really recommended.
Default main options
You can change the default main settings of a widget. Main settings are settings that are same for every widget. For example its position, size and whether it is movable or not. The default main option allow you to change these default values.
Properties
Name | Type | Description | Default |
---|---|---|---|
Width | int | Widgets default width. | 300 |
Height | int | Widgets default height. | 150 |
Usage
C#
public partial class App : WidgetApplication
{
public App() : base(typeof(CustomSettings),
typeof(PreferencesPage),
typeof(AppearancePage),
typeof(WidgetPage),
new DefaultMainOptions { Width = 500, Height = 250 })
{ // Insert the line above into the constructor to set default main options
this.InitializeComponent();
}
}