Wisej.NET Examples
HomeSupportDocumentation
  • Introduction
  • Tutorials
    • StockViewer
      • Structure
      • User Interface
      • Animations
      • Localization
      • Code
  • Examples
    • AspNetAuthentication
    • BackgroundTasks
    • Buttons
    • ChartJS
    • CodeProject
    • CustomCellRenderer
    • CustomPainting
    • DataBinding
    • DataRepeaterDragDrop
    • DeepLinking
    • Download
    • EditorsChoice
    • FullCalendar
    • GoogleMaps
    • KeyboardHandling
    • LazyLoadingPanel
    • Localization
    • MDIExample
    • ModalWorkflow
    • NavigationBar
    • Pannellum
    • ProgressCircle
    • Responsive
    • RibbonBar
    • SimpleChat
    • SlideBar
    • SmoothieChart
    • TagInput
    • TourPanel
    • TreeGrid
    • UploadFiles
    • UserControl
    • UserDesktop
    • UserPaintCells
  • Premium
    • Syncfusion EJ2 DocumentEditor
    • Syncfusion EJ2 FileManager
    • Syncfusion EJ2 PdfViewer
    • KendoUI Captcha
    • KendoUI TaskBoard
Powered by GitBook
On this page
  • Animation Extender
  • Stylesheet Extender

Was this helpful?

Export as PDF
  1. Tutorials
  2. StockViewer

Animations

PreviousUser InterfaceNextLocalization

Last updated 4 years ago

Was this helpful?

When you run the application you will notice two animations:

  • Blinking of the stock value that has been updated

  • Smooth motion when changing the layout

Animation Extender

In this case, the blink animation has been applied to the DataRepeater template panel without an event. Therefore the animation will run only if invoked by code.

Since the Animation extender exposes a complex property with child fields it is not replicated by the DataRepeater. With a simple handler for the ItemCloned event we can add the blink animation to the repeated items:

private void dataRepeater_ItemCloned(object sender, DataRepeaterItemEventArgs e)
{
    this.animation.GetAnimation(e.DataRepeaterItem).Name = "blink";
}

When the text of the value label is changed by the data binding layer, we handle the TextChanged property and run the animation.

private void labelValue_TextChanged(object sender, EventArgs e)
{
    // animate the item when the value changes.
    var control = (Control)sender;
    if (control.Parent != null)
        this.animation.Run(control.Parent);
}

Stylesheet Extender

A second way to add simple animations is to use the Stylesheet extender to add a transition style to the elements.

For the MainView, we simply added a general transition to all div elements:

div {
    transition: top 250ms, left 250ms
}

When Wisej moves the controls into their new position because the responsive property for a client profile kicks in, the element will move to the target location in 250 milliseconds.

Wisej can add animations (even multiple animations) to any control or container simply by dropping one or more instances of the Animation extender to a container. All the child controls will show a new Animation property in the designer.

⭐
Animations
Animation properties
MainView with the Stylesheet extender