@page "/title"
@inject IStringLocalizer<Titles> Localizer

<h3>@Localizer["Title"]</h3>

<h4>@Localizer["SubTitle"]</h4>

<Tips>
    @((MarkupString)Localizer["Tips"].Value)
</Tips>

<DemoBlock Title="@Localizer["BasicUsageTitle"]" Introduction="@Localizer["BasicUsageIntro"]" Name="Normal">
    <Tips>
        <p>
            @((MarkupString)Localizer["BasicUsageTips"].Value)
        </p>
    </Tips>
    <p>@((MarkupString)Localizer["BasicUsageP"].Value)</p>
    <Pre>
@@page "/titles"
&lt;Title Text="@Localizer["BasicUsageTitleText"]" /&gt;
&lt;p&gt;@Localizer["BasicUsageP1"]&lt;p/&gt;</Pre>
</DemoBlock>

<DemoBlock Title="@Localizer["AdvanceTitle"]" Introduction="@Localizer["AdvanceIntro"]" Name="Advance">
    <p>
        <b>@Localizer["AdvanceB"]</b>
        <div>@((MarkupString)Localizer["AdvanceP"].Value)</div>
    </p>
    <Pre>[Inject]
[NotNull]
private TitleService? TitleService { get; set; }

protected override async Task OnAfterRenderAsync(bool firstRender)
{
    await base.OnAfterRenderAsync(firstRender);

    await TitleService.SetTitle("@Localizer["FuncationParmeter"]");
}</Pre>
</DemoBlock>

<DemoBlock Title="@Localizer["StaticTitle"]" Introduction="@Localizer["StaticIntro"]" Name="Static">
    <p>
        <b>@Localizer["StaticB"]</b>
        <div>@((MarkupString)Localizer["StaticDiv"].Value)</div>
    </p>
    <Pre>protected override async Task OnAfterRenderAsync(bool firstRender)
{
    await base.OnAfterRenderAsync(firstRender);

    await TitleService.SetTitle("@Localizer["FuncationParmeter"]");
}</Pre>
</DemoBlock>
