You can show or hide the AccordionItem in MAUI Accordion by adding or removing the data from ViewModel bound collection dynamically. public class BehaviorExt: Behavior<ContentPage> { Contact? deletedItem = null; SfAccordion? accordion; Button? button; protected override void OnAttachedTo(ContentPage bindable) { base.OnAttachedTo(bindable); accordion = bindable.FindByName<SfAccordion>("Accordion"); button= bindable.FindByName<Button>("HideOrShow"); button.Clicked += OnHideOrShow; } private void OnHideOrShow(object? sender, EventArgs e) { var items = (sender as Button)!.BindingContext as ContactViewModel; if (deletedItem == null) { deletedItem = items!.ContactsInfo![2]; items.ContactsInfo.RemoveAt(2); } else { items!.ContactsInfo!.Insert(2, deletedItem); deletedItem = null; } } } Output View sample in GitHub Conclusion I hope you enjoyed learning how to show or hide Accordion Item in .NET MAUI. You can refer to our .NET MAUI Accordion feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our .NET MAUI Accordion example to understand how to create and manipulate data. For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls. If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!
This article explains how to programmatically show the trackball when loading the Xamarin Cchart. You can show the trackball programmatically with the help of chart SeriesRendered event and Show method of ChartTrackballBehavior as shown in the following code sample. XAML <chart:SfChart SeriesRendered="Chart_SeriesRendered" VerticalOptions="FillAndExpand"> … <chart:SfChart.ChartBehaviors> <chart:ChartTrackballBehavior x:Name="trackball"/> </chart:SfChart.ChartBehaviors> </chart:SfChart> Either you can show the trackball, using the pixel position or axis values by anyone of the following solutions: Solution 1: Using the pixel values. You can show the trackball by directly passing the pixel position to the Show method. C# private void Chart_SeriesRendered(object sender, EventArgs e) { SfChart chart = sender as SfChart; trackball.Show(567, 333); } Solution 2: Using the data point. You can show the trackball by converting the axis data points to the pixel values by using the ValueToPoint method and passing that converted pixel value to the Show method. C# private void Chart_SeriesRendered(object sender, EventArgs e) { SfChart chart = sender as SfChart; float xposition = (float)chart.ValueToPoint(chart.PrimaryAxis, new DateTime(2000, 4, 19).ToOADate()); float yposition = (float)chart.ValueToPoint(chart.SecondaryAxis, 86); trackball.Show(xposition,yposition); } Output Conclusion I hope you enjoyed learning about how to show the trackball on load time in Xamarin.Forms Charts. You can refer to our Xamarin Chart’s feature tour page to know about its other groundbreaking feature representations. You can also explore our Xamarin Chart Documentation to understand how to present and manipulate data. For current customers, you can check out our Xamarin components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our Xamarin Chart and other Xamarin components. If you have any queries or require clarifications, please let us know in comments below. You can also contact us through our support forums, Direct-Trac or feedback portal. We are always happy to assist you!
This KB article explains how to show the tooltip programmatically for the first segment in load time in Xamarin Charts and move the tooltip based on touch move instead of touch down. You can show the tooltip in load time with the help of the SeriesRendered event and Show method of ChartTooltipBehavior as shown inper the following code sample. XAML <chart:SfChart SeriesRendered="Chart_SeriesRendered" VerticalOptions="FillAndExpand" > …… <chart:SfChart.Series> <chart:ColumnSeries EnableTooltip="True" ItemsSource="{Binding ColumnData}" XBindingPath="XValue" YBindingPath="YValue"/> </chart:SfChart.Series> <chart:SfChart.ChartBehaviors> <local:ChartTooltipBehaviorExt x:Name="tooltip"/> </chart:SfChart.ChartBehaviors> ……. </chart:SfChart> You can show the tooltip by using the following two solutions either pixel position or axis values. Solution 1: Using pixel values. You can show the tooltip by directly passing the pixel position to the Show method. C# private void Chart_SeriesRendered(object sender, EventArgs e) { Device.BeginInvokeOnMainThread(() => { tooltip.Show(406, 544, true); }); } Solution 2: Using data point. You can show the tooltip by converting the data point value to the pixel values by using the ValueToPoint method and passing that converted pixel value to the Show method. C# private void Chart_SeriesRendered(object sender, EventArgs e) { SfChart chart = sender as SfChart; Device.BeginInvokeOnMainThread(() => { float xPoint = (float)chart.ValueToPoint(chart.PrimaryAxis, 2016); float yPoint = (float)chart.ValueToPoint(chart.SecondaryAxis, 55); tooltip.Show(xPoint, yPoint, true); }); } Note:The Show method is available for Android and iOS platforms only. It will not work for the UWP platform. Output: How to show the Tooltip in touch move instead of touch down? You can show the tooltip in touch move by extending the ChartTooltipBehavior and calling the Show method inside the OnTouchUp and OnTouchMove methods as shown in the following code sample. ChartTooltipBehaviorExt public class ChartTooltipBehaviorExt : ChartTooltipBehavior { protected override void OnTouchUp(float x, float y) { base.OnTouchUp(x,y); EnableTooltip(x, y); } protected override void OnTouchMove(float x, float y) { base.OnTouchMove(x,y); EnableTooltip(x, y); } void EnableTooltip(float x, float y) { Show(x, y, false); Device.StartTimer(TimeSpan.FromSeconds(this.Duration), () => { Hide(false); return false; }); } } See also:How to customize the appearance of Xamarin.Forms chartHow to enable the zooming in Xamarin.Forms chartHow to enable the data point selection Conclusion I hope you enjoyed learning about how to show tooltip on load time in Xamarin.Forms Charts. You can refer to our Xamarin Chart’s feature tour page to know about its other groundbreaking feature representations. You can also explore our Xamarin Chart Documentation to understand how to present and manipulate data. For current customers, you can check out our Xamarin components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our Xamarin Chart and other Xamarin components. If you have any queries or require clarifications, please let us know in comments below. You can also contact us through our support forums, Direct-Trac or feedback portal. We are always happy to assist you!
In the WPF CalendarEdit control, dates of the next and previous months are shown by default. You can restrict the visibility of the days of the previous months or the next month by using the ShowNextMonthDays and ShowPreviousMonthDays Boolean properties, respectively. By disabling these properties, the corresponding dates are not displayed.The following code example shows how to disable the visibility of the days of the previous or the next month and to show only current month’s dates. XAML <syncfusion:CalendarEdit x:Name="_calendar" ShowNextMonthDays="False" ShowPreviousMonthDays="False"></syncfusion:CalendarEdit> C# _calendar.ShowNextMonthDays = false; _calendar.ShowPreviousMonthDays = false; Screenshot Figure 1: Dates of the previous and next months are hidden Figure 2: Dates of the previous and next months are displayedConclusionI hope you enjoyed learning about ow to restrict the visibility of the days in CalendarEdit.You can refer to our WPF CalendarEditor feature tour page to know about its other groundbreaking feature representations. You can also explore our WPF CalendarEditor documentation to understand how to create and manipulate data.For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!
Description You can show or hide AutoComplete element using client-side API in the web page. Solution You can show or hide the AutoComplete control from client side script using the setVisible(bool) API method. When the setVisible() is false then the control is hidden from the web page. Refer to the following code example to show or hide the control from script. ASPX <ej:Autocomplete ID="AutoComplete" runat="server" DataTextField="Text" DataUniqueKeyField="ID" /> <br /> <ej:ToggleButton runat="server" ID="Toggle" ActiveText="Show Control" DefaultText="Hide Control" ClientSideOnClick="OnClick"></ej:ToggleButton> JavaScript <script type="text/javascript"> function OnClick(args) { var autocompObj =$("#<%=AutoComplete.ClientID%>").data("ejAutocomplete"); if (args.isChecked) autocompObj.setVisible(false); else autocompObj.setVisible(true); } </script> The following screenshot illustrates the output on toggle button click. Figure 1: Show or Hide AutoComplete on Toggle button click