In the
previous chapter you
have created your first MForm control. However you did that in the project where
everything was already set up. If you plan to use MForm in your own project, you
will need to set up the environment.
Some default stylesheets have been prepared to make MForm look appealing. These
stylesheets are divided into several files, each file controls different parts of
the MForm framework.
The most important stylesheet that is always consumed by the MForm controls is:
~/Resources/MForm/Common/Css/main.css,
Depending on which MForm features you use, you will need some of the following stylesheets:
~/Resources/MForm/Title/Css/main.css - stylesheet used with the MForm
Title control,
~/Resources/MForm/VerticalTableDisplay/Css/main.css - stylesheet used
with the VerticalTableDisplayModifier,
~/Resources/MForm/HorizontalTableDisplay/Css/main.css - stylesheet
used with the HorizontalTableDisplayModifier,
~/Resources/MForm/Leaf/Css/main.css - stylesheet used with the MForm
Leaf item control,
~/Resources/MForm/ValueHandler/Css/main.css - stylesheet used with
standard MForm value handlers,
~/Resources/MForm/BubbleTooltip/Css/main.css - stylesheet used with
the BubbleTooltipAddition,
~/Resources/MForm/ErrorLabel/Css/main.css - stylesheet used with the
error descriptions,
~/Resources/MForm/Tabs/Css/main.css - stylesheet used with the MForm
tab functionality,
There are also some other stylesheets defined in this project that are not necessary
for the MForm framework, but you may find them interesting:
~/Resources/Controls/Column/Css/main.css - stylesheet used to display
MForm leaf items in two columns,
Finally, this project uses its own stylesheets that affect the display. If you just
want to start your new project and you are happy with this project's display, you
can use it too.
~/Resources/Example/Layout/Css/main.css - stylesheet that defines the
standard page layout,
~/Resources/Example/Typography/Css/main.css - stylesheet that defines
the standard page typography,
Libraries needed to use MForm
The following libraries should be added to the project that uses MForm control:
- BM.Tools.WebControls.MForm - MForm library
- BM.Tools.Xml.Schema - a library that facilitates
reading XML schema files. It is needed to run the MForm generator
- AjaxControlToolkit - MForm controls use some concepts
from this library
MForm controls namespaces
The following namespaces may be used inside .aspx pages:
- BM.Tools.WebControls.MForm.Controls - the namespace
for MForm definition controls.
- BM.Tools.WebControls.MForm.Controls.Additions - the
namespace for MForm Addition controls.
- BM.Tools.WebControls.MForm.Controls.Additions.Actions
- the namespace for MForm actions.
- BM.Tools.WebControls.MForm.Controls.Modifiers - the
namespace for MForm Modifier controls.
- BM.Tools.WebControls.MForm.Controls.ValueHandlers
- the namespace for MForm value handler controls.
You can also simply paste in the page register part: