Update Blazor common sample example (#18874)

pull/18894/head
Luke Latham 2020-06-21 15:41:37 -05:00 committed by GitHub
parent 9644fe8b77
commit 1c49b0faf7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 28 additions and 28 deletions

View File

@ -1,8 +1,8 @@
@using BlazorSample.UIInterfaces
@using BlazorSample.UIInterfaces
@implements ITab
<li>
<a @onclick="Activate" class="nav-link @TitleCssClass" role="button">
<a @onclick="ActivateTab" class="nav-link @TitleCssClass" role="button">
@Title
</a>
</li>
@ -24,8 +24,8 @@
ContainerTabSet.AddTab(this);
}
private void Activate()
private void ActivateTab()
{
ContainerTabSet.SetActivateTab(this);
ContainerTabSet.SetActiveTab(this);
}
}

View File

@ -1,4 +1,4 @@
@using BlazorSample.UIInterfaces
@using BlazorSample.UIInterfaces
<!-- Display the tab headers -->
<CascadingValue Value=this>
@ -22,7 +22,7 @@
{
if (ActiveTab == null)
{
SetActivateTab(tab);
SetActiveTab(tab);
}
}
@ -30,11 +30,11 @@
{
if (ActiveTab == tab)
{
SetActivateTab(null);
SetActiveTab(null);
}
}
public void SetActivateTab(ITab tab)
public void SetActiveTab(ITab tab)
{
if (ActiveTab != tab)
{

View File

@ -97,7 +97,7 @@ namespace BlazorSample.UIInterfaces
{
if (ActiveTab == null)
{
SetActivateTab(tab);
SetActiveTab(tab);
}
}
@ -105,11 +105,11 @@ namespace BlazorSample.UIInterfaces
{
if (ActiveTab == tab)
{
SetActivateTab(null);
SetActiveTab(null);
}
}
public void SetActivateTab(ITab tab)
public void SetActiveTab(ITab tab)
{
if (ActiveTab != tab)
{
@ -127,7 +127,7 @@ namespace BlazorSample.UIInterfaces
@@implements ITab
&lt;li&gt;
&lt;a @@onclick="Activate" class="nav-link @@TitleCssClass" role="button"&gt;
&lt;a @@onclick="ActivateTab" class="nav-link @@TitleCssClass" role="button"&gt;
@@Title
&lt;/a&gt;
&lt;/li&gt;
@ -149,9 +149,9 @@ namespace BlazorSample.UIInterfaces
ContainerTabSet.AddTab(this);
}
private void Activate()
private void ActivateTab()
{
ContainerTabSet.SetActivateTab(this);
ContainerTabSet.SetActiveTab(this);
}
}</code></pre>

View File

@ -1,8 +1,8 @@
@using BlazorSample.UIInterfaces
@using BlazorSample.UIInterfaces
@implements ITab
<li>
<a @onclick="Activate" class="nav-link @TitleCssClass" role="button">
<a @onclick="ActivateTab" class="nav-link @TitleCssClass" role="button">
@Title
</a>
</li>
@ -24,8 +24,8 @@
ContainerTabSet.AddTab(this);
}
private void Activate()
private void ActivateTab()
{
ContainerTabSet.SetActivateTab(this);
ContainerTabSet.SetActiveTab(this);
}
}

View File

@ -1,4 +1,4 @@
@using BlazorSample.UIInterfaces
@using BlazorSample.UIInterfaces
<!-- Display the tab headers -->
<CascadingValue Value=this>
@ -22,7 +22,7 @@
{
if (ActiveTab == null)
{
SetActivateTab(tab);
SetActiveTab(tab);
}
}
@ -30,11 +30,11 @@
{
if (ActiveTab == tab)
{
SetActivateTab(null);
SetActiveTab(null);
}
}
public void SetActivateTab(ITab tab)
public void SetActiveTab(ITab tab)
{
if (ActiveTab != tab)
{

View File

@ -97,7 +97,7 @@ namespace BlazorSample.UIInterfaces
{
if (ActiveTab == null)
{
SetActivateTab(tab);
SetActiveTab(tab);
}
}
@ -105,11 +105,11 @@ namespace BlazorSample.UIInterfaces
{
if (ActiveTab == tab)
{
SetActivateTab(null);
SetActiveTab(null);
}
}
public void SetActivateTab(ITab tab)
public void SetActiveTab(ITab tab)
{
if (ActiveTab != tab)
{
@ -127,7 +127,7 @@ namespace BlazorSample.UIInterfaces
@@implements ITab
&lt;li&gt;
&lt;a @@onclick="Activate" class="nav-link @@TitleCssClass" role="button"&gt;
&lt;a @@onclick="ActivateTab" class="nav-link @@TitleCssClass" role="button"&gt;
@@Title
&lt;/a&gt;
&lt;/li&gt;
@ -149,9 +149,9 @@ namespace BlazorSample.UIInterfaces
ContainerTabSet.AddTab(this);
}
private void Activate()
private void ActivateTab()
{
ContainerTabSet.SetActivateTab(this);
ContainerTabSet.SetActiveTab(this);
}
}</code></pre>