aspnet-mvc-ej1-demos/Views/Tab/Direction.cshtml

56 строки
2.9 KiB
Plaintext

@section MetaTags{
<meta name="description" content="This example demonstrates both vertical and horizontal orientation of the toolbar header in the Syncfusion ASP.NET MVC Tab component." >
}
@section SampleHeading{ <span class="sampleName">Tab-Direction-ASP.NET MVC-SYNCFUSION</span>}
@section ControlsSection{
<div class="controlframe">
@{Html.EJ().Tab("directionTab").Items(data =>
{
data.Add().ID("tools").Text("Rome").ContentTemplate(@<div>
Rome is one of the world's most fascinating cities. The old adage that Rome was not built in a day — and that you won't see it in one or even in three — is true. For the intrepid traveler who can keep pace, here is a list of must-sees. But remember what the Romans say: "Even a lifetime isn't enough to see Rome."
</div>);
data.Add().ID("chart").Text("Paris").ContentTemplate(@<div>
Paris, the city of lights and love - this short guide is full of ideas for how to make the most of the romanticism that oozes from every one of its beautiful corners.You couldn't possibly visit Paris without seeing the Eiffel Tower. Even if you do not want to visit this world famous structure, you will see its top from all over Paris. The tower rises 300 meters tall (984 ft); when it was completed at the end of the nineteenth century.
</div>);
data.Add().ID("grid").Text("London").ContentTemplate(@<div>
London is one of the most popular tourist destinations in the world for a reason. A cultural and historical hub, London has an excellent public transportation system that allows visitors to see all the fantastic sights without spending a ton of money on a rental car.London contains four World Heritage Sites: the Tower of London; Kew Gardens; the site comprising the Palace of Westminster, Westminster Abbey, and St Margaret's Church.
</div>);
}).HeaderPosition(HeaderPosition.Bottom).Render();}
</div>
}
<div id="tabTarget">
<ul>
<li>Bottom</li>
<li>Top</li>
<li>Left</li>
<li>Right</li>
</ul>
</div>
@section PropertiesSection{
<div class="row">
<div class="col-md-3">
Header Direction
</div>
<div class="col-md-3">
@Html.EJ().DropDownList("optDirection").TargetID("tabTarget").Width("120px").SelectedItemIndex(0).ClientSideEvents(evt => evt.Change("onSelectChange"))
</div>
</div>
}
@section ScriptSection{
<script>
var tabIndex = 1;
var tabObj, value;
function onSelectChange(args) {
tabObj = $("#directionTab").data("ejTab");
value = args.selectedText;
$("#directionTab").ejTab("setModel", { headerPosition: value.toLowerCase() });
}
$(document).ready(function () { $("#sampleProperties").ejPropertiesPanel(); });
</script>
}