diff --git a/aspnetcore/client-side/spa/blazor/get-started/samples_snapshot/3.x/Counter1.cshtml b/aspnetcore/client-side/spa/blazor/get-started/samples_snapshot/3.x/Counter1.cshtml
index e7244066a267..691a329347f7 100644
--- a/aspnetcore/client-side/spa/blazor/get-started/samples_snapshot/3.x/Counter1.cshtml
+++ b/aspnetcore/client-side/spa/blazor/get-started/samples_snapshot/3.x/Counter1.cshtml
@@ -7,9 +7,9 @@
Click me
@functions {
- int currentCount = 0;
+ private int currentCount = 0;
- void IncrementCount()
+ private void IncrementCount()
{
currentCount++;
}
diff --git a/aspnetcore/client-side/spa/blazor/get-started/samples_snapshot/3.x/Counter2.cshtml b/aspnetcore/client-side/spa/blazor/get-started/samples_snapshot/3.x/Counter2.cshtml
index d8c824a3d37a..bf5adca257fb 100644
--- a/aspnetcore/client-side/spa/blazor/get-started/samples_snapshot/3.x/Counter2.cshtml
+++ b/aspnetcore/client-side/spa/blazor/get-started/samples_snapshot/3.x/Counter2.cshtml
@@ -1,9 +1,9 @@
@functions {
- int currentCount = 0;
+ private int currentCount = 0;
- [Parameter] int IncrementAmount { get; set; } = 1;
+ [Parameter] private int IncrementAmount { get; set; } = 1;
- void IncrementCount()
+ private void IncrementCount()
{
currentCount += IncrementAmount;
}
diff --git a/aspnetcore/client-side/spa/blazor/index.md b/aspnetcore/client-side/spa/blazor/index.md
index f8050c784aea..927df3c8cc70 100644
--- a/aspnetcore/client-side/spa/blazor/index.md
+++ b/aspnetcore/client-side/spa/blazor/index.md
@@ -5,7 +5,7 @@ description: Explore ASP.NET Core Blazor, a new way to build interactive client-
monikerRange: '>= aspnetcore-3.0'
ms.author: riande
ms.custom: mvc
-ms.date: 03/28/2019
+ms.date: 04/08/2019
uid: spa/blazor/index
---
# Introduction to Blazor
@@ -66,7 +66,7 @@ The following markup is an example of a custom dialog component in a Razor file
@Title
@BodyContent
- OK
+ OK
@functions {
diff --git a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Components/ListViewTemplate.cshtml b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Components/ListViewTemplate.cshtml
index 8a6b658b825a..5d1e16e32e86 100644
--- a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Components/ListViewTemplate.cshtml
+++ b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Components/ListViewTemplate.cshtml
@@ -8,6 +8,6 @@
@functions {
- [Parameter] RenderFragment ItemTemplate { get; set; }
- [Parameter] IReadOnlyList Items { get; set; }
+ [Parameter] private RenderFragment ItemTemplate { get; set; }
+ [Parameter] private IReadOnlyList Items { get; set; }
}
diff --git a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Components/Tab.cshtml b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Components/Tab.cshtml
index 4ac4d17fe521..9bdbd87f2add 100644
--- a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Components/Tab.cshtml
+++ b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Components/Tab.cshtml
@@ -3,17 +3,17 @@
@implements ITab
-
+
@Title
@functions {
- [CascadingParameter] TabSet ContainerTabSet { get; set; }
- [Parameter] string Title { get; set; }
+ [CascadingParameter] private TabSet ContainerTabSet { get; set; }
+ [Parameter] private string Title { get; set; }
[Parameter] public RenderFragment ChildContent { get; private set; }
- string TitleCssClass => ContainerTabSet.ActiveTab == this ? "active" : null;
+ private string TitleCssClass => ContainerTabSet.ActiveTab == this ? "active" : null;
protected override void OnInit()
{
@@ -25,7 +25,7 @@
ContainerTabSet.RemoveTab(this);
}
- void Activate()
+ private void Activate()
{
ContainerTabSet.SetActivateTab(this);
}
diff --git a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Components/TabSet.cshtml b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Components/TabSet.cshtml
index bf03bcb440af..4b0d14dbc29a 100644
--- a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Components/TabSet.cshtml
+++ b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Components/TabSet.cshtml
@@ -13,7 +13,7 @@
@functions {
- [Parameter] RenderFragment ChildContent { get; set; }
+ [Parameter] private RenderFragment ChildContent { get; set; }
public ITab ActiveTab { get; private set; }
diff --git a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Components/TableTemplate.cshtml b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Components/TableTemplate.cshtml
index 68c6e2c85388..b7393be16699 100644
--- a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Components/TableTemplate.cshtml
+++ b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Components/TableTemplate.cshtml
@@ -16,8 +16,8 @@
@functions {
- [Parameter] RenderFragment TableHeader { get; set; }
- [Parameter] RenderFragment RowTemplate { get; set; }
- [Parameter] RenderFragment TableFooter { get; set; }
- [Parameter] IReadOnlyList Items { get; set; }
+ [Parameter] private RenderFragment TableHeader { get; set; }
+ [Parameter] private RenderFragment RowTemplate { get; set; }
+ [Parameter] private RenderFragment TableFooter { get; set; }
+ [Parameter] private IReadOnlyList Items { get; set; }
}
diff --git a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/BlazorRocksBase.cs b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/BlazorRocksBase.cs
index 64b56fe344b0..d746dc9395d4 100644
--- a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/BlazorRocksBase.cs
+++ b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/BlazorRocksBase.cs
@@ -2,5 +2,6 @@
public class BlazorRocksBase : ComponentBase
{
- public string BlazorRocksText { get; set; } = "Blazor rocks the browser!";
+ public string BlazorRocksText { get; set; } =
+ "Blazor rocks the browser!";
}
diff --git a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/CascadingValuesParametersTabSet.cshtml b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/CascadingValuesParametersTabSet.cshtml
index 1957f7d52af8..b753fd0e84fa 100644
--- a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/CascadingValuesParametersTabSet.cshtml
+++ b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/CascadingValuesParametersTabSet.cshtml
@@ -8,7 +8,7 @@
Greetings from the first tab!
-
+
Toggle third tab
@@ -49,7 +49,7 @@ namespace BlazorSample.UIInterfaces
<h4>Greetings from the first tab!</h4>
<label>
- <input type="checkbox" bind=@@showThirdTab />
+ <input type="checkbox" bind="@@showThirdTab" />
Toggle third tab
</label>
</Tab>
@@ -68,7 +68,7 @@ namespace BlazorSample.UIInterfaces
@@functions
{
- bool showThirdTab;
+ private bool showThirdTab;
}
TabSet.csthml
@@ -90,7 +90,7 @@ namespace BlazorSample.UIInterfaces
</div>
@@functions {
- [Parameter] RenderFragment ChildContent { get; set; }
+ [Parameter] private RenderFragment ChildContent { get; set; }
public ITab ActiveTab { get; private set; }
@@ -129,17 +129,17 @@ namespace BlazorSample.UIInterfaces
@@implements ITab
<li>
- <a onclick=@@Activate class="nav-link @@TitleCssClass" role="button">
+ <a onclick="@@Activate" class="nav-link @@TitleCssClass" role="button">
@@Title
</a>
</li>
@@functions {
- [CascadingParameter] TabSet ContainerTabSet { get; set; }
- [Parameter] string Title { get; set; }
+ [CascadingParameter] private TabSet ContainerTabSet { get; set; }
+ [Parameter] private string Title { get; set; }
[Parameter] public RenderFragment ChildContent { get; private set; }
- string TitleCssClass => ContainerTabSet.ActiveTab == this ? "active" : null;
+ private string TitleCssClass => ContainerTabSet.ActiveTab == this ? "active" : null;
protected override void OnInit()
{
@@ -151,7 +151,7 @@ namespace BlazorSample.UIInterfaces
ContainerTabSet.RemoveTab(this);
}
- void Activate()
+ private void Activate()
{
ContainerTabSet.SetActivateTab(this);
}
@@ -159,5 +159,5 @@ namespace BlazorSample.UIInterfaces
@functions
{
-bool showThirdTab;
+ private bool showThirdTab;
}
diff --git a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/CascadingValuesParametersTheme.cshtml b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/CascadingValuesParametersTheme.cshtml
index c00a424e8265..020de77a2e83 100644
--- a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/CascadingValuesParametersTheme.cshtml
+++ b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/CascadingValuesParametersTheme.cshtml
@@ -11,11 +11,11 @@
Increment Counter (Themed)
@functions {
- int currentCount = 0;
+ private int currentCount = 0;
[CascadingParameter] protected ThemeInfo ThemeInfo { get; set; }
- void IncrementCount()
+ private void IncrementCount()
{
currentCount++;
}
@@ -39,7 +39,7 @@
</div>
@@functions {
- ThemeInfo theme = new ThemeInfo { ButtonClass = "btn-success" };
+ private ThemeInfo theme = new ThemeInfo { ButtonClass = "btn-success" };
}
This component (CascadingValuesParametersTheme.cshtml ) receives the ThemeInfo
as a CascadingParameter
. The parameter is used to style one of the buttons:
@@ -49,11 +49,11 @@
<button class="btn @@ThemeInfo.ButtonClass" onclick="@@IncrementCount">Increment Counter (Themed)</button>
@@functions {
- int currentCount = 0;
+ private int currentCount = 0;
[CascadingParameter] protected ThemeInfo ThemeInfo { get; set; }
- void IncrementCount()
+ private void IncrementCount()
{
currentCount++;
}
diff --git a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/HeadingComponent.cshtml b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/HeadingComponent.cshtml
index d21318cfe03f..3aaab449f1f7 100644
--- a/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/HeadingComponent.cshtml
+++ b/aspnetcore/razor-components/common/samples/3.x/BlazorSample/Pages/HeadingComponent.cshtml
@@ -15,7 +15,7 @@
@_headingText