Skip to content

Commit 77e30f0

Browse files
Merge pull request #15 from Nevitha-Ravi/master
Schedule, Accordion, Tab, Toolbar samples committed
2 parents ddf494f + 1dfb517 commit 77e30f0

File tree

10 files changed

+149
-236
lines changed

10 files changed

+149
-236
lines changed

ej2-blazor-samples/Pages/Navigations/Accordion/DefaultFunctionalities.razor

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
<div class="control_wrapper accordion-control-section">
1717

1818
<EjsAccordion ID="defaultAccordion">
19+
<AccordionAnimationSettings>
20+
<AccordionAnimationCollapse Effect="SlideDown" Duration="400" Easing="linear"></AccordionAnimationCollapse>
21+
<AccordionAnimationExpand Effect="SlideDown" Duration="400" Easing="linear"></AccordionAnimationExpand>
22+
</AccordionAnimationSettings>
1923
<AccordionItems>
2024
<AccordionItem Expanded="true" Header="ASP.NET" Content="Microsoft ASP.NET is a set of technologies in the Microsoft .NET Framework for building Web applications and XML Web services. ASP.NET pages execute on the server and generate markup such as HTML, WML, or XML that is sent to a desktop or mobile browser. ASP.NET pages use a compiled,event-driven programming model that improves performance and enables the separation of application logic and user interface."></AccordionItem>
2125
<AccordionItem Header="ASP.NET MVC" Content="The Model-View-Controller (MVC) architectural pattern separates an application into three main components: the model, the view, and the controller. The ASP.NET MVC framework provides an alternative to the ASP.NET Web Forms pattern for creating Web applications. The ASP.NET MVC framework is a lightweight, highly testable presentation framework that (as with Web Forms-based applications) is integrated with existing ASP.NET features, such as master pages and membership-based authentication."></AccordionItem>
@@ -38,7 +42,7 @@
3842
}
3943
</style>
4044

41-
@functions{
45+
@code{
4246

4347

4448
}

ej2-blazor-samples/Pages/Navigations/Accordion/Icons.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@
204204
}
205205
</style>
206206

207-
@functions{
207+
@code{
208208

209209
}
210210

ej2-blazor-samples/Pages/Navigations/Tab/DefaultFunctionalities.razor

Lines changed: 14 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,15 @@
2727

2828
<div class="col-lg-12 control-section">
2929
<div class="e-sample-resize-container">
30-
@*<EjsTab id="defaultTab" Items="@TabItems">
31-
</EjsTab>*@
3230
<EjsTab ID="defaultTab">
31+
<TabAnimationSettings>
32+
<TabAnimationPrevious Effect="SlideRightIn" Duration="600" Easing="ease"></TabAnimationPrevious>
33+
<TabAnimationNext Effect="SlideLeftIn" Duration="600" Easing="ease"></TabAnimationNext>
34+
</TabAnimationSettings>
3335
<TabItems>
34-
<TabItem Header="@header1" Content="@content1"></TabItem>
35-
<TabItem Header="@header2" Content="@content2"></TabItem>
36-
<TabItem Header="@header3" Content="@content3"></TabItem>
36+
<TabItem Header="@Header1" Content="@Content1"></TabItem>
37+
<TabItem Header="@Header2" Content="@Content2"></TabItem>
38+
<TabItem Header="@Header3" Content="@Content3"></TabItem>
3739
</TabItems>
3840
</EjsTab>
3941
</div>
@@ -75,51 +77,28 @@
7577
}
7678
</style>
7779

78-
@functions{
80+
@code{
7981

80-
public object header1 = new { text = "Twitter", iconCss = "e-twitter" };
81-
public object header2 = new { text = "Facebook", iconCss = "e-facebook" };
82-
public object header3 = new { text = "Whatsapp", iconCss = "e-whatsapp" };
82+
public object Header1 = new { text = "Twitter", iconCss = "e-twitter" };
83+
public object Header2 = new { text = "Facebook", iconCss = "e-facebook" };
84+
public object Header3 = new { text = "Whatsapp", iconCss = "e-whatsapp" };
8385

84-
public string content1 = "witter is an online social networking service that enables users to send and read short 140-character" +
86+
public string Content1 = "witter is an online social networking service that enables users to send and read short 140-character" +
8587
"messages called tweets.Registered users can read and post tweets, but those who are unregistered can only read" +
8688
"them.Users access Twitter through the website interface, SMS or mobile device app Twitter Inc. is based in San" +
8789
"Francisco and has more than 25 offices around the world.Twitter was created in March 2006 by Jack Dorsey," +
8890
"Evan Williams, Biz Stone, and Noah Glass and launched in July 2006. The service rapidly gained worldwide popularity," +
8991
"with more than 100 million users posting 340 million tweets a day in 2012.The service also handled 1.6 billion" +
9092
"search queries per day.";
91-
public string content2 = "Facebook is an online social networking service headquartered in Menlo Park, California. Its website was" +
93+
public string Content2 = "Facebook is an online social networking service headquartered in Menlo Park, California. Its website was" +
9294
"launched on February 4, 2004, by Mark Zuckerberg with his Harvard College roommates and fellow students Eduardo" +
9395
"Saverin, Andrew McCollum, Dustin Moskovitz and Chris Hughes.The founders had initially limited the websites" +
9496
"membership to Harvard students, but later expanded it to colleges in the Boston area, the Ivy League, and Stanford" +
9597
"University.It gradually added support for students at various other universities and later to high - school students.";
96-
public string content3 = "WhatsApp Messenger is a proprietary cross-platform instant messaging client for smartphones that operates" +
98+
public string Content3 = "WhatsApp Messenger is a proprietary cross-platform instant messaging client for smartphones that operates" +
9799
"under a subscription business model.It uses the Internet to send text messages, images, video, user location and" +
98100
"audio media messages to other users using standard cellular mobile numbers. As of February 2016, WhatsApp had a user" +
99101
"base of up to one billion,[10] making it the most globally popular messaging application.WhatsApp Inc., based in" +
100102
"Mountain View, California, was acquired by Facebook Inc.on February 19, 2014, for approximately US$19.3 billion.";
101-
102-
private List<Object>
103-
TabItems { get; set; } = new List<Object>
104-
{
105-
new { header = new { text = "Twitter", iconCss = "e-twitter" }, content = "Twitter is an online social networking service that enables users to send and read short 140-character " +
106-
"messages called 'tweets'. Registered users can read and post tweets, but those who are unregistered can only read " +
107-
"them. Users access Twitter through the website interface, SMS or mobile device app Twitter Inc. is based in San " +
108-
"Francisco and has more than 25 offices around the world. Twitter was created in March 2006 by Jack Dorsey, " +
109-
"Evan Williams, Biz Stone, and Noah Glass and launched in July 2006. The service rapidly gained worldwide popularity, " +
110-
"with more than 100 million users posting 340 million tweets a day in 2012.The service also handled 1.6 billion " +
111-
"search queries per day." },
112-
new { header = new { text = "Facebook", iconCss = "e-facebook" }, content = "Facebook is an online social networking service headquartered in Menlo Park, California. Its website was " +
113-
"launched on February 4, 2004, by Mark Zuckerberg with his Harvard College roommates and fellow students Eduardo " +
114-
"Saverin, Andrew McCollum, Dustin Moskovitz and Chris Hughes.The founders had initially limited the website " +
115-
"membership to Harvard students, but later expanded it to colleges in the Boston area, the Ivy League, and Stanford " +
116-
"University. It gradually added support for students at various other universities and later to high-school students." },
117-
new { header = new { text = "WhatsApp", iconCss = "e-whatsapp" }, content = "WhatsApp Messenger is a proprietary cross-platform instant messaging client for smartphones that operates " +
118-
"under a subscription business model. It uses the Internet to send text messages, images, video, user location and " +
119-
"audio media messages to other users using standard cellular mobile numbers. As of February 2016, WhatsApp had a user " +
120-
"base of up to one billion,[10] making it the most globally popular messaging application. WhatsApp Inc., based in " +
121-
"Mountain View, California, was acquired by Facebook Inc. on February 19, 2014, for approximately US$19.3 billion." }
122-
};
123-
124103
}
125104

ej2-blazor-samples/Pages/Navigations/Toolbar/DefaultFunctionalities.razor

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@
4444

4545
<div class="col-lg-12 control-section">
4646
<div class="e-sample-resize-container">
47-
@*<EjsToolbar id="defaultToolbar" Items="@ToolbarItems">
48-
</EjsToolbar>*@
49-
5047
<EjsToolbar ID="defaultToolbar">
5148
<ToolBarItems>
5249
<ToolBarItem PrefixIcon="e-cut-icon tb-icons" TooltipText="Cut"></ToolBarItem>
@@ -227,7 +224,7 @@
227224
}
228225
</style>
229226

230-
@functions{
227+
@code{
231228

232229
}
233230

ej2-blazor-samples/Pages/Navigations/Toolbar/Popup.razor

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,28 +56,27 @@
5656

5757
<div class="col-lg-12 control-section">
5858
<div class="e-sample-resize-container">
59-
60-
<EjsToolbar id="popup" OverflowMode="@mode">
59+
<EjsToolbar ID="popup" OverflowMode="@Mode">
6160
<ToolBarItems>
6261
<ToolBarItem PrefixIcon="e-cut-icon tb-icons" TooltipText="Cut" Text="Cut"></ToolBarItem>
6362
<ToolBarItem PrefixIcon="e-copy-icon tb-icons" TooltipText="Copy" Text="Copy"></ToolBarItem>
6463
<ToolBarItem PrefixIcon="e-paste-icon tb-icons" TooltipText="Paste" Text="Paste"></ToolBarItem>
65-
<ToolBarItem type="@type"></ToolBarItem>
64+
<ToolBarItem Type="@Type"></ToolBarItem>
6665
<ToolBarItem PrefixIcon="e-bold-icon tb-icons" TooltipText="Bold" Text="Bold"></ToolBarItem>
6766
<ToolBarItem PrefixIcon="e-underline-icon tb-icons" TooltipText="Underline" Text="Underline"></ToolBarItem>
6867
<ToolBarItem PrefixIcon="e-italic-icon tb-icons" TooltipText="Italic" Text="Italic"></ToolBarItem>
69-
<ToolBarItem type="@type"></ToolBarItem>
68+
<ToolBarItem Type="@Type"></ToolBarItem>
7069
<ToolBarItem PrefixIcon="e-bullets-icon tb-icons" TooltipText="Bullets" Text="Bullets"></ToolBarItem>
7170
<ToolBarItem PrefixIcon="e-numbering-icon tb-icons" TooltipText="Numbering" Text="Numbering"></ToolBarItem>
72-
<ToolBarItem type="@type"></ToolBarItem>
71+
<ToolBarItem Type="@Type"></ToolBarItem>
7372
<ToolBarItem PrefixIcon="e-undo-icon tb-icons" TooltipText="Undo" Text="Undo"></ToolBarItem>
7473
<ToolBarItem PrefixIcon="e-redo-icon tb-icons" TooltipText="Redo" Text="Redo"></ToolBarItem>
75-
<ToolBarItem type="@type"></ToolBarItem>
74+
<ToolBarItem Type="@Type"></ToolBarItem>
7675
<ToolBarItem PrefixIcon="e-alignleft-icon tb-icons" TooltipText="Align-Left" Text="Left"></ToolBarItem>
7776
<ToolBarItem PrefixIcon="e-alignright-icon tb-icons" TooltipText="Align-Right" Text="Right"></ToolBarItem>
7877
<ToolBarItem PrefixIcon="e-aligncenter-icon tb-icons" TooltipText="Align-Center" Text="Center"></ToolBarItem>
7978
<ToolBarItem PrefixIcon="e-alignjustify-icon tb-icons" TooltipText="Align-Justify" Text="Justify"></ToolBarItem>
80-
<ToolBarItem type="@type"></ToolBarItem>
79+
<ToolBarItem Type="@Type"></ToolBarItem>
8180
<ToolBarItem PrefixIcon="e-radar-icon tb-icons" TooltipText="Radar Chart" Text="Radar"></ToolBarItem>
8281
<ToolBarItem PrefixIcon="e-line-icon tb-icons" TooltipText="Line Chart" Text="Line"></ToolBarItem>
8382
<ToolBarItem PrefixIcon="e-doughnut-icon tb-icons" TooltipText="Doughnut Chart" Text="Doughnut"></ToolBarItem>
@@ -87,7 +86,6 @@
8786
<ToolBarItem PrefixIcon="e-design-icon tb-icons" TooltipText="Design" Text="Design"></ToolBarItem>
8887
</ToolBarItems>
8988
</EjsToolbar>
90-
9189
</div>
9290
</div>
9391

@@ -309,10 +307,10 @@
309307
}
310308
</style>
311309

