<?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[DevExpress Technical - Medium]]></title>
        <description><![CDATA[Thinking Forward - Medium]]></description>
        <link>https://medium.com/devexpress-technical?source=rss----4892616baea6---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>DevExpress Technical - Medium</title>
            <link>https://medium.com/devexpress-technical?source=rss----4892616baea6---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 06:04:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/devexpress-technical" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[.NET MAUI Collection View — Switch Between Different Item Representations]]></title>
            <link>https://medium.com/devexpress-technical/net-maui-collection-view-switch-between-different-item-representations-c8543f6cadd3?source=rss----4892616baea6---4</link>
            <guid isPermaLink="false">https://medium.com/p/c8543f6cadd3</guid>
            <category><![CDATA[net-maui]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[mobile-development]]></category>
            <dc:creator><![CDATA[Anthony Sam]]></dc:creator>
            <pubDate>Mon, 27 May 2024 08:14:10 GMT</pubDate>
            <atom:updated>2024-05-27T08:14:01.155Z</atom:updated>
            <content:encoded><![CDATA[<h3>.NET MAUI Collection View — Switch Between Different Item Representations</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*muzNEAkLFugknuX9.png" /></figure><p>How many different ways can you present information using the CollectionView? More importantly, which presentation option should you choose for the best possible user experience? Here is our recommendation: Consider offering users multiple options and let them choose based on requirements/preferences.</p><p>As you might have guessed by now, the DevExpress .NET MAUI CollectionView allows you to switch between multiple data presentation modes: single/multiple columns or simple/detailed item template. In this blog post, we will review both options in detail.</p><h3>Multi-Span Layout</h3><p>In one of our minor releases (v23.2.4), we’ve extended our DXCollectionView with a new <a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.CollectionView.DXCollectionView.ItemSpanCount">DXCollectionView.ItemSpanCount</a> property so you can easily display CollectionView items across a multi-column list. This property allows you to set the number of columns ( <a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.CollectionView.DXCollectionView.Orientation">Orientation</a> is Vertical) or rows ( <a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.CollectionView.DXCollectionView.Orientation">Orientation</a> is Horizontal) the DXCollectionView must display on-screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jMA10f21zHGIEArV.png" /></figure><pre>&lt;dxcv:DXCollectionView x:Name=&quot;collectionView&quot; <br>                       ItemSpanCount=&quot;{Binding ColumnsCount}&quot;&gt;<br>    &lt;!--...--&gt; <br>&lt;/dxcv:DXCollectionView&gt;</pre><p>The complete source code for our demo app is available on GitHub: <a href="https://github.com/DevExpress-Examples/maui-collection-view/tree/23.2.4%2B/CS/CollectionViewFilteringUI#readme">Collection View — Filtering UI</a>.</p><p>To design a more flexible user interface, you can calculate the number of collection view spans (columns or rows) based on device type (phone or tablet) and screen orientation (landscape or portrait). Obviously, a tablet screen in landscape mode can fit more data items — improving readability when compared to a mobile phone screen.</p><p>With this fact in mind, let’s add selection logic for the ItemSpanCount property value based on device parameters. To do so, we&#39;ll use our multi-functional <a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.Core.ON">ON</a> class and its <a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.Core.ON.Idiom--1(--0---0)?v=24.1">ON.Idiom</a>, <a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.Core.ON.Orientation--1(--0---0)?v=24.1">ON.Orientation</a> and <a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.Core.ON.OrientationChanged--1(--0-System.Action---0-)?v=24.1">ON.OrientationChanged</a> methods. The following code snippet determines the number of Collection View columns to display.</p><pre>public MainPage() {<br>  //... <br>  ON.OrientationChanged(this, OnOrientationChanged); <br>  OnOrientationChanged(this); <br>} <br><br>void OnOrientationChanged(ContentPage view) { <br>  UpdateColumnsCount(); <br>} <br><br>void UpdateColumnsCount() { <br>  ViewModel.ColumnsCount = ON.Idiom&lt;int&gt;(ON.Orientation&lt;int&gt;(1, 2), ON.Orientation&lt;int&gt;(2, Height &lt; 600 ? 2 : 4)); <br>}</pre><h3>Simplified and Detailed Item Template</h3><p>Additionally, we can vary visual representation of items when using single-column and multi-column modes. This approach can address a diverse set of user preferences and usage scenarios.</p><p>The amount of information displayed for a single item may also depend on user preferences. For example, users with impaired vision will typically prefer larger items in a single column. In this instance, you can display less detail, but improve overall readability.</p><p>You may also want to display more details when a user filters them against a criteria. For example, if you need to filter the list by the number of orders, you may want to switch to detailed mode to view numbers on-screen.</p><p>In our example, we select a simple item template in multi-column mode and a detailed item template in single mode. To deliver this capability, we implemented the ColumnsCountToTemplateConverter that conditionally selects a template to apply to the <a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.CollectionView.DXCollectionView.ItemTemplate?v=24.1">ItemTemplate</a> property (based on the number of DXCollectionView layout columns).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*I17ZDviITjoKl96t.png" /></figure><pre>&lt;ContentPage.Resources&gt; <br>  &lt;utils:ColumnsCountToTemplateConverter x:Key=&quot;cardTemplateConverter&quot; <br>                                         SmallCardTemplate=&quot;{StaticResource smallHouseCardTemplate}&quot; <br>                                         CardTemplate=&quot;{StaticResource houseCardTemplate}&quot;/&gt; <br>&lt;/ContentPage.Resources&gt; <br><br>&lt;!--...--&gt; <br><br>&lt;dxcv:DXCollectionView x:Name=&quot;collectionView&quot; <br>                       ItemsSource=&quot;{Binding ItemsSource}&quot; <br>                       ItemTemplate=&quot;{Binding ColumnsCount, Converter={StaticResource cardTemplateConverter}}&quot; &gt;<br>&lt;/dxcv:DXCollectionView&gt;</pre><pre>public class ColumnsCountToTemplateConverter : IValueConverter { <br>  public DataTemplate SmallCardTemplate { get; set; } <br>  public DataTemplate CardTemplate { get; set; } <br><br>  public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { <br>    return ON.Idiom&lt;DataTemplate&gt;((int)value &gt; 1 ? SmallCardTemplate : CardTemplate, CardTemplate); <br>  } <br><br>  //... <br>}</pre><h3>Summary</h3><p>By providing users with flexible item presentation options (and by using our flexible .NET MAUI CollectionView component), you can address a variety of business requirements/use cases.</p><p>To learn more about our .NET MAUI product line, refer to the following blog posts:</p><ul><li><a href="https://community.devexpress.com/blogs/mobile/archive/2024/04/01/How-to-Profile-NET-MAUI-Applications-and-Isolate-Performance-Related-Issues.aspx">How to Profile .NET MAUI Applications and Isolate Performance-Related Issues</a></li><li><a href="https://community.devexpress.com/blogs/mobile/archive/2024/01/08/net-maui-bottom-sheet-3-ways-to-optimize-mobile-screen-space.aspx">.NET MAUI Bottom Sheet — 3 Ways to Optimize Mobile Screen Space</a></li><li><a href="https://community.devexpress.com/blogs/mobile/archive/2023/10/18/incorporate-crud-operations-into-your-app-with-devexpress-net-maui-collectionview.aspx">.NET MAUI — Incorporate CRUD Operations in Your Mobile App with DevExpress CollectionView</a></li><li><a href="https://community.devexpress.com/blogs/mobile/archive/2023/10/12/net-maui-mobile-collection-filtering-best-practices.aspx">.NET MAUI Mobile — Collection Filtering Best Practices</a></li><li><a href="https://community.devexpress.com/blogs/mobile/archive/2023/11/02/3-combobox-dropdown-alternatives-to-implement-user-friendly-item-selection-in-a-mobile-app.aspx">.NET MAUI — 3 ComboBox Dropdown Alternatives for User-Friendly Item Selection within a Mobile App</a></li></ul><h3>Free DevExpress Products — Get Your Copy Today</h3><p>The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the <a href="https://supportcenter.devexpress.com/">DevExpress Support Center</a> at your convenience. We’ll be happy to follow-up.</p><p><em>Originally published at </em><a href="https://community.devexpress.com/blogs/mobile/archive/2024/05/24/net-maui-collection-view-switch-between-different-item-representations.aspx"><em>https://community.devexpress.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8543f6cadd3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devexpress-technical/net-maui-collection-view-switch-between-different-item-representations-c8543f6cadd3">.NET MAUI Collection View — Switch Between Different Item Representations</a> was originally published in <a href="https://medium.com/devexpress-technical">DevExpress Technical</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Implement Material Design 3 in a .NET MAUI Application]]></title>
            <link>https://medium.com/devexpress-technical/how-to-implement-material-design-3-in-a-net-maui-application-c00c2618c7be?source=rss----4892616baea6---4</link>
            <guid isPermaLink="false">https://medium.com/p/c00c2618c7be</guid>
            <category><![CDATA[net-maui]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[mobile-development]]></category>
            <dc:creator><![CDATA[Anthony Sam]]></dc:creator>
            <pubDate>Wed, 22 May 2024 14:48:40 GMT</pubDate>
            <atom:updated>2024-05-22T14:48:23.309Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to Implement Material Design 3 in a .NET MAUI Application</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hzxPAibFNsfyRF2Xi1N47w.png" /></figure><p><a href="https://m3.material.io/">Material Design</a> is a cross-platform system of guidelines developed by Google. Inspired by the textures of the physical world, it helps you craft visually captivating interfaces with balanced colors and enhanced usability (the objective is to focus attention on essential UI elements). The DevExpress .NET MAUI Suite includes 10 built-in Material Design 3 color themes — available in both dark and light variants. With the help of the ThemeColor markup extension and project templates, you can easily support Material Design 3 themes in applications using DevExpress or standard .NET MAUI controls.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AqwVexSnvulgkbYy.png" /></figure><h3>Access the Material Design 3 Palette</h3><p>Material Design 3 Palette is generated based on a given seed color. From this color, the Material Design 3 algorithm creates six tonal palettes. To support dark and light application appearance, the algorithm takes colors from tonal palettes and creates color schemes. Material Design 3 ensures color scheme colors have sufficient contrast and a consistent appearance. To use Material Design 3 colors in your application, simply bind controls directly to a color scheme’s colors. Refer to the <a href="https://docs.devexpress.com/MAUI/404636/common-concepts/themes#color-theme-anatomy">Color Theme Anatomy</a> section for more information.</p><p>To simplify bindings, we ship a <a href="https://docs.devexpress.com/MAUI/404636/common-concepts/themes#apply-color-themes">ThemeManager</a> class. This member allows you to generate a new theme based on a seed color and apply it to the application. This capability will be of value for those who wish to style applications based on brand colors.</p><pre>using DevExpress.Maui;<br>using DevExpress.Maui.Core; <br>using Microsoft.Maui.Graphics; <br>// ... <br>public static class MauiProgram { <br>  public static MauiApp CreateMauiApp() { <br>    ThemeManager.UseAndroidSystemColor = false; <br>    ThemeManager.Theme = new Theme(Color.FromArgb(&quot;FF6200EE&quot;)); <br>    var builder = MauiApp.CreateBuilder(); <br>    builder <br>      .UseDevExpress() <br>      // ... <br>      .UseMauiApp&lt;App&gt;(); <br>    return builder.Build(); <br>  } <br>}</pre><p>You can also use the APIs mentioned above to apply a predefined theme to your application:</p><pre>using DevExpress.Maui; <br>using DevExpress.Maui.Core; <br>// ... <br>public static class MauiProgram { <br>  public static MauiApp CreateMauiApp() { <br>    ThemeManager.UseAndroidSystemColor = false; <br>    ThemeManager.Theme = new Theme(ThemeSeedColor.TealGreen); <br>    var builder = MauiApp.CreateBuilder(); <br>    builder <br>      .UseDevExpress() <br>      // ... <br>      .UseMauiApp&lt;App&gt;(); <br>    return builder.Build(); <br>  } <br>}</pre><p>When you need to use a color scheme’s color, you can use the ThemeColor markup extension to pick a color by its token name.</p><p>To maintain application consistency with the appearance of a device, we also added the <a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.Core.ThemeManager.UseAndroidSystemColor">ThemeManager.UseAndroidSystemColor</a> property. It takes the primary color of your Android device as a seed color, generates a new theme based on it, and applies the theme to the application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*t0HLXkT5jDYO9Uvh.png" /></figure><p>Additionally, you can set a custom navigation bar’s background and foreground colors (available on Android OS), status bar background color (available on Android OS), and status bar foreground color (for both Android OS and iOS).</p><pre>ThemeManager.Theme = new Theme(ThemeSeedColor.DarkGreen); <br>ThemeManager.AndroidNavigationBarForeground = AppTheme.Light;</pre><p>Refer to the following topic for additional guidance: <a href="https://docs.devexpress.com/MAUI/404636/common-concepts/themes#apply-system-colors-to-system-bars">Apply System Colors to System Bars</a></p><p>You can also visit the <a href="https://github.com/DevExpress-Examples/maui-demo-app/">DevExpress .NET MAUI Demo Center</a> GitHub repository to view our theme engine in action.</p><h3>Use Predefined Material Design Styles</h3><p>The default appearances of our .NET MAUI Controls meet Material Design 3 guideline requirements. Like Material Design 3, our controls support multiple types: Accent, Filled, Outlined, and Text.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*svsJ9ubgNzN66hOF.png" /></figure><p>When it comes to application appearance, design consistency of utmost importance. If you use both standard controls and DevExpress .NET MAUI Controls in a single solution, you can apply our color themes to standard controls to introduce consistency across your entire mobile project.</p><p>If you create a new application, you do not need to worry about extra code because we added styles for standard controls in our project templates. If you already have an application, you simply need to use our <a href="https://docs.devexpress.com/MAUI/404636/common-concepts/themes?v=24.1#apply-color-theme-colors-to-a-standard-control">ThemeColor markup extension</a> to bind standard controls to DevExpress .NET MAUI Color Themes.</p><p>Refer to the following topic for more information in this regard: <a href="https://docs.devexpress.com/MAUI/404636/common-concepts/themes#apply-color-theme-colors-to-a-standard-control">Apply Color Theme to a Standard Control</a></p><p>To review sample code used to theme standard .NET MAUI controls: <a href="https://github.com/DevExpress-Examples/maui-theme-standard-controls">Apply Themes to Standard Controls</a></p><h3>Summary</h3><p>Material Design 3 principles help you deliver mobile solutions with a consistent, modern appearance. While Material Design 3 includes many rules and uses sophisticated algorithms for color calculation, our components and predefined project templates have been designed to style your app with relative ease.</p><h3>Free DevExpress Products — Get Your Copy Today</h3><p>The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the <a href="https://supportcenter.devexpress.com/">DevExpress Support Center</a> at your convenience. We’ll be happy to follow-up.</p><p><em>Originally published at </em><a href="https://community.devexpress.com/blogs/mobile/archive/2024/05/14/how-to-implement-material-design-3-in-a-net-maui-application.aspx"><em>https://community.devexpress.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c00c2618c7be" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devexpress-technical/how-to-implement-material-design-3-in-a-net-maui-application-c00c2618c7be">How to Implement Material Design 3 in a .NET MAUI Application</a> was originally published in <a href="https://medium.com/devexpress-technical">DevExpress Technical</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[.NET MAUI: Edit HTML Content with the DevExpress .NET MAUI HTML Edit Control]]></title>
            <link>https://medium.com/devexpress-technical/net-maui-edit-html-content-with-the-devexpress-net-maui-html-edit-control-1709c32b090c?source=rss----4892616baea6---4</link>
            <guid isPermaLink="false">https://medium.com/p/1709c32b090c</guid>
            <category><![CDATA[maui]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[mobile-development]]></category>
            <dc:creator><![CDATA[Anthony Sam]]></dc:creator>
            <pubDate>Mon, 20 May 2024 10:54:10 GMT</pubDate>
            <atom:updated>2024-05-20T10:54:10.615Z</atom:updated>
            <content:encoded><![CDATA[<h3>.NET MAUI: Edit HTML Content with the DevExpress .NET MAUI HTML Edit Control</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zTp0y0kHl0M8Jl0M.png" /></figure><p>In the late 80s, physicist Tim Berners-Lee created the first prototype of HTML — a unified format designed to share documents between researchers.</p><p>Since then, HTML adoption has grown exponentially, and is now used in browsers, email clients, and CMS systems. Needless to say, rich content stored in HTML format is used across the web and within applications able to render HTML. Thanks to its versatility, HTML is now ubiquitous.</p><p>If HTML editing is important to your mobile development strategy, the DevExpress .NET MAUI HTML Edit Control can help you incorporate HTML editing within your mobile solution and address a variety of usage scenarios, including:</p><ul><li>introduce rich text notes</li><li>write comments/messages</li><li>compose email messages</li><li>create content for a CMS system.</li></ul><p>In this blog post, I’ll use the DevExpress .NET MAUI HTML Edit to display and edit descriptions of homes within a simple mobile application (using a CRUD editing form).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*biL_KjZV7FnzQWfU.gif" /></figure><p>The application showcased in this post is available on GitHub: <a href="https://github.com/DevExpress-Examples/maui-html-edit/tree/23.2.3%2B/CS/PropertyDescription">Edit HTML in DataGridView CRUD Views</a>.</p><p>You can also watch a tutorial video on YouTube if you expect to integrate our .NET MAUI HTML Edit Control in your next .NET MAUI project: <a href="https://youtu.be/gne2Olr_uiw">Get Started With the HTML Edit Control for .NET MAUI</a>.</p><p>The primary goal of our HTML Edit Control is to create/edit rich text content to be displayed in other components/applications. It doesn’t support all HTML tags, such as interactive buttons, borders, etc.</p><p>To use the DevExpress .NET MAUI HTML Edit control in a project, you must purchase a DevExpress Universal Subscription. If you are new to our .NET MAUI product line and are considering it for an upcoming project, you can start a 30-day trial using NuGet as described in <a href="https://docs.devexpress.com/GeneralInformation/116042/nuget/obtain-your-nuget-feed-credentials#start-a-30-day-trial-period">this help topic</a>.</p><h3>Display HTML Content in Read-Only Mode</h3><p>Since mobile applications don’t have much screen space, its good practice to separate item detail info/editing views.</p><p>In this particular example, our .NET MAUI HTML Edit displays rich text in read-only mode on the detail view page (HTML Edit includes an <a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.HtmlEditor.HtmlEdit.IsReadOnly">IsReadOnly</a> property that restricts/permits content editing).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gjvIFcrq-jepO6b9.png" /></figure><p>To display content in XAML, specify the <a href="https://docs.devexpress.com/MAUI/404637/html-edit/load-and-obtain-markup#display-content-xaml">HtmlEdit.HtmlSource</a> property. For this example, this property is bound to a ViewModel property.</p><h3>Related GitHub Repository Files</h3><ul><li><a href="https://github.com/DevExpress-Examples/maui-html-edit/blob/23.2.3%2B/CS/PropertyDescription/Views/PropertiesDetailPage.xaml#L38">Views/PropertiesDetailPage.xaml</a></li><li><a href="https://github.com/DevExpress-Examples/maui-html-edit/blob/23.2.3%2B/CS/PropertyDescription/ViewModels/PropertyViewModel.cs#L61">ViewModels/PropertyViewModel.cs</a></li></ul><h3>Switch to Edit Mode and Modify Descriptions on a Separate Page</h3><p>When editing rich text, you will often need more space to display elements such as toolbars. You will also need to reduce excessive scrolling. It’s for these reasons we recommend the use of a separate screen to edit content.</p><p>If you choose to display our HTML Edit Control in a separate view, you can leverage our built-in adaptive toolbar and use the following content editing actions:</p><p>Set the <a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.HtmlEditor.HtmlEdit.ShowToolbar">HtmlEdit.ShowToolbar</a> property to true to display the toolbar.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1h2WPnLfXy5I0lAY.png" /></figure><p>Editing HTML content with the DevExpress HTML Edit works best if you place the control in a <a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.Core.SafeKeyboardAreaView">SafeKeyboardAreaView</a> container. This container allows you to manage the following:</p><ul><li>Prevent HTML content from keyboard overlap.</li><li>Decrease the height of HTML Edit when you open the device keyboard (to maintain toolbar visibility).</li><li>Display custom content in the keyboard region to add more space for UI elements. The built-in toolbar uses this feature to display action panels.</li></ul><p>Once you modify the HTML, call the <a href="https://docs.devexpress.com/MAUI/404637/html-edit/load-and-obtain-markup#retrieve-the-displayed-content">HtmlEdit.GetHtmlAsync</a> method to obtain HTML content and save it to a ViewModel property.</p><h3>Related GitHub Repository Files</h3><ul><li><a href="https://github.com/DevExpress-Examples/maui-html-edit/blob/23.2.3%2B/CS/PropertyDescription/Views/PropertyDescriptionEditView.xaml#L16">Views/PropertyDescriptionEditView.xaml</a></li><li><a href="https://github.com/DevExpress-Examples/maui-html-edit/blob/23.2.3%2B/CS/PropertyDescription/Views/PropertyDescriptionEditView.xaml.cs">Views/PropertyDescriptionEditView.xaml.cs</a></li></ul><h3>Free DevExpress Products — Get Your Copy Today</h3><p>The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the <a href="https://supportcenter.devexpress.com/">DevExpress Support Center</a> at your convenience. We’ll be happy to follow-up.</p><p><em>Originally published at </em><a href="https://community.devexpress.com/blogs/mobile/archive/2024/04/23/net-maui-html-edit-control.aspx"><em>https://community.devexpress.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1709c32b090c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devexpress-technical/net-maui-edit-html-content-with-the-devexpress-net-maui-html-edit-control-1709c32b090c">.NET MAUI: Edit HTML Content with the DevExpress .NET MAUI HTML Edit Control</a> was originally published in <a href="https://medium.com/devexpress-technical">DevExpress Technical</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[.NET MAUI — Creating Profile Settings Page with Form Items]]></title>
            <link>https://medium.com/devexpress-technical/net-maui-creating-profile-settings-page-with-form-items-a6a2daee5603?source=rss----4892616baea6---4</link>
            <guid isPermaLink="false">https://medium.com/p/a6a2daee5603</guid>
            <category><![CDATA[mobile-development]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[maui]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[dotnet]]></category>
            <dc:creator><![CDATA[Anthony Sam]]></dc:creator>
            <pubDate>Thu, 25 Jan 2024 10:11:37 GMT</pubDate>
            <atom:updated>2024-01-25T11:21:59.031Z</atom:updated>
            <content:encoded><![CDATA[<h3>.NET MAUI — Creating Profile Settings Page with Form Items</h3><p>A profile settings/profile configuration page is common to many mobile apps. If you’re targeting .NET MAUI, our distribution includes a set of <a href="https://docs.devexpress.com/MAUI/404418/form-items/overview">Form Item</a> components to help you construct intuitive settings/config pages.</p><p>In this post, I’ll highlight the flexibility of DevExpress .NET MAUI Form Items and illustrate how to create mobile interfaces to address a variety of usage scenarios:</p><ul><li>Settings pages</li><li>Navigation menus</li><li>Data editing screens</li><li>Action sheets</li></ul><p>Let’s start with a simple settings page for illustration purposes. To implement such a page, you will generally need to use icons as labels, create groups, react to taps, and update selected values. To select a value from a list, you will need to manually display a popup or a separate page and replicate this functionality for similar items. Needless to say, this process can be quite time consuming. Our .NET MAUI Form Item components were designed to simplify the steps involved and reduce code duplication.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NB-1BzJciHKXpW6r.png" /></figure><p>The demo app showcased in this post is available on GitHub: <a href="https://github.com/DevExpress-Examples/maui-form-items">DevExpress Form Items for .NET MAUI</a>.</p><p>You can also watch a step-by-step tutorial video on YouTube:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F1jNGt71aYj8%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D1jNGt71aYj8&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F1jNGt71aYj8%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/5a1f6bfe49aae25cca2f18a3ca285705/href">https://medium.com/media/5a1f6bfe49aae25cca2f18a3ca285705/href</a></iframe><h3>Basic Form Item</h3><p>The control implements the basic functionality required to generate items within a settings list. It can include the following elements:</p><ul><li><a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.Editors.FormItemBase.ImageSource">Leading image.</a> In our demo app, we’ll use this image to display a person’s avatar and icons to visually inform users about the purpose of a given item. We’ll use our new <a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.Editors.ImageEdit">ImageEdit</a> component to integrate edit functionality to the form item image. For instance, we&#39;ll specify the <a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.Editors.FormItemBase.ImageTemplate">FormItemBase.ImageTemplate</a> property to display an &quot;edit&quot; icon over the avatar image. Once complete, you can assign a TapGestureRecognizer to handle user taps. On tap, you can invoke a separate page or popup with an ImageEdit. In both instances, ImageEdit and FormItem use the same image as a source.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/0*d3aacCbwud7-pySo.png" /></figure><p>The following GitHub repo illustrates how to integrate an ImageEdit into an app: <a href="https://github.com/DevExpress-Examples/maui-data-form/blob/HEAD/CS/EditFormExample/ImageEditView.xaml#L19">DataFormView for .NET MAUI - Edit a Contact&#39;s Data</a>.</p><ul><li><a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.Editors.FormItemBase.Text">Text</a>: In most cases, this element displays item headline and contains the setting’s name.</li><li><a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.Editors.FormItemBase.Detail">Detail</a>: Can include supporting description/additional info. In our example, we use Detail to display an editable text field where users can input biographic information.</li><li><a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.Editors.FormItem.Content">Content</a> &amp; <a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.Editors.FormItem.InlineContent">InlineContent</a>: These options allow you to display additional custom content in the item. In this demo, we use Content and InlineContent to display selected values as trailing content in a form item.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*emMzY8MgnU--LcFW.png" /></figure><ul><li><a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.Editors.FormItemBase.ArrowTemplate">Arrow</a>. This element prompts users to tap the form item to execute an action. In some instances, you may invoke a popup with radio buttons or a detached edit page. If you would like to limit user selection options to a predefined list, consider using the next form item on our list — <a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.Editors.FormListPickerItem">FormListPickerItem</a>.</li></ul><h3>Form Item with Picker List</h3><p><a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.Editors.FormListPickerItem">FormListPickerItem</a> allows you to select an option from a list. Its <a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.Editors.FormPickerItemBase.PickerShowMode">PickerShowMode</a> setting defines how to display options: in a detached page, popup, or bottom sheet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Vcr1aCtRo2noGikh.png" /></figure><p>You do not need to create and configure picker container control (Page, Popup, or BottomSheet) — you simply need to specify the <a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.Editors.FormListPickerItem.ItemsSource">ItemsSource</a> property. FormListPickerItem will handle all navigation configurations for you.</p><p>Note: Each show mode supports search and allows you to display a built-in search bar if your options list is lengthy.</p><p>The FormListPickerItem supports different selection modes (single and multiple). The <a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.Editors.FormListPickerItem.IsMultipleSelectionEnabled">IsMultipleSelectionEnabled</a> setting allows you to switch modes as needed. In single selection mode, the FormListPickerItem control closes the picker once a user selects an option (to reduce unnecessary OK button taps).</p><p>Another customization option includes the manner in which the FormListPickerItem displays its selected items. In Single selection mode, the selected option is displayed as form item <a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.Editors.FormItem.InlineContent">InlineContent</a> and multiple selected options are displayed as tokens in the <a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.Editors.FormItem.Content">Content</a>. So you can customize the InlineContent or Content property to customize the appearance of selected items. In our demo, we replaced tokens with a simple list of strings separated by a semicolon.</p><pre>&lt;dxe:FormListPickerItem ... <br>  Content=&quot;{Binding Blacklist, Converter={helpers:BlacklistCollectionConverter}, Mode=TwoWay}&quot;&gt;</pre><pre>public class BlacklistCollectionConverter : IValueConverter {<br>  public object Convert(object value, Type targetType, object parameter, CultureInfo culture) {<br>    if (value is IList&lt;string&gt; contacts) {<br>      return String.Join(&quot;; &quot;, contacts.Select(x =&gt; x)); <br>    } <br>    return String.Empty; <br>  } <br>}</pre><h3>Check Box &amp; Switch Form Items</h3><p>The <a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.Editors.FormCheckItem">FormCheckItem</a> control includes the same functionality found in FormItem but displays a combo box instead of an arrow. The FormCheckItem allows you to select three possible state values: Enabled, Disabled, or Indeterminate. The indeterminate state can be useful when you need to indicate that a setting is not set.</p><p><a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.Editors.FormSwitchItem">FormSwitchItem</a> supports the same functionality as FormItem but displays a switch instead of an arrow. The FormSwitchItem control may be the best choice when a user needs to enable/disable an option.</p><h3>Invoke an Edit Page</h3><p>You can respond to user taps on a form item. In this example, users can tap the form item to update bio info in a separate edit form. The advantages of a separate form are:</p><ul><li>Best for editing multi-line text.</li><li>You can include prompts as to what is expected for input, and in so doing, reduce clutter on the main page.</li><li>Users can save changes on the edit page for each individual setting.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/506/0*g7EGOIUz4Vw32j3t.gif" /></figure><pre>&lt;dxe:FormItem AllowTap=&quot;True&quot; DetailColor=&quot;Gray&quot; TapCommand=&quot;{Binding EditBioCommand}&quot;<br>              Detail=&quot;{Binding Bio, Converter={helpers:BioDetailsConverter}, Mode=OneWay}&quot; <br>              Text=&quot;{Binding Bio, Converter={helpers:BioTextConverter}, Mode=OneWay}&quot;&gt;<br>&lt;/dxe:FormItem&gt;</pre><pre>&lt;ContentPage x:Class=&quot;FormItemExample.Views.EditBioPage&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:dxe=&quot;clr-namespace:DevExpress.Maui.Editors;assembly=DevExpress.Maui.Editors&quot; <br>             xmlns:helpers=&quot;clr-namespace:FormItemExample.Helpers&quot; <br>             Title=&quot;Bio&quot;&gt; <br>    &lt;ContentPage.ToolbarItems&gt; <br>        &lt;ToolbarItem Clicked=&quot;OnAccept&quot; IconImageSource=&quot;check_24px&quot; /&gt; <br>    &lt;/ContentPage.ToolbarItems&gt; <br>    &lt;VerticalStackLayout&gt; <br>        &lt;dxe:MultilineEdit Loaded=&quot;bioEditor_Loaded&quot; BackgroundColor=&quot;Transparent&quot; x:Name=&quot;bioEditor&quot; <br>                           Margin=&quot;5&quot; BoxMode=&quot;Filled&quot; HelpText=&quot;{x:Static helpers:BioHelper.detailText}&quot; <br>                           HelpTextColor=&quot;Gray&quot; MaxCharacterCount=&quot;100&quot; /&gt; <br>    &lt;/VerticalStackLayout&gt; <br>&lt;/ContentPage&gt;</pre><h3>Grouping Form Items with Group Form Item</h3><p>Once we design a settings page (with a variety of different form item options), we can combine them into logical categories. The <a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.Editors.FormGroupItem">FormGroupItem</a> control can address this requirement since it allows you to organize form items into groups and assign a specific name to each group. To create groups of form items, place FormItem controls within &lt;FormGroupItem&gt;...&lt;/FormGroupItem&gt; tags and use the group item&#39;s Header property to specify group captions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/0*yVp7gP353PS6RjnQ.png" /></figure><h3>Apply Color Themes</h3><p>The DevExpress .NET MAUI UI Suite v23.2 includes a new theming mechanism. To learn more, please visit: <a href="https://docs.devexpress.com/MAUI/404636/common-concepts/themes">Color Themes for DevExpress .NET MAUI Controls</a>.</p><p>If you are new to .NET MAUI or considering our .NET MAUI UI Suite for a future project, please review the following posts for additional UX related samples/guidance:</p><ul><li><a href="https://community.devexpress.com/blogs/mobile/archive/2023/11/02/3-combobox-dropdown-alternatives-to-implement-user-friendly-item-selection-in-a-mobile-app.aspx">.NET MAUI — 3 ComboBox Dropdown Alternatives for User-Friendly Item Selection within a Mobile App</a></li><li><a href="https://community.devexpress.com/blogs/mobile/archive/2023/10/18/incorporate-crud-operations-into-your-app-with-devexpress-net-maui-collectionview.aspx">.NET MAUI — Incorporate CRUD Operations in Your Mobile App with DevExpress CollectionView</a></li><li><a href="https://community.devexpress.com/blogs/mobile/archive/2023/10/12/net-maui-mobile-collection-filtering-best-practices.aspx">.NET MAUI Mobile — Collection Filtering Best Practices</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*u2ax4xkKyMKnvuI0.png" /></figure><p><em>Originally published at </em><a href="https://community.devexpress.com/blogs/mobile/archive/2024/01/24/creating-profile-settings-page-with-net-maui-form-items.aspx"><em>https://community.devexpress.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a6a2daee5603" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devexpress-technical/net-maui-creating-profile-settings-page-with-form-items-a6a2daee5603">.NET MAUI — Creating Profile Settings Page with Form Items</a> was originally published in <a href="https://medium.com/devexpress-technical">DevExpress Technical</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[.NET MAUI Bottom Sheet — 3 Ways to Optimize Mobile Screen Space]]></title>
            <link>https://medium.com/devexpress-technical/net-maui-bottom-sheet-3-ways-to-optimize-mobile-screen-space-278e75a497b4?source=rss----4892616baea6---4</link>
            <guid isPermaLink="false">https://medium.com/p/278e75a497b4</guid>
            <category><![CDATA[maui]]></category>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[mobile-development]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Anthony Sam]]></dc:creator>
            <pubDate>Mon, 08 Jan 2024 14:42:42 GMT</pubDate>
            <atom:updated>2024-01-08T14:41:06.503Z</atom:updated>
            <content:encoded><![CDATA[<h3>.NET MAUI Bottom Sheet — 3 Ways to Optimize Mobile Screen Space</h3><p>As you may know, <a href="https://docs.devexpress.com/MAUI/404324/dialogs-menu-and-navigation/bottom-sheet/get-started">Bottom Sheet</a> is a component that displays supplementary content anchored to the bottom of the screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BI1iQFU1y-eJqqLc.png" /></figure><p>This UI metaphor is uncommon for desktop apps, but widely used in the mobile world. It allows you to conditionally display large UI elements, giving them almost the entire screen space without navigating to a separate page.</p><p>In this blog post, I’ll demonstrate a few usage scenarios wherein the Bottom Sheet can enhance the mobile user experience.</p><h3>1. Master-Detail Data</h3><p>A common solution for master-detail data display in a desktop apps is use of a Data Grid with expandable rows with detail grids. On mobile screens, it may be challenging to allocate space for multiple Data Grids or lists. Additionally, creating an expandable hierarchy level may complicate the UI, especially if each data row displays diverse information. One possible solution to this UI problem is to display detail data in a Bottom Sheet when a master item is selected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*bJViHwTnssDwmzRI.gif" /></figure><p>Bottom Sheet allows you to display big data segments visually separated from primary content. Its advantage is that it doesn’t require users to navigate to a separate page to view relevant information.</p><p>Our Bottom Sheet supports both modal and inline display modes. In inline mode, you can interact with primary content when the Bottom Sheet is open. When a user interacts with primary content, you may want to provide him/her with more space in the main area, but still keep the Bottom Sheet visible. You can implement this behavior with our Bottom Sheet by setting the <a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.Controls.BottomSheet.HalfExpandedRatio">HalfExpandedRatio</a> property.</p><p>As demonstrated in the animation above, our Bottom Sheet is a good place for additional action buttons related to a tapped item.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FUc116S77DEo%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DUc116S77DEo&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FUc116S77DEo%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/4e006302bdda26b7a2a05c74c9866d25/href">https://medium.com/media/4e006302bdda26b7a2a05c74c9866d25/href</a></iframe><h3>2. Display Filter Items</h3><p>As you may know, you can use <a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.CollectionView.DXCollectionView.FilteringContext#filter-items">Filter UI Elements</a> alongside our Collection View and Data Grid to apply various filters. A common mobile UI implementation is to display filters in a Bottom Sheet. You can use <a href="https://docs.devexpress.com/MAUI/404001/button-chips-and-checkbox/chips/get-started">Chips</a> to activate a filter and <a href="https://docs.devexpress.com/MAUI/403306/dialogs-menu-and-navigation/tab-view/index">Tab View</a> to switch from one filter group to another within the same Bottom Sheet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9SdtUq7gzprKoBd9.png" /></figure><p>For additional information, refer to the following: <a href="https://community.devexpress.com/blogs/mobile/archive/2023/10/12/net-maui-mobile-collection-filtering-best-practices.aspx">.NET MAUI Mobile — Collection Filtering Best Practices</a>.</p><h3>3. Select Values</h3><p>Most business apps include the use of data editors, allowing users to select values from predefined lists. In desktop apps, the obvious component choice is a ComboBoxEdit with a standard dropdown. In mobile apps, dropdown might not be the best solution, because it doesn’t leverage available screen space. DevExpress <a href="https://docs.devexpress.com/MAUI/404621/editors/editor-types#combo-box">ComboBoxEdit</a> and <a href="https://docs.devexpress.com/MAUI/404418/form-items/form-items">Form Item</a> elements offer you item pick modes where the Bottom Sheet is used instead of a dropdown:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/0*9jKvCWHim2lmKo1g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Zjn6-FxD-Wg1woCZ.png" /></figure><p>Refer to the following blog post for additional item selection-related information: <a href="https://community.devexpress.com/blogs/mobile/archive/2023/11/02/3-combobox-dropdown-alternatives-to-implement-user-friendly-item-selection-in-a-mobile-app.aspx">.NET MAUI — 3 ComboBox Dropdown Alternatives for User-Friendly Item Selection within a Mobile App</a>.</p><h3>Summary</h3><p>Bottom Sheet is a multi-purpose UI control designed to address a variety of mobile specific UI requirements, including:</p><ul><li>You can use Bottom Sheet to display large data segments within the primary screen.</li><li>Inline (non-modal) display mode allows you to interact with primary content and automatically reduce Bottom Sheet height when required.</li><li>You can display a bar with actions when an item is selected.</li><li>You can add filter items to the Bottom Sheet.</li><li>Bottom Sheet is a capable alternative to a dropdown.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QePMMfw9C16V-Opg9jK3hA.png" /></figure><p><em>Originally published at </em><a href="https://community.devexpress.com/blogs/mobile/archive/2023/11/28/net-maui-bottom-sheet-3-ways-to-optimize-mobile-screen-space.aspx"><em>https://community.devexpress.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=278e75a497b4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devexpress-technical/net-maui-bottom-sheet-3-ways-to-optimize-mobile-screen-space-278e75a497b4">.NET MAUI Bottom Sheet — 3 Ways to Optimize Mobile Screen Space</a> was originally published in <a href="https://medium.com/devexpress-technical">DevExpress Technical</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Blazor — New .NET 8 Render Modes]]></title>
            <link>https://medium.com/devexpress-technical/blazor-new-net-8-render-modes-7be850029174?source=rss----4892616baea6---4</link>
            <guid isPermaLink="false">https://medium.com/p/7be850029174</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[blazor]]></category>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[performance]]></category>
            <dc:creator><![CDATA[Vyacheslav Khudyakov]]></dc:creator>
            <pubDate>Thu, 21 Dec 2023 14:40:33 GMT</pubDate>
            <atom:updated>2023-12-21T14:40:33.012Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Blazor — New .NET 8 Render Modes</strong></h3><p>.NET 8 introduced major and exciting changes to Blazor, unified its hosting models, and adopted server-side rendering. In this post, we will give you an overview of these new additions and describe how you can leverage them in your Blazor apps.</p><h4>Interactive Render Modes and Static Server-Side Rendering</h4><p>One of the main changes introduced in .NET 8 is new <a href="https://learn.microsoft.com/en-us/aspnet/core/blazor/components/render-modes?view=aspnetcore-8.0">render modes</a>:</p><ul><li>Static (SSR)</li><li>Interactive Server</li><li>Interactive WebAssembly</li><li>Interactive Auto</li></ul><p>Significant attention has been paid to Static Server-side rendering — as it is the default render mode for Blazor applications in .NET 8.</p><p>Server-side rendering (SSR) is a technique that may be familiar to those of you using modern JavaScript frameworks. With SSR, a server pre-renders pages and sends them as fully formed HTML to the browser. .NET 8 adopts this technique by introducing the concept of Static Server-side rendering to Blazor apps. New Blazor apps created with .NET 8 don’t open a WebSocket connection by default. Instead, Blazor pages are rendered entirely on the server and sent to the client as static HTML. This offers the following advantages:</p><ul><li>Static pages are often loaded faster.</li><li>An app with static pages doesn’t require a running server connection or bulky WebAssembly file downloads.</li></ul><figure><img alt="Server-side rendering scheme" src="https://cdn-images-1.medium.com/max/400/0*Vun8uQ3EvZ6iFgzQ.png" /><figcaption>Server-side rendering scheme</figcaption></figure><p>Though Static Server-side rendering offers advantages, it does have certain limitations:</p><ul><li>Blazor components are not interactive — they don’t fire events and don’t execute associated C# code after being rendered for the first time.</li><li>Any communication with the server that leads to changes on the page needs to be implemented through HTTP requests.</li></ul><p>Large Blazor apps that rely on interactive components and existing Blazor code might not be ported to static SSR easily. And of course, there are existing technologies that offer a similar static approach in .NET — Razor Pages or MVC. The main benefit of Static SSR is that it can be combined with interactive rendering (WebAssembly or Server) within the same app. The app’s shell, its starting page, and other basic pages can be static. But once a user navigates to a page that requires interactivity, the app will open a SignalR circuit or fire up the WebAssembly runtime.</p><figure><img alt="Static SSR combined with interactive rendering (WebAssembly or Server) within the same page" src="https://cdn-images-1.medium.com/max/360/0*RlXV2_xLB_7Tq5_s.png" /><figcaption>Static SSR combined with interactive rendering (WebAssembly or Server) within the same page</figcaption></figure><p>Refer to the following video to learn more information about the benefits of SSR: <a href="https://www.youtube.com/watch?v=QZKi81F24H0">Blazor in .NET 8 RC2: Carl Franklin’s Blazor Train Ep 99</a></p><h4>New Render Modes and DevExpress Components</h4><p>With v23.2, all DevExpress Blazor UI components have been tested and support all interactive render modes mentioned herein.</p><p>While the majority of DevExpress Blazor components are interactive, some of them can be static and render their content using Static Server-side rendering. We’ve implemented support for Static Server-side rendering for the following components:</p><ul><li><a href="https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxGrid">Grid</a> and <a href="https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxPivotGrid-1">Pivot Grid</a> (to display static data in a single page).</li><li><a href="http://docs.devexpress.com/Blazor/DevExpress.Blazor.DxMenu">Menu</a> and <a href="http://docs.devexpress.com/Blazor/DevExpress.Blazor.DxTreeView">TreeView</a> (to display one level of hierarchy).</li><li><a href="http://docs.devexpress.com/Blazor/DevExpress.Blazor.DxWaitIndicator">Wait Indicator</a> and <a href="http://docs.devexpress.com/Blazor/DevExpress.Blazor.DxLoadingPanel">Loading Panel</a> (to indicate progress with streaming rendering).</li><li><a href="http://docs.devexpress.com/Blazor/DevExpress.Blazor.DxFormLayout">Form Layout</a> (excluding tabs and collapsible groups).</li><li><a href="http://docs.devexpress.com/Blazor/DevExpress.Blazor.DxGridLayout">Grid Layout</a> and <a href="http://docs.devexpress.com/Blazor/DevExpress.Blazor.DxStackLayout">Stack Layout</a></li></ul><p>To simplify the integration of our Blazor UI components with the major changes to the project structure introduced in .NET 8, we updated our <a href="https://docs.devexpress.com/Blazor/401057/get-started/blazor-and-wasm/get-started?v=23.2#devexpress-template">DevExpress project templates</a> in v23.2. The updated Template now demonstrates the use of DevExpress Blazor components in different render modes. The final application created based on our Template includes:</p><ul><li>The <a href="http://docs.devexpress.com/Blazor/DevExpress.Blazor.DxGridLayout">GridLayout</a> component in Static SSR mode (to define application layout).</li><li>The <a href="http://docs.devexpress.com/Blazor/DevExpress.Blazor.DxMenu">Menu</a> component in Static SSR mode (to navigate within the application).</li><li>The <a href="https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxButton">Button</a> component on the <em>Counter</em> page in the specified interactive render mode.</li><li>The <a href="https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxGrid">Grid</a> component on the <em>Weather</em> page in Interactive Server mode.</li></ul><figure><img alt="DevExpress Blazor components in different render modes" src="https://cdn-images-1.medium.com/max/1024/0*eW3tdEDo1_lRCvPK.png" /><figcaption>DevExpress Blazor components in different render modes</figcaption></figure><p>Download our fully functional 30-day trial version and try out DevExpress Blazor library in your projects:</p><p><a href="https://go.devexpress.com/medium_v23.2_rendermodes_blazor_trial.aspx">Download Trial</a></p><p><em>Originally published at </em><a href="https://community.devexpress.com/blogs/aspnet/archive/2023/12/13/blazor-new-net-8-render-modes-v23-2.aspx"><em>https://community.devexpress.com</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*pcV8Mr5YWJjjYpbExz1VKQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7be850029174" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devexpress-technical/blazor-new-net-8-render-modes-7be850029174">Blazor — New .NET 8 Render Modes</a> was originally published in <a href="https://medium.com/devexpress-technical">DevExpress Technical</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Populate PDF Forms with the DevExpress Office File API]]></title>
            <link>https://medium.com/devexpress-technical/populate-pdf-forms-with-the-devexpress-office-file-api-3d23e64df626?source=rss----4892616baea6---4</link>
            <guid isPermaLink="false">https://medium.com/p/3d23e64df626</guid>
            <category><![CDATA[maui]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[interactive-form]]></category>
            <category><![CDATA[devexpress]]></category>
            <dc:creator><![CDATA[Poline Fedorova]]></dc:creator>
            <pubDate>Wed, 06 Dec 2023 08:47:41 GMT</pubDate>
            <atom:updated>2023-12-06T08:47:41.824Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Populate PDF Forms with the DevExpress Office File API (Using .NET MAUI Edit Forms Generated on the Fly)</strong></h3><p>This is the second post in our Office File API and .NET MAUI blog series. In this post, I’ll explain how to create and populate interactive form fields within PDF files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*YIDmisUzbKRn0goDc8K_Mg.png" /></figure><p>To learn more about synergies between our Office File API and .NET MAUI-powered mobile apps, please review the first post in this series: <a href="https://community.devexpress.com/blogs/office/archive/2023/08/21/office-file-api-mail-merge-an-easy-way-to-personalize-user-messages-and-template-word-documents-in-net-maui-mobile-apps.aspx">Office File API — An Easy Way to Personalize User Messages and Use Word Document Templates in .NET MAUI Mobile Apps</a></p><h4>Populate PDF Form Fields in your .NET MAUI Mobile App</h4><p>An interactive form (also known as an AcroForm) is a type of PDF form with additional elements called interactive fields. These fields allow users to enter information and allow developers to extract data as needed. If you’ve used AcroForm in the past, you are already aware of its strengths (standardization, simplicity of use/implementation, compatibility with most PDF processors, and PDF-compliant data input).</p><p>The <a href="https://www.devexpress.com/products/net/office-file-api/pdf/">DevExpress PDF Document API</a> library (included in our Office File API suite) ships with a comprehensive Interactive Form API subset. Our PDF Document Processor can detect editor type and change its properties and values. It can also generate new form fields.</p><h4>Mobile-Friendly Field Editing</h4><p>One issue when populating form fields in mobile apps is the size of individual editors. In many instances, form field editors are simply too small for mobile or tablet screens.</p><p>To address this, you can generate a user interface on the fly with the help of the DevExpress .NET MAUI <a href="https://docs.devexpress.com/MAUI/403640/data-form/index">DataFormView</a> UI component (allows you to populate forms in a loaded PDF file). Our DataFormView component uses the most appropriate editor for each PDF file field.</p><p>If you are targeting .NET MAUI and are considering the use of AcroForm, please review the following GitHub example for implementation details: <a href="https://github.com/DevExpress-Examples/maui-populate-pdf-file-forms">Populate E-Forms in a PDF File</a></p><p>The example opens a PDF File, obtains form fields so they can be populated, and saves results.</p><p>In this sample app, the DevExpress PDF Document API is used to retrieve form field information and save results (form field information is passed to a dictionary object).</p><p>We use the DevExpress .NET MAUI <a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.DataForm.DataFormView">DataFormView</a> component to:</p><ul><li>Generate editors on the fly</li><li>Add editor masks</li><li>Validate editor values</li></ul><p>As you’ll discover once you obtain this sample project, our <a href="https://docs.devexpress.com/OfficeFileAPI/DevExpress.Pdf.PdfDocumentProcessor">PdfDocumentProcessor</a> component extracts detailed AcroForm information from the loaded PDF file. This information includes form field type/value, default text used as a placeholder, mandatory form fields, etc.</p><p>For more information on app structure, please refer to the following article: <a href="https://docs.devexpress.com/MAUI/404476/scenarios/fill-pdf-form">Populate E-Forms in PDF Files</a></p><h4>Get Started with DevExpress .NET MAUI UI Controls and Our Office File API</h4><p>Our .NET MAUI UI libraries offer a variety of compelling features for your next great mobile app. Refer to the following step-by-step guides if you are new to .NET MAUI and our PDF Document API:</p><ul><li><a href="https://docs.devexpress.com/MAUI/403249/get-started/get-started">Get Started with DevExpress UI Controls for .NET Multi-platform App UI (.NET MAUI)</a></li><li><a href="https://docs.devexpress.com/OfficeFileAPI/17701/pdf-document-api/getting-started">Get Started with the DevExpress PDF Document API</a></li></ul><p>And don’t forget to check out the following .NET MAUI/Office File API integration blog posts as well:</p><ul><li><a href="https://community.devexpress.com/blogs/office/archive/2023/08/21/office-file-api-mail-merge-an-easy-way-to-personalize-user-messages-and-template-word-documents-in-net-maui-mobile-apps.aspx">An Easy Way to Personalize User Messages and Use Word Document Templates in .NET MAUI Mobile Apps</a></li><li><a href="https://community.devexpress.com/blogs/mobile/archive/2023/09/27/electronic-and-hand-drawn-pdf-signatures-in-a-net-maui-mobile-app-with-office-file-api.aspx">Electronic and Hand-Drawn PDF Signatures in a .NET MAUI Mobile App with Office File API (v23.1)</a></li></ul><p>Download our fully functional 30-day trial version and try out DevExpress Office File API libraries in your projects:</p><p><a href="https://go.devexpress.com/DevExpressDownload_UniversalTrial.aspx">Download Trial</a></p><p><em>Originally published at </em><a href="https://community.devexpress.com/blogs/office/archive/2023/10/23/create-a-web-api-application-with-office-file-api-powered-by-devexpress-drawing-graphics-engine.aspx"><em>https://community.devexpress.com</em></a><em>.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LUaFDj9QSaR-C9H-ZevVAQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3d23e64df626" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devexpress-technical/populate-pdf-forms-with-the-devexpress-office-file-api-3d23e64df626">Populate PDF Forms with the DevExpress Office File API</a> was originally published in <a href="https://medium.com/devexpress-technical">DevExpress Technical</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Office File API — An Easy Way to Personalize User Messages and Use Word Document Templates in .NET]]></title>
            <link>https://medium.com/devexpress-technical/office-file-api-an-easy-way-to-personalize-user-messages-and-use-word-document-templates-in-net-d51910ce39bb?source=rss----4892616baea6---4</link>
            <guid isPermaLink="false">https://medium.com/p/d51910ce39bb</guid>
            <category><![CDATA[mail-merge]]></category>
            <category><![CDATA[maui]]></category>
            <category><![CDATA[office-file-api]]></category>
            <category><![CDATA[devexpress]]></category>
            <dc:creator><![CDATA[Poline Fedorova]]></dc:creator>
            <pubDate>Thu, 23 Nov 2023 08:24:00 GMT</pubDate>
            <atom:updated>2023-11-23T08:28:36.166Z</atom:updated>
            <content:encoded><![CDATA[<h3>Office File API — An Easy Way to Personalize User Messages and Use Word Document Templates in .NET MAUI Mobile Apps</h3><p>As you may already know, our <a href="https://www.devexpress.com/products/net/office-file-api/">Office File API</a> suite now supports the .NET MAUI development platform. In this blog post series, I will share straightforward ways to incorporate many DevExpress Office File API features in your .NET MAUI mobile app. This particular post details how to leverage our Office File API’s mail merge capabilities to generate e-mail messages from templates in your DevExpress-powered .NET MAUI app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*rGhWsD6A2ij0y2sRsSTDRQ@2x.gif" /></figure><p>By introducing mail merge support in your .NET MAUI app, users can generate Word documents (based on templates) with relative ease and reduce repetitive actions when creating messages with similar content. Since mail merge support can seamlessly integrate with mobile device contact management systems, introducing this capability can also streamline the recipient selection process.</p><p>If mail merge support is on your mobile development radar, the <a href="https://www.devexpress.com/products/net/office-file-api/word/">Word Processing Document API</a> (included in our Office File API suite) can load/create templates, bind data sources, and generate/share messages. The library supports <a href="https://learn.microsoft.com/en-us/dotnet/api/system.collections.ilis">IList</a>, <a href="https://learn.microsoft.com/en-us/dotnet/api/system.collections.arraylist">ArrayList</a>, and <a href="https://learn.microsoft.com/en-us/dotnet/api/system.data.datatable">DataTable</a> data sources. You can export generated text to any supported format or send it to an e-mail application.</p><p>We have created a GitHub example that demonstrates the use of our Word Processing Document API. This example sends e-mail messages (generated from an e-mail template) to records in a database. Please refer to the following link for implementation details: <a href="https://github.com/DevExpress-Examples/maui-mail-merge">DevExpress .NET MAUI Controls — Send Template Messages Using Mail Merge</a>.</p><blockquote>Important Note: You must purchase a license to use the DevExpress Office File API within a .NET MAUI app. The DevExpress Office File API (including our Word Processing Document API) ships in the following DevExpress Subscriptions:<a href="https://www.devexpress.com/subscriptions/universal.xml">DevExpress Universal</a>, <a href="https://www.devexpress.com/subscriptions/dxperience.xml">DXperience</a>, or <a href="https://www.devexpress.com/products/net/office-file-api/">Office File API</a>.</blockquote><h4>Example Overview</h4><p>This sample application displays a contact list within our .NET MAUI Data Grid (<a href="https://docs.devexpress.com/MAUI/DevExpress.Maui.DataGrid.DataGridView">DataGridView</a> component). You can swipe the desired contact (to the right) to generate an email. Once you select the template you wish to use, an e-mail app tab appears on-screen. You can edit the document (if required) and send it to the recipient.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*amc0w9lNDUEXMy6ThRbAtg.png" /></figure><p>Our <a href="https://docs.devexpress.com/OfficeFileAPI/DevExpress.XtraRichEdit.RichEditDocumentServer?p=netframework">RichEditDocumentServer</a> acts as the mail merge engine. It is used to populate placeholders within an e-mail template (using the selected contact’s information). Once complete, output is sent to the Microsoft Outlook mail app.</p><p>For more information on app structure, please refer to the following document: <a href="https://docs.devexpress.com/MAUI/404352/scenarios/mail-merge">Send Template Messages Using Mail Merge</a>.</p><h4>Get Started with DevExpress .NET MAUI UI Controls and Our Office File API</h4><p>Our .NET MAUI component libraries offer many more features than those described in this blog post. Refer to the following step-by-step guides if you are new to.NET MAUI and our Word Processing Document API:</p><ul><li><a href="https://docs.devexpress.com/MAUI/403249/get-started/get-started">Get Started with DevExpress Controls for .NET Multi-platform App UI (.NET MAUI)</a></li><li><a href="https://docs.devexpress.com/OfficeFileAPI/16785/word-processing-document-api/getting-started">Get Started with Word Processing Document API</a></li></ul><p>Check out other blog posts from this series to learn more about .NET MAUI/Office File API integration: <a href="https://community.devexpress.com/blogs/mobile/archive/2023/09/27/electronic-and-hand-drawn-pdf-signatures-in-a-net-maui-mobile-app-with-office-file-api.aspx">Electronic and Hand-Drawn PDF Signatures in a .NET MAUI Mobile App with Office File API (v23.1)</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d4Yrg9jZpgk3Ld7t46hJBw.png" /></figure><p><em>Originally published at </em><a href="https://community.devexpress.com/blogs/office/archive/2023/10/23/create-a-web-api-application-with-office-file-api-powered-by-devexpress-drawing-graphics-engine.aspx"><em>https://community.devexpress.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d51910ce39bb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devexpress-technical/office-file-api-an-easy-way-to-personalize-user-messages-and-use-word-document-templates-in-net-d51910ce39bb">Office File API — An Easy Way to Personalize User Messages and Use Word Document Templates in .NET</a> was originally published in <a href="https://medium.com/devexpress-technical">DevExpress Technical</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript — Consume the DevExpress Backend Web API with Svelte (Part 1. Get Started and Load Data)]]></title>
            <link>https://medium.com/devexpress-technical/javascript-consume-the-devexpress-backend-web-api-with-svelte-part-1-get-started-and-load-data-bc3f8f4d6e3d?source=rss----4892616baea6---4</link>
            <guid isPermaLink="false">https://medium.com/p/bc3f8f4d6e3d</guid>
            <category><![CDATA[webapi]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[xaf]]></category>
            <dc:creator><![CDATA[Oli Sturm]]></dc:creator>
            <pubDate>Wed, 15 Nov 2023 12:11:04 GMT</pubDate>
            <atom:updated>2023-11-15T12:11:03.942Z</atom:updated>
            <content:encoded><![CDATA[<h3>Consume the DevExpress Backend Web API with Svelte and JavaScript</h3><h4>Part 1. Get Started and Load Data</h4><p>For a while now, DevExpress has delivered a <a href="https://docs.devexpress.com/eXpressAppFramework/403394/backend-web-api-service?utm_source=DevExpress&amp;utm_medium=Blog&amp;utm_id=XAF&amp;utm_term=part1&amp;utm_content=oliver-apr2022">Web API Service</a> component out of the box. This service supports some of the existing XAF framework functionality, but it is meant to be used as a stand-alone element of an application system. There are many plans and requests for the service, and we expect things to keep moving quickly in the future.</p><p>I was curious to see for myself what the current state is, and I decided to create an app using JavaScript, <a href="https://go.devexpress.com/XAF_Security_NonXAF_DevExtreme_OData.aspx">but not DevExtreme</a>, and to evaluate the state of the Web API service from this “outside” perspective. I was able to feed back my experiences to the team, and they asked me to document what I had done so others can benefit.</p><p>I decided to do this in some detail so you can follow along, but I also created “versions” of my sample project as I went along, so you can use those to check out the individual states without having to recreate everything for yourself. If you plan to walk through my description yourself, please be aware that my path may be less than straight on occasion!</p><p>The full source code for this stage of the demo process is available in the branch stage-1 of the repository. You can access it <a href="https://github.com/oliversturm/demo-dx-webapi-js/tree/stage-1">by clicking this link</a>. The instructions below still apply even if you run directly from the repo — you will need to create a .env file as described, and run the sample using the Docker setup provided. Side note: we have recently published a sample along similar lines for .NET MAUI (<a href="https://community.devexpress.com/blogs/news/archive/2023/03/29/authorize-ef-core-crud-operations-and-download-reports-in-net-maui-with-odata-web-api.aspx">please follow this link to read the blog post)</a>.</p><h4>Table of Contents</h4><p>Note that the following links point to the DevExpress blog resources instead of Medium.</p><ul><li><a href="https://community.devexpress.com/blogs/news/archive/2023/04/11/consume-the-devexpress-backend-web-api-from-javascript-with-svelte-part-1.aspx">Stage 1 — Get started and load data</a> / <a href="https://github.com/oliversturm/demo-dx-webapi-js/tree/stage-1">GitHub sample</a> (<strong>this post</strong>)</li><li><a href="https://community.devexpress.com/blogs/news/archive/2023/04/17/consume-the-devexpress-backend-web-api-from-javascript-with-svelte-part-2-model-info.aspx">Stage 2 — Localize UI captions</a> / <a href="https://github.com/oliversturm/demo-dx-webapi-js/tree/stage-2">GitHub sample</a></li><li><a href="https://community.devexpress.com/blogs/news/archive/2023/04/28/consume-the-devexpress-backend-web-api-from-javascript-with-svelte-part-3-sort-and-filter.aspx">Stage 3 — Sort and filter data</a> / <a href="https://github.com/oliversturm/demo-dx-webapi-js/tree/stage-3">GitHub sample</a></li><li><a href="https://community.devexpress.com/blogs/news/archive/2023/05/04/consume-the-devexpress-backend-web-api-from-javascript-with-svelte-part-4-edit-and-validate.aspx">Stage 4 — Edit and validate data</a> / <a href="https://github.com/oliversturm/demo-dx-webapi-js/tree/stage-4">GitHub sample</a></li><li><a href="https://community.devexpress.com/blogs/news/archive/2023/05/24/javascript-consume-the-devexpress-backend-web-api-with-svelte-part-5-authenticate-users.aspx">Stage 5 — Authenticate users and protect data</a> / <a href="https://github.com/oliversturm/demo-dx-webapi-js/tree/stage-5">GitHub sample</a></li><li><a href="https://community.devexpress.com/blogs/news/archive/2023/10/17/javascript-consume-the-devexpress-backend-web-api-with-svelte-part-6-reports.aspx">Stage 6 — Preview and download reports</a> / <a href="https://github.com/oliversturm/demo-dx-webapi-js/tree/stage-6">GitHub sample</a></li></ul><h4>Get started with a new project</h4><p>Begin this walkthrough in the simplest possible way, by creating a new project with the help of the Visual Studio wizard. Select the XAF Solution Wizard and choose both the Blazor frontend and the Web API service from the dialog <em>Choose Target Platforms</em>, and stick to Entity Framework Core as the ORM tool.</p><p>Note that the XAF Solution Wizard is the starting point for Web API projects at this time, but the Web API approach does not tie you to the XAF ecosystem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*VCojp_okknehMaIh866aPQ.png" /></figure><p>On the page <em>Choose Options</em>, select the radio button titled <em>Standalone (Separate Projects)</em> so that the Web API will not be integrated in the Blazor app. For the purposes of this demo, we want the Web API separate. Being able to run the Blazor app as well is a bonus because it will enable you to use the standard auto-generated UI to work with the sample app as you go along, or to compare the standard implementation with your custom UI.</p><p>Leave the <em>Authentication</em> selection on <em>None</em> for the time being. I will later document how to add authentication support to the project, but it is easier to get started without the extra complexity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*-pfD42C1RSJ_2vx6aCzKeA.png" /></figure><p>Leave the default selection active on the <em>Choose Additional Modules</em> page and click <em>Finish</em> to create the project.</p><p>Before moving on, I suggest you change the three newly created projects to use .NET 7. Unless you have specific reasons to stick to .NET 6, which is currently chosen by default, going with the newer version is a good recommendation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*aWITNsBKrl6HPOC6XfB5hQ.png" /></figure><p>Please make sure to change this setting for all three projects! You can either use the Visual Studio Properties view for each project, or change the TargetFramework line in the project file manually.</p><h4>Optional: use Docker as a development runtime</h4><p>In the sample scenario, I set up the project so that I can develop and run it independently of the usual Windows Visual Studio environment. I described this process independently in the post <a href="https://community.devexpress.com/blogs/news/archive/2023/04/06/develop-a-devexpress-xaf-and-web-api-solution-in-docker.aspx">Develop a DevExpress XAF and Web API Solution in Docker</a>. If you are following along, you can find the required steps there to evolve your own sample to the same state as the demo repository.</p><h4>Add a Svelte Kit frontend app</h4><p>Creating a JavaScript app to access data from the Web API service was the whole point of the exercise, and we have finally reached that point! There is much more to come, but as a starting point please add a Svelte Kit app to the repository now. Here are the steps to do this.</p><p>You will need an installation of <a href="https://nodejs.org/">Node.js</a>. Instructions and installers are available on the website, or you may have this already since it can even be installed automatically by Visual Studio. If you work with Node.js seriously, I recommend using <a href="https://nvm.sh/">nvm</a>, the Node Version Manager. It is easy to install — a single command on any Mac, Linux machine, or Windows using WSL, and then you can choose any Node.js environment and manage versions side by side as required.</p><p>For commands related to Node.js package management, I will show the use of the <a href="https://pnpm.io/">pnpm</a> package manager. You can substitute npm or yarn commands if you prefer. Starting from a basic Node.js or nvm installation, pnpm can be added with a simple npm i -g pnpm.</p><h4>Set up the project</h4><p>On the repo level, create a new project svelte-frontend and add packages for Tailwind CSS. I typically enjoy working with Tailwind as a utility CSS library, so I recommend it here — of course Svelte has powerful built-in style handling, so feel free to leave this out if you’d like to configure styles without Tailwind.</p><pre>&gt; pnpm create svelte@latest svelte-frontend<br><br># ... choose &quot;skeleton project&quot;, then &quot;JavaScript with JSDoc&quot;,<br># activate &quot;ESLint&quot; and &quot;Prettier&quot;<br><br>&gt; cd svelte-frontend<br>&gt; pnpm i -D tailwindcss postcss autoprefixer<br>&gt; pnpm tailwind init -p --esm</pre><p>Now make the required modifications to use Tailwind. Detailed instructions for this can be found <a href="https://tailwindcss.com/docs/guides/sveltekit">on the Tailwind website</a>.</p><p>Edit svelte.config.js and add the vitePreprocess config:</p><pre>import adapter from &#39;@sveltejs/adapter-auto&#39;;<br>import { vitePreprocess } from &#39;@sveltejs/kit/vite&#39;;<br><br>/** @type {import(&#39;@sveltejs/kit&#39;).Config} */<br>const config = {<br>    kit: {<br>        // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.<br>        // If your environment is not supported or you settled on a specific environment, switch out the adapter.<br>        // See https://kit.svelte.dev/docs/adapters for more information about adapters.<br>        adapter: adapter()<br>    },<br>    preprocess: vitePreprocess()<br>};<br><br>export default config;</pre><p>Adjust the content value in tailwind.config.js like this:</p><pre>/** @type {import(&#39;tailwindcss&#39;).Config} */<br>export default {<br>  content: [&#39;./src/**/*.{html,js,svelte,ts}&#39;],<br>  theme: {<br>    extend: {},<br>  },<br>  plugins: [],<br>}</pre><p>Change the plugins setting in postcss.config.cjs so that Tailwind supports the use of nested elements in style tags.</p><pre>export default {<br>    plugins: {<br>        &#39;tailwindcss/nesting&#39;: {},<br>        tailwindcss: {},<br>        autoprefixer: {}<br>    }<br>};</pre><p>Add src/app.css and load the Tailwind layers:</p><pre>@tailwind base;<br>@tailwind components;<br>@tailwind utilities;</pre><p>Finally, create src/routes/+layout.svelte and load the new app.css from there:</p><pre>&lt;script&gt;<br>    import &#39;../app.css&#39;;<br>&lt;/script&gt;<br><br>&lt;slot /&gt;</pre><p>Edit src/routes/+page.svelte and add a few Tailwind classes to the h1 element to check that Tailwind is active.</p><pre>&lt;h1 class=&quot;font-bold text-2xl&quot;&gt;Welcome to SvelteKit&lt;/h1&gt;<br>&lt;p&gt;Visit &lt;a href=&quot;https://kit.svelte.dev&quot;&gt;kit.svelte.dev&lt;/a&gt; to read the documentation&lt;/p&gt;</pre><p>Now you can run the project, just to see that everything works so far:</p><pre>svelte-frontend &gt; pnpm run dev</pre><p>Navigate to http://localhost:5173 to bring up the dev preview.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*dwZ7PWWYj0l7YBqghkBlgA.png" /></figure><h4>Add the project to the Docker configuration</h4><p>Create the file svelte-frontend/Dockerfile:</p><pre>FROM node:lts<br><br>RUN apt-get update<br>RUN apt-get install -y wait-for-it<br>RUN npm i -g pnpm <br><br>WORKDIR /src<br>COPY . ./<br>RUN chmod +x /src/start.sh<br><br>CMD [&quot;wait-for-it&quot;, &quot;-t&quot;, &quot;0&quot;, &quot;webapi:5273&quot;, &quot;--&quot;, &quot;/bin/sh&quot;, &quot;/src/start.sh&quot;]</pre><p>The structure is very similar to that used by the Blazor and Web API projects, but the base image is different due to the Node.js requirement.</p><p>Create the file svelte-frontend/start.sh:</p><pre>#!/bin/sh<br><br># Remove old files to avoid conflicts<br>rm -rf /src/.svelte-kit /src/node_modules /src/.pnpm-store /.pnpm-store<br>pnpm config set store-dir /.pnpm-store<br>pnpm config set node-linker hoisted<br>pnpm config set symlink false<br>pnpm i<br>pnpm run dev</pre><p>Create the file svelte-frontend/.dockerignore. Similar to the Blazor and Web API projects, you can prevent copying large folder structures that will be recreated inside the container anyway.</p><pre>.svelte-kit<br>node_modules<br>.pnpm-store</pre><p>Edit vite.config.js and add the server setting, so that the process listens to all network interfaces inside the Docker container.</p><pre>import { sveltekit } from &#39;@sveltejs/kit/vite&#39;;<br>import { defineConfig } from &#39;vite&#39;;<br><br>export default defineConfig({<br>    plugins: [sveltekit()],<br>    server: {<br>        host: &#39;0.0.0.0&#39;<br>    }<br>});</pre><p>Now edit docker-compose.yml and add a service block called svelte. It does not matter where it is added in relation to the other three blocks, but make sure to indent it correctly so that the block name svelte lines up with the blocks sql, webapi and blazor.</p><pre>svelte:<br>    build: ./svelte-frontend<br>    depends_on:<br>      - webapi<br>    ports:<br>      - &#39;5173:5173&#39;<br>    volumes:<br>      - ./svelte-frontend:/src</pre><p>Make sure you don’t have the previous instance of the Svelte Kit project running anymore, so that port 5173 is available. Then repeat the command from earlier. Again, a full rebuild is not strictly required, but using the same command is convenient.</p><pre>&gt; docker compose up --build -d</pre><p>Access http://localhost:5173 again, and now the Svelte Kit app should come up from the container.</p><h4>Add the first data view to the Svelte Kit app</h4><p>Finally you can now see data in the Svelte Kit based JavaScript app. This is what we will build upon in further posts, so the starting point is simple. Begin by adding the file svelte-frontend/src/routes/saleProducts/+page.server.js. It implements a simple load function that accesses the Web API service using its OData endpoint, and retrieves the data in JSON format.</p><pre>export function load({ fetch }) {<br>    const odataUrl = `http://webapi:5273/api/odata/SaleProduct`;<br><br>    const dataSource = fetch(odataUrl)<br>        .then((res) =&gt; res.json())<br>        .then((res) =&gt; res.value);<br><br>    return { dataSource };<br>}</pre><p>Now add +page.svelte in the same folder. Use this code to display the loaded data in a table. Of course this could be a bit shorter as a minimal implementation — some careful error handling is already in place here, as well as basic styling.</p><pre>&lt;script&gt;<br>    export let data;<br>    $: ({ dataSource: saleProducts } = data);<br>&lt;/script&gt;<br><br>&lt;h2 class=&quot;font-bold text-xl&quot;&gt;Data: Sale Products&lt;/h2&gt;<br><br>&lt;table class=&quot;border-separate w-full&quot;&gt;<br>    &lt;tr&gt;<br>        &lt;th class=&quot;text-left&quot;&gt;Name&lt;/th&gt;<br>        &lt;th class=&quot;text-right&quot;&gt;Price&lt;/th&gt;<br>    &lt;/tr&gt;<br>    {#await saleProducts}<br>        &lt;tr class=&quot;placeholder&quot;&gt;&lt;td colspan=&quot;2&quot;&gt;Waiting for data&lt;/td&gt;&lt;/tr&gt;<br>    {:then dataSourceContent}<br>        {#if dataSourceContent &amp;&amp; Array.isArray(dataSourceContent)}<br>            {#each dataSourceContent as item}<br>                &lt;tr&gt;<br>                    &lt;td class=&quot;text-left&quot;&gt;{item.Name}&lt;/td&gt;<br>                    &lt;td class=&quot;text-right&quot;&gt;{item.Price}&lt;/td&gt;<br>                &lt;/tr&gt;<br>            {/each}<br>        {/if}<br>    {/await}<br>&lt;/table&gt;<br><br>&lt;style lang=&quot;postcss&quot;&gt;<br>    td,<br>    th {<br>        @apply px-2 py-1;<br>    }<br>    th {<br>        @apply bg-blue-300 cursor-pointer select-none;<br>    }<br>    td {<br>        @apply border border-gray-200;<br>    }<br>    tr.placeholder {<br>        @apply bg-gray-200;<br>    }<br>&lt;/style&gt;</pre><p>In most cases, the running development server for the Svelte Kit app will pick up your changes without restart. Navigate to http://localhost:5173/saleProducts to see the data table! In case something doesn’t seem right, you can use Docker Desktop to quickly restart the container, which may occasionally help if packages have been added or larger configuration changes are not recognized correctly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*ArCanDtlksZMoOlDcJayfQ.png" /></figure><h4>Refactor for reusability</h4><p>In preparation for further posts, which will go deeper into topics around data retrieval, I’ll describe a few steps you can take now to refactor the code of the initial data view.</p><p>First, create a file src/lib/DataTable.svelte. The lib folder will probably not exist yet, if you started with a skeleton project. It is typically used in a Svelte Kit app for components that are not part of the routing structure.</p><p>Add this code to the file, which is a more flexible version of the table rendering code that was previously used above. It supports field definitions passed from the outside, and it can detect various error states and display information accordingly.</p><pre>&lt;script&gt;<br>    export let dataSource;<br>    export let fields;<br>&lt;/script&gt;<br><br>&lt;table class=&quot;border-separate w-full&quot;&gt;<br>    &lt;tr&gt;<br>        {#each Object.keys(fields) as f}<br>            &lt;th class={fields[f].class}&gt;{f}&lt;/th&gt;<br>        {/each}<br>    &lt;/tr&gt;<br>    {#await dataSource}<br>        &lt;tr class=&quot;placeholder&quot;&gt;&lt;td colspan=&quot;2&quot;&gt;Waiting for data&lt;/td&gt;&lt;/tr&gt;<br>    {:then dataSourceContent}<br>        {#if dataSourceContent &amp;&amp; Array.isArray(dataSourceContent)}<br>            {#each dataSourceContent as item}<br>                &lt;tr&gt;<br>                    {#each Object.keys(fields) as f}<br>                        &lt;td class={fields[f].class}&gt;{item[f]}&lt;/td&gt;<br>                    {/each}<br>                &lt;/tr&gt;<br>            {:else}<br>                &lt;tr class=&quot;placeholder empty&quot;&gt;<br>                    &lt;td colspan={Object.keys(fields).length}&gt;Empty list&lt;/td&gt;<br>                &lt;/tr&gt;<br>            {/each}<br>        {:else}<br>            &lt;tr class=&quot;placeholder debugging&quot;&gt;<br>                &lt;td colspan={Object.keys(fields).length}&gt;<br>                    Unknown dataSourceContent content (debugging): &lt;code<br>                        &gt;{JSON.stringify(dataSourceContent)}&lt;/code<br>                    &gt;<br>                &lt;/td&gt;<br>            &lt;/tr&gt;<br>        {/if}<br>    {:catch e}<br>        &lt;tr class=&quot;placeholder error&quot;&gt;<br>            &lt;td colspan={Object.keys(fields).length}&gt;Error: {e}&lt;/td&gt;<br>        &lt;/tr&gt;<br>    {/await}<br>&lt;/table&gt;<br><br>&lt;style lang=&quot;postcss&quot;&gt;<br>    td,<br>    th {<br>        @apply px-2 py-1;<br>    }<br>    th {<br>        @apply bg-blue-300 cursor-pointer select-none;<br>    }<br>    td {<br>        @apply border border-gray-200;<br>    }<br>    tr.placeholder {<br>        @apply bg-gray-200;<br>    }<br>    tr.empty {<br>        @apply bg-yellow-200;<br>        td {<br>            @apply text-center p-4;<br>        }<br>    }<br>    tr.error {<br>        @apply bg-red-200 font-bold;<br>    }<br>&lt;/style&gt;</pre><p>Now you can update the file src/routes/saleProducts/+page.svelte, which is a lot shorter than before since it uses the DataTable component.</p><pre>&lt;script&gt;<br>    import DataTable from &#39;$lib/DataTable.svelte&#39;;<br><br>    export let data;<br>    $: ({ dataSource } = data);<br><br>    const fields = {<br>        Name: { class: &#39;text-left&#39; },<br>        Price: { class: &#39;text-right&#39; }<br>    };<br>&lt;/script&gt;<br><br>&lt;h2 class=&quot;font-bold text-xl&quot;&gt;Data: Sale Products&lt;/h2&gt;<br><br>&lt;DataTable {dataSource} {fields} /&gt;</pre><h4>Add navigation elements</h4><p>As a final change for this post, the demo can be made more accessible by providing top-level navigation elements. For the time being, you’ll need just one.</p><p>Start by emptying the file src/routes/+page.svelte. It should remain in place so that the main page of the app can be accessed, but the placeholder text created by the Svelte Kit template is not needed. Of course, instead of emptying it, you can add your own welcome text!</p><p>Then adjust the code in src/routes/+layout.svelte like this:</p><pre>&lt;script&gt;<br>    import &#39;../app.css&#39;;<br>&lt;/script&gt;<br><br>&lt;h1 class=&quot;text-2xl mt-4 mb-8 text-center&quot;&gt;DevExpress Web API Service from a Svelte App&lt;/h1&gt;<br><br>&lt;div class=&quot;w-9/12 max-w-prose m-auto&quot;&gt;<br>    &lt;nav class=&quot;mb-8 flex gap-2&quot;&gt;<br>        &lt;a href=&quot;/saleProducts&quot;&gt;Sale Products&lt;/a&gt;<br>    &lt;/nav&gt;<br><br>    &lt;slot /&gt;<br>&lt;/div&gt;<br><br>&lt;style lang=&quot;postcss&quot;&gt;<br>    a {<br>        @apply bg-blue-200 px-4 py-1 rounded hover:bg-orange-200;<br>    }<br>&lt;/style&gt;</pre><p>With these changes in place, your app will display its content in an improved format. Additionally, if you access http://localhost:5137, i.e. the root URL of the app, you will see a navigation button that leads to the /saleProducts URL. This makes the demo more usable!</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*TSaS8pU7B2xAI5eIxygu6Q.png" /></figure><h4>Conclusion</h4><p>This completes the stage-1 step of the demo. Again, you can find the repository branch at <a href="https://github.com/oliversturm/demo-dx-webapi-js/tree/stage-1">this link</a>.</p><p>Please feel free to send comments and ideas! Additional steps are already complete and I will write posts about them soon. The next item coming up will be the addition of sort and filter features to the data view. Thanks for reading!</p><p>For related information, please review the following articles: <a href="https://docs.devexpress.com/eXpressAppFramework/402125/getting-started/in-depth-tutorial-blazor?utm_source=DevExpress&amp;utm_medium=Blog&amp;utm_id=XAF&amp;utm_term=part1&amp;utm_content=oliver-apr2022">XAF Blazor | Getting Started Tutorials</a> | <a href="https://community.devexpress.com/blogs/news/archive/2022/10/17/common-questions-about-the-new-devexpress-web-api-service-powered-by-entity-framework-and-xpo-orm.aspx?utm_source=DevExpress&amp;utm_medium=Blog&amp;utm_id=XAF&amp;utm_term=part1&amp;utm_content=oliver-apr2022">Common Questions about the New DevExpress Web API Service</a>. You can get your free copy of .NET App Security Library &amp; Web API Service here: <a href="https://www.devexpress.com/security-api-free?utm_source=DevExpress&amp;utm_medium=Blog&amp;utm_id=XAF&amp;utm_term=part1&amp;utm_content=oliver-apr2022">https://www.devexpress.com/security-api-free</a>. To learn about the advanced/paid features of our Web API Service, please refer to the following help topic: <a href="https://docs.devexpress.com/eXpressAppFramework/404176/backend-web-api-service/obtain-a-report-from-a-web-api-controller-endpoint?utm_source=DevExpress&amp;utm_medium=Blog&amp;utm_id=XAF&amp;utm_term=part1&amp;utm_content=oliver-apr2022">Obtain a Report from a Web API Controller Endpoint</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jOeXpsRUNIFIKQZ-4Sr8kA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc3f8f4d6e3d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devexpress-technical/javascript-consume-the-devexpress-backend-web-api-with-svelte-part-1-get-started-and-load-data-bc3f8f4d6e3d">JavaScript — Consume the DevExpress Backend Web API with Svelte (Part 1. Get Started and Load Data)</a> was originally published in <a href="https://medium.com/devexpress-technical">DevExpress Technical</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create a Web API Application with our Office File API (Powered by the platform-agnostic DevExpress.D]]></title>
            <link>https://medium.com/devexpress-technical/create-a-web-api-application-with-our-office-file-api-powered-by-the-platform-agnostic-devexpress-d-a048646b477c?source=rss----4892616baea6---4</link>
            <guid isPermaLink="false">https://medium.com/p/a048646b477c</guid>
            <category><![CDATA[webapi]]></category>
            <category><![CDATA[document-management]]></category>
            <category><![CDATA[endpoints]]></category>
            <category><![CDATA[cross-platform]]></category>
            <category><![CDATA[devexpress]]></category>
            <dc:creator><![CDATA[Poline Fedorova]]></dc:creator>
            <pubDate>Mon, 13 Nov 2023 12:12:07 GMT</pubDate>
            <atom:updated>2023-11-13T12:14:33.192Z</atom:updated>
            <content:encoded><![CDATA[<h3>Create a Web API Application with our Office File API (Powered by the platform-agnostic DevExpress.Drawing Graphics Engine)</h3><p>In our summer v23.1 major release, our new DevExpress Drawing graphics library was released to manufacturing (RTM).<br>This new engine is available for the following DevExpress products:</p><ol><li><a href="https://www.devexpress.com/products/net/office-file-api/">Office File API</a></li><li><a href="https://www.devexpress.com/subscriptions/reporting/">Reporting</a></li><li><a href="https://www.devexpress.com/products/net/dashboard/">BI Dashboard</a></li></ol><p>We are starting a new blog post series where we’ll describe how to use our cross-platform engine and maximize its full potential. In this particular blog post, we’ll show you how to integrate <a href="https://www.devexpress.com/products/net/office-file-api/">Office File API</a> functionality in Web API applications. But first, let me give a brief explanation of what the DevExpress.Drawing library is.</p><h3>DevExpress.Drawing Library: Backstory</h3><p>Microsoft attributed System.Drawing.Common as a Windows-specific library in .NET 6 and higher: <a href="https://docs.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/6.0/system-drawing-common-windows-only">System.Drawing.Common only supported on Windows</a>. This breaking change affected the DevExpress cross-platform products — components that use System.Drawing.Common as a rendering/text measurement engine — including Reporting, Office File API and BI Dashboards.</p><p>To address issues with the System.Drawing.Common package, we introduced a new <a href="https://docs.devexpress.com/CoreLibraries/404247/devexpress-drawing-library">DevExpress.Drawing</a> assembly in our v22.1 release cycle. This assembly contains custom implementations of all System.Drawing classes not supported for non-Windows systems. We made a series of enhancements during the 22.1 and 23.1 release cycles, and the library reached its final state in v23.1.</p><p>DevExpress.Drawing is gdiplus-independent and works on DevExpress primitives. This means that you can use supported components within applications that target different operating systems (Linux, macOS) and cloud services (Azure, AWS). Our internal test results demonstrate that the new engine works with the same efficiency as our previous GDI+ engine.</p><p>Our new approach allows our cross-platform products to work as expected across all supported platforms/target frameworks. And this change has opened up numerous opportunities in other areas.</p><h3>Organize and Convert Files in a Web API Application</h3><p>Web API (Application Programming Interface) offers numerous benefits. Web API is platform-agnostic, which means it can be used across various devices and operating systems.</p><p>Our <a href="https://www.devexpress.com/products/net/office-file-api/">Office File API suite</a> allows you to organize Word, Excel, and PDF documents. Each library in the suite ships with a comprehensive set of features, such as PDF/HTML conversion, mail merge, digital signature support, etc.</p><p>You can now integrate our DevExpress Office File API into a Web API app and then consume available endpoints from frontend apps built using any programming language. This increases reach and allows you to introduce Excel, Word, and PDF-related document management functionality across platforms.</p><p>To help illustrate what’s possible, we created an Office File API in Web API apps sample solution. Please refer to the following link for more information: <a href="https://github.com/DevExpress-Examples/office-file-api-in-web-api-app">Office File API — Use DevExpress Office File API Libraries (at the backend) for your Web-API Applications</a></p><p>Our example uses Swagger UI, but you can change the client-side implementation to suit your specific requirements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GtvGQXNOcJY-KbwwWtcO8Q.png" /></figure><p>The project contains a set of endpoints for the popular tasks you can address when using the DevExpress Office File API. These pre-built functions and services accelerate the development process so you can focus on the unique aspects of your application rather than building everything from scratch.</p><p>Let’s take a look at document conversion and organization (merge and split documents) as an example.</p><h3>Convert Documents</h3><p>We prepared conversion endpoints to Word and Excel files. The web request allows you to load a file (file format is detected automatically). The drop-down menu displays available conversion formats.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m5yAqFnjKIOZ8Aw7Fy5BVw.png" /></figure><p>You can download the result (after successful conversion) in the <strong>Response</strong> section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*lSZia20aDURfDsIBWsZtWw.png" /></figure><h3>Merge and Split Files</h3><p>The merge and split endpoints are available for Word, Excel, and PDF files. Load files to merge and select the format of the resulting file. Download the result in the <strong>Response</strong> section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kZHSBSUXtAbDrApT8n_FCQ.png" /></figure><p>As for splitting, the web request splits the loaded file page-by-page and exports results to a zip file with documents in the selected format.</p><p>The endpoints described herein illustrate basic implementation of conversion, split, and merge operations. You can download and modify the project based on specific business requirements. Refer to the following articles for additional information in this regard:</p><ul><li><a href="https://docs.devexpress.com/OfficeFileAPI/17488/word-processing-document-api">Word Processing Document API</a></li><li><a href="https://docs.devexpress.com/OfficeFileAPI/14912/spreadsheet-document-api">Spreadsheet Document API</a></li><li><a href="https://docs.devexpress.com/OfficeFileAPI/16491/pdf-document-api">PDF Document API</a></li></ul><p>As always, your feedback is highly appreciated. Please take a moment to respond to the survey in the original blog post and tell us what you’d like us to document next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hq6AxI0bzZHmDbNS4I8z7w.png" /></figure><p><em>Originally published at </em><a href="https://community.devexpress.com/blogs/office/archive/2023/10/23/create-a-web-api-application-with-office-file-api-powered-by-devexpress-drawing-graphics-engine.aspx"><em>https://community.devexpress.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a048646b477c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devexpress-technical/create-a-web-api-application-with-our-office-file-api-powered-by-the-platform-agnostic-devexpress-d-a048646b477c">Create a Web API Application with our Office File API (Powered by the platform-agnostic DevExpress.D</a> was originally published in <a href="https://medium.com/devexpress-technical">DevExpress Technical</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>