DOT

VVM

 DOCS

Version: 1.0 | 1.1 |

UpdateProgress

in namespace DotVVM.Framework.Controls

Container for content that will be displayed for the time the page is doing a postback.

Properties

Name Type Description Notes Default Value
ClientIDMode ClientIDMode Gets or sets the client ID generation algorithm.
attribute
inner element
static value
bindable
default
1
DataContext Object Gets or sets a data context for the control and its children. All value and command bindings are evaluated in context of this value.
attribute
inner element
static value
bindable
default
ID String Gets or sets the unique control ID.
attribute
inner element
static value
bindable
default
InnerText String Gets or sets the inner text of the HTML element.
attribute
inner element
static value
bindable
default
Visible Boolean Gets or sets whether the control is visible.
attribute
inner element
static value
bindable
default
True

Events

Name Type Description

Usage & Scenarios

Container for content that will be displayed for the time the page is doing a postback.

HTML Rendered by the Control

The content of the UpdateProgress is wrapped in the <div> element.

<div data-bind="..." style="display: none">
</div>

Sample 1: UpdateProgress

The content inside the UpdateProgress will appear when the user clicks the button. When the postback completes, the content will disappear.

@viewModel DotvvmWeb.Views.Docs.Controls.builtin.UpdateProgress.sample1.ViewModel, DotvvmWeb

<dot:Button Text="Perform difficult calculation" Click="{command: CalculateIt()}" />

<p>{{value: Result}}</p>

<dot:UpdateProgress>
	<h4>Calculating...</h4>
</dot:UpdateProgress>
using System;
using System.Threading;
using DotVVM.Framework.ViewModel;

namespace DotvvmWeb.Views.Docs.Controls.builtin.UpdateProgress.sample1
{
    public class ViewModel : DotvvmViewModelBase
    {
        public int Result { get; set; }

        public void CalculateIt()
        {
            // the calculation is very complicated and it takes a lot of time to get the result
            Thread.Sleep(5000);

            var random = new Random(DateTime.Now.Millisecond);
            Result = random.Next();
        }

    }
}

Suggestions


Help & Contribute

The documentation is maintained on GitHub.
We'll be happy if you edit the page and create a pull request.

Send message