Custom Header
23 Feb 2018 / 1 minute to read
When the built-in view is not needed, it can be overridden by adding the custom view to the header region for a tab.
UIButton allCallsButton = new UIButton();
allCallsButton.SetTitle("All Calls", UIControlState.Normal);
allCallsButton.BackgroundColor = UIColor.FromRGB(240, 240, 240);
allCallsButton.TouchUpInside += AllCallsButton_Clicked;
var tabViewItem = new SfTabItem()
{
Title = "Calls",
Content = allContactsGrid,
HeaderContent = allCallsButton
};
How to handle events for custom view with tab view?
When you use button or similar control with clicked event, it can be handled directly and set to the SelectedIndex property to navigate the clicked view.
private void AllCallsButton_Clicked(object sender, EventArgs e)
{
tabView.SelectedIndex = 0;
}
Was this page helpful?
Yes
No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page