DotvvmChildEventCallback

Hard-code step content in markup

6/28/2023 9:29:01 AM

Details

diff --git a/src/Web/ViewModels/DefaultViewModel.cs b/src/Web/ViewModels/DefaultViewModel.cs
index ad2b807..2c06744 100644
--- a/src/Web/ViewModels/DefaultViewModel.cs
+++ b/src/Web/ViewModels/DefaultViewModel.cs
@@ -18,6 +18,16 @@ namespace Web.ViewModels
                 "Second",
                 "Third"
             }, 1);
+
+            Initialize();
+        }
+
+        private void Initialize()
+        {
+            First = new FirstViewModel();
+            if (!First.IsInitialized)
+                First.Initialize();
+
             Wizard.ShowNavigation();
         }
 
@@ -25,15 +35,6 @@ namespace Web.ViewModels
         {
             Wizard.OnNextClick();
 
-            if (Wizard.Step == 1)
-            {
-                if (First == null)  // TODO resolve with IOC
-                    First = new FirstViewModel();
-
-                if (!First.IsInitialized)
-                    First.Initialize();
-            }
-
             if (Wizard.Step == 2)
             {
                 if (Second == null)  // TODO resolve with IOC
diff --git a/src/Web/Views/Default.dothtml b/src/Web/Views/Default.dothtml
index 0065e16..96a8848 100644
--- a/src/Web/Views/Default.dothtml
+++ b/src/Web/Views/Default.dothtml
@@ -42,11 +42,76 @@
             </div>
         </div>
     </div>
-    <div class="container">
+    <div class="container mt-4">
         <div class="row">
             <div class="col-md-12">
                 <div IncludeInPage="{value: Wizard.Step == 1}">
                     <div DataContext="{value: First}">
+                        <blockquote class="blockquote">
+                            <p class="mb-0">
+                                It was the best of times, it was the worst of times, it was the age of
+                                wisdom, it was the age of foolishness, it was the epoch of belief, it was
+                                the epoch of incredulity, it was the season of Light, it was the season of
+                                Darkness, it was the spring of hope, it was the winter of despair, we had
+                                everything before us, we had nothing before us, we were all going direct
+                                to Heaven, we were all going direct the other way—in short, the period
+                                was so far like the present period, that some of its noisiest authorities
+                                insisted on its being received, for good or for evil, in the superlative
+                                degree of comparison only.
+                            </p>
+                            <footer class="blockquote-footer">Charles Dickens: <cite title="Source Title">A Tale of Two Cities</cite></footer>
+                        </blockquote>
+                    </div>
+                </div>
+                <div IncludeInPage="{value: Wizard.Step == 2}">
+                    <div DataContext="{value: Second}">
+                        <blockquote class="blockquote">
+                            <p class="mb-0">
+                                Call me Ishmael. Some years ago—never mind how long precisely—having little or
+                                no money in my purse, and nothing particular to interest me on shore, I thought
+                                I would sail about a little and see the watery part of the world. It is a way
+                                I have of driving off the spleen and regulating the circulation. Whenever I
+                                find myself growing grim about the mouth; whenever it is a damp, drizzly
+                                November in my soul; whenever I find myself involuntarily pausing before
+                                coffin warehouses, and bringing up the rear of every funeral I meet; and
+                                especially whenever my hypos get such an upper hand of me, that it requires a
+                                strong moral principle to prevent me from deliberately stepping into the street,
+                                and methodically knocking people’s hats off—then, I account it high time to get
+                                to sea as soon as I can. This is my substitute for pistol and ball. With a
+                                philosophical flourish Cato throws himself upon his sword; I quietly take to the
+                                ship. There is nothing surprising in this. If they but knew it, almost all men
+                                in their degree, some time or other, cherish very nearly the same feelings
+                                towards the ocean with me.
+                            </p>
+                            <footer class="blockquote-footer">Herman Melville: <cite title="Source Title">Moby Dick</cite></footer>
+                        </blockquote>
+                    </div>
+                </div>
+                <div IncludeInPage="{value: Wizard.Step == 3}">
+                    <div DataContext="{value: Third}">
+                        <blockquote class="blockquote">
+                            <p class="mb-0">
+                                No one would have believed in the last years of the nineteenth century that
+                                this world was being watched keenly and closely by intelligences greater than
+                                man’s and yet as mortal as his own; that as men busied themselves about their
+                                various concerns they were scrutinised and studied, perhaps almost as narrowly
+                                as a man with a microscope might scrutinise the transient creatures that swarm
+                                and multiply in a drop of water. With infinite complacency men went to and fro
+                                over this globe about their little affairs, serene in their assurance of their
+                                empire over matter. It is possible that the infusoria under the microscope do
+                                the same. No one gave a thought to the older worlds of space as sources of
+                                human danger, or thought of them only to dismiss the idea of life upon them as
+                                impossible or improbable. It is curious to recall some of the mental habits of
+                                those departed days. At most terrestrial men fancied there might be other men
+                                upon Mars, perhaps inferior to themselves and ready to welcome a missionary
+                                enterprise. Yet across the gulf of space, minds that are to our minds as ours
+                                are to those of the beasts that perish, intellects vast and cool and
+                                unsympathetic, regarded this earth with envious eyes, and slowly and surely
+                                drew their plans against us. And early in the twentieth century came the great
+                                disillusionment.
+                            </p>
+                            <footer class="blockquote-footer">H.G. Wells: <cite title="Source Title">The War of the Worlds</cite></footer>
+                        </blockquote>
                     </div>
                 </div>
             </div>