312-
@functions{
310+
@code{
313311

314-
public OverflowMode mode { get; set; } = OverflowMode.Popup;
312+
public OverflowMode Mode { get; set; } = OverflowMode.Popup;
315313

316-
public ItemType type { get; set; } = ItemType.Separator;
314+
public ItemType Type { get; set; } = ItemType.Separator;
317315

318316
}

ej2-blazor-samples/Pages/Schedule/Schedule/Agenda.razor

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,15 @@
3838

3939
<div class="col-lg-12 control-section">
4040
<div class="schedule-wrapper">
41-
<EjsSchedule id="schedule" width="100%" height="650px" selectedDate="new DateTime(2019, 1, 10)" EventSettings="@ScheduleData">
42-
<ScheduleViews>
43-
<ScheduleView option="@agenda" allowVirtualScrolling="false"></ScheduleView>
44-
</ScheduleViews>
41+
<EjsSchedule ID="schedule" Width="100%" Height="650px" SelectedDate="new DateTime(2019, 1, 10)">
42+
<ScheduleViews>
43+
<ScheduleView Option="View.Agenda" AllowVirtualScrolling="false"></ScheduleView>
44+
</ScheduleViews>
45+
<ScheduleEventSettings DataSource="@Data.GetScheduleData()"></ScheduleEventSettings>
4546
</EjsSchedule>
4647
</div>
4748
</div>
4849

4950
@functions{
50-
static ScheduleData data = new ScheduleData();
51-
private object viewList { get; set; } = new string[] { "Agenda" };
52-
[Parameter]
53-
private object ScheduleData { get; set; } = new
54-
{
55-
dataSource = data.GetScheduleData()
56-
};
57-
public View agenda = View.Agenda;
51+
static ScheduleData Data = new ScheduleData();
5852
}

ej2-blazor-samples/Pages/Schedule/Schedule/Default.razor

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,12 @@
8989

9090
<div class="col-lg-12 control-section">
9191
<div class="schedule-wrapper">
92-
<EjsSchedule id="schedule" width="100%" height="650px" selectedDate="new DateTime(2019, 1, 10)" EventSettings="@ScheduleData">
92+
<EjsSchedule ID="schedule" Width="100%" Height="650px" SelectedDate="new DateTime(2019, 1, 10)">
93+
<ScheduleEventSettings DataSource="@Data.GetScheduleData()"></ScheduleEventSettings>
9394
</EjsSchedule>
9495
</div>
9596
</div>
9697

9798
@functions{
98-
static ScheduleData data = new ScheduleData();
99-
[Parameter]
100-
private object ScheduleData { get; set; } = new
101-
{
102-
dataSource = data.GetScheduleData()
103-
};
99+
static ScheduleData Data = new ScheduleData();
104100
}

0 commit comments

Comments
 (0)