Skip to content

Commit 80d8ef4

Browse files
chore(common): rename functions to code
1 parent eb316ae commit 80d8ef4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+92
-92
lines changed

_contentTemplates/chart/link-to-basics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Bar and Column charts can take the color of the series item from the `ColorField
2424
</TelerikChartLegend>
2525
</TelerikChart>
2626
27-
@functions {
27+
@code {
2828
public class MyChartDataModel
2929
{
3030
public string Category { get; set; }

_contentTemplates/common/get-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ To get access to the UI for Blazor components, follow these steps:
101101

102102
@helloString
103103

104-
@functions {
104+
@code {
105105
MarkupString helloString;
106106

107107
void SayHelloHandler()

common-features/input-validation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Simple textbox-like inputs do not have any special behavior. You need to bind th
6868
<button type="submit">Submit</button>
6969
</EditForm>
7070
71-
@functions {
71+
@code {
7272
// Usually this class would be in a different file
7373
public class Person
7474
{
@@ -128,7 +128,7 @@ The DropDownList always has an item selected - the first item from its data sour
128128
<button type="submit">Submit</button>
129129
</EditForm>
130130
131-
@functions {
131+
@code {
132132
// Usually the model classes would be in different files
133133
public class Person
134134
{

components/animationcontainer/overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ To use the animation container, add the `TelerikAnimationContainer` tag.
2727
2828
<TelerikButton OnClick="@ToggleContainer">Toggle Animation Container</TelerikButton>
2929
30-
@functions {
30+
@code {
3131
public bool Shown { get; set; } = false;
3232
3333
public void ToggleContainer()
@@ -79,7 +79,7 @@ The animation container exposes the following properties:
7979
8080
<TelerikButton OnClick="@ToggleContainer">Toggle Animation Container</TelerikButton>
8181
82-
@functions {
82+
@code {
8383
public bool Shown { get; set; } = false;
8484
public AnimationType AnimType { get; set; } = AnimationType.Fade;
8585
public void ToggleContainer()

components/button/overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ To add a Telerik Button to your Blazor app, use the `<TelerikButton>` tag:
3737
3838
<TelerikButton ref="@theButton">Hello!</TelerikButton>
3939
40-
@functions{
40+
@code{
4141
Telerik.Blazor.Components.Button.TelerikButton theButton;
4242
}
4343
````
@@ -55,7 +55,7 @@ To attach a click handler, use the `OnClick` attribute and define the method in
5555
5656
@someVariable
5757
58-
@functions {
58+
@code {
5959
MarkupString someVariable;
6060
6161
void myHandler()

components/calendar/navigation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The user starts in April 2019 and can navigate between January 2019 and July 201
2828
<br />
2929
3030
<TelerikCalendar Date="@startDate" View="@CalendarView.Month" Min="@minDate" Max="@maxDate"></TelerikCalendar>
31-
@functions {
31+
@code {
3232
DateTime startDate = new DateTime(2019, 4, 1);
3333
DateTime minDate = new DateTime(2019, 1, 1);
3434
DateTime maxDate = new DateTime(2019, 7, 31);
@@ -69,7 +69,7 @@ The user starts in the Decade view and can only go down to years.
6969
7070
The selected date is: @selectedDate
7171
72-
@functions {
72+
@code {
7373
private DateTime min = new DateTime(2015, 1, 1);
7474
private DateTime max = new DateTime(2025, 12, 31);
7575
private string selectedDate = "";
@@ -99,7 +99,7 @@ You can make the Calendar component move to a certain date and view through its
9999
<TelerikButton OnClick="@NavigateCalendarProgrammatically">Go to new date and view</TelerikButton>
100100
<TelerikCalendar Date="@startDate" Max="@maxDate" Min="@minDate" View="@Telerik.Blazor.CalendarView.Decade" ref="@theCalendar"></TelerikCalendar>
101101
102-
@functions{
102+
@code{
103103
DateTime startDate = new DateTime(2345, 11, 22);
104104
DateTime maxDate = new DateTime(2400, 11, 22);
105105
DateTime minDate = new DateTime(1800, 11, 22);

components/calendar/overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ To use a Telerik Calendar for Blazor, add the `TelerikCalendar` tag.
2626
<br />
2727
The selected date is: @selectedDate
2828
29-
@functions {
29+
@code {
3030
3131
private DateTime min = new DateTime(2015, 1, 1);
3232
private DateTime max = new DateTime(2025, 12, 31);
@@ -53,7 +53,7 @@ The selected date is: @selectedDate
5353
<TelerikCalendar ref="@myCalendarReference">
5454
</TelerikCalendar>
5555
56-
@functions {
56+
@code {
5757
Telerik.Blazor.Components.Calendar.TelerikCalendar myCalendarReference;
5858
}
5959
````

components/calendar/selection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ The user will not be able to select the first and second of April 2019.
7171
</ul>
7272
}
7373
74-
@functions {
74+
@code {
7575
private DateTime startDate = new DateTime(2019, 4, 1);//set the initial date of the calendar
7676
7777
//set dates the user can't select

components/chart/data-bind.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ With this approach, the items in each series are independent from the other seri
4646
</TelerikChartCategoryAxes>
4747
</TelerikChart>
4848
49-
@functions {
49+
@code {
5050
public List<object> data1 = new List<object>() { 1, 2, 3, 4 };
5151
public List<object> data2 = new List<object>() { 2, 3, 4, 5 };
5252
public string[] xAxisItems = new string[] { "Q1", "Q2", "Q3", "Q4" };
@@ -84,7 +84,7 @@ With this, the items from the series will be matched to the items (categories) o
8484
</TelerikChartSeriesItems>
8585
</TelerikChart>
8686
87-
@functions {
87+
@code {
8888
public class MyDataModel
8989
{
9090
public string MySharedCategories { get; set; }
@@ -122,7 +122,7 @@ With this, the items from the series will be matched to the items (categories) o
122122
</TelerikChartSeriesItems>
123123
</TelerikChart>
124124
125-
@functions {
125+
@code {
126126
public class MyDataModel
127127
{
128128
public string FirstSeriesCategories { get; set; }
@@ -163,7 +163,7 @@ With this, the items from the series will be matched to the items (categories) o
163163
</TelerikChartSeriesItems>
164164
</TelerikChart>
165165
166-
@functions {
166+
@code {
167167
public class MyDataModel
168168
{
169169
public string FirstSeriesCategories { get; set; }
@@ -215,7 +215,7 @@ For example, you can take the data for some series from a complex model, and the
215215
</TelerikChartCategoryAxes>
216216
</TelerikChart>
217217
218-
@functions {
218+
@code {
219219
public List<object> standaloneData = new List<object>() { 3, 4, 5, 6 };
220220
public string[] xAxisItems = new string[] { "Q1", "Q2", "Q3", "Q4" };
221221
@@ -260,7 +260,7 @@ For example, you can take the data for some series from a complex model, and the
260260
</TelerikChartCategoryAxes>
261261
</TelerikChart>
262262
263-
@functions {
263+
@code {
264264
public List<object> standaloneData = new List<object>() { 3, 4, 5, 6 };
265265
266266
//the standalone categories will be ignored if they are data bound from a series configuration

components/chart/labels-template-and-format.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Where the labels are numerical (series values, the value axis), you can format t
4242
</TelerikChartLegend>
4343
</TelerikChart>
4444
45-
@functions {
45+
@code {
4646
public class MyChartDataModel
4747
{
4848
public double TheValue { get; set; }
@@ -116,7 +116,7 @@ To add a new line, use the `\n` symbol.
116116
</TelerikChartLegend>
117117
</TelerikChart>
118118
119-
@functions {
119+
@code {
120120
public string MySeriesTemplate = "value: #=value#\nfor category: #=category#\nextra info: #=dataItem.ExtraData#";
121121
public string MyCategoryAxisTemplate = "#=value# quarter";
122122
public string MyValueAxisTemplate = "#=value# million";

0 commit comments

Comments
 (0)