#pragma warning disable 1998
        public async override global::System.Threading.Tasks.Task ExecuteAsync()
        {
            DefineSection("MetaTags", async() => {
                BeginContext(18, 142, true);
                WriteLiteral("\r\n   <meta name=\"description\" content=\"This example demonstrates the default functionalities of the scroller and scrollbar in ASP.NET Core\">\r\n");
                EndContext();
            }
                          );
            BeginContext(163, 2, true);
            WriteLiteral("\r\n");
            EndContext();
            DefineSection("SampleHeading", async() => {
                BeginContext(188, 73, true);
                WriteLiteral("\r\n    <span class=\"sampleName\">ScrollBar / Default Functionalities</span>");
                EndContext();
            }
                          );
            DefineSection("ControlsSection", async() => {
                BeginContext(289, 37, true);
                WriteLiteral("\r\n    <div class=\"control\">\r\n        ");
                EndContext();
                BeginContext(326, 2870, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("ej-Scroller", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "04667ce48cb5414592f44ea1bf4114e0", async() => {
                    BeginContext(383, 26, true);
                    WriteLiteral("            \r\n            ");
                    EndContext();
                    BeginContext(409, 2763, false);
                    __tagHelperExecutionContext = __tagHelperScopeManager.Begin("e-content-template", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "03ff8f8f8d404f81834ddf587cc9f7a9", async() => {
                        BeginContext(429, 2722, true);
                        WriteLiteral(@"
                <div>
                    <div class=""sampleContent"">
                        <h3 style=""font-size: 20px;"">MVC</h3>
                        <div>
                            <p>
                                Model–view–controller (MVC) is a software architecture pattern which separates the
                                representation of information from the user's interaction with it. The model consists
                                of application data, business rules, logic, and functions. A view can be any output
                                representation of data, such as a chart or a diagram. Multiple views of the same
                                data are possible, such as a bar chart for management and a tabular view for accountants.
                                The controller mediates input, converting it to commands for the model or view.The
                                central ideas behind MVC are code reusability and n addition to dividing the applicati");
                        WriteLiteral(@"on
                                into three kinds of components, the MVC design defines the interactions between
                                them.
                            </p>
                            <ul>
                                <li>
                                    <b>A controller </b>can send commands to its associated view to change the view's
                                    presentation of the model (e.g., by scrolling through a document). It can also send
                                    commands to the model to update the model's state (e.g., editing a document).
                                </li>
                                <li>
                                    <b>A model</b> notifies its associated views and controllers when there has been
                                    a change in its state. This notification allows the views to produce updated output,
                                    and the controllers to change the available set of com");
                        WriteLiteral(@"mands. A passive implementation
                                    of MVC omits these notifications, because the application does not require them
                                    or the software platform does not support them.
                                </li>
                                <li>
                                    <b>A view</b> requests from the model the information that it needs to generate
                                    an output representation to the user.
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            ");
                        EndContext();
                    }
                                                                                );
                    __Syncfusion_JavaScript_ContentTemplate = CreateTagHelper <global::Syncfusion.JavaScript.ContentTemplate>();
                    __tagHelperExecutionContext.Add(__Syncfusion_JavaScript_ContentTemplate);
                    await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                    if (!__tagHelperExecutionContext.Output.IsContentModified)
                    {
                        await __tagHelperExecutionContext.SetOutputContentAsync();
                    }
                    Write(__tagHelperExecutionContext.Output);
                    __tagHelperExecutionContext = __tagHelperScopeManager.End();
                    EndContext();
                    BeginContext(3172, 10, true);
                    WriteLiteral("\r\n        ");
                    EndContext();
                }
                                                                            );
                __Syncfusion_JavaScript_Models_ScrollerProperties = CreateTagHelper <global::Syncfusion.JavaScript.Models.ScrollerProperties>();
                __tagHelperExecutionContext.Add(__Syncfusion_JavaScript_Models_ScrollerProperties);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
#line 9 "D:\Samples_17.2.0.46\ASPNETCORE\samplebrowser_core_2_0\Views\ScrollBar\Default.cshtml"
                __Syncfusion_JavaScript_Models_ScrollerProperties.Height = 300;

#line default
#line hidden
                __tagHelperExecutionContext.AddTagHelperAttribute("height", __Syncfusion_JavaScript_Models_ScrollerProperties.Height, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line 9 "D:\Samples_17.2.0.46\ASPNETCORE\samplebrowser_core_2_0\Views\ScrollBar\Default.cshtml"
                __Syncfusion_JavaScript_Models_ScrollerProperties.Width = 600;

#line default
#line hidden
                __tagHelperExecutionContext.AddTagHelperAttribute("width", __Syncfusion_JavaScript_Models_ScrollerProperties.Width, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(3196, 17, true);
                WriteLiteral("\r\n    </div>   \r\n");
                EndContext();
            }
                          );
            DefineSection("StyleSection", async() => {
                BeginContext(3238, 281, true);
                WriteLiteral(@"
    <style type=""text/css"" class=""cssStyles"">
        .control {
            border: 1px solid #bbbcbb;
            color: gray;
            width: 600px;
        }

        .sampleContent {
            width: 700px;
            padding: 15px;
        }
    </style>
");
                EndContext();
            }
                          );
        }
Ejemplo n.º 2
0
        #pragma warning disable 1998
        public async override global::System.Threading.Tasks.Task ExecuteAsync()
        {
            DefineSection("MetaTags", async() => {
                BeginContext(18, 157, true);
                WriteLiteral("\r\n   <meta name=\"description\" content=\"This example demonstrates how to achieve the virtual scrolling(loads content dynamically) in ASP.NET Core Scroller\">\r\n");
                EndContext();
            }
                          );
            BeginContext(178, 2, true);
            WriteLiteral("\r\n");
            EndContext();
            DefineSection("SampleHeading", async() => {
                BeginContext(203, 67, true);
                WriteLiteral("\r\n    <span class=\"sampleName\">ScrollBar / Virtual Scrolling</span>");
                EndContext();
            }
                          );
            DefineSection("ControlsSection", async() => {
                BeginContext(298, 37, true);
                WriteLiteral("\r\n    <div class=\"control\">\r\n        ");
                EndContext();
                BeginContext(335, 2086, false);
                __tagHelperExecutionContext = __tagHelperScopeManager.Begin("ej-scroller", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "2be87403ada245ddb44e1d1d58ce4286", async() => {
                    BeginContext(410, 14, true);
                    WriteLiteral("\r\n            ");
                    EndContext();
                    BeginContext(424, 1973, false);
                    __tagHelperExecutionContext = __tagHelperScopeManager.Begin("e-content-template", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagAndEndTag, "0aca64dfec964bd9ab9d55f04ea08cf1", async() => {
                        BeginContext(444, 1932, true);
                        WriteLiteral(@"
                <div>
                    <div class=""sampleContent"" unselectable=""on"">
                        <p><b>Scroll to see various contents loading virtually</b></p>
                        <h3 style=""font-size: 20px;"">Syncfusion</h3>
                        <div>
                            <p>
                                Founded by industry experts in 2001, Syncfusion, Inc. provides the broadest range of enterprise-class software components and tools for the Microsoft .NET platform.
                            </p>
                            <br />
                            <p>
                                With Syncfusion, developers can move beyond simply coding applications to delivering real business innovation—the elegant user interfaces, business intelligence dashboards, and sophisticated reporting that today's business users need, in the formats they demand.
                                Our award-winning components and controls are designed to meet your evolving deve");
                        WriteLiteral(@"lopment needs, whether you're working in ASP.NET, ASP.NET MVC, Windows Forms, WPF, Windows Phone, WinRT, JavaScript, Silverlight, or Xamarin.
                            </p>
                            <br />
                            <p><b>More than 650 stunning controls and frameworks</b></p>
                            <p>
                                The most comprehensive suite of components available for .NET and JavaScript, including charts, grids, diagrams, schedulers, Gantt controls, maps, gauges, docking, ribbons and much more.
                                The Syncfusion Big Data Platform is the first and the only complete Hadoop distribution designed for Windows. Develop on Windows using tools that you are familiar with. Deploy on Windows.
                            </p>
                        </div>
                    </div>
                </div> 
            ");
                        EndContext();
                    }
                                                                                );
                    __Syncfusion_JavaScript_ContentTemplate = CreateTagHelper <global::Syncfusion.JavaScript.ContentTemplate>();
                    __tagHelperExecutionContext.Add(__Syncfusion_JavaScript_ContentTemplate);
                    await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                    if (!__tagHelperExecutionContext.Output.IsContentModified)
                    {
                        await __tagHelperExecutionContext.SetOutputContentAsync();
                    }
                    Write(__tagHelperExecutionContext.Output);
                    __tagHelperExecutionContext = __tagHelperScopeManager.End();
                    EndContext();
                    BeginContext(2397, 10, true);
                    WriteLiteral("\r\n        ");
                    EndContext();
                }
                                                                            );
                __Syncfusion_JavaScript_Models_ScrollerProperties = CreateTagHelper <global::Syncfusion.JavaScript.Models.ScrollerProperties>();
                __tagHelperExecutionContext.Add(__Syncfusion_JavaScript_Models_ScrollerProperties);
                __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
#line 9 "D:\Samples_17.2.0.46\ASPNETCORE\samplebrowser_core_2_0\Views\ScrollBar\VirtualScrolling.cshtml"
                __Syncfusion_JavaScript_Models_ScrollerProperties.Height = 400;

#line default
#line hidden
                __tagHelperExecutionContext.AddTagHelperAttribute("height", __Syncfusion_JavaScript_Models_ScrollerProperties.Height, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
#line 9 "D:\Samples_17.2.0.46\ASPNETCORE\samplebrowser_core_2_0\Views\ScrollBar\VirtualScrolling.cshtml"
                __Syncfusion_JavaScript_Models_ScrollerProperties.Width = 700;

#line default
#line hidden
                __tagHelperExecutionContext.AddTagHelperAttribute("width", __Syncfusion_JavaScript_Models_ScrollerProperties.Width, global::Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeValueStyle.DoubleQuotes);
                __Syncfusion_JavaScript_Models_ScrollerProperties.Scroll = (string)__tagHelperAttribute_1.Value;
                __tagHelperExecutionContext.AddTagHelperAttribute(__tagHelperAttribute_1);
                await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
                if (!__tagHelperExecutionContext.Output.IsContentModified)
                {
                    await __tagHelperExecutionContext.SetOutputContentAsync();
                }
                Write(__tagHelperExecutionContext.Output);
                __tagHelperExecutionContext = __tagHelperScopeManager.End();
                EndContext();
                BeginContext(2421, 14, true);
                WriteLiteral("\r\n    </div>\r\n");
                EndContext();
            }
                          );
            DefineSection("ScriptSection", async() => {
                BeginContext(2461, 1701, true);
                WriteLiteral(@"
    <script>
        var scrollerObj, contentLoaded = false; var list = 0; var newItem, newItemHeading;
        var content = [""mvccontent"", ""gridcontent"", ""twitter"", ""wpfcontent"", ""javascript"", ""lightswitch"", ""orubase"", ""bigdata""];
        $(function () {
            scrollerObj = $(""#scrollcontent"").data(""ejScroller"");
        });
        function onScroll(e) {
            if (scrollerObj) {
                scrollerPositon = e.scrollTop;
                if (!contentLoaded && document.querySelectorAll("".sampleContent"")[0].scrollHeight - (e.scrollTop) <= scrollerObj.option(""height"")) {
                    $.ajax({
                        url: ""../css/samplecontent/"" + content[list] + "".html"",
                        success: function (result) {
                            newItem = $(""<div unselectable='on'></div>"").addClass(""e-newItem"").attr({ ""id"": ""e-newItem"" + list });
                            newItemHeading = $(""<h2>NewContent "" + (list + 1) + "" loaded</h2>"");
                        ");
                WriteLiteral(@"    newItem.appendTo("".sampleContent"");
                            newItem.html(result);
                            newItemHeading.prependTo(newItem);
                            //refresh the scroller to adjust the scroller position automatically based on new content
                            scrollerObj.refresh();
                            scrollerObj.option(""scrollTop"", scrollerPositon);
                            list++;
                            if (list == content.length)
                                contentLoaded = true;
                        }
                    });
                }
            }
        }
        
    </script>
");
                EndContext();
            }
                          );
            BeginContext(4165, 2, true);
            WriteLiteral("\r\n");
            EndContext();
            DefineSection("StyleSection", async() => {
                BeginContext(4189, 746, true);
                WriteLiteral(@"
    <style type=""text/css"" class=""cssStyles"">
        .control {
            border: 1px solid #bbbcbb;
            color: gray;
            width: 700px;
        }

        .sampleContent {
            width: 650px;
            padding: 15px;
            text-align: justify;
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            -khtml-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }

        #e-newItem0 {
            height: 400px;
        }

        #e-newItem1 {
            height: 250px;
        }

        #e-newItem3, #e-newItem2 {
            height: 340px;
        }
    </style>
");
                EndContext();
            }
                          );
        }