The flicker effect is caused by the fade-in and fade-out animation. In the current project the menu component implements the appear and disappear operation with a short opacity fade effect. When switching between the menus for a short period both menus are semitransparent.
These fade-in and fade-out animations exist in the default menu template as they provide an often desired behaviors. Because of the template idea you can modify, extend or even remove functionality from the menu created from the template.
To disable the fade-in and fade-out effects modify first the method BasicClass::BasicGroup.FadeIn so it contains only following code:
// If an owner group has been specified -> the panel should be added now to
// this group. Dont't forget to remove the panel again from the group when
// the panel is closed.
autoRemove = ( aOwner != null );
// If no owner group has been specified, assume that the panel already belongs
// to a group and thus is visible.
if ( aOwner == null )
aOwner = Owner;
// As already mentioned, the panel should have an owner where it can be seen
if ( aOwner == null )
throw "No owner group known where the panel should appear";
// If the panel is still not arranged within an owner group -> do it now.
if ( aOwner != Owner )
{
if ( Owner != null )
throw "Panel already belongs to an owner group";
// Add the panel to the group
aOwner.Add( this, 0 );
}
In the second step modify the method BasicClass::BasicGroup.FadeOut so it contains only following code:
// In case of 'fade-out' effect -> remove the panel from its owner group if it
// was specified explicitly in the previous FadeIn() call.
if ( autoRemove && ( FadeInOutEffect.Value == 0 ))
Owner.Remove( this );
These adaptations cause the menus to appear/disappaer immediately. If you like you can cleanup the BasicClass::BasicGroup now. e.g. remove the members FadeInOutEffect and onFinishEffect as these are not needed anymore.
Important in this context is to understand the idea of 'templates'. With Embedded Wizard we provide a set of component templates like the menu, which can be simply integrated in your project. These templates contain already predefined behavior and appearance. This is the starting point for EmWi developers.
When you drag a component template to your project you create a copy of the template. Now you can modify this copy. Add new behavior. Change its default look and feel. Or even remove undesired functionality. You are also free to create multiple copies from the same template and implement these in a different manner.
Hope it helps you further.