🕓 10 MIN Today’s release is a …
Users increasingly expect an intuitive way to drill into your data source and inspect the contents of an individual element. It’s often necessary to leverage a pattern that consistently connects the intentioned person behind the screen to the result they expect. Likewise, a nontrivial part of modernizing your .NET app not only lies in rethinking it for the web but in challenging past assumptions about the user. In a multi-platform world, significant opportunities exist to bolster engagement and familiarity with the information they seek. That’s why developers using WinUI XAML on Uno Platform are well-positioned to enhance their app’s UI to enable faster parsing through a data source, more intuitive location of data items, and a responsive layout that scales to the current device.
Users increasingly expect an intuitive way to drill into your data source and inspect the contents of an individual element. It’s often necessary to leverage a pattern that consistently connects the intentioned person behind the screen to the result they expect. Likewise, a nontrivial part of modernizing your .NET app not only lies in rethinking it for the web but in challenging past assumptions about the user. In a multi-platform world, significant opportunities exist to bolster engagement and familiarity with the information they seek. That’s why developers using WinUI XAML on Uno Platform are well-positioned to enhance their app’s UI to enable faster parsing through a data source, more intuitive location of data items, and a responsive layout that scales to the current device.
For instance, users of an email client typically access messages sorted by the date received. While we can assign and group nearly any type of data with properties, it would make little sense for users to drill down multiple levels, such as by a sender name or priority, just to find an email. Your application scenario may not be as clear-cut, but you should weigh how specific you believe the user’s intent is against the standard behavior for your app type. Complex data sources containing related items, yet a rich set of uncommon properties should employ a three-level list/detail design instead.
Having the intermediate level allows you to display a filtered copy of your data source collection depending on what’s selected in the starting list such as the sample demonstrated:
The three-level pattern requires us to delineate between the first level and second level types of items. For instance, our sample application has the `WorkRequestItem`s as being the first level, and multiple `AttachmentItem`s associated with them. Each `AttachmentItem` has more specific properties like a photo. Above, the new shower head photo is tightly related to both the `AttachmentItem` entry describing it, and the selected work request ticket which happens to contain multiple other related `AttachmentItem`s
private static List _items = new List()
{
new WorkRequestItem()
{
Id = 0,
DateAdded = DateTime.Now.AddDays(new Random().Next(1, 31)),
Title = "My shower makes an awful loud noise",
Description = @"My shower has been noisy since I moved in.",
AttachmentItems = new List()
{
new AttachmentItem()
{
Title = "ORDER PRODUCT: Modern rain shower faucet",
DateAdded = DateTime.Now.AddDays(new Random().Next(1, 31)),
Photo = new Microsoft.UI.Xaml.Media.Imaging.BitmapImage(new Uri(@"ms-appx:///Assets/showerhe.jpg"))
},
new AttachmentItem()
{
Title = "PHOTO: Damaged faucet",
DateAdded = DateTime.Now.AddDays(new Random().Next(1, 31)),
Photo = new Microsoft.UI.Xaml.Media.Imaging.BitmapImage(new Uri(@"ms-appx:///Assets/pipesinsp.jpg"))
},
new AttachmentItem()
{
Title = "PHOTO: Water heater inspection",
DateAdded = DateTime.Now.AddDays(new Random().Next(1, 31)),
Photo = new Microsoft.UI.Xaml.Media.Imaging.BitmapImage(new Uri(@"ms-appx:///Assets/waterheat.jpg"))
},
}
},
Since the purpose of our hypothetical application’s user experience is to provide technicians with simplified access to work request attachment metadata, we must represent graphically both this destination and steps to get there. To do so, we construct pages for the attachment item metadata—our destination—and the intermediate step where the user interacts with `ListView` to select the desired work request and relevant attachment. The metadata for an attachment item could consist of critical details like a photo, title, description, and date created.
However, notice that the attachment items themselves are represented by `ListViewItem`s in a similar way as top-level work request items
We use nested `Pages` to set up the multiple levels of the list/detail UI. The first `ListView` has its `ItemsSource` property set to a collection of the broad filters which we populate from code behind. In our case, we filter attachments by the maintenance work request item they’re associated with. The ListPage and DetailsPage have knowledge of what to populate their UI with because of a DependencyProperty on both that gets a value from the previous level’s selection.
Now, when the user selects a work request item, a list of attachments relevant to this selected top level data source item are displayed in between the starting `ListView` and your content viewer control. Users can now make it to the same result faster than scrolling through a single list. This widely accepted pattern supports spatial memory which will boost repeat engagement with your application’s content.
For those new to Uno Platform – it allows for creation of pixel-perfect, single-source C# and XAML apps which run natively on Windows, iOS, Android, macOS, Linux and Web via WebAssembly. It offers Figma integration for design-development handoff, and a set of extensions to bootstrap your projects. Uno Platform is free and Open Source (Apache 2.0) and available on GitHub.
Want to start creating cross-platform applications with XAML and C#? If you are new to Uno Platform, the best way to get started is to follow our official getting started guide. (5 min to complete) To upgrade to the latest release of Uno Platform, please update your packages to 4.3 via your Visual Studio NuGet package manager!Â
🕓 10 MIN Today’s release is a …
🕓 5 MIN This article will review …
🕓 5 MIN We are thrilled to …
Uno Platform
360 rue Saint-Jacques, suite G101,
Montréal, Québec, Canada
H2Y 1P5
USA/CANADA toll free: +1-877-237-0471
International: +1-514-312-6958
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
Uno Platform 5.2 LIVE Webinar – Today at 3 PM EST – Watch