title: Blazor CascadingValue programmatically
body: <p>I created a own base Component and i want all my Page components inhertis from this base Component</p>
  
  <pre><code>public class BaseComponent : ComponentBase
  {
      // ...
  }
  </code></pre>
  
  <p>a Page Component:</p>
  
  <pre><code>@page "/apage"
  @inherits BaseComponent
  &lt;CascadingValue Value="this"&gt;
      &lt;div&gt;
          &lt;MyOtherComponent /&gt;
      &lt;/div&gt;
  &lt;/CascadingValue&gt;
  </code></pre>
  
  <p>In MyOtherComponent i want to do:</p>
  
  <pre><code>[CascadingParameter]
  public BaseComponent BaseComponent { get; set; }
  </code></pre>
  
  <p>Till here all works. But i want to improve and i want every page component should make <code>CascadingValue Value="this"</code> because every page which inherits from BaseComponent should give the BaseComponent reference to all child components which need the reference.</p>
  
  <p>So a Page Component should be like this:</p>
  
  <pre><code>@page "/apage"
  @inherits BaseComponent
  &lt;div&gt;
      &lt;MyOtherComponent /&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And the logic for CascadingValue Value="this" should be moved into BaseComponent.<br>
  How i can do this?</p>