<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Lavender Anyango Otieno. on Medium]]></title>
        <description><![CDATA[Stories by Lavender Anyango Otieno. on Medium]]></description>
        <link>https://medium.com/@lavenderanyangoo?source=rss-f874534cf75d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Lavender Anyango Otieno. on Medium</title>
            <link>https://medium.com/@lavenderanyangoo?source=rss-f874534cf75d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 22:36:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@lavenderanyangoo/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Easily Develop a Travel Destination Listing UI in .NET MAUI]]></title>
            <link>https://medium.com/syncfusion/easily-develop-a-travel-destination-listing-ui-in-net-maui-d1d0443b41cd?source=rss-f874534cf75d------2</link>
            <guid isPermaLink="false">https://medium.com/p/d1d0443b41cd</guid>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[csharp]]></category>
            <dc:creator><![CDATA[Lavender Anyango Otieno.]]></dc:creator>
            <pubDate>Thu, 02 Feb 2023 11:30:09 GMT</pubDate>
            <atom:updated>2023-02-02T12:09:15.765Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Easily Develop a Travel Destination Listing UI in .NET MAUI" src="https://cdn-images-1.medium.com/max/1024/0*BxtD53wj5LH6RV67.png" /></figure><h3>Easily Develop a Travel Destination Listing UI in .NET MAUI</h3><p>Assume your application needs to display a list of tourist attractions in a city on a vertical list based on the city selected from a horizontal list. Here comes the <a href="https://www.syncfusion.com/maui-controls/maui-listview">Syncfusion .NET MAUI ListView</a> to help you easily implement this in your .NET MAUI application.</p><p>The Syncfusion <a href="https://www.syncfusion.com/maui-controls/maui-listview">.NET MAUI ListView</a> control is a list-like interface that renders a set of data in vertical and horizontal orientation with easy customization.</p><p>By customizing the <a href="https://help.syncfusion.com/cr/maui/Syncfusion.Maui.ListView.SfListView.html#Syncfusion_Maui_ListView_SfListView_Orientation">Orientation</a> property of the .NET MAUI ListView, you can easily configure the ListView to be horizontal or vertical.</p><p>Let’s get started with the development of this application.</p><h3>Data population for a vertical and horizontal list</h3><p>As we know, the .NET MAUI ListView is a data-bound control, and we must create a data model to bind to the ListView.</p><h3>Creating a data model</h3><p>Create a model class to hold the data values, such as the place’s name, image<strong>,</strong> and collection, which holds data for the vertical list.</p><p>Refer to the following code example.</p><pre>public class PlaceInfo : INotifyPropertyChanged<br>{<br>    #region Fields<br>    <br>    private string? name;<br>    private string? description;<br>    private ImageSource? image;<br>    private ObservableCollection&lt;PlaceInfo&gt; touristPlaces;<br>   <br>    #endregion<br>    <br>    #region Constructor<br>    <br>    public PlaceInfo()<br>    {<br>    }<br>    <br>    #endregion<br>   <br>    #region Properties<br>   <br>    public string? Name<br>    {<br>        get { return name; }<br>        set<br>        {<br>            name = value;<br>            OnPropertyChanged(&quot;Name&quot;);<br>        }<br>    }<br>   <br>    public string? Description<br>    {<br>        get<br>        {<br>            return description;<br>        }<br>        set<br>        {<br>            description = value;<br>            OnPropertyChanged(&quot;Description&quot;);<br>        }<br>    }<br>    <br>    public ImageSource? Image<br>    {<br>        get<br>        {<br>            return image;<br>        }<br>        set<br>        {<br>            image = value;<br>            OnPropertyChanged(&quot;Image&quot;);<br>        }<br>    }<br>    <br>    public ObservableCollection&lt;PlaceInfo&gt; TouristPlaces<br>    {<br>        get { return touristPlaces; }<br>        set <br>        { <br>            touristPlaces = value;<br>            OnPropertyChanged(&quot;TouristPlaces&quot;);<br>        }<br>    }<br>    <br>    #endregion<br>    <br>    #region Interface Member<br>    <br>    public event PropertyChangedEventHandler? PropertyChanged;<br>    <br>    public void OnPropertyChanged(string name)<br>    {<br>        if (this.PropertyChanged != null)<br>            this.PropertyChanged(this, new PropertyChangedEventArgs(name));<br>    }<br>    <br>    #endregion<br>}</pre><h3>Populate model collection in ViewModel</h3><p>Create an <strong>ObservableCollection</strong> of <strong>PlaceInfo</strong> named Places to hold the data for the horizontal ListView. Each <strong>PlaceInfo</strong> will have a collection of PlaceInfo named <strong>TouristPlaces</strong>, which holds data for the vertical list to show the travel places.</p><p>Refer to the following code.</p><pre>public class ListViewOrientationViewModel : INotifyPropertyChanged<br>{<br>    #region Fields<br>    <br>    private ObservableCollection&lt;PlaceInfo&gt;? places;<br>    private PlaceInfo selectedItem;<br>    <br>    #endregion<br>    <br>    #region Constructor<br>    <br>    public ListViewOrientationViewModel()<br>    {<br>        var placesRepository = new PlaceInfoRepository();<br>        Places = placesRepository.GeneratePlaces();<br>        SelectedItem = Places[0];<br>    }<br>    <br>    #endregion<br>    <br>    #region Properties<br>    <br>    public PlaceInfo SelectedItem<br>    {<br>        get<br>        {<br>            return selectedItem;<br>        }<br>        set<br>        {<br>            selectedItem = value;<br>            OnPropertyChanged(&quot;SelectedItem&quot;);<br>        }<br>    }<br>    <br>    public ObservableCollection&lt;PlaceInfo&gt;? Places<br>    {<br>        get { return places; }<br>        set { this.places = value; OnPropertyChanged(&quot;Places&quot;); }<br>    }<br>    <br>    #endregion<br>    <br>    #region INotifyPropertyChanged<br>    <br>    public event PropertyChangedEventHandler? PropertyChanged;<br>    private void OnPropertyChanged(string name)<br>    {<br>        if (PropertyChanged != null)<br>            PropertyChanged(this, new PropertyChangedEventArgs(name));<br>    }<br>    #endregion<br>}</pre><p>Now, bind the ViewModel’s Places collection to the horizontal ListView control on the XAML page.</p><pre>&lt;ContentPage x:Class=&quot;ListViewMaui.HorizontalOrientation&quot;<br>             xmlns=&quot;http://schemas.microsoft.com/dotnet/2021/maui&quot;<br>             xmlns:x=&quot;http://schemas.microsoft.com/winfx/2009/xaml&quot;<br>             xmlns:local=&quot;clr-namespace:ListViewMaui&quot;<br>             xmlns:ListView=&quot;clr-namespace:Syncfusion.Maui.ListView;assembly=Syncfusion.Maui.ListView&quot;             <br>             BackgroundColor=&quot;White&quot;&gt;<br>    &lt;ContentPage.BindingContext&gt;<br>        &lt;local:ListViewOrientationViewModel x:Name=&quot;viewModel&quot;/&gt;<br>    &lt;/ContentPage.BindingContext&gt;<br>        &lt;ListView:SfListView x:Name=&quot;listView&quot; Grid.Row=&quot;1&quot;                                   <br>                        ItemsSource=&quot;{Binding Places}&quot;                                <br>                        Orientation=&quot;Horizontal&quot;&gt;<br>        &lt;/ListView:SfListView&gt;<br>    &lt;/ContentPage.Content&gt;<br>&lt;/ContentPage&gt;</pre><h3>Defining horizontal ListView’s ItemTemplate</h3><p>Once the <a href="https://help.syncfusion.com/cr/maui/Syncfusion.Maui.ListView.SfListView.html#Syncfusion_Maui_ListView_SfListView_ItemsSource">ItemsSource</a> is bound, the ListView control will display only the business objects (like PlaceInfo) as the content of the ListView items. We must update them by defining the <a href="https://help.syncfusion.com/cr/maui/Syncfusion.Maui.ListView.SfListView.html#Syncfusion_Maui_ListView_SfListView_ItemTemplate">ItemTemplate</a>.</p><p>By defining the <strong>ItemTemplate</strong>, you can easily set custom views to display the data items.</p><p>Refer to the following code.</p><pre>&lt;ListView:SfListView x:Name=&quot;listView&quot; Grid.Row=&quot;1&quot;                                   <br>                        ItemsSource=&quot;{Binding Places}&quot;                                <br>                        ScrollBarVisibility=&quot;Never&quot;<br>                        SelectionMode=&quot;Single&quot;                             <br>                        Orientation=&quot;Horizontal&quot; <br>                        SelectionBackground=&quot;Transparent&quot;<br>                        ItemSize=&quot;{OnPlatform Android=120,Default=130}&quot; <br>                        Margin=&quot;8,0,0,0&quot;<br>                        HeightRequest=&quot;180&quot;<br>                        SelectedItem=&quot;{Binding SelectedItem}&quot;&gt;<br>    &lt;ListView:SfListView.ItemTemplate&gt;<br>        &lt;DataTemplate&gt;<br>            &lt;Grid Margin=&quot;8,0,8,0&quot;&gt;<br>                &lt;Grid.RowDefinitions&gt;<br>                    &lt;RowDefinition Height=&quot;130&quot;/&gt;<br>                    &lt;RowDefinition Height=&quot;Auto&quot;/&gt;<br>                &lt;/Grid.RowDefinitions&gt;<br><br>                &lt;Border Padding=&#39;{OnPlatform UWP=&quot;-5,-5,5,5&quot;}&#39;<br>                        Stroke=&quot;#FFFDFD&quot;             <br>                        StrokeThickness=&quot;6&quot;    <br>                        HorizontalOptions=&quot;Center&quot;&gt;<br>                    &lt;Border.StrokeShape&gt;<br>                        &lt;RoundRectangle CornerRadius=&quot;6&quot;/&gt;<br>                    &lt;/Border.StrokeShape&gt;<br><br>                    &lt;Image Grid.Row=&quot;0&quot; Source=&quot;{Binding Image}&quot;  HeightRequest=&quot;130&quot; WidthRequest=&quot;110&quot;  Aspect=&quot;Fill&quot; Margin=&#39;{OnPlatform MacCatalyst=-3,iOS=-3}&#39;/&gt;<br>                &lt;/Border&gt;<br>                &lt;Label Grid.Row=&quot;1&quot; Text=&quot;{Binding Name}&quot;<br>                                    LineBreakMode=&quot;WordWrap&quot;                                               <br>                                    HorizontalTextAlignment=&quot;Center&quot;<br>                                    HorizontalOptions=&quot;Center&quot;<br>                                    VerticalTextAlignment=&quot;Center&quot; <br>                                    FontFamily=&quot;Roboto-Regular&quot;<br>                                    VerticalOptions=&quot;Center&quot;                                                                                   <br>                                    HeightRequest=&quot;40&quot;<br>                                    WidthRequest=&quot;110&quot;                                  <br>                                    TextColor=&quot;#99000000&quot;<br>                                    FontSize=&quot;14&quot;&gt;<br>                &lt;/Label&gt;<br>            &lt;/Grid&gt;<br>        &lt;/DataTemplate&gt;<br>    &lt;/ListView:SfListView.ItemTemplate&gt;<br>    &lt;ListView:SfListView.SelectedItemTemplate&gt;<br>        &lt;DataTemplate&gt;<br>            &lt;Grid Margin=&quot;8,0,8,0&quot;&gt;<br>                &lt;Grid.RowDefinitions&gt;<br>                    &lt;RowDefinition Height=&quot;130&quot;/&gt;<br>                    &lt;RowDefinition Height=&quot;Auto&quot;/&gt;<br>                &lt;/Grid.RowDefinitions&gt;<br><br>                &lt;Border Padding=&#39;{OnPlatform UWP=&quot;-5,-5,5,5&quot;}&#39;<br>                        Stroke=&quot;#1899EF&quot;             <br>                        StrokeThickness=&quot;6&quot;    <br>                        HorizontalOptions=&quot;Center&quot;&gt;<br>                    &lt;Border.StrokeShape&gt;<br>                        &lt;RoundRectangle CornerRadius=&quot;6&quot;/&gt;<br>                    &lt;/Border.StrokeShape&gt;<br><br>                    &lt;Image Grid.Row=&quot;0&quot; Source=&quot;{Binding Image}&quot;  HeightRequest=&quot;130&quot; WidthRequest=&quot;110&quot;  Aspect=&quot;Fill&quot; Margin=&#39;{OnPlatform MacCatalyst=-3,iOS=-3}&#39;/&gt;<br>                &lt;/Border&gt;<br>                &lt;Label Grid.Row=&quot;1&quot; Text=&quot;{Binding Name}&quot;<br>                                    LineBreakMode=&quot;WordWrap&quot;                                               <br>                                    HorizontalTextAlignment=&quot;Center&quot;<br>                                    HorizontalOptions=&quot;Center&quot;<br>                                    VerticalTextAlignment=&quot;Center&quot; <br>                                    FontFamily=&quot;Roboto-Regular&quot;<br>                                    VerticalOptions=&quot;Center&quot;                                                                                   <br>                                    HeightRequest=&quot;40&quot;<br>                                    WidthRequest=&quot;110&quot;                                  <br>                                    TextColor=&quot;#99000000&quot;<br>                                    FontSize=&quot;14&quot;&gt;<br>                &lt;/Label&gt;<br>            &lt;/Grid&gt;<br>        &lt;/DataTemplate&gt;<br><br>    &lt;/ListView:SfListView.SelectedItemTemplate&gt;<br>&lt;/ListView:SfListView&gt;</pre><p>Now the application will look like the following screenshot.</p><figure><img alt="Defining horizontal ListView’s ItemTemplate" src="https://cdn-images-1.medium.com/max/939/0*I7ITOy-VgPsSVHR_.png" /></figure><h3>Data binding for vertical ListView</h3><p>Now, selecting a city from the horizontal list will display the list of travel destinations by changing the ViewModel’s <strong>SelectedItem,</strong> which is bound to the horizontal ListView’s <a href="https://help.syncfusion.com/cr/maui/Syncfusion.Maui.ListView.SfListView.html#Syncfusion_Maui_ListView_SfListView_SelectedItem">SelectedItem</a> by using the bound property <strong>ItemsSource</strong> in the vertical ListView.</p><pre>&lt;ListView:SfListView x:Name=&quot;verticalListView&quot; Grid.Row=&quot;3&quot; <br>                        ItemsSource=&quot;{Binding Path=SelectedItem.TouristPlaces, Source={x:Reference listView}}&quot; <br>                        ItemSize=&quot;60&quot; <br>                        ItemSpacing=&quot;16,8,16,8&quot; <br>                        SelectionMode=&quot;None&quot;/&gt;</pre><h3>Defining vertical ListView’s ItemTemplate</h3><p>Here, we are showing the details of travel places by using their name, description<strong>,</strong> and image in custom views defined within the <strong>ItemTemplate</strong> property.</p><pre>&lt;ListView:SfListView x:Name=&quot;verticalListView&quot; Grid.Row=&quot;3&quot; <br>                        ItemsSource=&quot;{Binding Path=SelectedItem.TouristPlaces, Source={x:Reference listView}}&quot; <br>                        ItemSize=&quot;60&quot; <br>                        ItemSpacing=&quot;16,8,16,8&quot; <br>                        SelectionMode=&quot;None&quot;&gt;<br>    &lt;ListView:SfListView.ItemTemplate&gt;<br>        &lt;DataTemplate&gt;<br>            &lt;Grid&gt;<br>                &lt;Grid.ColumnDefinitions&gt;<br>                    &lt;ColumnDefinition Width=&quot;76&quot;/&gt;<br>                    &lt;ColumnDefinition Width=&quot;*&quot;/&gt;<br>                &lt;/Grid.ColumnDefinitions&gt;<br>                &lt;Frame HorizontalOptions=&quot;Start&quot; CornerRadius=&quot;3&quot; IsClippedToBounds=&quot;True&quot; Padding=&quot;0&quot; Margin=&quot;0&quot; HasShadow=&quot;False&quot; HeightRequest=&quot;60&quot; WidthRequest=&quot;60&quot;&gt;<br>                    &lt;Image Grid.Column=&quot;0&quot; HorizontalOptions=&quot;Start&quot; Source=&quot;{Binding Image}&quot; Aspect=&quot;Fill&quot; HeightRequest=&quot;60&quot; WidthRequest=&quot;60&quot;/&gt;<br>                &lt;/Frame&gt;<br>                &lt;Grid Grid.Column=&quot;1&quot; VerticalOptions=&quot;Center&quot;&gt;<br>                    &lt;Grid.RowDefinitions&gt;<br>                        &lt;RowDefinition Height=&quot;Auto&quot;/&gt;<br>                        &lt;RowDefinition Height=&quot;*&quot;/&gt;<br>                    &lt;/Grid.RowDefinitions&gt;<br>                    &lt;Label Grid.Row=&quot;0&quot; Text=&quot;{Binding Name}&quot; FontSize=&quot;14&quot; TextColor=&quot;#666666&quot; FontFamily=&quot;Roboto-Regular&quot; CharacterSpacing=&quot;0.25&quot;/&gt;<br>                    &lt;Label Grid.Row=&quot;1&quot; Text=&quot;{Binding Description}&quot; FontSize=&quot;14&quot; FontFamily=&quot;Roboto-Regular&quot; TextColor=&quot;#DE000000&quot; LineBreakMode=&quot;WordWrap&quot; CharacterSpacing=&quot;0.15&quot; Margin=&quot;0,5,0,0&quot;/&gt;<br>                &lt;/Grid&gt;<br>            &lt;/Grid&gt;<br>        &lt;/DataTemplate&gt;<br>    &lt;/ListView:SfListView.ItemTemplate&gt;<br>&lt;/ListView:SfListView&gt;</pre><p>After executing this code example, we will get output like in the following GIF image. Tapping on the items in the horizontal ListView dynamically updates the content of the vertical ListView.</p><figure><img alt="Travel Destination Listing UI in .NET MAUI" src="https://cdn-images-1.medium.com/max/600/0*dL7EN6TsaU0X05Ga.gif" /><figcaption>Travel Destination Listing UI in .NET MAUI</figcaption></figure><h3>Resources</h3><p>For more details, refer to the complete sample of <a href="https://github.com/SyncfusionExamples/horizontal-listview-with-travel-places-ui-.net-maui-listview">Travel Place Listing UI in .NET MAUI</a> in the GitHub repository.</p><h3>Conclusion</h3><p>Thanks for reading! I hope you now have a good idea of how to use the <a href="https://www.syncfusion.com/maui-controls/maui-listview">.NET MAUI ListView</a> to display tourist places in a vertical list based on the city selected from a horizontal list. Try creating this sample project and share your feedback in the comment section below.</p><p>For questions, contact us through our <a href="https://www.syncfusion.com/forums">support forum</a>, <a href="https://support.syncfusion.com/">support portal</a>, or <a href="https://www.syncfusion.com/feedback/maui">feedback portal</a>. We are always happy to assist you!</p><h3>Related blogs</h3><ul><li><a href="https://www.syncfusion.com/blogs/post/create-group-chat-profile-view-in-net-maui-app.aspx">Create Group Chat Profile View in .NET MAUI App</a></li><li><a href="https://www.syncfusion.com/blogs/post/replicating-an-immersive-ui-in-net-maui.aspx">Replicating an Immersive UI in .NET MAUI</a></li><li><a href="https://www.syncfusion.com/blogs/post/learn-performing-animation-in-net-maui-part-1.aspx">Learn Performing Animation in .NET MAUI: Part 1</a></li><li><a href="https://www.syncfusion.com/blogs/post/add-busy-notifications-to-your-net-maui-application.aspx">Add Busy Notifications to Your .NET MAUI Application</a></li></ul><p><em>Originally published at </em><a href="https://www.syncfusion.com/blogs/post/travel-destination-listing-ui-in-dotnet-maui.aspx"><em>https://www.syncfusion.com</em></a><em> on February 2, 2023.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d1d0443b41cd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/syncfusion/easily-develop-a-travel-destination-listing-ui-in-net-maui-d1d0443b41cd">Easily Develop a Travel Destination Listing UI in .NET MAUI</a> was originally published in <a href="https://medium.com/syncfusion">Syncfusion, Inc.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learn Performing Animation in .NET MAUI: Part 2]]></title>
            <link>https://medium.com/syncfusion/learn-performing-animation-in-net-maui-part-2-3b97534abd3a?source=rss-f874534cf75d------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b97534abd3a</guid>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[animation]]></category>
            <dc:creator><![CDATA[Lavender Anyango Otieno.]]></dc:creator>
            <pubDate>Thu, 02 Feb 2023 11:00:47 GMT</pubDate>
            <atom:updated>2023-02-02T12:11:29.546Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Learn Performing Animation in .NET MAUI: Part 2" src="https://cdn-images-1.medium.com/max/1024/0*0cs0fxpHacu9uWUr.png" /></figure><h3>Learn Performing Animation in .NET MAUI: Part 2</h3><p>Welcome to the second part of our blog on animation in <a href="https://docs.microsoft.com/en-us/dotnet/maui/what-is-maui">.NET MAUI</a>! In <a href="https://www.syncfusion.com/blogs/post/learn-performing-animation-in-net-maui-part-1.aspx">Part 1</a>, we covered the basics of animation and how to add simple animations to your .NET MAUI application. Now, it’s time to take it to the next level and explore custom animation in .NET MAUI.</p><p>Custom animation allows you to create more complex and tailored animations. This blog will teach you how to create custom animations in your .NET MAUI apps.</p><h3>Custom animation in .NET MAUI</h3><p>The .NET Multi-Platform App UI, or .NET MAUI, is a framework for building cross-platform applications using the .NET ecosystem. One of the powerful features of .NET MAUI is the ability to add animations to your app to enhance the user experience and make it more visually appealing.</p><p>The <strong><em>Animation</em></strong> class is the foundation for all .NET MAUI animations. The <strong><em>ViewExtensions</em></strong> class provides the extension methods for creating one or more animation objects. When creating an animation object, we should specify the number of parameters, including the beginning and end values for the animated property and a callback function to update the property’s value as the animation progresses.</p><p>In addition to animating a single property, the <strong><em>Animation</em></strong> class allows you to create and synchronize child animations. This will enable you to create more complex animations that involve multiple properties and elements within your app.</p><p>To run an animation created with the <strong><em>Animation</em></strong> class, we need to call the <strong><em>Commit</em></strong> method and specify the duration of the animation. You can also specify a callback function to control whether the animation should repeat, as well as other parameters, such as easing functions, to control the speed and smoothness of the animation.</p><h3>Create a custom animation</h3><p>We will create an animation for a Cody image that appears to be moving and blocked by a brick wall. Cody then thinks and jumps over the wall with a flip. After successfully flipping over the wall, Cody will celebrate a jump before moving away.</p><p>We can achieve this animation with several different animation objects. Each one is responsible for animating a specific aspect of the Cody image.</p><p>For example, the <strong><em>movingLeftAnimation</em></strong> object is responsible for animating Cody’s movement from left to right, while the <strong><em>rotateJumpAnimation</em></strong> object is responsible for animating Cody’s rotation as it jumps over the wall.</p><p>Then, we need to add the animation objects to a <strong><em>parentAnimation</em></strong> object, which controls the overall flow of the animation. The <strong><em>parentAnimation</em></strong> object specifies the start and end times for each animation object, allowing them to be sequenced together to create the desired animation.</p><p>Finally, the <strong><em>parentAnimation</em></strong> object is committed to the screen using the <strong><em>Commit</em></strong> method. This method specifies the length of the animation (in our case, it is 10,000 milliseconds) and a flag to indicate that the animation should repeat indefinitely.</p><p>Refer to the following code example to initialize the UI.</p><pre>&lt;ContentPage xmlns=&quot;http://schemas.microsoft.com/dotnet/2021/maui&quot;<br>             xmlns:x=&quot;http://schemas.microsoft.com/winfx/2009/xaml&quot;<br>             x:Class=&quot;CustomAnimation.MainPage&quot;&gt;  <br>    &lt;Grid WidthRequest=&quot;700&quot; Margin=&quot;10&quot;&gt;<br>         &lt;Image x:Name=&quot;imageView&quot;<br>                  Source=&quot;cody.png&quot;<br>                  HeightRequest=&quot;100&quot;<br>                  HorizontalOptions=&quot;Start&quot;<br>                  VerticalOptions=&quot;End&quot;/&gt;<br>  <br>         &lt;Image WidthRequest=&quot;50&quot;<br>                Margin=&quot;125,0,0,0&quot;<br>                Source=&quot;bricks.png&quot;<br>                VerticalOptions=&quot;End&quot;<br>                HeightRequest=&quot;100&quot;/&gt;<br>    &lt;/Grid&gt; <br>&lt;/ContentPage&gt;</pre><p>Refer to the following code to create a visually appealing animation of the Cody image that moves and jumps over a brick wall.</p><pre>var parentAnimation = new Animation();<br>var movingLeftAnimation = new Animation(v =&gt; imageView.TranslationX = v, 0, 250);<br>var movingLeftBackAnimation = new Animation(v =&gt; imageView.TranslationX = v, 250, 200);<br>var movingRightAnimation = new Animation(v =&gt; imageView.TranslationX = v, 500, 700);<br> <br>var rotateJumpAnimation = new Animation(v =&gt; imageView.Rotation = v, 0, 360);<br>var movingJumpAnimation = new Animation(v =&gt; imageView.TranslationX = v, 200, 500);<br>var movingJumpUpAnimation = new Animation(v =&gt; imageView.TranslationY = v, 0, -200);<br>var movingJumpDownAnimation = new Animation(v =&gt; imageView.TranslationY = v, -200, 0);<br>       <br>var jumpUpAnimation = new Animation(v =&gt; imageView.TranslationY = v, 0, -30);<br>var jumpDownAnimation = new Animation(v =&gt; imageView.TranslationY = v, -30, 0);<br>var jumpUpAnimation2 = new Animation(v =&gt; imageView.TranslationY = v, 0, -30);<br>var jumpDownAnimation2 = new Animation(v =&gt; imageView.TranslationY = v, -30, 0);<br> <br>parentAnimation.Add(0, 0.15, movingLeftAnimation);<br>parentAnimation.Add(0.25, 0.35, movingLeftBackAnimation);<br> <br>parentAnimation.Add(0.35, 0.65, rotateJumpAnimation);<br>parentAnimation.Add(0.35, 0.65, movingJumpAnimation);<br>parentAnimation.Add(0.35, 0.5, movingJumpUpAnimation);<br>parentAnimation.Add(0.5, 0.65, movingJumpDownAnimation);<br> <br>parentAnimation.Add(0.7, 0.75, jumpUpAnimation);<br>parentAnimation.Add(0.75, 0.8, jumpDownAnimation);<br>parentAnimation.Add(0.8, 0.85, jumpUpAnimation2);<br>parentAnimation.Add(0.85, 0.9, jumpDownAnimation2);<br> <br>parentAnimation.Add(0.9, 1, movingRightAnimation);<br> <br>parentAnimation.Commit(this, &quot;ChildAnimations&quot;, 16, 10000, null, null,repeat:()=&gt;true);</pre><figure><img alt="Creating a Custom Animation in .NET MAUI" src="https://cdn-images-1.medium.com/max/1024/0*tySOVEs8oJbstPUU.gif" /><figcaption>Creating a Custom Animation in .NET MAUI</figcaption></figure><h3>Custom animation with ViewExtensions class</h3><p>The <strong><em>ViewExtensions</em></strong> class in .NET MAUI allows us to animate a property from its current value to the specified value. However, this will be difficult when creating a color-changing animation method that animates a <strong><em>color</em></strong> property from one value to another, as different controls have different color properties.</p><p>To solve this problem, the <strong><em>PaintTo</em></strong> method can be written with a callback method that passes the interpolated color value back to the caller and takes the start and end color arguments.</p><p>Refer to the following code example.</p><pre>public static class ViewExtensions<br>{<br>    public static Task&lt;bool&gt; PaintTo(this VisualElement element, Color startColor, Color endColor, Action&lt;Color&gt; callback, uint length = 250, Easing easing = null)<br>    {<br>        Func&lt;double, Color&gt; transform = (t) =&gt;<br>            Color.FromRgba(startColor.Red + t * (endColor.Red - startColor.Red),<br>                           startColor.Green + t * (endColor.Green - startColor.Green),<br>                           startColor.Blue + t * (endColor.Blue - startColor.Blue),<br>                           startColor.Alpha + t * (endColor.Alpha - startColor.Alpha));<br>        return ChangePaint(element, &quot;ChangePaint&quot;, transform, callback, length, easing);<br>    }<br> <br>    public static void Cancel(this VisualElement self)<br>    {<br>        self.AbortAnimation(&quot;ColorTo&quot;);<br>    }<br> <br>    static Task&lt;bool&gt; ChangePaint(VisualElement element, string animation, Func&lt;double, Color&gt; transform, Action&lt;Color&gt; callback, uint length, Easing effect)<br>    {<br>        effect = effect ?? Easing.Linear;<br>        var source = new TaskCompletionSource&lt;bool&gt;();<br>        element.Animate&lt;Color&gt;(animation, transform, callback, 16, length, effect, (v, c) =&gt; source.SetResult(c));<br>        return source.Task;<br>    }<br>}</pre><figure><img alt="Creating Color-Changing Custom Animation in .NET MAUI" src="https://cdn-images-1.medium.com/max/296/0*uWelFaJVqO1VYO3d.gif" /><figcaption>Creating Color-Changing Custom Animation in .NET MAUI</figcaption></figure><h3>Reference</h3><p>For more details, refer to the <a href="https://learn.microsoft.com/en-us/dotnet/maui/user-interface/animation/custom?view=net-maui-7.0">custom animation in the .NET MAUI documentation</a>.</p><h3>Conclusion</h3><p>Thanks for reading! In this blog, we have seen how to create custom animations in your .NET MAUI applications. With these animations, you can provide a wonderful user experience in your apps!</p><p>Syncfusion <a href="https://www.syncfusion.com/maui-controls">.NET MAUI controls</a> were built from scratch using .NET MAUI, so they feel like framework controls. They are fine-tuned to work with a vast volume of data. Use them to build your cross-platform mobile and desktop apps!</p><p>The Essential Studio for .NET MAUI suite is available from the <a href="https://www.syncfusion.com/account/login">License and Downloads</a> page. If you are not a Syncfusion customer, you can always download our <a href="https://www.syncfusion.com/downloads/maui">free evaluation</a> to see all our controls.</p><p>For questions, you can contact us through our <a href="https://www.syncfusion.com/forums">support forum</a>, <a href="https://support.syncfusion.com/">support portal</a>, or <a href="https://www.syncfusion.com/feedback/maui">feedback portal</a>. We are always happy to assist you!</p><h3>Related blogs</h3><ul><li><a href="https://www.syncfusion.com/blogs/post/dotnet-maui-text-input-layout.aspx">Introducing the New .NET MAUI Text Input Layout</a></li><li><a href="https://www.syncfusion.com/blogs/post/create-project-planning-and-resource-management-calendar-in-net-maui.aspx">Create Project Planning and Resource Management Calendar in .NET MAUI</a></li><li><a href="https://www.syncfusion.com/blogs/post/dotnet-maui-funnel-charts.aspx">Introducing the New .NET MAUI Funnel Charts</a></li><li><a href="https://www.syncfusion.com/blogs/post/syncfusion-net-maui-2023-roadmap.aspx">Syncfusion .NET MAUI 2023 Roadmap</a></li></ul><p><em>Originally published at </em><a href="https://www.syncfusion.com/blogs/post/animation-in-net-maui-part-2.aspx"><em>https://www.syncfusion.com</em></a><em> on February 2, 2023.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b97534abd3a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/syncfusion/learn-performing-animation-in-net-maui-part-2-3b97534abd3a">Learn Performing Animation in .NET MAUI: Part 2</a> was originally published in <a href="https://medium.com/syncfusion">Syncfusion, Inc.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Integrating ChatGPT into Software Development Workflow: Tips and Best Practices]]></title>
            <link>https://medium.com/syncfusion/integrating-chatgpt-into-software-development-workflow-tips-and-best-practices-c243558051ed?source=rss-f874534cf75d------2</link>
            <guid isPermaLink="false">https://medium.com/p/c243558051ed</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[chatgpt]]></category>
            <dc:creator><![CDATA[Lavender Anyango Otieno.]]></dc:creator>
            <pubDate>Wed, 01 Feb 2023 13:09:06 GMT</pubDate>
            <atom:updated>2023-02-01T14:04:40.536Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Integrating ChatGPT into Software Development Workflow: Tips and Best Practices" src="https://cdn-images-1.medium.com/max/1024/0*HN2LVxVmc-Km8-V5.png" /></figure><p><a href="https://chat.openai.com/">ChatGPT</a>, developed by OpenAI, is a powerful chatbot that can hold natural conversations and provide human-like responses. In addition, its ability to understand and solve code-related problems makes it an ideal tool for software developers.</p><p>Developers can save time and effort by avoiding repetitive tasks, solving everyday design issues, and understanding complex code using ChatGPT as a pair programmer or a code reviewer. In addition, using ChatGPT leads to increased productivity and improved code quality, resulting in faster feature development and quicker releases.</p><p>In this article, I will discuss eight tips and tricks every developer should know when integrating ChatGPT into their development workflow.</p><h3>1. Comparing tech stacks</h3><p>Choosing the right tech stack is a challenge when starting a new project. Most of the time, you must evaluate languages, adaptability, long-term support, and limitations.</p><p>Typically, we’d do desk research and evaluate several tools based on our experience and searching on Google. In some cases, we’d develop proof of concepts (PoCs) to evaluate different tools, frameworks, and combinations. Unfortunately, this is extremely time-consuming as it’s dependent on manual work.</p><p>Thankfully, ChatGPT is brilliant at evaluating tech stacks. You can offload your stack evaluation to ChatGPT and let it create the PoCs for you! All you have to do is:</p><ol><li>Provide ChatGPT with the scenario you will build and the tools you have in mind.</li><li>Ask ChatGPT to compile a PoC and include all the steps needed to replicate it locally.</li></ol><p>Afterward, ChatGPT will do it for you! Here’s a brief scene where I asked ChatGPT to help me select between two front-end technology choices to interact with an API.</p><figure><img alt="Question Provided to ChatGPT" src="https://cdn-images-1.medium.com/max/1024/0*N5Km_ZOEd4FDdxxS.png" /><figcaption>Question Provided to ChatGPT</figcaption></figure><figure><img alt="Replies Provided by ChatGPT" src="https://cdn-images-1.medium.com/max/1024/0*FtHmytrCSEimCz0I.png" /></figure><figure><img alt="Replies Provided by ChatGPT" src="https://cdn-images-1.medium.com/max/1024/0*Wqyb_9sRYuQIN-Bd.png" /></figure><figure><img alt="Replies Provided by ChatGPT" src="https://cdn-images-1.medium.com/max/1024/0*ob4I2_vJ5qr6p8AL.png" /></figure><figure><img alt="Replies Provided by ChatGPT" src="https://cdn-images-1.medium.com/max/1024/0*Cgttpu04Gx-NCGlC.png" /></figure><figure><img alt="Replies Provided by ChatGPT" src="https://cdn-images-1.medium.com/max/1024/0*rhfjkLOLIefmBL9U.png" /><figcaption>Replies Provided by ChatGPT</figcaption></figure><p>As you can see, ChatGPT does an enormous amount of initial work for us, saving us time when deciding between different technology choices. All we had to do was ask the question.</p><h3>2. Generating boilerplate code</h3><p>As developers, we often write the same boilerplate code for each new project. If the tech stack is the same, this is mostly repetitive work with minor changes. Instead of doing it manually, you can ask ChatGPT to compile the boilerplate code depending on your needs.</p><p>For example, here is a scenario where I’ve asked ChatGPT to initialize an <strong>express</strong> API to reduce the effort of creating the foundation code.</p><figure><img alt="Compiling Boilerplate Code for an API" src="https://cdn-images-1.medium.com/max/1024/0*JdvkDwuBL1Oa7Oye.png" /><figcaption>Compiling Boilerplate Code for an API</figcaption></figure><p>Hereafter, this code can be modified and used for specific requirements. You can even ask ChatGPT to perform some of these changes.</p><h3>3. Understand complex code</h3><p>Sometimes as developers, we get to work on projects where the code is difficult to understand and highly complex. Typically, we would spend hours figuring out what the code does. Sometimes you might need more clarification on the code and have to ask a teammate or find the contributor that wrote it. This is extremely time-consuming and negatively impacts your productivity.</p><p>Now you can use ChatGPT to help provide reasoning to the code. All you have to do is provide ChatGPT the code and ask how it works, and you’ll receive a detailed explanation. This is shown below.</p><figure><img alt="Question Provided to ChatGPT" src="https://cdn-images-1.medium.com/max/1024/0*L6g4CwxpLoT01vlA.png" /><figcaption>Question Provided to ChatGPT</figcaption></figure><figure><img alt="Response Provided by ChatGPT" src="https://cdn-images-1.medium.com/max/1024/0*BYu3w7n9Mf5tpshf.png" /><figcaption>Response Provided by ChatGPT</figcaption></figure><h3>4. Implementing algorithms</h3><p>Suppose you are developing a complex algorithm to solve a problem. You have to spend significant time at the drawing board thinking about the approach and how to optimize it from various angles.</p><p>Now you can bring ChatGPT into your thinking process and work with it to help compile the best algorithm for you. For example, the following algorithm was created with the help of ChatGPT to implement search functionality.</p><figure><img alt="ChatGPT Assisting in Compiling Algorithms" src="https://cdn-images-1.medium.com/max/1024/0*nTtwoifL0pJ_KN8l.png" /></figure><figure><img alt="ChatGPT Assisting in Compiling Algorithms" src="https://cdn-images-1.medium.com/max/734/0*wD5RnA5oUttThzw0.png" /><figcaption>ChatGPT Assisting in Compiling Algorithms</figcaption></figure><p>As shown above, ChatGPT recommended using a tree-based algorithm to achieve searching with optimal time and space.</p><p>For developers, this is extremely helpful as we no longer need to spend hours developing the most optimal solution. We can offload it to ChatGPT and focus our time on building client requirements.</p><h3>5. Generate complex regexes</h3><p>This is one of the best examples of utilizing ChatGPT in your development workflow. Regexes can become very complex and challenging.</p><p>You can ask ChatGPT to write a regex for you by describing your matching use case. For example, you can tell ChatGPT to provide you with a regex that can be used to verify the format of the Sri Lankan National Identity Card as shown below.</p><figure><img alt="Generating a Regex for Sri Lankan NIC Using ChatGPT" src="https://cdn-images-1.medium.com/max/1024/0*_wHq96I2sTRX4Z4d.png" /><figcaption>Generating a Regex for Sri Lankan NIC Using ChatGPT</figcaption></figure><p>ChatGPT managed to build the regex in just a matter of seconds, whereas someone unfamiliar with regexes would spend around 30 minutes or longer trying to make it. This helps boost development efficiency and ensures developers work faster.</p><h3>6. Optimizing and refactoring code</h3><p>As developers, we may not always write the most readable or concise code. When a peer reviewer notices something that could be better and suggests changes, you have to go back and forth with them to improve the offending code.</p><p>However, you can utilize ChatGPT to review your code before sending it for peer review. It will look at your code and suggest ways to optimize and even refactor it. This is way beyond what typical static analyzers can do. All you have to do is:</p><ul><li>Include the code snippet in ChatGPT.</li><li>Ask ChatGPT, “Can you refactor this code to ensure it’s more readable and concise?”</li></ul><p>Here’s an example of ChatGPT refactoring and cleaning up a React Hook.</p><figure><img alt="Question Provided to ChatGPT" src="https://cdn-images-1.medium.com/max/1024/0*QNB7VV-AR8A-gkNj.png" /><figcaption>Question Provided to ChatGPT</figcaption></figure><figure><img alt="Refactored Code Provided by ChatGPT" src="https://cdn-images-1.medium.com/max/1024/0*Fpv85jDvK_OGrGx-.png" /><figcaption>Refactored Code Provided by ChatGPT</figcaption></figure><p>This implements a solid shift-left approach in the code review process, helping reduce time spent on development in the long run.</p><h3>7. Building test cases</h3><p>Writing unit tests has become a norm in the development lifecycle because it introduces many advantages to the process. However, it takes skill and effort to write a solid set of test cases with good coverage. Typically, you have to cover at least 80% of your code to ensure that your function is reliable. Thus the main challenge with unit tests is the time it takes to write them.</p><p>With ChatGPT in hand, you can use it to aid the development and generation of test cases that can cover up to 100% of your code. For example, provide your function to ChatGPT and ask, “Compile test cases that cover 100% of this code.” This lets you focus on building fantastic software rapidly while ensuring that your code is 100% testable.</p><figure><img alt="Question Provided to ChatGPT" src="https://cdn-images-1.medium.com/max/1024/0*h9enOum2Yuniu2hK.png" /><figcaption>Question Provided to ChatGPT</figcaption></figure><figure><img alt="Tests Generated by ChatGPT" src="https://cdn-images-1.medium.com/max/822/0*Lvtx0uWLHTPnWxbq.png" /><figcaption>Tests Generated by ChatGPT</figcaption></figure><p>The figure above highlights the test cases that ChatGPT generated, which aimed to cover 100% of the code. You can use these test cases as a starting point and even continue adding test cases in the future!</p><p>Using ChatGPT in testing ensures that your test cases are written faster and that tests are provided to cover areas you could accidentally overlook.</p><h3>8. Generating code documentation</h3><p>Writing documentation is a good practice for maintainability. It improves code readability and helps IDEs show meaningful information for autocompletion (e.g., showcase the details of the parameters and return types when invoking your function).</p><p>You can utilize ChatGPT to provide short yet complete function documentation to your code. Provide a snippet of your code and ask it to generate documentation. ChatGPT will immediately generate documentation for your code so you can focus your attention on something else.</p><figure><img alt="Request Provided to ChatGPT" src="https://cdn-images-1.medium.com/max/1024/0*ZMN94bWoAYpPCsgR.png" /><figcaption>Request Provided to ChatGPT</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wHq5IP_72_CZ89lp.png" /><figcaption>ChatGPT Documenting Code</figcaption></figure><p>As shown above, the documentation generated by ChatGPT is sufficient to understand the logic, parameters, and returned values from the hook provided as input. However, if you need the documentation to be descriptive, feel free to ask ChatGPT to provide descriptive documentation by asking, “Can you document the code in about 100 words?”</p><h3>Wrapping up</h3><p>AI should be encouraged in software development, not feared. If you haven’t used ChatGPT, I recommend creating an account and adopting ChatGPT in your day-to-day development workflow. Doing so will vastly improve your development efficiency, and you may even learn something new.</p><p>I hope that you found this article helpful.</p><p>Thank you for reading!</p><p>Syncfusion’s is the only suite you will need to build an app. It contains over 65 high-performance, lightweight, modular, and responsive UI components in a single package. Download a <a href="https://www.syncfusion.com/javascript-ui-controls">Essential JS 2</a> <a href="https://www.syncfusion.com/downloads/essential-js2">free trial</a> to evaluate the controls today.</p><p>If you have any questions or comments, you can contact us through our <a href="https://www.syncfusion.com/forums">support forums</a>, <a href="https://www.syncfusion.com/feedback/">feedback portal</a>, or <a href="https://support.syncfusion.com/">support portal</a>. We are always happy to assist you!</p><h3>Related blogs</h3><ul><li><a href="https://www.syncfusion.com/blogs/post/how-to-connect-azure-bot-service-to-xamarin-forms-chat-control.aspx">How to Connect Azure Bot Service to Xamarin.Forms Chat Control</a></li><li><a href="https://www.syncfusion.com/blogs/post/lets-see-what-it-takes-to-build-an-ai-chatbot-webinar-qa.aspx">Let’s See What It Takes to Build an AI Chatbot! Webinar Q&amp;A</a></li><li><a href="https://www.syncfusion.com/blogs/post/integrating-ai-into-your-apps-with-ai-builder.aspx">Integrating AI into Your Apps with AI Builder [Webinar Show Notes]</a></li><li><a href="https://www.syncfusion.com/blogs/post/simple-steps-to-automate-ui-testing-in-asp-net-core.aspx">Simple Steps to Automate UI Testing in ASP.NET Core</a></li></ul><p><em>Originally published at </em><a href="https://www.syncfusion.com/blogs/post/integrating-chatgpt-into-software-development.aspx"><em>https://www.syncfusion.com</em></a><em> on February 1, 2023.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c243558051ed" width="1" height="1" alt=""><hr><p><a href="https://medium.com/syncfusion/integrating-chatgpt-into-software-development-workflow-tips-and-best-practices-c243558051ed">Integrating ChatGPT into Software Development Workflow: Tips and Best Practices</a> was originally published in <a href="https://medium.com/syncfusion">Syncfusion, Inc.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Angular Lifecycle Hooks in Practice]]></title>
            <link>https://medium.com/syncfusion/angular-lifecycle-hooks-in-practice-ca5acb43640?source=rss-f874534cf75d------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca5acb43640</guid>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[hooks]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Lavender Anyango Otieno.]]></dc:creator>
            <pubDate>Tue, 31 Jan 2023 11:00:18 GMT</pubDate>
            <atom:updated>2023-01-31T12:48:44.336Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Angular Lifecycle Hooks in Practice" src="https://cdn-images-1.medium.com/max/1024/0*fkcJtAJsI1OdALNC.png" /></figure><p><a href="https://angular.io/">Angular</a> is one of the most popular front-end frameworks for building component-based robust web applications. A component in an Angular app has a lifecycle that goes through different phases, starting from its instantiation. Lifecycle hooks allow you to hook into those different phases as components are created, updated, and destroyed to gain more control over your application.</p><p>In this article, I will discuss Angular lifecycle hooks while showing when and how to use them.</p><h3>What are lifecycle hooks?</h3><p>Lifecycle hooks are timed methods that get activated by Angular change detection. Since Angular continuously executes change detection on data, the conditions of the current change detection cycle determine how lifecycle hooks are used. The most vital point about lifecycle hooks is the sequence in which they are used. The execution order doesn’t change, and they execute based on a predetermined sequence of load events generated by a detection cycle.</p><p>A hook, of course, only works when it satisfies specific criteria as determined by the current change detection cycle. Some resources are only accessible when a specific hook runs. You can use lifecycle hooks to hook into essential stages in the lifecycle of a component or directive to initiate new instances, initialize change detection when required, respond to changes throughout change detection, and clean up before instance destruction.</p><p>We can group these hooks into the following two categories:</p><ul><li>Hooks connected to the component itself or directives:</li><li><a href="https://www.syncfusion.com/blogs/post/angular-lifecycle-hooks-in-practice.aspx#constructor">constructor()</a></li><li><a href="https://www.syncfusion.com/blogs/post/angular-lifecycle-hooks-in-practice.aspx#ngonchanges">ngOnChanges</a></li><li><a href="https://www.syncfusion.com/blogs/post/angular-lifecycle-hooks-in-practice.aspx#ngoninit">ngOnInit</a></li><li><a href="https://www.syncfusion.com/blogs/post/angular-lifecycle-hooks-in-practice.aspx#ngdocheck">ngDoCheck</a></li><li><a href="https://www.syncfusion.com/blogs/post/angular-lifecycle-hooks-in-practice.aspx#ngondestroy">ngOnDestroy</a></li><li>Hooks connected to child components:</li><li><a href="https://www.syncfusion.com/blogs/post/angular-lifecycle-hooks-in-practice.aspx#ngaftercontentinit">ngAfterContentInit</a></li><li><a href="https://www.syncfusion.com/blogs/post/angular-lifecycle-hooks-in-practice.aspx#ngaftercontentchecked">ngAfterContentChecked</a></li><li><a href="https://www.syncfusion.com/blogs/post/angular-lifecycle-hooks-in-practice.aspx#ngafterviewinit">ngAfterViewInit</a></li><li><a href="https://www.syncfusion.com/blogs/post/angular-lifecycle-hooks-in-practice.aspx#ngafterviewchecked">ngAfterViewChecked</a></li></ul><p>Now let’s look into these, one by one.</p><h3>constructor()</h3><p>A component lifecycle begins with the creation of a component. The <strong>Constructor()</strong> method is the first hook called when Angular calls <strong>new</strong> on a class to construct a component or directive, and it ensures that the class’s fields and subclasses are properly initialized.</p><p>At this time, we cannot access the input properties of the component. None of its subcomponents are created. Furthermore, projected content is also unavailable. After the component has been instantiated, Angular starts the component’s first cycle of change detection.</p><h3>ngOnChanges</h3><p><strong>ngOnChanges</strong> is a lifecycle hook that is invoked once on the component’s instantiation and whenever one or more data-bound input properties change before <strong>ngOnInit()</strong> (if the component contains <strong>@Input</strong>-bound inputs). It gets triggered when Angular changes the data-bound input properties or resets them. A <strong>SimpleChanges</strong> object with the current and previous property values is passed as an optional parameter to the method.</p><h3>ngOnInit</h3><p>The <strong>ngOnInit</strong> hook is invoked following the first <strong>ngOnChanges()</strong>. Even when <strong>ngOnChanges()</strong> is not called when there are no template-bound inputs, <strong>ngOnInit()</strong> is still invoked. It is triggered upon the completion of initializing data-bound or input properties of a component.</p><p>After the completion of child component rendering, <strong>ngOnInit()</strong> gets invoked. Then, even after the data source of the input-bound property gets updated within the parent component, <strong>ngOnInit()</strong> isn’t invoked. So, we can call the <strong>ngOnInit()</strong> a one-time-use hook. It solely cares about initialization.</p><h3>ngDoCheck</h3><p>On every change detection run, <strong>ngDoCheck()</strong> is called immediately after <strong>ngOnChanges()</strong>, and on the initial run, it is called right after <strong>ngOnInit()</strong>. It detects and responds to changes that Angular alone cannot or will not detect. Following the execution of the default change detector, <strong>ngDoCheck()</strong> usually carries out change detection.</p><p>Developers can explicitly verify their data using <strong>ngDoCheck()</strong> as a custom change detector while combining it with <strong>ChangeDetectorRef</strong>. However, it is worth noting that it might lead to performance problems when mishandled.</p><h3>ngAfterContentInit</h3><p>Following the first <strong>ngDoCheck</strong>, the <strong>ngAfterContentInit()</strong> hook is executed. It gets triggered when the component or directive content has been initialized.</p><h3>ngAfterContentChecked</h3><p><strong>ngAfterContentChecked</strong> is called following <strong>ngAfterContentInit()</strong> and each subsequent <strong>ngDoCheck()</strong>. This hook gets invoked after Angular has evaluated the content projected in the directive or component.</p><h3>ngAfterViewInit</h3><p>The <strong>ngAfterViewInit</strong> hook is executed after <strong>ngAfterContentChecked()</strong>. The view is always loaded immediately after the content. So, it gets triggered after Angular initializes the views and child views of the component or the view containing the directive.</p><p>Within this hook, we have access to the <strong>ElementRef</strong> of the <strong>ViewChildren</strong> after the component has been created. <strong>ngAfterViewInit</strong> awaits the resolution of either <strong>@ViewChild</strong> or <strong>@ViewChildren</strong> queries. The same view of the component helps us to query these elements. We can use this hook for cases where the loading of view content depends on other view components.</p><h3>ngAfterViewChecked</h3><p>The <strong>ngAfterViewChecked</strong> hook is called after the <strong>ngAfterViewInit()</strong> and every subsequent <strong>ngAfterContentChecked()</strong>. It is triggered after Angular has examined the component’s and child’s views or the view that holds the directive. Watch out for setting any variables here that are bound to the template. It will lead to unexpected errors.</p><h3>ngOnDestroy</h3><p>When a component’s lifecycle is over, Angular is in charge of destroying the component. However, several essential detachment steps must be finished before the component or directive can be destroyed. <strong>ngOnDestroy()</strong> is the lifecycle hook responsible for carrying out these steps.</p><p>Now, let’s see how to implement Angular lifecycle hooks through a simple example.</p><p>Here, we are going to implement a simple component named <strong>UserDetails</strong>. Additionally, the <strong>UserDetails</strong> component will have a child component named <strong>Random</strong> to generate user IDs with a user-provided prefix randomly. You may choose to display or hide this <strong>UserDetails</strong> form from the main view.</p><figure><img alt="Angular Life Cycle Hooks Example" src="https://cdn-images-1.medium.com/max/732/0*_LNx5tRljgBzAS1m.gif" /></figure><p>Refer to the code of the <strong>UserDetails</strong> component below.</p><pre>import { Component, Injectable, OnInit, OnChanges, DoCheck, AfterViewChecked, AfterViewInit, AfterContentInit, AfterContentChecked, OnDestroy } from &quot;@angular/core&quot;;<br><br>@Component({<br>  selector: &quot;userdetails&quot;,<br>  template: `<br>    &lt;div&gt;<br>      &lt;h2&gt;Name :&lt;/h2&gt;<br>      &lt;input type=&quot;text&quot; [(ngModel)]=&quot;name&quot; /&gt;<br>      &lt;input type=&quot;text&quot; [(ngModel)]=&quot;prefix&quot; /&gt;<br>      &lt;random<br>        [user]=&quot;prefix&quot;<br>        (generateUserId)=&quot;onGenerateUserId($event)&quot;<br>      &gt;&lt;/random&gt;<br>      &lt;h3&gt;UserID : {{ userid }}&lt;/h3&gt;<br>    &lt;/div&gt;<br>  `<br>})<br><br>export class UserDetails<br>  implements<br>    OnInit,<br>    OnChanges,<br>    DoCheck,<br>    AfterViewChecked,<br>    AfterViewInit,<br>    AfterContentInit,<br>    AfterContentChecked,<br>    OnDestroy {<br>      name: string = &quot;Angular&quot;;<br>      prefix: string = &quot;&quot;;<br>      userid: string = &quot;&quot;;<br>     <br>      constructor() {<br>        this.name = &quot;&quot;;<br>        console.log(&quot;Parent constructor() called&quot;);<br>      }<br>   <br>      onGenerateUserId(uid:string) {<br>        console.log(&quot;Generating UserID&quot;);<br>        this.userid = uid;<br>      }<br>  <br>      ngOnInit() {<br>        this.name = &quot;John Doe&quot;;<br>        console.log(&quot;Parent ngOnInit() called&quot;);<br>      }<br>  <br>      ngOnChanges() {<br>        console.log(&quot;Parent ngOnChanges() called&quot;);<br>      }<br>  <br>      ngDoCheck() {<br>        console.log(&quot;Parent ngDoCheck() called&quot;);<br>      }<br>  <br>      ngAfterViewChecked() {<br>        console.log(&quot;Parent ngAfterViewChecked() called&quot;);<br>      }<br>  <br>      ngAfterViewInit() {<br>        console.log(&quot;Parent ngAfterViewInit() called&quot;);<br>      }<br>  <br>      ngAfterContentInit() {<br>        console.log(&quot;Parent ngAfterContentInit() called&quot;);<br>      }<br>  <br>      ngAfterContentChecked() {<br>        console.log(&quot;Parent ngAfterContentChecked() called&quot;);<br>      }<br>  <br>      ngOnDestroy() {<br>        console.log(&quot;Parent ngOnDestroy() called&quot;);<br>      }<br>}</pre><p>Refer to the code of the <strong>random ID generator</strong> component below.</p><pre>import {Component, Injectable, Input, Output, EventEmitter, OnInit, OnChanges, DoCheck, AfterViewChecked, AfterViewInit, AfterContentInit, AfterContentChecked, OnDestroy} from &#39;@angular/core&#39;<br><br>@Component({<br>  selector: &#39;random&#39;,<br>  template: `<br>    &lt;div&gt;<br>      &lt;input type=&#39;button&#39; (click)=&#39;random()&#39; value=&#39;Generate UserID&#39; /&gt;<br>    &lt;/div&gt;<br>  `<br>})<br><br>export class Random implements OnInit, OnChanges, DoCheck, AfterViewChecked, AfterViewInit, AfterContentInit, AfterContentChecked, OnDestroy{<br>  <br>  @Input() user:string;<br>  @Output() generateUserId: EventEmitter&lt;string&gt; = new EventEmitter&lt;string&gt;();<br>  <br>  constructor(){<br>   this.user = &#39;&#39;;<br>   console.log(&#39;Child constructor() called&#39;);<br>  }<br>  <br>  random(){<br>    var t = new Date().getTime();<br>    this.generateUserId.emit(this.user + t.toString());<br>    console.log(&#39;random() called&#39;);<br>  }<br>  <br>  ngOnInit(){<br>    console.log(&#39;Child ngOnInit() called&#39;);<br>  }<br>  <br>  ngOnChanges(){<br>    console.log(&#39;Child ngOnChanges() called&#39;);<br>  }<br>  <br>  ngDoCheck(){<br>    console.log(&#39;Child ngDoCheck() called&#39;);<br>  }<br>  <br>  ngAfterViewChecked(){<br>    console.log(&#39;Child ngAfterViewChecked() called&#39;);<br>  } <br>  <br>  ngAfterViewInit(){<br>    console.log(&#39;Child ngAfterViewInit() called&#39;);<br>  }<br>  <br>  ngAfterContentInit(){<br>    console.log(&#39;Child ngAfterContentInit() called&#39;);<br>  }<br>  <br>  ngAfterContentChecked(){<br>    console.log(&#39;Child ngAfterContentChecked() called&#39;);<br>  }<br>  <br>  ngOnDestroy(){<br>    console.log(&#39;Child ngOnDestroy() called&#39;);<br>  }<br>}</pre><p>Once you click on the <strong>Show User Details</strong> button, the parent and child components’ constructors run first as the parent component’s initialization occurs.</p><p>The application’s main component code is as follows.</p><pre>//app.component.ts<br>import { Component } from &#39;@angular/core&#39;;<br><br>@Component({<br>  selector: &#39;my-app&#39;,<br>  templateUrl: &#39;./app.component.html&#39;,<br>  styleUrls: [ &#39;./app.component.css&#39; ]<br>})<br><br>export class AppComponent  {<br>  name:string;<br>  showUserDetails: boolean;<br>  btnText: string;<br><br>  constructor() {<br>    this.showUserDetails = false;<br>    this.btnText = &#39;Show&#39;;<br>  }<br><br>  toggleUserDetails(){<br>    this.showUserDetails = !this.showUserDetails;<br>    this.btnText = this.showUserDetails ? &#39;Hide&#39; : &#39;Show&#39;;<br>  }<br><br>}</pre><pre>//app.component.html<br>  &lt;h2&gt;Angular Lifecycle Events Example&lt;/h2&gt;<br>    &lt;div&gt;<br>      &lt;input type=&#39;button&#39; (click)=&#39;toggleUserDetails()&#39; value=&#39;{{btnText}} User Details&#39;&gt;<br>    &lt;/div&gt;<br>    &lt;div *ngIf=&#39;showUserDetails&#39;&gt;<br>      &lt;userdetails&gt;&lt;/userdetails&gt;<br>    &lt;/div&gt;</pre><p><strong>ngAfterContentInit</strong> and <strong>ngAfterContentChecked </strong>are invoked immediately after <strong>ngOnInit()</strong> and <strong>ngDoCheck()</strong>. This implies that all external HTML will be first rendered. Then, the child component kicks off initializing. As previously explained, whenever any child’s <strong>Input()</strong>-bound properties are initialized or updated, <strong>ngOnChanges()</strong> will be called.</p><p>Looking closely, we can see that the child component’s <strong>ngAfterViewInit</strong> and <strong>ngAfterViewChecked</strong> hooks are coming early in the execution sequence. This indicates that the child component view will be first rendered before giving it to the parent. The parent component then relies on the assumption that its own view is finished since its child’s views are done. Therefore, the parent component’s <strong>ngAfterViewInit</strong> and <strong>ngAfterViewChecked</strong> hooks are triggered next.</p><p>The following figure shows the output flow for the <strong>Show User Details</strong> button click.</p><figure><img alt="Output flow for the Show User Details" src="https://cdn-images-1.medium.com/max/1024/0*h60a_CbEZT_rgPhz.png" /></figure><p>Once you type a letter in the text box as a user ID prefix and then click the <strong>Generate UserID</strong> button, you will get the console output like in the following image.</p><figure><img alt="Console output" src="https://cdn-images-1.medium.com/max/955/0*GAbXi0WHj1ztk1vx.png" /></figure><p>So the complete flow would look like the following image.</p><figure><img alt="Output of the complete flow" src="https://cdn-images-1.medium.com/max/1024/0*RRHzNFiuPz6r6FJd.png" /></figure><p>The parent component will be destroyed when you click the <strong>Hide User Details</strong> button, depending on <strong>*ngIf</strong>. Since the parent is destroyed, each of its children will also be removed. This means that the parent components will be cleaned up after cleaning up the child components. The result is shown below.</p><figure><img alt="Angular Lifecycle Hooks in Practice" src="https://cdn-images-1.medium.com/max/1024/0*vtQfaFLqxSMKk2jX.png" /></figure><h3>Resources</h3><p>For more details, refer to the demo application on the <a href="https://github.com/SyncfusionExamples/angular-life-cycle-hooks-demo">Angular Lifecycle Hooks</a> GitHub repository.</p><h3>Conclusion</h3><p>In this article, I discussed the Angular lifecycle hooks and when, where, and why they are used in Angular app development. As our projects expand, lifecycle hooks let us precisely control how our components behave from their creation. So, it is vital to grasp the concept and practice with it to enjoy its benefits.</p><p>Thank you for reading!</p><p>Syncfusion’s <a href="https://www.syncfusion.com/angular-ui-components">Angular UI component</a> library is the only suite you will ever need to build an app. It contains over 80 high-performance, lightweight, modular, and responsive UI components in a single package.</p><p>For existing customers, the newest Essential Studio version is available for download from the <a href="https://www.syncfusion.com/account/downloads">License and Downloads</a> page. If you are not a Syncfusion customer, you can try our 30-day <a href="https://www.syncfusion.com/downloads">free trial</a> to check out the available features. Also, check out our demos on <a href="https://github.com/syncfusion">GitHub</a>.</p><p>If you have questions, contact us through our <a href="https://www.syncfusion.com/forums">support forums</a>, <a href="https://support.syncfusion.com/">support portal</a>, or <a href="https://www.syncfusion.com/feedback/angular">feedback portal</a>. We are always happy to assist you!</p><h3>Related blogs</h3><ul><li><a href="https://www.syncfusion.com/blogs/post/whats-new-in-2022-volume-4-essential-js-2.aspx">What’s New in 2022 Volume 4: Essential JS 2</a></li><li><a href="https://www.syncfusion.com/blogs/post/mind-map-using-angular-diagram.aspx">A Complete Guide to Creating a Mind Map Using Angular Diagram Component</a></li><li><a href="https://www.syncfusion.com/blogs/post/debug-angular-apps-easily-using-angular-devtools.aspx">Debug Angular Apps Easily Using Angular DevTools</a></li><li><a href="https://www.syncfusion.com/blogs/post/strictly-typed-reactive-forms-in-angular.aspx">Mastering Strictly Typed Reactive Forms in Angular: A Step-by-Step Guide</a></li></ul><p><em>Originally published at </em><a href="https://www.syncfusion.com/blogs/post/angular-lifecycle-hooks-in-practice.aspx"><em>https://www.syncfusion.com</em></a><em> on January 31, 2023.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca5acb43640" width="1" height="1" alt=""><hr><p><a href="https://medium.com/syncfusion/angular-lifecycle-hooks-in-practice-ca5acb43640">Angular Lifecycle Hooks in Practice</a> was originally published in <a href="https://medium.com/syncfusion">Syncfusion, Inc.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Designing Effective Data Entry Forms in .NET MAUI: A Step-by-Step Guide]]></title>
            <link>https://medium.com/syncfusion/designing-effective-data-entry-forms-in-net-maui-a-step-by-step-guide-df0ec320fc6d?source=rss-f874534cf75d------2</link>
            <guid isPermaLink="false">https://medium.com/p/df0ec320fc6d</guid>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[csharp]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <dc:creator><![CDATA[Lavender Anyango Otieno.]]></dc:creator>
            <pubDate>Fri, 27 Jan 2023 12:06:38 GMT</pubDate>
            <atom:updated>2023-01-31T06:58:47.870Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Designing Effective Data Entry Forms in .NET MAUI: A Step-by-Step Guide" src="https://cdn-images-1.medium.com/max/1024/0*3itm17gj4qXA5AmO.png" /></figure><h3>Designing Effective Data Entry Forms in .NET MAUI: A Step-by-Step Guide</h3><p>The Syncfusion <a href="https://www.syncfusion.com/maui-controls/maui-dataform">.NET MAUI DataForm</a> (SfDataForm) is used to gather, edit, and display data in a user-friendly interface. It supports built-in and custom data editors to create data entry forms such as contact, employee, sign-in, and sign-up forms. This control is available with the <a href="https://www.syncfusion.com/forums/179561/essential-studio-2022-volume-4-main-release-v20-4-0-38-is-available-for-download">2022 Volume 4</a> release.</p><p>This blog will explain how to create a contact form using the .NET MAUI DataForm control and its basic features in mobile and desktop applications from a single shared codebase.</p><p><strong>Note: </strong>Refer to the <a href="https://help.syncfusion.com/maui/dataform/overview">.NET MAUI DataForm</a> documentation before getting started.</p><h3>Step 1: Initializing the .NET MAUI DataForm control</h3><ol><li>First, create a new <a href="https://learn.microsoft.com/en-us/dotnet/maui/get-started/first-app?view=net-maui-7.0&amp;tabs=vswin&amp;pivots=devices-android">.NET MAUI</a> application in <a href="https://visualstudio.microsoft.com/vs/">Visual Studio</a>.</li><li>Syncfusion .NET MAUI controls are available in the <a href="https://www.nuget.org/">NuGet Gallery</a>. To add the <a href="https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataForm.html">SfDataForm</a> to your project, open the <strong>NuGet package manager</strong> in <strong>Visual Studio</strong>, search for <a href="https://www.nuget.org/packages/Syncfusion.Maui.DataForm">Syncfusion.Maui.DataForm</a>, and then install it.</li><li>Import the control namespace <strong>Syncfusion.Maui.DataForm</strong> in your XAML page.</li><li>Now, initialize the <a href="https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataForm.SfDataForm.html">SfDataForm</a>.</li></ol><pre>&lt;ContentPage&gt;<br>  …..<br>  xmlns:dataForm=&quot;clr-namespace:Syncfusion.Maui.DataForm;assembly=Syncfusion.Maui.DataForm&quot;<br>  …..<br>  &lt;dataForm:SfDataForm/&gt;<br>&lt;/ContentPage&gt;</pre><p>5. The <a href="https://www.nuget.org/packages/Syncfusion.Maui.Core">Syncfusion.Maui.Core</a> NuGet is a dependent package for all <a href="https://www.syncfusion.com/maui-controls">Syncfusion .NET MAUI controls</a>. So, in the <strong>MauiProgram.cs</strong> file, register the handler for the Syncfusion core assembly. Refer to the following code.</p><pre>builder.ConfigureSyncfusionCore();</pre><h3>Step 2: Adding a model class to create a contact form</h3><p>Let’s create the data form model class ( <strong>ContactFormModel</strong>), which contains fields that store specific information such as names, addresses, and phone numbers. You can also use <a href="https://help.syncfusion.com/maui/dataform/data-annotations">attributes</a> to the data model class properties to effectively handle data.</p><p>Refer to the following code example.</p><pre>public class ContactFormModel<br>{<br>    [DataFormDisplayOptions(ColumnSpan = 2, ShowLabel = false)]<br>    public string ProfileImage { get; set; }<br><br>    [Display(Prompt = &quot;First name&quot;)]<br>    public string Name { get; set; }<br><br>    [Display(Prompt = &quot;Last name&quot;)]<br>    public string LastName { get; set; }<br><br>    [Display(Prompt = &quot;Mobile&quot;)]<br>    public double? Mobile { get; set; }<br><br>    [Display(Prompt = &quot;Landline&quot;)]<br>    public double? Landline { get; set; }<br><br>    [Display(Prompt = &quot;Address&quot;)]<br>    [DataFormDisplayOptions(ColumnSpan = 2)]<br>    public string Address { get; set; }<br><br>    [Display(Prompt = &quot;City&quot;)]<br>    [DataFormDisplayOptions(ColumnSpan = 2)]<br>    public string City { get; set; }<br><br>    [Display(Prompt = &quot;State&quot;)]<br>    public string State { get; set; }<br><br>    [Display(Prompt = &quot;Zip code&quot;)]<br>    [DataFormDisplayOptions(ShowLabel = false)]<br>    public double? ZipCode { get; set; }<br><br>    [Display(Prompt = &quot;Email&quot;)]<br>    public string Email { get; set; }<br>}</pre><h3>Step 3: Defining the editors</h3><p>By default, the .NET MAUI DataForm autogenerates editors based on primitive data types such as <strong>string</strong>, <strong>enumeration</strong>, <strong>DateTime</strong>, and <strong>TimeSpan</strong> in the <a href="https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataForm.SfDataForm.html#Syncfusion_Maui_DataForm_SfDataForm_DataObject">DataObject</a> property.</p><p>Some of the <a href="https://help.syncfusion.com/maui/dataform/editors">built-in editors</a> are text, password, multi-line, combo box, autocomplete, date, time, checkbox, switch, and radio group.</p><p>Refer to the following code to set the data form model ( <strong>ContactFormModel</strong>) to the <strong>DataObject</strong> property.</p><p><strong>XAML</strong></p><pre>&lt;Grid.BindingContext&gt;<br>     &lt;local:ContactFormViewModel/&gt;<br>&lt;/Grid.BindingContext&gt;<br>&lt;dataForm:SfDataForm x:Name=&quot;contactForm&quot;<br>                       DataObject=&quot;{Binding ContactFormModel}&quot; /&gt;</pre><p><strong>C#</strong></p><pre>public ContactFormViewModel()<br>{<br>   this.ContactFormModel = new ContactFormModel();<br>}<br><br>/// &lt;summary&gt;<br>/// Gets or sets the contact form model.<br>/// &lt;/summary&gt;<br>public ContactFormModel ContactFormModel { get; set; }</pre><figure><img alt="Creating a Contact Form Using the Built-in Editors in .NET MAUI DataForm Control" src="https://cdn-images-1.medium.com/max/610/0*jDuRCxdEInCDpSfh.png" /><figcaption>Creating a Contact Form Using the Built-in Editors in .NET MAUI DataForm Control</figcaption></figure><h3>Step 4: Grouping the editors in the contact form</h3><p>The .NET MAUI DataForm allows you to <a href="https://help.syncfusion.com/maui/dataform/grouping">group</a> or categorize related data. For example, we can create a <strong>Name</strong> group with the first and last name fields.</p><p>Refer to the following code example. In it, we have created the Name and Address groups.</p><pre>&lt;dataForm:SfDataForm x:Name=&quot;contactForm&quot;<br>                         DataObject=&quot;{Binding ContactFormModel}&quot;<br>                         AutoGenerateItems=&quot;False&quot; &gt;<br>      &lt;dataForm:SfDataForm.Items&gt;<br>        &lt;!--Name group--&gt;<br>        &lt;dataForm:DataFormGroupItem Name=&quot;Name&quot;&gt;<br>          &lt;dataForm:DataFormGroupItem.Items&gt;<br>            &lt;dataForm:DataFormTextItem FieldName=&quot;Name&quot; Padding=&quot;0, 10, 10, 10&quot; /&gt;<br>            &lt;dataForm:DataFormTextItem FieldName=&quot;LastName&quot;  Padding=&quot;0, 10, 10, 10&quot;/&gt;                   <br>          &lt;/dataForm:DataFormGroupItem.Items&gt;<br>        &lt;/dataForm:DataFormGroupItem&gt;<br>        &lt;!--Address group--&gt;<br>        &lt;dataForm:DataFormGroupItem Name=&quot;Address&quot;&gt;<br>          &lt;dataForm:DataFormGroupItem.Items&gt;<br>            &lt;dataForm:DataFormMultilineItem FieldName=&quot;Address&quot; RowSpan=&quot;2&quot; Padding=&quot;0, 10, 10, 10&quot;/&gt;<br>            &lt;dataForm:DataFormTextItem FieldName=&quot;City&quot;  Padding=&quot;0, 10, 10, 10&quot;/&gt;<br>            &lt;dataForm:DataFormTextItem FieldName=&quot;State&quot; Padding=&quot;0, 10, 10, 10&quot;/&gt;                        <br>          &lt;/dataForm:DataFormGroupItem.Items&gt;<br>        &lt;/dataForm:DataFormGroupItem&gt;<br>    &lt;/dataForm:SfDataForm.Items&gt;<br>&lt;/dataForm:SfDataForm&gt;</pre><figure><img alt="Grouping Editors in the Contact Form" src="https://cdn-images-1.medium.com/max/607/0*1PBIFiEED8c04QOG.png" /><figcaption>Grouping Editors in the Contact Form</figcaption></figure><h3>Step 5: Creating image-based labels</h3><p>Let’s add custom fonts to the <a href="https://help.syncfusion.com/maui/dataform/layout#loading-images-for-label">labels</a>. To do so, we have to add the font file (<strong>.ttf</strong>) in the <strong>Fonts</strong> folder. Then, register the custom font in the <strong>CreateMauiApp</strong> method in the <strong>MauiProgram.cs</strong> file.</p><p>Refer to the following code example.</p><p><strong>C#</strong></p><pre>builder<br>    .UseMauiApp&lt;App&gt;()<br>    .ConfigureFonts(fonts =&gt;<br>    {<br>       fonts.AddFont(“OpenSans-Regular.ttf”, “OpenSansRegular”);<br>       fonts.AddFont(“OpenSans-Semibold.ttf”, “OpenSansSemibold”);<br>       //// Register custom font.<br>       fonts.AddFont(“InputLayoutIcons.ttf”, “InputLayoutIcons”);<br>    });</pre><p><strong>XAML</strong></p><pre>&lt;dataForm:SfDataForm.Items&gt;            <br>  &lt;dataForm:DataFormGroupItem Name=&quot;Name&quot;&gt;<br>     &lt;dataForm:DataFormGroupItem.Items&gt;<br>        &lt;dataForm:DataFormTextItem FieldName=&quot;Name&quot; Padding=&quot;0, 10, 10, 10&quot; &gt;<br>           &lt;!--Add custom font to label--&gt;                                <br>           &lt;dataForm:DataFormTextItem.LeadingLabelIcon&gt;<br>              &lt;FontImageSource Glyph=&quot;F&quot; Color=&quot;#79747E&quot; FontFamily=&quot;InputLayoutIcons&quot; Size=&quot;18&quot; /&gt;                                <br>           &lt;/dataForm:DataFormTextItem.LeadingLabelIcon&gt;<br>         &lt;/dataForm:DataFormTextItem&gt;<br>         &lt;dataForm:DataFormTextItem FieldName=&quot;LastName&quot; LeadingLabelIcon=&quot;&quot; Padding=&quot;0, 10, 10, 10&quot;/&gt;<br>     &lt;/dataForm:DataFormGroupItem.Items&gt;<br>  &lt;/dataForm:DataFormGroupItem&gt;<br>  …<br>&lt;/dataForm:SfDataForm.Items&gt;</pre><figure><img alt="Adding Custom Image Fonts to Contact Form Labels" src="https://cdn-images-1.medium.com/max/619/0*yLNh9uktg6FXHhMv.png" /><figcaption>Adding Custom Image Fonts to Contact Form Labels</figcaption></figure><h3>Step 6: Adding a custom image editor</h3><p>You can also add a custom image editor in the DataForm to display the person’s image in the contact form.</p><p>Refer to the following code example.</p><pre>&lt;dataForm:SfDataForm.Items&gt;<br>   &lt;!--Custom image editor added--&gt;<br>   &lt;dataForm:DataFormCustomItem FieldName=&quot;ProfileImage&quot;&gt;<br>     &lt;dataForm:DataFormCustomItem.EditorView&gt;<br>       &lt;Image Source=&quot;people.png&quot;<br>               HeightRequest=&quot;80&quot;/&gt;<br>     &lt;/dataForm:DataFormCustomItem.EditorView&gt;<br>   &lt;/dataForm:DataFormCustomItem&gt;<br>   ….<br>&lt;/dataForm:SfDataForm.Items&gt;</pre><figure><img alt="Adding Custom Image Editor to Contact Form" src="https://cdn-images-1.medium.com/max/621/0*1oKqWDHyDgiQdcVQ.png" /><figcaption>Adding Custom Image Editor to Contact Form</figcaption></figure><h3>Step 7: Validating the data fields</h3><p>The .NET MAUI DataForm supports <a href="https://help.syncfusion.com/maui/dataform/validation">validating</a> the user input. Validation will make sure the users enter only correct values in the data form.</p><p>It supports the following data validations:</p><ul><li><strong>Required field validation</strong>: To check whether all the required data has been entered. For example, the form can be submitted only after filling in all the data fields.</li><li><strong>Input format validation:</strong> To check that the data being entered is in the correct format. For example, email address data should include the @ character.</li><li><strong>Date range validation</strong>: To check that the data being entered is within the specific range. For example, dates should be selected within a specific date range.</li></ul><p>We are going to add the required field validation to the phone<strong> number</strong> field in the contact form.</p><p><strong>XAML</strong></p><pre>&lt;dataForm:SfDataForm x:Name=&quot;contactForm&quot; DataObject=&quot;{Binding ContactFormModel}&quot; ColumnCount=&quot;1&quot; AutoGenerateItems=&quot;False&quot; ValidationMode=&quot;PropertyChanged&quot;/&gt;</pre><p><strong>C#</strong></p><pre>dataForm.ValidateProperty += this.OnDataFormValidateProperty;<br> <br>private void OnDataFormValidateProperty(object? sender, DataFormValidatePropertyEventArgs e)<br>{<br>    if (e.PropertyName == nameof(ContactFormModel.Mobile) &amp;&amp; !e.IsValid) <br>    {<br>        e.ErrorMessage = e.NewValue == null || string.IsNullOrEmpty(e.NewValue.ToString()) ? &quot;Please enter the mobile number&quot; : &quot;Invalid mobile number&quot;;<br>    }<br>}</pre><figure><img alt="Validating Data in the Contact Form" src="https://cdn-images-1.medium.com/max/622/0*Y-3ClT_2vPLmlRGW.png" /><figcaption>Validating Data in the Contact Form</figcaption></figure><h3>Step 8: Committing the data to the database</h3><p>Now, you can save or submit the entered data in the underlying database with the help of the following commit modes in the .NET MAUI DataForm:</p><ul><li><strong>LostFocus</strong>: The default commit mode, it commits the value to the underline data object when the editor loses focus.</li><li><strong>PropertyChanged</strong>: Immediately commits the value to the underline data object when the value changes.</li><li><strong>Manual</strong>: Manually commits the value by calling the <a href="https://help.syncfusion.com/maui/dataform/editing#commit-mode">Commit</a> method.</li></ul><p><strong>Note: </strong>For more details, refer to the <a href="https://help.syncfusion.com/maui/dataform/editing#commit-mode">data committing in the .NET MAUI DataForm</a> control documentation.</p><h3>Step 9: Designing the contact form with layouts</h3><p>You can elegantly design the contact form with the following layouts in the .NET MAUI DataForm control:</p><ul><li><strong>Grid layout:</strong> To arrange the editors in the form in a grid-like pattern with rows and columns.</li><li><strong>Linear layout: </strong>To arrange the editors in a single column.</li></ul><p>In this demo, I have added the grid layout to the <strong>Address</strong> group of the contact form.</p><pre>&lt;dataForm:DataFormGroupItem Name=&quot;Address&quot; ColumnCount=&quot;2&quot;&gt;<br>  &lt;dataForm:DataFormGroupItem.Items&gt;<br>   &lt;dataForm:DataFormMultilineItem FieldName=&quot;Address&quot; RowSpan=&quot;2&quot; Padding=&quot;0, 10, 10, 10&quot;&gt;<br>    &lt;dataForm:DataFormMultilineItem.LeadingLabelIcon&gt;<br>     &lt;FontImageSource Glyph=&quot;C&quot; Color=&quot;#79747E&quot; FontFamily=&quot;InputLayoutIcons&quot; Size=&quot;20&quot; /&gt;<br>    &lt;/dataForm:DataFormMultilineItem.LeadingLabelIcon&gt;<br>   &lt;/dataForm:DataFormMultilineItem&gt;<br>   &lt;dataForm:DataFormTextItem FieldName=&quot;City&quot; LeadingLabelIcon=&quot;&quot; Padding=&quot;0, 10, 10, 10&quot;/&gt;<br>   &lt;dataForm:DataFormTextItem FieldName=&quot;State&quot; LeadingLabelIcon=&quot;&quot; Padding=&quot;0, 10, 10, 10&quot;&gt;<br>    &lt;dataForm:DataFormTextItem.DefaultLayoutSettings&gt;<br>     &lt;dataForm:DataFormDefaultLayoutSettings LabelWidth=&quot;{OnIdiom Desktop=0.2*, Phone=0.3*}&quot; EditorWidth=&quot;{OnIdiom Desktop=0.8*, Phone=0.7*}&quot;/&gt;<br>     &lt;/dataForm:DataFormTextItem.DefaultLayoutSettings&gt;<br>   &lt;/dataForm:DataFormTextItem&gt;<br>   &lt;dataForm:DataFormCustomItem FieldName=&quot;ZipCode&quot; Padding=&quot;0, 10, 10, 10&quot; /&gt;<br>  &lt;/dataForm:DataFormGroupItem.Items&gt;<br> &lt;/dataForm:DataFormGroupItem&gt;</pre><figure><img alt="Adding Layouts to the Contact Form" src="https://cdn-images-1.medium.com/max/631/0*n8I8nk2Pyt-7wyw3.png" /><figcaption>Adding Layouts to the Contact Form</figcaption></figure><h3>GitHub reference</h3><p>For more details, refer to the <a href="https://github.com/SyncfusionExamples/create-contact-form-using-.net-maui-dataform">creating a contact form using the .NET MAUI DataForm control GitHub demo</a>.</p><h3>Conclusion</h3><p>Thanks for reading! In this blog, we have seen how to create a contact form easily using the Syncfusion <a href="https://www.syncfusion.com/maui-controls/maui-dataform">.NET MAUI DataForm</a> control. Try out the steps in this blog and leave your feedback in the comments section below!</p><p>For current Syncfusion customers, the newest version of Essential Studio is available from the <a href="https://www.syncfusion.com/account/downloads">license and downloads page</a>. If you are not yet a customer, you can try our 30-day <a href="https://www.syncfusion.com/downloads">free trial</a> to check out these features.</p><p>If you have any questions, you can contact us through our <a href="https://www.syncfusion.com/forums">support forums</a>, <a href="https://www.syncfusion.com/feedback">feedback portal</a>, or <a href="https://support.syncfusion.com/">support portal</a>. We are always happy to assist you!</p><h3>Related blogs</h3><ul><li><a href="https://www.syncfusion.com/blogs/post/create-project-planning-and-resource-management-calendar-in-net-maui.aspx">Create a Project Planning and Resource Management Calendar in .NET MAUI</a></li><li><a href="https://www.syncfusion.com/blogs/post/syncfusion-net-maui-control-demos-are-now-available-at-app-stores.aspx">Syncfusion .NET MAUI Control Demos Are Now Available at App Stores</a></li><li><a href="https://www.syncfusion.com/blogs/post/introducing-the-sixth-set-of-net-maui-controls.aspx">Introducing the Sixth Set of .NET MAUI Controls</a></li><li><a href="https://www.syncfusion.com/blogs/post/ocr-in-net-maui-building-an-image-processing-application.aspx">OCR in .NET MAUI: Building an Image Processing Application</a></li></ul><p><em>Originally published at </em><a href="https://www.syncfusion.com/blogs/post/designing-effective-data-entry-forms-in-net-maui-a-step-by-step-guide.aspx"><em>https://www.syncfusion.com</em></a><em> on January 27, 2023.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df0ec320fc6d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/syncfusion/designing-effective-data-entry-forms-in-net-maui-a-step-by-step-guide-df0ec320fc6d">Designing Effective Data Entry Forms in .NET MAUI: A Step-by-Step Guide</a> was originally published in <a href="https://medium.com/syncfusion">Syncfusion, Inc.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Recurring Events in .NET MAUI Scheduler-An Overview]]></title>
            <link>https://medium.com/syncfusion/recurring-events-in-net-maui-scheduler-an-overview-4a0e6442cb77?source=rss-f874534cf75d------2</link>
            <guid isPermaLink="false">https://medium.com/p/4a0e6442cb77</guid>
            <category><![CDATA[csharp]]></category>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[maui]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <dc:creator><![CDATA[Lavender Anyango Otieno.]]></dc:creator>
            <pubDate>Wed, 25 Jan 2023 10:05:10 GMT</pubDate>
            <atom:updated>2023-01-31T06:59:15.134Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Recurring Events in .NET MAUI Scheduler — An Overview" src="https://cdn-images-1.medium.com/max/1024/0*9q-h2SVFdXpUJCrQ.png" /></figure><h3>Recurring Events in .NET MAUI Scheduler-An Overview</h3><p>The <a href="https://www.syncfusion.com/maui-controls/maui-scheduler">.NET MAUI Scheduler</a> is a tool for scheduling events in a .NET MAUI application. It supports scheduling recurring events, which are regularly or periodically occurring appointments or events. Scheduler’s API has been designed with simplicity and ease of use in mind, so that anyone can add recurring events to their project with just a few API calls. Supported by a robust internal scheduling engine, Scheduler gives you all the APIs you need to build simple and easy-to-maintain schedules.</p><p>Let’s see how to create and customize recurrence appointments in the .NET MAUI Scheduler.</p><p><strong>Note: </strong>If you are new to this control, refer to the <a href="https://help.syncfusion.com/maui/scheduler/getting-started">.NET MAUI Scheduler getting started</a> documentation before proceeding.</p><h3>Recurrence Rule</h3><p>The Scheduler control uses the recurrence rule (string) to specify the recurrence details of an appointment. The recurrence rule specifies the recurrence frequency, interval, range, and position details.</p><h3>Recurrence pattern</h3><p>The pattern specifies the frequency or type of appointment: daily, weekly, monthly, and yearly.</p><h3>Interval</h3><p>Specify the interval between consecutive occurrences of the recurring appointment.</p><h3>Range</h3><p>The time range in which an appointment recurs. The range value is determined by the recurrence rule’s number of instances (count) or the end date (until). The recurring appointment is considered a never-ending appointment when the range is not specified.</p><h3>Position details</h3><p>The position (the day of the week, week of the month, month of the year) is specified and used on weekly, monthly, and yearly recurrence types.</p><h3>Recurrence Types</h3><p>Recurrence is the base term describing a repeating pattern. Business people use the concept of regular assignment of tasks or recurring events on certain days of the week, month, or even annually, like Jan. 1 every year.</p><h3>Daily recurrence type</h3><p>An appointment repeats daily with a specified day interval within a set date range. Following are some examples of daily recurrences.</p><figure><img alt="Daily recurrence type" src="https://cdn-images-1.medium.com/max/909/1*13aiVbqzrfUMlH-WMLJwZw.png" /></figure><h3>Weekly recurrence type</h3><p>An appointment repeats on a specified weekday with a specified week interval within the specified date range. Following are some examples of weekly recurrences.</p><figure><img alt="Weekly recurrence type" src="https://cdn-images-1.medium.com/max/925/1*r_1wR3rESJ6VCReO9ImYPQ.png" /></figure><h3>Monthly recurrence type</h3><p>An appointment repeats on a specified day of the month or weekday of a specified week position with a specified month interval within a set date range. Following are some examples of monthly recurrences.</p><figure><img alt="Monthly recurrence type" src="https://cdn-images-1.medium.com/max/918/1*LmKWSLoESRp8WzFK2L_jhg.png" /></figure><h3>Yearly recurrence type</h3><p>Schedule and repeat an appointment on a specified day of a month or weekday of specified week position of a month with a specified year interval within a specified date range.</p><figure><img alt="Yearly recurrence type" src="https://cdn-images-1.medium.com/max/910/1*YxFa67G4l_GiXO7x9NwCtw.png" /></figure><p><strong>Example</strong></p><pre>SfScheduler scheduler = new SfScheduler();<br>scheduler.View = SchedulerView.Week;<br>var appointment = new ObservableCollection&lt;SchedulerAppointment&gt;();<br><br>//Adding scheduler appointment in the scheduler appointment collection.<br>appointment.Add(new SchedulerAppointment()<br>{<br>    StartTime = DateTime.Today.Date.AddHours(9),<br>    EndTime = DateTime.Today.Date.AddHours(11),<br>    Subject = &quot;Daily scrum meeting&quot;,<br>    RecurrenceRule = &quot;FREQ=DAILY;INTERVAL=1;COUNT=10&quot;<br>});<br><br>//Adding the scheduler appointment collection to the AppointmentsSource of .NET MAUI Scheduler.<br>scheduler.AppointmentsSource = appointment;<br>this.Content = scheduler;</pre><figure><img alt="Daily Recurrence Type in .NET MAUI Scheduler" src="https://cdn-images-1.medium.com/max/720/0*Hcevezm2HRoixPFy.png" /><figcaption>Daily Recurrence Type in .NET MAUI Scheduler</figcaption></figure><p><strong>Note: </strong>For more details, refer to the <a href="https://help.syncfusion.com/maui/scheduler/appointments#recurrence-appointment">Recurrence appointments in the .NET MAUI Scheduler documentation</a>.</p><h3>Recurrence Exception Appointment</h3><p>The Scheduler control provides support to restrict (change start time, end time, and appointment details) occurrences and remove an occurrence of a repeating appointment with a recurrence exception.</p><h3>Deleting a recurring appointment</h3><p>The <strong>RecurrenceExceptionDates</strong> property in an appointment is used to remove the occurrence on specified dates.</p><p>Refer to the following code example.</p><pre>SfScheduler scheduler = new SfScheduler();<br>scheduler.View = SchedulerView.Week;<br>var appointment = new ObservableCollection&lt;SchedulerAppointment&gt;();<br><br>//Adding scheduler appointment in the scheduler appointment collection.<br>appointment.Add(new SchedulerAppointment()<br>{<br>    StartTime = DateTime.Today.Date.AddHours(9),<br>    EndTime = DateTime.Today.Date.AddHours(11),<br>    Subject = &quot;Daily scrum meeting&quot;,<br>    RecurrenceRule = &quot;FREQ=DAILY;INTERVAL=1;COUNT=10&quot;,<br>    RecurrenceExceptionDates = new ObservableCollection&lt;DateTime&gt; { DateTime.Today.AddDays(1) },<br>});<br><br>//Adding the scheduler appointment collection to the AppointmentsSource of .NET MAUI Scheduler.<br>scheduler.AppointmentsSource = appointment;<br>this.Content = scheduler;</pre><figure><img alt="Deleting an occurrence of a recurring appointment" src="https://cdn-images-1.medium.com/max/720/0*UhHng7KR87YRqngB.png" /><figcaption>Deleting an occurrence of a recurring appointment</figcaption></figure><h3>Modifying an occurrence of an appointment</h3><p>The <strong>RecurrenceExceptionDates</strong> and <strong>RecurrenceId</strong> properties in an appointment are used to change the occurrence appointment details without removing the appointment on a specified date.</p><p>Refer to the following code example.</p><pre>SfScheduler scheduler = new SfScheduler();<br>scheduler.View = SchedulerView.Week;<br>var appointment = new ObservableCollection&lt;SchedulerAppointment&gt;();<br><br>//Adding scheduler appointment in the scheduler appointment collection.<br>appointment.Add(new SchedulerAppointment()<br>{<br>     Id = 1,<br>     StartTime = DateTime.Today.Date.AddHours(9),<br>     EndTime = DateTime.Today.Date.AddHours(11),<br>     Subject = &quot;Daily scrum meeting&quot;,<br>     RecurrenceRule = &quot;FREQ=DAILY;INTERVAL=1;COUNT=10&quot;,<br>     RecurrenceExceptionDates = new ObservableCollection&lt;DateTime&gt; { DateTime.Today.AddDays(1) },<br>});<br><br>//Adding exception appointment in the scheduler appointment collection.<br>Appointment.Add(new SchedulerAppointment()<br>{<br>     Id = 2,<br>     StartTime = DateTime.Today.AddDays(1).Date.AddHours(11),<br>     EndTime = DateTime.Today.AddDays(1).Date.AddHours(13),<br>     Subject = &quot;Scrum meeting - Changed&quot;,<br>     RecurrenceId=1,<br>});<br><br>//Adding the scheduler appointment collection to the AppointmentsSource of .NET MAUI Scheduler.<br>scheduler.AppointmentsSource = appointment;<br>this.Content = scheduler;</pre><figure><img alt="Modified an occurrence of a recurring appointment on a Scheduler" src="https://cdn-images-1.medium.com/max/720/0*ZlbFvajorOLUZi_x.png" /><figcaption>Modified an occurrence of a recurring appointment on a Scheduler</figcaption></figure><h3>Conclusion</h3><p>Thank you for your time! This blog post showed how to set a recurring appointment in the <a href="https://www.syncfusion.com/maui-controls/maui-scheduler">.NET MAUI Scheduler</a>. You can explore other features in the Scheduler control in the <a href="https://help.syncfusion.com/maui/scheduler/overview">documentation</a>, where you can find detailed explanations of each with code examples.</p><p>If you are not a Syncfusion customer, you can try our 30-day <a href="https://www.syncfusion.com/downloads">free trial</a> to see how our components can enhance your projects.</p><p>Please feel free to try out the samples available in our <a href="https://github.com/syncfusion/maui-demos">.NET MAUI sample location</a> and share your feedback or ask questions in the comments section. Or contact us through our <a href="https://www.syncfusion.com/forums">support forum</a>, <a href="https://support.syncfusion.com/">support portal</a>, or <a href="https://www.syncfusion.com/feedback/home">feedback portal</a>. We are happy to assist you!</p><h3>Related blogs</h3><ul><li><a href="https://www.syncfusion.com/blogs/post/draw-2d-graphics-in-dotnet-maui-graphicsview.aspx">How to Draw 2D Graphics in .NET MAUI’s GraphicsView</a></li><li><a href="https://www.syncfusion.com/blogs/post/keyboard-shortcuts-in-dotnet-maui-scheduler.aspx">Keyboard Shortcuts in .NET MAUI Scheduler</a></li><li><a href="https://www.syncfusion.com/blogs/post/4-impressive-features-of-net-maui-in-net-7.aspx">4 Impressive Features of .NET MAUI in .NET 7</a></li><li><a href="https://www.syncfusion.com/blogs/post/syncfusion-mobile-and-desktop-controls-are-now-compatible-with-net-7.aspx">Syncfusion Mobile and Desktop Controls Are Now Compatible with .NET 7</a></li></ul><p><em>Originally published at </em><a href="https://www.syncfusion.com/blogs/post/recurring-events-in-net-maui-scheduler-an-overview.aspx"><em>https://www.syncfusion.com</em></a><em> on January 25, 2023.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a0e6442cb77" width="1" height="1" alt=""><hr><p><a href="https://medium.com/syncfusion/recurring-events-in-net-maui-scheduler-an-overview-4a0e6442cb77">Recurring Events in .NET MAUI Scheduler-An Overview</a> was originally published in <a href="https://medium.com/syncfusion">Syncfusion, Inc.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Step-by-Step Guide: Downloading PDFs from SharePoint and Displaying Them in a Xamarin App]]></title>
            <link>https://medium.com/syncfusion/step-by-step-guide-downloading-pdfs-from-sharepoint-and-displaying-them-in-a-xamarin-app-14696086bc2c?source=rss-f874534cf75d------2</link>
            <guid isPermaLink="false">https://medium.com/p/14696086bc2c</guid>
            <category><![CDATA[pdf]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[sharepoint]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[xamarin]]></category>
            <dc:creator><![CDATA[Lavender Anyango Otieno.]]></dc:creator>
            <pubDate>Tue, 24 Jan 2023 11:56:39 GMT</pubDate>
            <atom:updated>2023-01-31T06:59:47.039Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Step-by-Step Guide: Downloading PDFs from SharePoint and Displaying Them in a Xamarin App" src="https://cdn-images-1.medium.com/max/1024/0*jOK1vqjmUXpDchlv.png" /></figure><p>As we all know, <a href="https://www.microsoft.com/en-in/microsoft-365/sharepoint/collaboration">Microsoft SharePoint</a> is one of the most popular and widely used applications for storing files in the cloud. In this blog, we will see how to implement SharePoint authentication, access PDF files, and view them easily in a Xamarin application using our <a href="https://www.syncfusion.com/xamarin-ui-controls/xamarin-pdf-viewer">Syncfusion Xamarin PDF Viewer</a>.</p><p>Let’s get started!</p><h3>Configuring the Xamarin application using the Azure Portal</h3><p>To start with, you need to register your Xamarin application in Azure AD. Sign into the <a href="https://portal.azure.com/">Azure Portal</a>, search for and select <strong>Azure Active Directory</strong>, then go to the <strong>App registrations</strong> tab and select <strong>New registration</strong>.</p><p><strong>Step 1:</strong> In the <strong>Register an application</strong> page:</p><p>a. Enter a <strong>Name</strong> for your app registration.</p><p>b. Select the type of accounts you want to grant access to your app.</p><p>c. Select <strong>Register</strong>.</p><figure><img alt="Register an application" src="https://cdn-images-1.medium.com/max/888/0*6pCRoWVd3b6dWsWq.png" /></figure><p><strong>Step 2:</strong> After the app registration is created, take note of the <strong>Application (client) ID</strong> for later use. You can find it in the <strong>Overview</strong> tab of the application registration we just created.</p><figure><img alt="Application (client) ID" src="https://cdn-images-1.medium.com/max/931/0*ZurizluZkJd3TztT.png" /></figure><p><strong>Step 3:</strong> Then, go to the <strong>Authentication</strong> tab, click <strong>Add a platform</strong>, and add both iOS and Android. Just for Android, we need to generate and provide a signature hash.</p><figure><img alt="Authentication tab" src="https://cdn-images-1.medium.com/max/939/0*1Gkxm7REQFh8Si1U.png" /></figure><h3>Creating and configuring a Xamarin application</h3><p>Now, integrate the Microsoft SharePoint authentication into our Xamarin application to access the PDF documents and view them using our Syncfusion Xamarin PDF Viewer.</p><p><strong>Step 1:</strong> <a href="https://learn.microsoft.com/en-us/xamarin/get-started/first-app/">Create a new Xamarin.Forms project</a>.</p><p><strong>Step 2:</strong> Install the following NuGet packages in the PCL and all platform projects:</p><ul><li><a href="https://www.nuget.org/packages/PnP.Framework/"><strong>PnP.Framework</strong></a><strong> </strong>— To authenticate and retrieve data from SharePoint.</li><li><a href="https://www.nuget.org/packages/Syncfusion.Xamarin.SfPdfViewer"><strong>Syncfusion.Xamarin.SfPdfViewer</strong></a><strong> </strong>— To view the PDF documents.</li><li><a href="https://www.nuget.org/packages/Syncfusion.Xamarin.SfTreeView"><strong>Syncfusion.Xamarin.SfTreeView</strong></a><strong> </strong>— To visualize the retrieved SharePoint documents like in a file explorer.</li><li><a href="https://www.nuget.org/packages/Syncfusion.Xamarin.SfProgressBar"><strong>Syncfusion.Xamarin.SfProgressBar</strong></a> — To indicate the progress of a task.</li></ul><p>Additionally, in iOS, to launch the application with Syncfusion controls, you need to call the <strong>SfPdfDocumentViewRenderer.Init()</strong>, <strong>SfTreeViewRenderer.Init()</strong>, and<strong> SfLinearProgressBarRenderer.Init() </strong>methods in the <strong>FinishedLaunching</strong> overridden method of the <strong>AppDelegate</strong> class after the Xamarin.Forms framework has been initialized and before the <strong>LoadApplication</strong> is called. Refer to the following code sample.</p><pre>public override bool FinishedLaunching(UIApplication app, NSDictionary options)<br>{<br>    global::Xamarin.Forms.Forms.Init();<br>    Syncfusion.SfPdfViewer.XForms.iOS.SfPdfDocumentViewRenderer.Init();<br>    Syncfusion.XForms.iOS.TreeView.SfTreeViewRenderer.Init();<br>    Syncfusion.XForms.iOS.ProgressBar.SfLinearProgressBarRenderer.Init();<br>    LoadApplication(new App());<br>    App.ParentWindow = null;<br>    return base.FinishedLaunching(app, options);<br>}</pre><p><strong>Note: </strong>Here, the <strong>SfTreeView</strong> and <strong>SfProgressBar</strong> have just been used to improve the usability of the application. You can replace these with the controls of your choice.</p><p><strong>Step 3:</strong> Create model classes named <strong>FileManager</strong> and <strong>PDFFile</strong> to hold the data of the SharePoint documents and the PDF document, respectively. Refer to the following code example.</p><p><strong>FileManager.cs</strong></p><pre>using System.ComponentModel;<br>using Xamarin.Forms;<br>using Microsoft.SharePoint.Client;<br><br>namespace SharePoint<br>{<br>    public class FileManager : INotifyPropertyChanged<br>    {<br>        private string itemName;<br>        private bool hasChildNodes;<br>        private Folder folder;<br>        private File file;<br>        private ImageSource imageIcon;<br>        <br>        public FileManager()<br>        {<br>        }<br>        <br>        public string ItemName<br>        {<br>            get { return itemName; }<br>            set<br>            {<br>                itemName = value;<br>                RaisedOnPropertyChanged(&quot;ItemName&quot;);<br>            }<br>        }<br>        <br>        public bool HasChildNodes<br>        {<br>            get { return hasChildNodes; }<br>            set<br>            {<br>                hasChildNodes = value;<br>                RaisedOnPropertyChanged(&quot;HasChildNodes&quot;);<br>            }<br>        }<br>        <br>        public Folder Folder<br>        {<br>            get { return folder; }<br>            set<br>            {<br>                folder = value;<br>                RaisedOnPropertyChanged(&quot;Folder&quot;);<br>            }<br>        }<br>        <br>        public File File<br>        {<br>            get { return file; }<br>            set<br>            {<br>                file = value;<br>                RaisedOnPropertyChanged(&quot;File&quot;);<br>            }<br>        }<br>       <br>        public ImageSource ImageIcon<br>        {<br>            get { return imageIcon; }<br>            set<br>            {<br>                imageIcon = value;<br>                RaisedOnPropertyChanged(&quot;ImageIcon&quot;);<br>            }<br>        }<br>        <br>        public event PropertyChangedEventHandler PropertyChanged;<br>        <br>        public void RaisedOnPropertyChanged(string _PropertyName)<br>        {<br>            if (PropertyChanged != null)<br>            {<br>                PropertyChanged(this, new PropertyChangedEventArgs(_PropertyName));<br>            }<br>        }<br>    }<br>}</pre><p><strong>PDFFile.cs</strong></p><pre>using System.IO;<br><br>namespace SharePoint<br>{<br>    public class PdfFile<br>    {<br>        public Stream DocumentStream { get; set; }<br>        public string Name { get; set; }<br>        public PdfFile(Stream pdfStream,string pdfName)<br>        {<br>            DocumentStream = pdfStream;<br>            Name = pdfName;<br>        }<br>    }<br>}</pre><p><strong>Step 4: </strong>Create a ViewModel class named SharePointViewModel.cs. Implement the logic to authenticate and retrieve the SharePoint documents and return the document stream of the selected PDF file in the File Manager. Refer to the following code example.</p><p><strong>SharePointViewModel.cs</strong></p><pre>using Microsoft.Identity.Client;<br>using Microsoft.SharePoint.Client;<br>using PnP.Framework;<br>using Syncfusion.TreeView.Engine;<br>using System;<br>using System.Collections.ObjectModel;<br>using System.IO;<br>using System.Reflection;<br>using System.Threading.Tasks;<br>using System.Windows.Input;<br>using Xamarin.Essentials;<br>using Xamarin.Forms;<br><br>namespace SharePoint<br>{<br>    internal class SharePointViewModel<br>    {<br>        // Replace with your SharePoint tenant name.<br>        private const string Tenant = &quot;{YOUR TENANT NAME}&quot;;<br>        <br>        // Replace with your targeted SharePoint site name.<br>        private const string SiteName = &quot;{YOUR SITE NAME}&quot;;<br>        <br>        // Replace with your Azure AD Application&#39;s Client ID.<br>        private const string ClientId = &quot;{YOUR CLIENT ID}&quot;;<br>        <br>        // Replace with your Azure AD Application&#39;s Package Name or Bundle ID.<br>        private const string AppId = &quot;{YOUR APP ID}&quot;;<br>        <br>        // For Android, replace with your Authentication Signature Hash.<br>        private const string SignatureHash = &quot;{YOUR SIGNATURE HASH}&quot;;<br>        <br>        public ObservableCollection&lt;FileManager&gt; Documents { get; set; }        <br>        public ClientContext Context { get; set; }        <br>        public ICommand DocumentsViewOnDemandCommand { get; set; }<br>        public SharePointViewModel()<br>        {<br>            DocumentsViewOnDemandCommand = new Command(ExecuteOnDemandLoading, CanExecuteOnDemandLoading);<br>        }<br>        <br>        private bool CanExecuteOnDemandLoading(object sender)<br>        {<br>            var hasChildNodes = ((sender as TreeViewNode).Content as FileManager).HasChildNodes;<br>            if (hasChildNodes)<br>                return true;<br>            else<br>                return false;<br>        }<br>        <br>        private void ExecuteOnDemandLoading(object obj)<br>        {<br>            var node = obj as TreeViewNode;<br>            <br>            // Skip the repeated population of child items when every time the node expands.<br>            if (node.ChildNodes.Count &gt; 0)<br>            {<br>                node.IsExpanded = true;<br>                return;<br>            }<br>            <br>            //Animation starts for expander to show progress of load on demand.<br>            node.ShowExpanderAnimation = true;<br>            <br>            Microsoft.SharePoint.Client.Folder root = (node.Content as FileManager).Folder;<br>            <br>            var documents = GetDocuments(root);<br>            <br>            node.PopulateChildNodes(documents);<br>            <br>            if (documents.Count &gt; 0)<br>            {<br>                //Expand the node after child items are added.              <br>                node.IsExpanded = true;<br>            }<br>           <br>            //Stop the animation after load on demand is executed. If animation not stopped, it remains still after execution of load on demand.<br>            node.ShowExpanderAnimation = false;<br>        }<br>        <br>        /// &lt;summary&gt;<br>        /// Perform SharePoint authentication and return the documents of the target site.<br>        /// &lt;/summary&gt;<br>        /// &lt;returns&gt;Documents of the target site&lt;/returns&gt;<br>        internal async Task AuthenticateAndAcquireDocuments()<br>        {<br>            string redirectURI = DeviceInfo.Platform == DevicePlatform.Android ?<br>                $&quot;msauth://{AppId}/{SignatureHash}&quot; : $&quot;msauth.{AppId}://auth&quot;;<br>            <br>            IPublicClientApplication PublicClientApp = PublicClientApplicationBuilder.Create(ClientId)<br>                .WithIosKeychainSecurityGroup(AppId)<br>                .WithRedirectUri(redirectURI)<br>                .WithAuthority(&quot;https://login.microsoftonline.com/common&quot;)<br>                .Build();<br>            <br>            var _scopes = new String[] { $&quot;https://{Tenant}.sharepoint.com/AllSites.Read&quot; }; //Replace with your own permissions.<br>            <br>            try<br>            {<br>                AuthenticationResult authResult = await PublicClientApp.AcquireTokenInteractive(_scopes)<br>                    .WithParentActivityOrWindow(App.ParentWindow)<br>                    .WithUseEmbeddedWebView(true)<br>                    .ExecuteAsync();<br>                <br>                var authManager = new AuthenticationManager().GetAccessTokenContext(                    $&quot;https://{Tenant}.sharepoint.com/sites/{SiteName}&quot;,<br>                    authResult.AccessToken);<br>                <br>                Context = authManager.GetSiteCollectionContext();<br>                <br>                var web = Context.Web;//Gets target site web details.<br>                var docs = web.Lists.GetByTitle(&quot;Documents&quot;);//Gets site&#39;s documents list.<br>                Var root = docs.RootFolder;  //Root folder.<br>                Documents = GetDocuments(root);<br>            }<br>            catch (Exception e)<br>            {<br>            }<br>        }<br>        <br>         /// &lt;summary&gt;<br>        /// Returns the documents present in the passed root or parent folder.<br>        /// &lt;/summary&gt;<br>        /// &lt;param name=&quot;root&quot;&gt;Root folder&lt;/param&gt;<br>        /// &lt;returns&gt;Documents of the root or parent folder&lt;/returns&gt;<br>        internal ObservableCollection&lt;FileManager&gt; GetDocuments(Microsoft.SharePoint.Client.Folder root)<br>        {<br>            ObservableCollection&lt;FileManager&gt; documents = new ObservableCollection&lt;FileManager&gt;();<br>            <br>            Assembly assembly = typeof(DocumentsPage).GetTypeInfo().Assembly;<br>            Context.Load(root, f =&gt; f.ItemCount, f =&gt; f.Folders);<br>            Context.Load(root, f =&gt; f.ItemCount, f =&gt; f.Files);<br>            Context.ExecuteQuery();<br>            <br>            foreach (Microsoft.SharePoint.Client.Folder folder in root.Folders)<br>            {<br>                bool hasChildNodes = folder.ItemCount &gt; 0 ? true : false;<br>                var folderItem = new FileManager()<br>                {<br>                    ItemName = folder.Name,<br>                    Folder = folder,<br>                    HasChildNodes = hasChildNodes,<br>                    ImageIcon = ImageSource.FromResource(&quot;SharePoint.Icons.treeview_folder.png&quot;, assembly)<br>                };<br>                documents.Add(folderItem);<br>            }<br>            <br>            foreach (Microsoft.SharePoint.Client.File file in root.Files)<br>            {<br>                if (file.Name.EndsWith(&quot;.pdf&quot;))<br>                {<br>                    var fileItem = new FileManager()<br>                    {<br>                        ItemName = file.Name,<br>                        File = file,<br>                        ImageIcon = ImageSource.FromResource(&quot;SharePoint.Icons.treeview_pdf.png&quot;, assembly)<br>                    };<br>                    documents.Add(fileItem);<br>                }<br>            }<br>            return documents;<br>        }<br>        <br>        /// &lt;summary&gt;<br>        /// Returns the chosen PDF document details.<br>        /// &lt;/summary&gt;<br>        /// &lt;param name=&quot;file&quot;&gt;PDF file chosen from the File Explorer&lt;/param&gt;<br>        /// &lt;returns&gt;PDF document details&lt;/returns&gt;<br>        internal PdfFile GetPdfDocumentDetails(Microsoft.SharePoint.Client.File file)<br>        {<br>            MemoryStream PdfDocumentStream = new MemoryStream();<br>            var fileStream = file.OpenBinaryStream();<br>            Context.Load(file);<br>            Context.ExecuteQuery();<br>            fileStream.Value.CopyTo(PdfDocumentStream);<br>            PdfDocumentStream.Position = 0;<br>            return new PdfFile(PdfDocumentStream, file.Name);<br>        }<br>    }<br>}</pre><p>Make sure to replace the following things in the previous code example:</p><ul><li><strong>Tenant</strong>-SharePoint tenant name.</li><li><strong>SiteName</strong>-SharePoint site name.</li><li><strong>ClientId</strong>-Application’s Client ID noted from the Azure AD.</li><li><strong>AppId</strong>-Application’s package name [Android] or bundle ID [iOS] given during Azure AD authentication.</li><li><strong>SignatureHash</strong>-Signature hash noted from Android’s authentication.</li></ul><p><strong>Step 5: </strong>Create a view named <strong>PdfViewerPage</strong> to view the selected PDF file from the SharePoint documents. Refer to the following code example.</p><p><strong>PdfViewerPage.xaml</strong></p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;<br>&lt;ContentPage xmlns=&quot;http://xamarin.com/schemas/2014/forms&quot;<br>             xmlns:x=&quot;http://schemas.microsoft.com/winfx/2009/xaml&quot; <br>             xmlns:syncfusion=&quot;clr-namespace:Syncfusion.SfPdfViewer.XForms;assembly=Syncfusion.SfPdfViewer.XForms&quot; <br>             x:Class=&quot;SharePoint.PdfViewerPage&quot;&gt;<br>    &lt;ContentPage.Content&gt;<br>        &lt;syncfusion:SfPdfViewer x:Name=&quot;PdfViewer&quot;/&gt;<br>    &lt;/ContentPage.Content&gt;<br>&lt;/ContentPage&gt;</pre><p><strong>PdfViewerPage.xaml.cs</strong></p><pre>using Xamarin.Forms;<br>using Xamarin.Forms.Xaml;<br><br>namespace SharePoint<br>{<br>    [XamlCompilation(XamlCompilationOptions.Compile)]<br>    public partial class PdfViewerPage : ContentPage<br>    {<br>        public PdfViewerPage(PdfFile pdfFile)<br>        {<br>            InitializeComponent();<br>            this.Title = pdfFile.Name;<br>            pdfFile.DocumentStream.Position = 0;<br>            PdfViewer.LoadDocument(pdfFile.DocumentStream);<br>        }<br>        <br>        protected override void OnDisappearing()<br>        {<br>            PdfViewer.Dispose();<br>            base.OnDisappearing();<br>        }<br>    }<br>}</pre><p><strong>Step 6: </strong>Create another view named <strong>DocumentsPage</strong> to login and display the SharePoint documents of the given site name in the File Explorer-like Treeview. Also, in the TreeView’s <strong>ItemTapped</strong> handler method, implement the logic to retrieve the selected PDF document details and navigate to the PdfViewerPage to view them.</p><p><strong>Note: </strong>In this example, we have used TreeView’s <a href="https://help.syncfusion.com/xamarin/treeview/appearance#itemtemplate-selector">ItemTemplate Selector</a> to customize the appearance of each item with different templates to create the file explorer view.</p><p>Refer to the following code example.</p><p><strong>DocumentsPage.xaml</strong></p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;<br>&lt;ContentPage xmlns=&quot;http://xamarin.com/schemas/2014/forms&quot;<br>             xmlns:x=&quot;http://schemas.microsoft.com/winfx/2009/xaml&quot; <br>             xmlns:treeView=&quot;clr-namespace:Syncfusion.XForms.TreeView;assembly=Syncfusion.SfTreeView.XForms&quot;<br>             xmlns:progressBar=&quot;clr-namespace:Syncfusion.XForms.ProgressBar;assembly=Syncfusion.SfProgressBar.XForms&quot;<br>             xmlns:local=&quot;clr-namespace:SharePoint&quot;<br>             NavigationPage.HasNavigationBar=&quot;False&quot;<br>             x:Class=&quot;SharePoint.DocumentsPage&quot;&gt;<br>    <br>    &lt;ContentPage.BindingContext&gt;<br>        &lt;local:SharePointViewModel/&gt;<br>    &lt;/ContentPage.BindingContext&gt;<br>    <br>    &lt;ContentPage.Resources&gt;<br>        &lt;ResourceDictionary&gt;<br>            &lt;local:ItemTemplateSelector x:Key=&quot;ItemTemplateSelector&quot; /&gt;<br>        &lt;/ResourceDictionary&gt;<br>    &lt;/ContentPage.Resources&gt;<br>    <br>    &lt;ContentPage.Content&gt;<br>        &lt;Grid&gt;<br>            &lt;Grid.RowDefinitions&gt;<br>                &lt;RowDefinition Height=&quot;auto&quot;/&gt;<br>                &lt;RowDefinition Height=&quot;*&quot;/&gt;<br>            &lt;/Grid.RowDefinitions&gt;<br>            &lt;progressBar:SfLinearProgressBar x:Name=&quot;ProgressBar&quot; Grid.Row=&quot;0&quot; HeightRequest=&quot;5&quot; IsIndeterminate=&quot;True&quot; IsVisible=&quot;false&quot; ProgressColor=&quot;#038387&quot;/&gt;<br>            &lt;StackLayout Grid.Row=&quot;1&quot; Orientation=&quot;Vertical&quot; VerticalOptions=&quot;Center&quot;&gt;<br>                &lt;Image x:Name=&quot;SharepointImage&quot; HeightRequest=&quot;175&quot; WidthRequest=&quot;175&quot; VerticalOptions=&quot;Center&quot;&gt;&lt;/Image&gt;<br>                &lt;Button Text=&quot;SHAREPOINT  LOGIN&quot; x:Name=&quot;LoginButton&quot; WidthRequest=&quot;250&quot;<br>                        HorizontalOptions=&quot;Center&quot;<br>                        Font=&quot;18&quot;<br>                        Clicked=&quot;LoginButton_Clicked&quot;/&gt;<br>                &lt;Label x:Name=&quot;DocumentsTitleLabel&quot; HeightRequest=&quot;50&quot; IsVisible=&quot;false&quot; Text=&quot;Documents&quot; HorizontalTextAlignment=&quot;Center&quot; VerticalTextAlignment=&quot;Center&quot; FontSize=&quot;20&quot; TextColor=&quot;White&quot; BackgroundColor=&quot;#038387&quot;/&gt;<br>                &lt;treeView:SfTreeView x:Name=&quot;DocumentsView&quot; ItemHeight=&quot;40&quot;<br>                                     IsVisible=&quot;false&quot;<br>                                     ChildPropertyName=&quot;SubFiles&quot;<br>                                     LoadOnDemandCommand=&quot;{Binding DocumentsViewOnDemandCommand}&quot;<br>                                     ItemTemplateContextType=&quot;Node&quot;                                   <br>                                     ItemTapped=&quot;DocumentsView_ItemTapped&quot;<br>                                     SelectionBackgroundColor=&quot;#038387&quot;<br>                                     SelectionForegroundColor=&quot;White&quot;<br>                                     Indentation=&quot;20&quot; <br>                                     ExpanderWidth=&quot;40&quot; ItemTemplate=&quot;{StaticResource ItemTemplateSelector}&quot;&gt;<br>                &lt;/treeView:SfTreeView&gt;<br>            &lt;/StackLayout&gt;<br>        &lt;/Grid&gt;<br>    &lt;/ContentPage.Content&gt;<br>&lt;/ContentPage&gt;</pre><p><strong>DocumentsPage.xaml.cs</strong></p><pre>using System;<br>using System.Reflection;<br>using Xamarin.Forms;<br>using Xamarin.Forms.Xaml;<br><br>namespace SharePoint<br>{<br>    [XamlCompilation(XamlCompilationOptions.Compile)]<br>    public partial class DocumentsPage : ContentPage<br>    {<br>        public DocumentsPage()<br>        {<br>            InitializeComponent();<br>            SharepointImage.Source = ImageSource.FromResource(&quot;SharePoint.Icons.sharepoint.png&quot;,<br>                typeof(DocumentsPage).GetTypeInfo().Assembly);<br>        }<br>        <br>        private async void LoginButton_Clicked(object sender, EventArgs e)<br>        {<br>            ProgressBar.IsVisible = true;<br>            LoginButton.IsVisible = false;<br>            <br>            await (BindingContext as SharePointViewModel).AuthenticateAndAcquireDocuments();<br>            <br>            SharepointImage.IsVisible = false;<br>            DocumentsTitleLabel.IsVisible = true;<br>            DocumentsView.IsVisible = true;<br>            DocumentsView.ItemsSource = (BindingContext as SharePointViewModel).Documents;<br>            ProgressBar.IsVisible = false;<br>        }<br>        <br>        private void DocumentsView_ItemTapped(object sender, Syncfusion.XForms.TreeView.ItemTappedEventArgs e)<br>        {<br>            Microsoft.SharePoint.Client.File file = (e.Node.Content as FileManager).File;<br>            if (file != null)<br>            {<br>                Navigation.PushAsync(new PdfViewerPage((BindingContext as SharePointViewModel)<br>                    .GetPdfDocumentDetails(file)));<br>            }<br>        }<br>    }<br>}</pre><p>In this example, you can navigate back to the <strong>Documents</strong> page from PDF Viewer page to choose or load another PDF document by clicking the back icon in the navigation bar. Refer to the following image.</p><figure><img alt="GIS Succintly.pdf" src="https://cdn-images-1.medium.com/max/375/0*WuiFsjXsVqAVFB12.png" /></figure><p><strong>Step 7:</strong> Before running the application, there are some configurations that need to be done in both Android and iOS platforms to make the SharePoint authentication successful and to continue with our application.</p><h3>iOS</h3><p>In iOS, to reopen our application after the authentication flow is completed, override the <strong>OpenUrl</strong> method in the <strong>AppDelegate</strong> class. Refer to the following code example.</p><pre>public override bool OpenUrl(UIApplication app, NSUrl url, NSDictionary options)<br>{                  <br> AuthenticationContinuationHelper.SetAuthenticationContinuationEventArgs(url);<br> return true;<br>}</pre><p>Next, open the <strong>Entitlements.plist</strong> file and check the <strong>Enable Keychain </strong>option. This will add an entry for our app to the keychain, which is where iOS securely stores our credentials.</p><figure><img alt="Open the Entitlements.plist file and check the Enable Keychain option" src="https://cdn-images-1.medium.com/max/975/0*i88uGgeN9-L6yN0w.png" /></figure><p>To allow the application to use the keychain, set the <strong>Custom Entitlements</strong> setting to point to the <strong>Entitlements.plist</strong> file. This setting option can be found in the <strong>Properties -&gt; iOS Bundle Signing -&gt; Additional Resources</strong>.</p><figure><img alt="iOS Bundle Signing" src="https://cdn-images-1.medium.com/max/978/0*L2BjuvSpuCDhvW_2.png" /></figure><p>Finally, configure the iOS application to respond to the callback URL by defining a URL type in the <strong>Info.plist</strong> file. Add or update the <strong>Identifier</strong>,<strong> URL Schemes, </strong>and<strong> Role</strong> properties in the URL type. Refer to the following screenshot.</p><figure><img alt="URL types" src="https://cdn-images-1.medium.com/max/976/0*JRqse3f_aL8TX12V.png" /></figure><h3>Android</h3><p>In Android, to reopen our application after the authentication is completed, override the <strong>OnActivityResult</strong> method in the <strong>MainActivity</strong> class. Refer to the following code example.</p><pre>protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)<br>{<br> base.OnActivityResult(requestCode, resultCode, data);   <br> AuthenticationContinuationHelper.SetAuthenticationContinuationEventArgs(requestCode, resultCode, data);<br>}</pre><p>Next, configure the Android application to respond to the callback URL by providing an <strong>activity</strong> and an intent-filter in the <strong>AndroidManifest.xml</strong> file. Refer to the following code example.</p><p><strong>AndroidManifest.xml</strong></p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br>&lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot; android:versionCode=&quot;1&quot; android:versionName=&quot;1.0&quot; package=&quot;com.companyname.SharePoint&quot; android:installLocation=&quot;preferExternal&quot;&gt;<br>  &lt;uses-sdk android:minSdkVersion=&quot;21&quot; android:targetSdkVersion=&quot;30&quot; /&gt;<br>  &lt;uses-permission android:name=&quot;android.permission.INTERNET&quot; /&gt;<br>  &lt;uses-permission android:name=&quot;android.permission.ACCESS_NETWORK_STATE&quot; /&gt;<br>  &lt;uses-permission android:name=&quot;android.permission.WRITE_EXTERNAL_STORAGE&quot; /&gt;<br>  <br>  &lt;application android:label=&quot;SharePoint.Android&quot;&gt;<br>    <br>    &lt;activity android:name=&quot;microsoft.identity.client.BrowserTabActivity&quot;&gt;<br>      &lt;intent-filter&gt;<br>        &lt;action android:name=&quot;android.intent.action.VIEW&quot; /&gt;<br>        &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;<br>        &lt;category android:name=&quot;android.intent.category.BROWSABLE&quot; /&gt;<br>        &lt;data android:scheme=&quot;msauth&quot; android:host=&quot;com.syncfusion.sharepointauth&quot; android:path=&quot;{YOUR_SIGNATURE_HASH}&quot; /&gt;<br>      &lt;/intent-filter&gt;<br>    &lt;/activity&gt;<br>  <br>  &lt;/application&gt;<br>&lt;/manifest&gt;</pre><p><strong>Note: </strong>Please make sure to replace the text {YOUR_SIGNATURE_HASH} with your application’s signature hash in the AndroidManifest.xml file.</p><p><strong>Step 8: </strong>Finally, you can deploy the application. The output of this example application will look as follows.</p><figure><img alt="Output" src="https://cdn-images-1.medium.com/max/360/0*0Lf8WuwIVxNBSNeI.gif" /></figure><h3>Resource</h3><p>For more details, check out the complete code example <a href="https://github.com/SyncfusionExamples/load-and-view-pdf-files-from-sharepoint-in-xamarin">on GitHub</a>.</p><h3>Conclusion</h3><p>Thanks for reading! We have seen in this blog how to access PDF files from SharePoint and load them using Syncfusion’s <a href="https://www.syncfusion.com/xamarin-ui-controls/xamarin-pdf-viewer">Xamarin.Forms PDF Viewer</a> control. Try this in your application and share your feedback in the comment section below!</p><p>If you aren’t a customer, you can try our 30-day <a href="https://www.syncfusion.com/downloads">free trial</a> to check out these features. Also, try our other Xamarin examples from this <a href="https://github.com/syncfusion/xamarin-demos">GitHub</a> location.</p><p>If you have any questions, you can contact us through our <a href="https://www.syncfusion.com/forums">support forum</a>, <a href="https://support.syncfusion.com/">support portal</a>, or <a href="https://www.syncfusion.com/feedback/">feedback portal</a>. We are always happy to assist you!</p><h3>Related blogs</h3><ul><li><a href="https://www.syncfusion.com/blogs/post/lock-and-unlock-annotations-using-xamarin-forms-pdf-viewer.aspx">Easily Lock and Unlock Annotations Using Xamarin.Forms PDF Viewer</a></li><li><a href="https://www.syncfusion.com/blogs/post/migrating-syncfusion-xamarin-forms-controls-to-net-maui.aspx">Migrating Syncfusion Xamarin.Forms Controls to .NET MAUI</a></li><li><a href="https://www.syncfusion.com/blogs/post/view-pdf-annotations-as-a-list-and-navigate-using-xamarin-forms-pdf-viewer.aspx">View PDF Annotations as a List and Navigate Using Xamarin.Forms PDF Viewer</a></li><li><a href="https://www.syncfusion.com/blogs/post/lazy-load-json-data-in-xamarin-forms-listview-an-overview.aspx">Lazy Load JSON Data in Xamarin.Forms ListView: An Overview</a></li></ul><p><em>Originally published at </em><a href="https://www.syncfusion.com/blogs/post/step-by-step-guide-downloading-pdfs-from-sharepoint-and-displaying-them-in-a-xamarin-app.aspx"><em>https://www.syncfusion.com</em></a><em> on January 24, 2023.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=14696086bc2c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/syncfusion/step-by-step-guide-downloading-pdfs-from-sharepoint-and-displaying-them-in-a-xamarin-app-14696086bc2c">Step-by-Step Guide: Downloading PDFs from SharePoint and Displaying Them in a Xamarin App</a> was originally published in <a href="https://medium.com/syncfusion">Syncfusion, Inc.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing the New React Image Editor]]></title>
            <link>https://medium.com/syncfusion/introducing-the-new-react-image-editor-e4e0d5ec50de?source=rss-f874534cf75d------2</link>
            <guid isPermaLink="false">https://medium.com/p/e4e0d5ec50de</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[image-processing]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Lavender Anyango Otieno.]]></dc:creator>
            <pubDate>Mon, 23 Jan 2023 12:17:55 GMT</pubDate>
            <atom:updated>2023-01-31T07:00:24.644Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Introducing the New React Image Editor" src="https://cdn-images-1.medium.com/max/1024/0*1tSU73c497ED-D3D.png" /></figure><p>In this blog, we’ll introduce the main features of the Syncfusion React Image Editor. We’ll also show you the new features for it from the <a href="https://www.syncfusion.com/forums/179561/essential-studio-2022-volume-4-main-release-v20-4-0-38-is-available-for-download">Essential Studio 2022 Vol. 4</a> release.</p><p>The <a href="https://www.syncfusion.com/react-components/react-image-editor">React Image Editor</a> is a user interface that allows users to edit images. It provides a range of built-in features for rotating, flipping, zooming, and cropping images with predefined filters. Users can also insert annotations, such as text, freehand drawings, and shapes like rectangles, ellipses, and lines. In addition, the Image Editor supports keyboard interactions and touch gestures and has an optimized user interface for events.</p><figure><img alt="React Image Editor Component" src="https://cdn-images-1.medium.com/max/820/0*7z_PJU8C1Bn2RQq9.gif" /><figcaption>React Image Editor Component</figcaption></figure><h3>Key features</h3><p>The following are the key features available in the React Image Editor component:</p><ul><li><a href="https://www.syncfusion.com/blogs/post/introducing-the-new-react-image-editor.aspx#load-and-save-an-image">Load and save an image</a>.</li><li><a href="https://www.syncfusion.com/blogs/post/introducing-the-new-react-image-editor.aspx#select-and-crop-an-image">Select and crop an image</a>.</li><li><a href="https://www.syncfusion.com/blogs/post/introducing-the-new-react-image-editor.aspx#transform-an-image">Transform an image</a>.</li><li><a href="https://www.syncfusion.com/blogs/post/introducing-the-new-react-image-editor.aspx#add-annotations-to-an-image">Add annotations to an image</a>.</li><li><a href="https://www.syncfusion.com/blogs/post/introducing-the-new-react-image-editor.aspx#zooming-and-panning-an-image">Zoom and pan an image</a>.</li><li><a href="https://www.syncfusion.com/blogs/post/introducing-the-new-react-image-editor.aspx#toolbar-customization">Customize the toolbar</a>.</li><li><a href="https://www.syncfusion.com/blogs/post/introducing-the-new-react-image-editor.aspx#adaptive-and-touch-friendly-ui">Responsive, touch-friendly UI</a>.</li></ul><h3>Load and save an image</h3><p>The Image Editor component allows you to open base64, <a href="https://www.w3schools.com/tags/canvas_imagedata_data.asp">ImageData</a>, or hosted and online URL images using the <a href="https://ej2.syncfusion.com/react/documentation/api/image-editor#open">open</a> method. The Image Editor supports a variety of file types, including PNG, JPEG, and SVG.</p><p>Users can also edit images and save them as <strong>ImageData</strong> using the <a href="https://ej2.syncfusion.com/react/documentation/api/image-editor#getimagedata">getImageData</a> method and save images in PNG, JPEG, and SVG formats using the <a href="https://ej2.syncfusion.com/react/documentation/api/image-editor#export">export</a> method.</p><p><strong>Note: </strong>To view hosted images, you need to enable the <strong>Directory Browsing</strong> option in <strong>IIS</strong>, which creates a <strong>web.config</strong> file inside the hosted folder. Add the following code in the <strong>web.config</strong> file to resolve the CORS issue.</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;configuration&gt;<br> &lt;system.webServer&gt;<br>  &lt;directoryBrowse enabled=&quot;true&quot; /&gt;<br>  &lt;httpProtocol&gt;<br>   &lt;customHeaders&gt;<br>     &lt;clear /&gt;<br>     &lt;add name=&quot;Access-Control-Allow-Origin&quot; value=&quot;*&quot; /&gt;<br>   &lt;/customHeaders&gt;<br>  &lt;/httpProtocol&gt;<br> &lt;/system.webServer&gt;<br>&lt;/configuration&gt;</pre><h3>Select and crop an image</h3><p>The Image Editor component offers a range of selection options including square, circle, and custom shapes, and can handle various aspect ratios (3:2, 4:3, 5:4, 7:5, or 16:9). Users can crop an image by dragging and resizing the selection region. You can initiate the selection process by using the toolbar or the <a href="https://ej2.syncfusion.com/react/documentation/api/image-editor#select">select</a> method.</p><h4>Cropping</h4><p>The React Image Editor allows you to crop any image. You can initiate the cropping process by using the toolbar or the <a href="https://ej2.syncfusion.com/react/documentation/api/image-editor#crop">crop</a> method. This feature enables you to crop images quickly and easily to the desired dimensions.</p><h3>Transform an image</h3><p>The React Image Editor offers rotate and flip transformation support, enabling users to alter the orientation of an image. The rotation transformation allows users to rotate an image clockwise or counterclockwise by 90, 180, 270, or 360 degrees. The flip transformation supports horizontal and vertical orientations. You can initiate these transformations by using the toolbar or the <a href="https://ej2.syncfusion.com/react/documentation/api/image-editor#rotate">rotate</a> and <a href="https://ej2.syncfusion.com/react/documentation/api/image-editor#flip">flip</a> methods.</p><h3>Add annotations to an image</h3><p>The React Image Editor component enables the addition of a variety of annotations to your images, including text, freehand drawings, and geometric shapes like rectangles, ellipses, and lines.</p><h4>Text annotation</h4><p>The text annotation allows you to insert text into your images and customize their appearance. Use the toolbar or the <a href="https://ej2.syncfusion.com/react/documentation/api/image-editor#drawtext">drawText</a> method to add a text annotation and then adjust its color, font family, font size, and font style, including bold and italic options.</p><h4>Shape annotation</h4><p>The shape annotation allows you to insert geometric shapes, such as rectangles, ellipses, and lines, and customize their appearance by adjusting the stroke color, fill color, and stroke width. These annotations can be added to your images through the toolbar or by using the <a href="https://ej2.syncfusion.com/react/documentation/api/image-editor#drawrectangle">drawRectangle</a>, <a href="https://ej2.syncfusion.com/react/documentation/api/image-editor#drawellipse">drawEllipse</a>, and <a href="https://ej2.syncfusion.com/react/documentation/api/image-editor#drawline">drawLine</a> methods.</p><h4>Freehand drawing annotation</h4><p>This annotation allows you to easily insert a freehand drawing and customize its appearance by adjusting the stroke color and stroke width. You can add a freehand drawing annotation to your images using the toolbar or the <a href="https://ej2.syncfusion.com/react/documentation/api/image-editor#freehanddraw">freehandDraw</a> method.</p><h3>Zooming and panning an image</h3><p>The zoom and pan features allow you to adjust the scale and position of an image to focus on specific areas of it. You can use the toolbar to access these features or use the <a href="https://ej2.syncfusion.com/react/documentation/api/image-editor#zoom">zoom</a> and <a href="https://ej2.syncfusion.com/react/documentation/api/image-editor#pan">pan</a> methods.</p><h3>Toolbar customization</h3><p>The <a href="https://ej2.syncfusion.com/react/documentation/api/image-editor#toolbar">toolbar</a> property and the <a href="https://ej2.syncfusion.com/react/documentation/api/image-editor#toolbarupdating">toolbarUpdating</a> event are used to customize the built-in toolbar items and <a href="https://ej2.syncfusion.com/react/documentation/api/image-editor#toolbartemplate">toolbarTemplate</a>. Specify a custom toolbar template as a JSX element to replace the default toolbar with your own custom UI.</p><h3>Adaptive and touch-friendly UI</h3><p>By default, the React Image Editor is designed to be responsive and touch-friendly, so it automatically adapts to different screen sizes and can be used on both mobile devices and desktop computers with finger, pen, or mouse interaction.</p><figure><img alt="Adaptive and Touch-Friendly UI in React Image Editor" src="https://cdn-images-1.medium.com/max/431/0*TyL_pyqMssgN0oId.png" /><figcaption>Adaptive and Touch-Friendly UI in React Image Editor</figcaption></figure><h3>New features in 2022 Volume 4</h3><ul><li><a href="https://www.syncfusion.com/blogs/post/introducing-the-new-react-image-editor.aspx#applying-filters">Applying filters to an image</a></li><li><a href="https://www.syncfusion.com/blogs/post/introducing-the-new-react-image-editor.aspx#fine-tune-an-image">Fine-tune an image</a></li></ul><h3>Applying filters</h3><p>The React Image Editor now lets you apply image filters to alter the appearance of an image. Image filters are predefined effects that can be applied to an image to add visual interest or to enhance certain features. The available filters are: cold, warm, chrome, sepia, grayscale, and invert.</p><h4>Applying a filter through the UI</h4><p>You can apply a filter by selecting the filter icon from the toolbar and then selecting a filter from the list like in the following image.</p><figure><img alt="Applying a filter through the UI" src="https://cdn-images-1.medium.com/max/820/0*lBYRgH9K-woHf3pM.png" /></figure><h4>Applying filters through code</h4><p>Apply a filter programmatically through the <a href="https://ej2.syncfusion.com/react/documentation/api/image-editor#applyimagefilter"><strong>applyImageFilter</strong></a> method. This method accepts a single parameter of type filter as in the following code snippet.</p><pre>imgObj.applyImageFilter(&#39;Warm&#39;);</pre><h3>Fine-tune an image</h3><p>The React Image Editor provides support for fine-tuning image filters to alter the appearance of an image. Fine-tuning allows you to adjust the settings of an image filter to achieve a desired effect. The fine-tuning options are brightness, contrast, exposure, hue, saturation, opacity, and blur.</p><h4>Fine-tuning an image using the UI</h4><p>Fine-tune an image using the toolbar by selecting the fine-tune option from the toolbar. Select an option from the list and adjust the slider to change the appearance of the image, as shown in the following image.</p><figure><img alt="Fine-tuning an image using the UI" src="https://cdn-images-1.medium.com/max/819/0*TXRHsYjxvchVtQ-c.png" /></figure><h4>Fine-tune programmatically</h4><p>Fine-tuning can be done programmatically using the <a href="https://ej2.syncfusion.com/react/documentation/api/image-editor#finetuneimage">finetuneImage</a> method. This method accepts two parameters, of type finetune and its value. Refer to the following code example.</p><pre>imgObj.finetuneImage(&#39;Brightness&#39;, 200);</pre><p>Here is an example of how you might use the <a href="https://ej2.syncfusion.com/react/documentation/api/image-editor#applyimagefilter">applyImageFilter</a> and <a href="https://ej2.syncfusion.com/react/documentation/api/image-editor#finetuneimage">finetuneImage</a> methods in the React Image Editor.</p><pre>import { ImageEditorComponent } from &#39;@syncfusion/ej2-react-image-editor&#39;;<br>import &#39;./App.css&#39;;<br>function App() {<br>  var imgObj;<br>  function imageEditorCreated() {<br>    imgObj.open(&#39;https://ej2.syncfusion.com/demos/src/image-editor/images/bridge.png&#39;);<br>  }<br>  function applyFilter() {<br>    imgObj.applyImageFilter(&#39;Warm&#39;);<br>  }<br>  function applyFinetune() {<br>    imgObj.finetuneImage(&#39;Brightness&#39;, 200);<br>  }<br>  return (<br>    &lt;div className=&quot;App&quot;&gt;<br>      &lt;button className=&quot;e-btn&quot; onClick={applyFilter}&gt;Filter&lt;/button&gt;<br>      &lt;button className=&quot;e-btn&quot; onClick={applyFinetune}&gt;Brightness&lt;/button&gt;<br>      &lt;ImageEditorComponent width=&#39;550px&#39; toolbar={[]} height=&#39;350px&#39; ref={(img) =&gt; { imgObj = img; }} created={imageEditorCreated} /&gt;<br>    &lt;/div&gt;<br>  );<br>}<br>export default App;</pre><figure><img alt="Filters and Fine-Tuning Features in React Image Editor" src="https://cdn-images-1.medium.com/max/706/0*fANn1A4pYRx_6AIP.png" /><figcaption>Filters and Fine-Tuning Features in React Image Editor</figcaption></figure><h3>Conclusion</h3><p>Thanks for reading! We hope you enjoyed this quick introduction to the design and features of our <a href="https://www.syncfusion.com/react-components/react-image-editor">React Image Editor</a> component. If you would like to give it a try, please download the latest available version of Essential Studio, <a href="https://www.syncfusion.com/forums/179561/essential-studio-2022-volume-4-main-release-v20-4-0-38-is-available-for-download">2022 Volume 4</a>. Experience wonderful image editing with this component and provide your valuable feedback in the comments section below.</p><p>You can also contact us through our <a href="https://www.syncfusion.com/forums">support forums</a>, <a href="https://support.syncfusion.com/?_gl=1*hmo0hl*_ga*MTc0OTQ0NjYwNi4xNjU3ODgyMjE1*_ga_WC4JKKPHH0*MTY2NzE4NjU0OC40MjcuMS4xNjY3MTg3MjE1LjAuMC4w">support portal</a>, or <a href="https://www.syncfusion.com/feedback/">feedback portal</a>. We are always happy to assist you!</p><h3>Related blogs</h3><ul><li><a href="https://www.syncfusion.com/blogs/post/preact-vs-react.aspx">Preact vs. React</a></li><li><a href="https://www.syncfusion.com/blogs/post/recoil-the-future-of-state-management-for-react.aspx">Recoil: the Future of State Management for React?</a></li><li><a href="https://www.syncfusion.com/blogs/post/react-router-vs-react-router-dom.aspx">React Router vs. React Router DOM</a></li><li><a href="https://www.syncfusion.com/blogs/post/functional-reactive-programming-with-node-js-streams.aspx">Functional Reactive Programming with Node.js Streams</a></li><li><a href="https://www.syncfusion.com/blogs/post/integrate-react-mention-component-with-rich-text-editor.aspx">How to Integrate Syncfusion React Mention Component with Rich Text Editor</a></li><li><a href="https://www.syncfusion.com/blogs/post/7-vs-code-extensions-for-react-developers.aspx">7 VS Code Extensions for React Developers</a></li></ul><p><em>Originally published at </em><a href="https://www.syncfusion.com/blogs/post/introducing-the-new-react-image-editor.aspx"><em>https://www.syncfusion.com</em></a><em> on January 23, 2023.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e4e0d5ec50de" width="1" height="1" alt=""><hr><p><a href="https://medium.com/syncfusion/introducing-the-new-react-image-editor-e4e0d5ec50de">Introducing the New React Image Editor</a> was originally published in <a href="https://medium.com/syncfusion">Syncfusion, Inc.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Syncfusion .NET MAUI Control Demos Are Now Available at App Stores]]></title>
            <link>https://medium.com/syncfusion/syncfusion-net-maui-control-demos-are-now-available-at-app-stores-58efcebe7e36?source=rss-f874534cf75d------2</link>
            <guid isPermaLink="false">https://medium.com/p/58efcebe7e36</guid>
            <category><![CDATA[csharp]]></category>
            <category><![CDATA[demo]]></category>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Lavender Anyango Otieno.]]></dc:creator>
            <pubDate>Mon, 23 Jan 2023 12:03:26 GMT</pubDate>
            <atom:updated>2023-01-31T07:01:00.138Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Syncfusion .NET MAUI Control Demos Are Now Available at App Stores" src="https://cdn-images-1.medium.com/max/1024/0*nFxbHj6Vc4YvO04j.png" /></figure><h3>Syncfusion .NET MAUI Control Demos Are Now Available at App Stores</h3><p>We are excited to announce that the Syncfusion <a href="https://www.syncfusion.com/maui-controls">.NET MAUI control</a> demos are now available in the app stores. Syncfusion offers a wide range of .NET MAUI controls and document processing libraries, providing everything you need to build modern mobile and desktop applications for platforms such as Android, iOS, Mac Catalyst, and Windows.</p><p>To start off 2023, we have published our sample browser, which contains demos of our .NET MAUI controls, in the app stores for your convenience. With these demos, you can easily explore the capabilities of our controls and see how they can enhance your apps’ development. Whether you are building a new app or looking to upgrade your current app, Syncfusion’s .NET MAUI controls are the perfect solution.</p><h3>Syncfusion .NET MAUI controls</h3><p>Syncfusion offers the following 35+ .NET MAUI controls and file-format libraries:</p><p><a href="https://www.syncfusion.com/maui-controls/maui-datagrid">DataGrid</a></p><p><a href="https://www.syncfusion.com/maui-controls/maui-cartesian-charts">Cartesian Chart</a></p><p><a href="https://www.syncfusion.com/maui-controls/maui-circular-charts">Circular Chart</a></p><p><a href="https://www.syncfusion.com/maui-controls/maui-funnel-charts">Funnel Chart</a></p><p><a href="https://www.syncfusion.com/maui-controls/maui-pyramid-charts">Pyramid Chart</a></p><p><a href="https://www.syncfusion.com/maui-controls/maui-radial-gauge">Radial Gauge</a></p><p><a href="https://www.syncfusion.com/maui-controls/maui-linear-gauge">Linear Gauge</a></p><p><a href="https://www.syncfusion.com/maui-controls/maui-maps">Maps</a></p><p><a href="https://www.syncfusion.com/maui-controls/maui-barcodes">Barcode Generator</a></p><p><a href="https://www.syncfusion.com/maui-controls/maui-backdrop">Backdrop</a></p><p><a href="https://www.syncfusion.com/maui-controls/maui-listview">ListView</a></p><p><a href="https://www.syncfusion.com/maui-controls/maui-textinputlayout">Text Input Layout</a></p><p><a href="https://www.syncfusion.com/maui-controls/maui-scheduler">Scheduler</a></p><p><a href="https://www.syncfusion.com/maui-controls/maui-calendar">Calendar</a></p><p><a href="https://www.syncfusion.com/maui-controls/maui-tab-view">Tab View</a></p><p><a href="https://www.syncfusion.com/maui-controls/maui-pdf-viewer">PDF Viewer</a></p><p><a href="https://www.syncfusion.com/maui-controls/maui-autocomplete">Autocomplete</a></p><p><a href="https://www.syncfusion.com/maui-controls/maui-combobox">ComboBox</a></p><p><a href="https://www.syncfusion.com/maui-controls/maui-dataform">DataForm</a></p><p><a href="https://www.syncfusion.com/maui-controls/maui-signaturepad">SignaturePad</a></p><p><a href="https://www.syncfusion.com/maui-controls/maui-rating">Rating</a></p><p><a href="https://www.syncfusion.com/maui-controls/maui-slider">Slider</a></p><p><a href="https://www.syncfusion.com/maui-controls/maui-range-slider">Range Slider</a></p><p><a href="https://www.syncfusion.com/maui-controls/maui-range-selector">Range Selector</a></p><p><a href="https://help.syncfusion.com/maui/datetime-slider/getting-started">DateTime Slider</a></p><p><a href="https://help.syncfusion.com/maui/datetime-range-slider/overview">DateTime Range Slider</a></p><p><a href="https://help.syncfusion.com/maui/datetime-range-selector/overview">DateTime Range Selector</a></p><p><a href="https://www.syncfusion.com/maui-controls/maui-badge-view">Badge View</a></p><p><a href="https://www.syncfusion.com/maui-controls/maui-busy-indicator">Busy Indicator</a></p><p><a href="https://help.syncfusion.com/maui/linearprogressbar/getting-started">Linear ProgressBar</a></p><p><a href="https://help.syncfusion.com/maui/circularprogressbar/getting-started">Circular ProgressBar</a></p><p><a href="https://www.syncfusion.com/maui-controls/maui-avatarview">Avatar View</a></p><p><a href="https://www.syncfusion.com/maui-controls/maui-effects-view">Effects View</a></p><p><a href="https://www.syncfusion.com/document-processing/excel-framework/maui/excel-library">Excel Library</a></p><p><a href="https://www.syncfusion.com/document-processing/pdf-framework/maui">PDF Library</a></p><p><a href="https://www.syncfusion.com/document-processing/word-framework/maui">Word Library</a></p><p><a href="https://www.syncfusion.com/document-processing/powerpoint-framework/maui">PowerPoint Library</a></p><h3>Syncfusion’s .NET MAUI sample browser demos</h3><p><a href="https://github.com/syncfusion/maui-demos">Syncfusion’s .NET MAUI sample browser</a> is a comprehensive app that showcases the capabilities of our .NET MAUI controls. You can deploy this app on various devices, including Android, iOS, macOS, and Windows. It can adapt to different screen sizes to provide an optimal user experience on mobile and desktop devices. The app also includes a settings page and code viewer navigator to help you customize and explore the demos.</p><p>This is a valuable resource for anyone looking to incorporate Syncfusion controls into their .NET MAUI apps. It features a wide range of demos that showcase real-world use cases, making it easy to see how these controls can be used in your projects. The controls are user-friendly and highly customizable, making them an excellent choice for developers who want to add rich, feature-packed functionalities to their apps. Whether you’re looking to build a mobile or desktop app, the Syncfusion .NET MAUI sample browser is an essential tool for anyone looking to take advantage of these robust controls.</p><figure><img alt="Syncfusion .NET MAUI Sample Browser Demos" src="https://cdn-images-1.medium.com/max/1000/0*-PgGR_b3lgsKmtn9.gif" /><figcaption>Syncfusion .NET MAUI Sample Browser Demos</figcaption></figure><h3>How to get and install the .NET MAUI sample browser app</h3><p>The Syncfusion .NET MAUI sample browser app is available on the Android, iOS, macOS, and Windows stores.</p><figure><img alt="Syncfusion .NET MAUI Sample Browser App" src="https://cdn-images-1.medium.com/max/241/0*sPWCeuEvX8UT3F1V.gif" /><figcaption>Syncfusion .NET MAUI Sample Browser App</figcaption></figure><h3>.NET MAUI demos for Android</h3><p>Download the Syncfusion .NET MAUI demos for Android devices from the <a href="https://play.google.com/store/apps/details?id=com.syncfusion.sampleBrowser.maui">Google Play Store</a> or scan the following QR code.</p><figure><img alt=".NET MAUI demos for Android" src="https://cdn-images-1.medium.com/max/623/0*x5RovhzMihLj1Tx7.png" /></figure><h3>.NET MAUI demos for Windows</h3><p>Install the .NET MAUI demos for Windows from the <a href="https://apps.microsoft.com/store/detail/syncfusion-maui-controls-gallery/9P2P4D2BK270">Microsoft Store</a> or scan the following QR code.</p><figure><img alt=".NET MAUI demos for Windows" src="https://cdn-images-1.medium.com/max/635/0*Eh4PvFORBaiftIL5.png" /></figure><h3>.NET MAUI demos for iOS</h3><p>According to <a href="https://developer.apple.com/app-store/review/guidelines/#performance">Apple’s App Store Review Guidelines (section 2.2 on beta testing)</a>, we cannot upload our Syncfusion .NET MAUI sample browser app to the <a href="https://www.apple.com/in/app-store/">App Store</a>. We understand and respect the guidelines set forth by Apple.</p><p>However, you can still experience the app in an iOS device. You can install our .NET MAUI demos for <a href="https://testflight.apple.com/join/EEOtwVNN">iOS</a> using the <a href="https://apps.apple.com/in/app/testflight/id899247664">TestFlight</a> app on your device. Or you can scan the following QR code to get them.</p><figure><img alt=".NET MAUI demos for iOS" src="https://cdn-images-1.medium.com/max/623/0*Vin0k3cURGgUEBsc.png" /></figure><h3>.NET MAUI demos for macOS</h3><p>Install the .NET MAUI demos for <a href="https://install.appcenter.ms/users/xamarincore/apps/syncfusion-maui-ui-controls/distribution_groups/public">macOS</a> from the App Center or scan the following QR code to download them.</p><figure><img alt=".NET MAUI demos for macOS" src="https://cdn-images-1.medium.com/max/630/0*I-0N7MudeBKH2I8U.png" /></figure><h3>View demo code on GitHub</h3><p>You can also find the complete code examples for Syncfusion .NET MAUI controls on the <a href="https://github.com/syncfusion/maui-demos">GitHub repository</a>.</p><figure><img alt="View demo code on GitHub" src="https://cdn-images-1.medium.com/max/619/0*iWTrAZ9szHJgiuXN.png" /></figure><h3>Conclusion</h3><p>Thanks for reading! In this blog, we have seen the availability of Syncfusion <a href="https://www.syncfusion.com/maui-controls">.NET MAUI control</a> demos in the app stores for Android, iOS, macOS, and Windows platforms. These demonstrations go through the capabilities and features of our controls in detail and help you build elegant, high-performance, and cross-platform apps. Try them out and leave your feedback in the comments section below!</p><p>For questions, you can contact us through our <a href="https://www.syncfusion.com/forums">support forum</a>, <a href="https://support.syncfusion.com/">support portal</a>, or <a href="https://www.syncfusion.com/feedback/maui">feedback portal</a>. We are always happy to assist you!</p><p>I hope the demos are helpful and informative and you will consider using the Syncfusion .NET MAUI controls for your next project. Happy coding!</p><h3>Related blogs</h3><ul><li><a href="https://www.syncfusion.com/blogs/post/replicating-a-cruise-travel-app-ui-in-net-maui.aspx">Replicating a Cruise Travel App UI in .NET MAUI</a></li><li><a href="https://www.syncfusion.com/blogs/post/building-an-audio-recorder-and-player-app-in-net-maui.aspx">Building an Audio Recorder and Player App in .NET MAUI</a></li><li><a href="https://www.syncfusion.com/blogs/post/dotnet-maui-pyramid-charts.aspx">Introducing the New .NET MAUI Pyramid Charts</a></li><li><a href="https://www.syncfusion.com/blogs/post/dotnet-maui-text-input-layout.aspx">Introducing the New .NET MAUI Text Input Layout</a></li></ul><p><em>Originally published at </em><a href="https://www.syncfusion.com/blogs/post/syncfusion-net-maui-control-demos-are-now-available-at-app-stores.aspx"><em>https://www.syncfusion.com</em></a><em> on January 23, 2023.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58efcebe7e36" width="1" height="1" alt=""><hr><p><a href="https://medium.com/syncfusion/syncfusion-net-maui-control-demos-are-now-available-at-app-stores-58efcebe7e36">Syncfusion .NET MAUI Control Demos Are Now Available at App Stores</a> was originally published in <a href="https://medium.com/syncfusion">Syncfusion, Inc.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing the New .NET MAUI PDF Viewer]]></title>
            <link>https://medium.com/syncfusion/introducing-the-new-net-maui-pdf-viewer-c94b4c7ccc18?source=rss-f874534cf75d------2</link>
            <guid isPermaLink="false">https://medium.com/p/c94b4c7ccc18</guid>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[maui]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[csharp]]></category>
            <dc:creator><![CDATA[Lavender Anyango Otieno.]]></dc:creator>
            <pubDate>Fri, 20 Jan 2023 10:18:10 GMT</pubDate>
            <atom:updated>2023-01-31T06:54:20.232Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Introducing the New .NET MAUI PDF Viewer" src="https://cdn-images-1.medium.com/max/1024/0*lP9KCMekfJJUqibo.png" /></figure><h3>Introducing the New .NET MAUI PDF Viewer</h3><p><a href="https://www.syncfusion.com/">Syncfusion</a> is excited to announce the availability of another valuable control, <a href="https://www.syncfusion.com/maui-controls/maui-pdf-viewer">PDF Viewer</a>, for the <a href="https://www.syncfusion.com/maui-controls">.NET MAUI</a> platform in the <a href="https://www.syncfusion.com/forums/179561/essential-studio-2022-volume-4-main-release-v20-4-0-38-is-available-for-download">2022 Volume 4</a> release.</p><p>The new .NET MAUI PDF Viewer control allows you to easily add PDF viewing capabilities within your applications. It is supported in Windows, macOS, iOS, and Android platforms.</p><p>In this blog, we’ll explore the features of the .NET MAUI PDF Viewer and the steps to get started with it.</p><h3>Key features</h3><p>The key features of the new .NET MAUI PDF Viewer are:</p><ul><li><strong>Virtual scrolling</strong>: Easily scroll through the pages in a PDF document with a fluent experience. The pages are rendered on demand in order to enhance the loading and scrolling performance.</li><li><strong>Magnification</strong>: The content of a PDF document can be efficiently zoomed in and out by pinching or changing the zoom factor programmatically.</li><li><strong>Page navigation</strong>: Navigate to the desired pages instantly using the programmatic page navigation or by dragging the scroll box in the UI.</li><li><strong>Opening password-protected PDFs</strong>: Load and view password-protected PDFs in a hassle-free way. Also, you can design a custom password request view and integrate the functionality easily with built-in options.</li></ul><h3>Getting started with .NET MAUI PDF Viewer</h3><p>Let’s see how to integrate the Syncfusion .NET MAUI PDF Viewer control in your application and use its basic features.</p><h3>Creating a .NET MAUI application with the PDF Viewer</h3><p><strong>Step 1:</strong> First, create a <a href="https://learn.microsoft.com/en-us/dotnet/maui/get-started/first-app?view=net-maui-7.0&amp;tabs=vswin&amp;pivots=devices-android">new .NET MAUI application</a> in <a href="https://visualstudio.microsoft.com/">Visual Studio</a>.</p><p><strong>Step 2:</strong> Then, add the <a href="https://www.nuget.org/packages/Syncfusion.Maui.PdfViewer">Syncfusion.Maui.PdfViewer</a> NuGet package reference to your project from the <a href="https://www.nuget.org/">NuGet Gallery</a>.</p><p><strong>Step 3</strong>: Then, register the handler for the Syncfusion core package in the <strong>MauiProgram.cs</strong> file. Refer to the following code.</p><pre>using Syncfusion.Maui.Core.Hosting;<br>namespace PdfViewerExample<br>{<br> public static class MauiProgram<br> {<br>    public static MauiApp CreateMauiApp()<br>    {<br> var builder = MauiApp.CreateBuilder();<br> builder<br>   .UseMauiApp&lt;App&gt;()<br>   .ConfigureFonts(fonts =&gt;<br>   {<br>      fonts.AddFont(&quot;OpenSans-Regular.ttf&quot;, &quot;OpenSansRegular&quot;);<br>      fonts.AddFont(&quot;OpenSans-Semibold.ttf&quot;, &quot;OpenSansSemibold&quot;);<br>    });<br>       builder.ConfigureSyncfusionCore();<br>       return builder.Build();<br>    }<br> }<br>}</pre><p><strong>Step 4:</strong> Add a new folder to the project named <strong>Assets</strong> and add the PDF document you want to view (such as <strong>PDF_Succinctly.pdf</strong>) using the PDF Viewer.</p><p><strong>Note: </strong>You can also load PDF files from <a href="https://help.syncfusion.com/maui/pdf-viewer/open-a-document-from-local-storage">local storage</a> or a <a href="https://help.syncfusion.com/maui/pdf-viewer/open-a-document-from-url">URL</a>.</p><p><strong>Step 5:</strong> We are going to use the MVVM binding technique. So, create a new view model class named <strong>PdfViewerViewModel.cs</strong> and add the following code to it.</p><pre>using System.ComponentModel;<br>using System.Reflection;<br><br>namespace PdfViewerExample<br>{<br>    internal class PdfViewerViewModel: INotifyPropertyChanged<br>    {<br>        private Stream? m_pdfDocumentStream;<br><br>        /// &lt;summary&gt;<br>        /// An event to detect the change in the value of a property.<br>        /// &lt;/summary&gt;<br>        public event PropertyChangedEventHandler? PropertyChanged;<br><br>        /// &lt;summary&gt;<br>        /// The PDF document stream that is loaded into the instance of the PDF viewer. <br>        /// &lt;/summary&gt;<br>        public Stream PdfDocumentStream<br>        {<br>            get<br>            {<br>                return m_pdfDocumentStream;<br>            }<br>            set<br>            {<br>                m_pdfDocumentStream = value;<br>                OnPropertyChanged(&quot;PdfDocumentStream&quot;);<br>            }<br>        }<br><br>        /// &lt;summary&gt;<br>        /// Constructor of the view model class.<br>        /// &lt;/summary&gt;<br>        public PdfViewerViewModel()<br>        {<br>            //Accessing the PDF document that is added as an embedded resource as a stream.<br>            m_pdfDocumentStream = typeof(App).GetTypeInfo().Assembly.GetManifestResourceStream(&quot;PdfViewerExample.Assets.PDF_Succinctly.pdf&quot;);<br>        }<br><br>        public void OnPropertyChanged(string name)<br>        {<br>            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));<br>        }<br>    }<br>}</pre><p><strong>Step 6:</strong> In the <strong>MainPage.xaml </strong>page, import the control namespace <strong>Syncfusion.Maui.PdfViewer</strong>, initialize the <strong>SfPdfViewer</strong> control, and bind the created <strong>PdfDocumentStream</strong> to the <a href="https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_DocumentSource">SfPdfViewer.DocumentSource</a> property. Refer to the following code example.</p><p><strong>Note: </strong>The <strong>DocumentSource</strong> property accepts both stream and byte[] instances.</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;<br>&lt;ContentPage xmlns=&quot;http://schemas.microsoft.com/dotnet/2021/maui&quot;<br>             xmlns:x=&quot;http://schemas.microsoft.com/winfx/2009/xaml&quot;<br>             xmlns:syncfusion=&quot;clr-namespace:Syncfusion.Maui.PdfViewer;assembly=Syncfusion.Maui.PdfViewer&quot;<br>             xmlns:local=&quot;clr-namespace:PdfViewerExample&quot;      <br>             x:Class=&quot;PdfViewerExample.MainPage&quot;&gt;<br><br>    &lt;ContentPage.BindingContext&gt;<br>        &lt;local:PdfViewerViewModel x:Name=&quot;viewModel&quot; /&gt;<br>    &lt;/ContentPage.BindingContext&gt;<br><br>    &lt;ContentPage.Content&gt;<br>        &lt;syncfusion:SfPdfViewer x:Name=&quot;PdfViewer&quot;<br>                               DocumentSource=&quot;{Binding PdfDocumentStream}&quot;&gt;<br>        &lt;/syncfusion:SfPdfViewer&gt;<br>    &lt;/ContentPage.Content&gt;<br><br>&lt;/ContentPage&gt;</pre><p><strong>Note: </strong>If you are using multiple pages in your app, then make sure to unload the document from the <a href="https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html">SfPdfViewer</a> class while leaving the page that has it to release the memory and resources consumed by the loaded PDF document. You can unload documents by calling the <a href="https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_UnloadDocument">UnloadDocument</a> method. Also, while changing or opening different documents on the same page, the previously loaded document will be unloaded automatically by the <a href="https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html">SfPdfViewer</a>.</p><p><strong>Step 7:</strong> Finally, run the app. Refer to the following output image.</p><figure><img alt="Integrating PDF Viewer in a .NET MAUI application" src="https://cdn-images-1.medium.com/max/396/0*GBokl4NCi23Aj7Dv.png" /><figcaption>Integrating PDF Viewer in a .NET MAUI application</figcaption></figure><p><strong>Note: </strong>For more details, refer to the <a href="https://github.com/SyncfusionExamples/maui-pdf-viewer-examples">.NET MAUI PDF Viewer GitHub demo</a>.</p><h3>Creating a custom toolbar</h3><p>Currently, we do not support a built-in toolbar in the .NET MAUI PDF Viewer. However, we have provided APIs for performing magnification and page navigation programmatically.</p><p>Therefore, you can design a simple custom toolbar and invoke the operations using the following APIs.</p><p><strong>Load document API</strong></p><figure><img alt="Load document API" src="https://cdn-images-1.medium.com/max/1024/1*gBRUl_R8HyShC9ZyvpjTIw.png" /></figure><p><strong>Page navigation APIs</strong></p><figure><img alt="Page navigation APIs" src="https://cdn-images-1.medium.com/max/411/1*dR5wNpTMpO4Jwv6vj4SAVA.png" /></figure><p><strong>Zoom APIs</strong></p><figure><img alt="Zoom APIs" src="https://cdn-images-1.medium.com/max/1024/1*T5d1I8vW5v0Bx5ABI2Q-oA.png" /></figure><p><strong>Note: </strong>For more details, refer to the <a href="https://github.com/SyncfusionExamples/maui-pdf-viewer-examples/tree/master/Custom%20Toolbar">.NET MAUI PDF Viewer with a custom toolbar</a> demo on GitHub.</p><figure><img alt=".NET MAUI PDF Viewer with a Custom Toolbar" src="https://cdn-images-1.medium.com/max/393/0*TSMa3V5RTWevLyWs.png" /><figcaption>.NET MAUI PDF Viewer with a Custom Toolbar</figcaption></figure><h3>Opening a password-protected PDF</h3><p>To open a password-protected or encrypted PDF document, you can use the <a href="https://help.syncfusion.com/cr/maui/Syncfusion.Maui.PdfViewer.SfPdfViewer.html#Syncfusion_Maui_PdfViewer_SfPdfViewer_LoadDocument_System_IO_Stream_System_String_">LoadDocument()</a> method by providing the password along with the document stream.</p><p>Refer to the following code example.</p><pre>string password = &quot;PASSWORD&quot;;<br>pdfViewer.LoadDocument(pdfDocumentStream, password);</pre><p>Using the following APIs, you can determine whether a PDF document is password protected.</p><figure><img alt="Opening a password-protected PDF" src="https://cdn-images-1.medium.com/max/909/1*10vAz-IchFkckiIQiL4M5Q.png" /></figure><p><strong>Note: </strong>For more details, refer to the <a href="https://github.com/SyncfusionExamples/maui-pdf-viewer-examples/tree/master/Open%20Password%20Protected%20File">opening a password-protected PDF using the .NET MAUI PDF Viewer</a> demo on GitHub.</p><figure><img alt="Opening a Password-Protected PDF Document Using .NET MAUI PDF Viewer" src="https://cdn-images-1.medium.com/max/395/0*dGsAYrDE5xIbfyYI.png" /><figcaption>Opening a Password-Protected PDF Document Using .NET MAUI PDF Viewer</figcaption></figure><h3>Reference</h3><p>Refer to the <a href="https://help.syncfusion.com/maui/pdf-viewer/overview">.NET MAUI PDF Viewer documentation</a> to learn about its other features.</p><h3>Coming soon</h3><p>We have planned and are working to support the following major features in the .NET MAUI PDF Viewer control in upcoming releases:</p><ul><li>Built-in toolbar.</li><li>Text search.</li><li>Text selection and copy.</li><li>Bookmark, TOC, and hyperlink navigation.</li><li>Localization.</li><li>Accessibility.</li><li>RTL text.</li><li>The ability to add, edit, save, and remove annotations.</li><li>Form filling with edit and save functions.</li><li>Single-page layout mode.</li><li>Thumbnails.</li><li>Themes.</li></ul><h3>Conclusion</h3><p>Thanks for reading! I hope you enjoyed learning about the new Syncfusion <a href="https://www.syncfusion.com/maui-controls/maui-pdf-viewer">.NET MAUI PDF Viewer</a> introduced in <a href="https://www.syncfusion.com/forums/179561/essential-studio-2022-volume-4-main-release-v20-4-0-38-is-available-for-download">2022 Volume 4</a>. You can download and check out our MAUI demo app from <a href="https://play.google.com/store/apps/details?id=com.syncfusion.sampleBrowser.maui&amp;hl=en_IN&amp;gl=US">Google Play </a>and the <a href="https://apps.microsoft.com/store/detail/syncfusion-maui-controls-gallery/9P2P4D2BK270?hl=en-in&amp;gl=in">Microsoft Store</a>.</p><p>Also, check out our <a href="https://www.syncfusion.com/products/release-history">Release Notes</a> and the <a href="https://www.syncfusion.com/products/whatsnew">What’s New</a> pages to see the other updates in this release.</p><p>For current customers, the new version is available for download from the <a href="https://www.syncfusion.com/account/downloads">License and Downloads</a> page. If you are not yet a Syncfusion customer, you can try our 30-day <a href="https://www.syncfusion.com/downloads">free trial</a> to check out our newest features.</p><p>You can share your feedback and questions through the comments section below or contact us through our <a href="https://www.syncfusion.com/forums">support forums</a>, <a href="https://support.syncfusion.com/support/tickets">support portal</a>, or <a href="https://www.syncfusion.com/feedback/maui">feedback portal</a>. We are always happy to assist you!</p><h3>Related blogs</h3><ul><li><a href="https://www.syncfusion.com/blogs/post/dotnet-maui-rating-control.aspx">Introducing the New .NET MAUI Rating Control</a></li><li><a href="https://www.syncfusion.com/blogs/post/introducing-the-sixth-set-of-net-maui-controls.aspx">Introducing the Sixth Set of .NET MAUI Controls</a></li><li><a href="https://www.syncfusion.com/blogs/post/authenticate-the-net-maui-app-with-azure-ad.aspx">Authenticate the .NET MAUI App with Azure AD</a></li><li><a href="https://www.syncfusion.com/blogs/post/agenda-view-in-net-maui-scheduler-a-perfect-tool-for-modern-day-office-management.aspx">Agenda View in .NET MAUI Scheduler: A Perfect Tool for Modern-Day Office Management</a></li></ul><p><em>Originally published at </em><a href="https://www.syncfusion.com/blogs/post/introducing-the-new-net-maui-pdf-viewer.aspx"><em>https://www.syncfusion.com</em></a><em> on January 20, 2023.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c94b4c7ccc18" width="1" height="1" alt=""><hr><p><a href="https://medium.com/syncfusion/introducing-the-new-net-maui-pdf-viewer-c94b4c7ccc18">Introducing the New .NET MAUI PDF Viewer</a> was originally published in <a href="https://medium.com/syncfusion">Syncfusion, Inc.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>