Coder Social home page Coder Social logo

strypper / mauisland Goto Github PK

View Code? Open in Web Editor NEW
153.0 7.0 9.0 99.09 MB

MAUIsland 🏝️ is the number 1 controls gallery for .NET MAUI

License: MIT License

C# 100.00%
csharp dotnet communities galleries maui maui-apps syncfusion android ios ipados

mauisland's Introduction

🏝️ MAUIsland

MAUIsland is an app that showcases all the .NET MAUI controls available for developers. It allows you to easily interact with them and see how they look and behave on different platforms. It also provides guidance, tips and tricks to help you use them effectively in your own apps.

MAUIsland

Explore and interact. Stay up to date with the .NET MAUI Community.

Store link

Version 2.0 (Dragon version)

  1. Revamped Design 🎨: The application now features a sleek, acrylic + mica material design. The interface is smoother, with enhanced contrast and reduced distractions, offering users a more engaging experience.

  2. Performance Enhancements 🏎️: Significant improvements have been made in page navigation, resulting in a reduced memory footprint. Additionally, internet data is cached locally in a database, enhancing performance and enabling better offline support. The lazy loading of the code view expander contributes to faster initialization of pages.

  3. Expanded Community Toolkit πŸ”¨: The Community Toolkit Gallery has been enriched with the addition of four new controls, nine converters, and three layouts, empowering developers with more tools to enhance their applications.

  4. GitHub Community Gallery 🀝: We've integrated six widely used GitHub nuggets that are commonly utilized with .NET MAUI, including LiveChart2, ZXing.Net.Maui, and more. This gallery not only provides access to these resources but also offers UI fixes to address issues like stretched clicking and hovering targets for a smoother user interaction.

⚠️ Create appsettings.Development.json before run App

  1. Click right MAUIsland in Solution Explorer
  2. Select Add -> New Item -> only JSON File
  3. Set Name: appsettings.Development.json
  4. Click Add and copy the format below (You can leave the key value empty if you don't have the syncfusion key, but this will lead to a crash if you try to view syncfusion controls) Add the json settings from the issue:
{
  "AppSettings": {
    "SyncfusionKey": "Your_syncfustion_key",
    "DiscordApplicationId": "Yout_discord_bot_application_id"
  }
}

πŸš€ Features

  1. Browse through over 50 .NET MAUI controls organized by categories
  2. See live previews of each control on iOS, Android, Windows, and Mac
  3. Learn how to use each control with code snippets and documentation links
  4. Customize each control’s properties and styles
  5. Copy code snippets to the clipboard and use them in your app

⬇️ Installation

To install .NET MAUI Control Gallery on your device or emulator/simulator:

  1. Clone or download this repository
  2. Open the solution file (.sln) in Visual Studio 2022 or later
  3. Select your target platform and device/emulator/simulator
  4. Create the appsettings.Development.json file this file will not contain any private key
  5. Build and run the app

We will publish our application on all platforms soon enough. Stay tuned!!!

⁉ Support

If you need help with something or have an idea, feel free to start a Discussion or find us on Discord. If you have detailed repro steps, open an issue here instead.

πŸ“„ Code of Conduct

This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information see the .NET Foundation Code of Conduct.

Meet the contributors

Made with contrib.rocks.

mauisland's People

Contributors

aspodel avatar duydh1995 avatar e-vatron avatar hatan09 avatar hung9n3 avatar kendy78 avatar nghia-duong-idealogic avatar seledy219 avatar storm175 avatar storm1852 avatar strypper avatar truonghocyeuquy avatar tuyen-vuduc avatar vipertricks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

mauisland's Issues

REFIT: Upload file or image in one object

Description

Please see the refit documents for this issue: https://github.com/reactiveui/refit

Situation

This is refit example showing us how to upload file through HTTP

public interface ISomeApi
{
    [Multipart]
    [Post("/users/{id}/photo")]
    Task UploadPhoto(int id, [AliasAs("myPhoto")] StreamPart stream);
}

The problem

Our API in Intranet Authentication Controller

    [AllowAnonymous]
    [HttpPost]
    public async Task<IActionResult> Register([FromForm] UserSignUpDTO dto, CancellationToken cancellationToken = default)
    {
        var user = new User()
        {
            UserName = dto.username,
            Email = dto.email
        };
        var result = await _userRepository.CreateAccount(user, dto.password);
        if (result.Succeeded)
        {
            if (dto.avatarfile is null) return Ok();
            if (_mediaService.IsImage(dto.avatarfile))
            {
                using (Stream stream = dto.avatarfile.OpenReadStream())
                {
                    Tuple<bool, string> uploadresults = await _mediaService.UploadAvatarToStorage(stream, dto.avatarfile.FileName);
                    var isUploaded = uploadresults.Item1;
                    var stringUrl = uploadresults.Item2;
                    if (isUploaded && !string.IsNullOrEmpty(stringUrl))
                    {
                        user.ProfilePic = stringUrl;
                        await _userRepository.UpdateUser(user, cancellationToken);
                        return Ok();
                    }
                    else return BadRequest("Look like the image couldnt upload to the storage, but your account have created successfully");
                }
            }
        }
        return BadRequest();
    }

UserSignUpDTO:

public record UserSignUpDTO(string username,
                            string password,
                            string firstname,
                            string lastname,
                            string email,
                            string phonenumber,
                            string[]? roles,
                            IFormFile? avatarfile)
{ }

As you can see the avatarfile is an IFormFile which we included inside this object, so far we haven't found a way to use refit to send this kind of object to our backend to recognize.

If we don't have a solution, we must call 2 requests to complete our registration process. we had the code for uploading files in using the System.Net.Http will be this massive like this

This is an example of my previous object uploading a file to ASP.NET

        public async Task<PetaverseMedia> CreatePetAvatarAsync(Animal petInfo, StorageFile avatar)
        {
            if (avatar != null)
            {
                var multipartFormContent = new MultipartFormDataContent();

                var handle = avatar.CreateSafeFileHandle(options: FileOptions.RandomAccess);
                var stream = new FileStream(handle, FileAccess.ReadWrite) { Position = 0 };
                var media = new StreamContent(stream);
                media.Headers.Add("Content-Type", "image/jpeg");
                multipartFormContent.Add(media, name: "avatar", fileName: $"{petInfo.Name}");

                try
                {
                    var result = await _httpClient.PostAsync($"api/Animal/UploadPetAvatar/{petInfo.Id}", multipartFormContent);
                    string stringReadResult = await result.Content.ReadAsStringAsync();
                    return JsonConvert.DeserializeObject<PetaverseMedia>(stringReadResult);
                }
                catch (Exception ex)
                {
                    await new HttpRequestErrorContentDialog()
                    {
                        Title = "Can't upload avatar"
                    }.ShowAsync();
                    return null;
                }
            }
            else return null;
        }

Public API Changes

        try
        {
            var response = await this.intranetAuthenticationRefit.Register(new RegisterDTO(userName, firstName, lastName, phoneNumber, email, password, profilePicStream));
            if (!response.IsSuccessStatusCode)
            {
                var errorContentJson = JsonConvert.DeserializeObject<RefitErrorMessageModel>(response.Error.Content);
                throw new Exception(errorContentJson.title);
            }
        }
        catch (ApiException ex)
        {
            throw new Exception(ex.Message);
        }

Intended Use-Case

Create user information with an avatar with only one call

[Features]: Settings page

Description

New feature settings page that gives the users the ability to adjust application settings and see all the contributions and contributors

Public API Changes

None

Intended Use-Case

  • Customize your app experience and view your impact on our community with our new feature settings page.
  • Manage your app preferences and discover how your contributions and contributors make a difference with our new feature settings page.
  • Explore our new feature settings page where you can adjust your app settings and see all your contributions and contributors.

🐞 SfRadialGauge crash when open in new windows

Contact Details

[email protected]

What happened?

When you on Galley -> Syncfusion -> SfRadialGauge, SfBadgeView -> More detail to open the new page-> It can't do it and got out of the program.

Version

7.0

What platforms are you seeing the problem on?

Windows

Relevant log output

System.Runtime.InteropServices.COMException: 'The application called an interface that was marshalled for a different thread. (0x8001010E (RPC_E_WRONG_THREAD))'

Code of Conduct

  • I agree to respect and follow this project's rules

Toolkit: DrawingView

Description

The DrawingView provides a surface that allows for the drawing of lines through the use of touch or mouse interaction. The result of a users drawing can be saved out as an image. A common use case for this is to provide a signature box in an application.
image

Public API Changes

<toolkit:DrawingView
            Lines="{Binding MyLines}"
            LineColor="Red"
            LineWidth="5" />

Intended Use-Case

Guide people to use this control
https://learn.microsoft.com/en-us/dotnet/communitytoolkit/maui/views/drawingview

[Bug]: RadioButton page crash app - RELEASE MODE

Contact Details

[email protected]

What happened?

Please test it on Release mode since Debug mode run without an issue

image

Run mode: Release
App shut down without any logs when navigating to RadiobuttonPage
Root cause: ControlTemplate="{StaticResource RadioButtonTemplate}"

Version

7.0

What platforms are you seeing the problem on?

Android, Windows

Relevant log output

None

Code of Conduct

  • I agree to respect and follow this project's rules

Timepicker

Implement the time picker following Microsoft documentation.

Document

Missions

  • Display control information
  • Display properties list
  • Create a simple time picker
  • Display code for simple time picker
  • Create a time picker for binding purpose
  • Create label that show text according to the binding time picker

Check out this branch

git fetch origin
git checkout 101-timepicker

SfBarcodeGenerator

Description

The Syncfusion .NET MAUI Barcode Generator is a data visualization control used to generate and display data in a machine-readable format. It provides a perfect approach to encode text using supported symbology types.

https://help.syncfusion.com/maui/barcode-generator/overview

Public API Changes

xmlns:barcode="clr-namespace:Syncfusion.Maui.Barcode;assembly=Syncfusion.Maui.Barcode"
<barcode:SfBarcodeGenerator Value="http://www.syncfusion.com" 
                            HeightRequest="150"/>

Intended Use-Case

  1. One-dimensional barcodes - Barcode Generator supports different one-dimensional barcode symbologies such as Code128, EAN8,EAN13, UPC-A, UPC-E, Code39, Code39 Extended, Code93, and Codabar.
  2. Two-dimensional barcode - Barcode Generator supports popular QR code and Data Matrix.
  3. Barcode customization - Customize the visual appearance of barcodes using the BackgroundColor and ForegroundColor properties, and adjust the size of the smallest line or dot of the code using the Module property.
  4. Text customization - Configure to display the barcode value and customize the position and style of the barcode text.

[Feature]: Validation Entry

Description

We did grab the RoundedEntry from CnP but not sure why the visual UI is not as straightforward as CnP, we haven't tested it on other platforms but we sure need validation in our application so that we can prevent potential issues and bugs in our Register/SignIn feature. Please provide us with validation entry with the below features:

  1. Can be able to validate
  2. Name: ValidationEntry
  3. Turn the border red when that entry text has rule issues

Notice: We can use the same logic from RoundedEntry since the logic is working perfectly fine, but the UI has visual issue so can you investigate that case ?

Public API Changes

<app:ValidationEntry/>

Intended Use-Case

For text input that required rules

SfAvatarView

Description

image

The .NET MAUI Avatar View control provides a graphical representation of user image that allows you to customize the view by adding image, background color, icon, text, etc.

https://help.syncfusion.com/maui/avatar-view/overview

Public API Changes

<ContentPage.Content>
<Grid>
    <sfavatar:SfAvatarView ContentType="Custom"
                           ImageSource="alex.png"
                           VerticalOptions="Center"
                           HorizontalOptions="Center"   
                           HeightRequest="50"
                           CornerRadius="25"
                           WidthRequest="50" />
</Grid>
</ContentPage.Content>
using Syncfusion.Maui.Core;

namespace AvatarViewGettingStarted
{
    public partial class MainPage : ContentPage
    {
        public MainPage()
        {
            InitializeComponent();
            
	        //main grid
            Grid mainGrid = new Grid();

            // Create an SfAvatarView control.
            SfAvatarView avatarview = new SfAvatarView();
            avatarview.VerticalOptions = LayoutOptions.Center;
            avatarview.HorizontalOptions = LayoutOptions.Center;
            avatarview.BackgroundColor = Color.FromRgba("#ffb6c1");
            avatarview.ContentType = ContentType.Custom;
            avatarview.ImageSource = "alex.png";
            avatarview.WidthRequest = 50;
            avatarview.HeightRequest = 50;
            avatarview.CornerRadius = 25;
            mainGrid.Children.Add(avatarview);
            this.Content = mainGrid;
        }
    }
}

Intended Use-Case

  • Supports for adding image and initials.
  • Customizes the height, width, Stroke, BackgroundColor, and CornerRadius of the view.
  • GroupView: Supports to add maximum three custom images or initials in a single view.
  • Supports different types of visual styles.
  • Supports BadgeView.

Better source code expander

Description

Instead of using code editor to display the code, we use the Label for richer color options, this will support many type of programming languages and it's faster than the Editor

Public API Changes

Old

<app:SourceCodeExpander XamlCode="{x:Binding SliderWithCustomThumbImageXamlCode}" />

New

<app:SourceCodeExpander Code="{x:Binding SliderWithCustomThumbImageXamlCode}" CodeType="Xaml" />
<app:SourceCodeExpander Code="{x:Binding SliderWithCustomThumbImageCSharpCode}" CodeType="CSharp" />

Intended Use-Case

For displaying code guidance.

Implement RefreshView page

RefreshView Page

Demonstrate how the refresh view page works in Maui

Missions:

  • Control Information
  • Properties List
  • Simple example
  • Demonstrate with CollectionView
  • Custom the appearance

[Feature]: Warning open source users about appsettings.Development.json

Description

Add information inside the installation section in README.md guide the users how to create the appsettings.Development.json file and this file will not contain any private key

Public API Changes

{
  "AppSettings": {
    "SyncfusionKey": "Your_syncfustion_key"
  }
}

Intended Use-Case

Help user build our application

[Enhancement]: RefreshView need more detail instruction how to perform a swipe to refresh

What is going on ?

When I enter the refresh page I'm really confuse how to perform a swipe to refresh action to try out this control, the document should include these following guidance.

  1. Don't use the mouse to trigger because it won't have any effect on this control
  2. A quick introduction what is Windows PRECISION Touchpad
  3. Help the user understand is their machine support it ?
  4. And animation or image that show the users how to do a 2 fingers swipe down

git issues

[Restriction]: Windows require Page datatype rather than URL

Contact Details

[email protected]

What happened?

Windows require Page datatype to lead to a different page and it doesn't allow page navigation through URL.

Temporary Solution:
Create a third page called: "BridgeWindowChat.xaml" to render the URL and then use it as a Page datatype to Navigate.

Version

6.0 (Default)

What platforms are you seeing the problem on?

No response

Relevant log output

No response

Code of Conduct

  • I agree to respect and follow this project's rules

πŸš€ TabbedPage unstable features

Contact Details

[email protected]

What happened?

Unstable feature

I don't think the TabbedPage is designed for desktop, as you can see it's trying to behave the navigation and position the same as what phone operating systems do, but in reality, these behaviors are a such mess that we can't even begin identifying what are goals it's trying to archive

Should we include this in our app ?

When you on Galley -> Built-in-> TabbedPage -> Detail -> I can't back to Menu Galley
2023-03-13-15-26-10

Version

7.0

What platforms are you seeing the problem on?

Windows

Relevant log output

None

Code of Conduct

  • I agree to respect and follow this project's rules

[Bug]: appsettings.Development.json is not found

Contact Details

[email protected]

What happened?

image

In the new version of MAUIsland we include provide it the way to grab the application settings file to get all the settings it need to startup the application, and later for future user settings storage

The problem right now is that we can't get the file with this line of code

using var stream = assembly.GetManifestResourceStream("MAUIsland.appsettings.Development.json");

Detail implementation in MauiProgram

    static MauiAppBuilder GetAppSettings(this MauiAppBuilder builder)
    {
        var assembly = Assembly.GetExecutingAssembly();
        using var stream = assembly.GetManifestResourceStream("MAUIsland.appsettings.Development.json");

        if (stream is not null)
        {
            var config = new ConfigurationBuilder()
                        .AddJsonStream(stream)
                        .Build();

            builder.Configuration.AddConfiguration(config);
        }
        else
        {
            var options = new SnackbarOptions
            {
                BackgroundColor = AppColors.Purple,
                TextColor = AppColors.White,
                ActionButtonTextColor = AppColors.Pink,
                CornerRadius = new CornerRadius(Dimensions.ButtonCornerRadius),
                CharacterSpacing = 0.5
            };
            var message = "Can't find app settings file";

            var snackbar = Snackbar.Make(message, null, "OK", TimeSpan.FromSeconds(5), options);
            snackbar.Show();
        }

Version

7.0

What platforms are you seeing the problem on?

Android, Windows, MacOS, IOS

Relevant log output

None

Code of Conduct

  • I agree to respect and follow this project's rules

[RnD]: Adaptive-Properties.MAUI

Description

Original source
https://github.com/rudyspano/MAUI-Adaptive-Properties

Adaptive-Properties.MAUI

XAML is powerful! It allows to describe complex UI and a lot of mechanisms provide solutions to add dynamism: Triggers (DataTrigger, Adaptive Triggers), Visual States, Attached Properties, Behaviors, ...

However, out of the box, you have to write a lot of code in order to adapt UI depending on the running form factor, orientation or state: Phones, Tablets, Foldable Phones, Vertical/Horizontal orientation, ...

The goal of this library is to provide a simple way to develop and maintain UI that handles this complexity.

  1. Install the nuget package https://www.nuget.org/packages/AdaptiveProperties.MAUI
  2. Import the following in your view : xmlns:m="clr-namespace:AdaptiveProperties.MAUI.M;assembly=AdaptiveProperties.MAUI"
  3. Add properties to override basics properties for a given mode starting with m:{ModeName}.{PropertyName}="{Value}"

Example:

The following XAML defines a part of UI with a Phone First Approach and overrides properties for Tablet (or foldable phone in the opened state) (m:T.XX, m:TV.XX, m.TH.XX)

<VerticalStackLayout>
      <Grid HeightRequest="200"
            BackgroundColor="LightBlue">

          <Label Margin="10" VerticalOptions="Center"
                 FontSize="40"
                 Text="Hello !!!"
                 m:T.Text="Hello Tablet User :)" />
      </Grid>

      <Grid Padding="4" ColumnSpacing="4" RowSpacing="4" RowDefinitions="100,100" ColumnDefinitions="*,*,*"
            m:TH.RowDefinitions="200" m:TH.ColumnDefinitions="*,*,*,*"
            m:TV.RowDefinitions="200,200" m:TV.ColumnDefinitions="*,*">
          <Frame Grid.RowSpan="2"
                 m:T.RowSpan="1"
                 BackgroundColor="Red"
                 CornerRadius="4">
              <Label VerticalTextAlignment="Center"
                     TextColor="White"
                     Text="ShortCut 1" />
          </Frame>
          <Frame Grid.Column="1" Grid.RowSpan="2"
                 m:T.RowSpan="1"
                 BackgroundColor="Orange"
                 CornerRadius="4">
              <Label VerticalTextAlignment="Center"
                     TextColor="White"
                     Text="ShortCut 2" />
          </Frame>
          <Frame Grid.Column="2"
                 m:TV.Column="0" m:TV.Row="1"
                 BackgroundColor="Green"
                 CornerRadius="4">
              <Label VerticalTextAlignment="Center"
                     TextColor="White"
                     Text="ShortCut 3" />
          </Frame>
          <Frame Grid.Row="1" Grid.Column="2"
                 m:TH.Column="3"
                 m:TV.Column="1" m:TV.Row="1"
                 BackgroundColor="Purple"
                 CornerRadius="4">
              <Label VerticalTextAlignment="Center"
                     TextColor="White"
                     Text="ShortCut 4" />
          </Frame>
      </Grid>

      <FlexLayout BindableLayout.ItemsSource="{Binding ShelfList}"
                  JustifyContent="Center" Wrap="Wrap">
          <BindableLayout.ItemTemplate>
              <DataTemplate x:DataType="Model:Shelf">
                  <Grid WidthRequest="180" HeightRequest="150">
                      <Button BackgroundColor="White" BorderColor="Gray"
                              Command="{Binding BindingContext.GotToShelfCommand, Source={x:Reference HomePageInstance}}"
                              CommandParameter="{Binding}"
                              BorderWidth="1" CornerRadius="0" />

                      <Grid HeightRequest="100" VerticalOptions="Center" RowDefinitions="80,20"
                            m:T.HeightRequest="-1" m:T.VerticalOptions="Fill" m:T.RowDefinitions="*"
                            InputTransparent="True">
                          <Image Source="{Binding ImageUrl}"
                                 m:T.Aspect="AspectFill" />
                          <Label Grid.Row="1" HorizontalOptions="Center"
                                 m:T.Row="0" m:T.VerticalOptions="End"
                                 m:T.TextColor="White"
                                 Text="{Binding Name}" />
                      </Grid>
                  </Grid>
              </DataTemplate>
          </BindableLayout.ItemTemplate>
      </FlexLayout>
</VerticalStackLayout>

Animation

Different Modes

You can use the following modes in order to override properties:

Description {Prefix}:{Name}.{PropertyName}
Phone/Tablet Vertical mode m:V.{PropertyName}
Phone/Tablet Horizontal mode m:H.{PropertyName}
Phone mode m:P.{PropertyName}
Phone Vertical mode m:PV.{PropertyName}
Phone Horizontal mode m:PH.{PropertyName}
Tablet mode m:T.{PropertyName}
Tablet Vertical mode m:TV.{PropertyName}
Tablet Horizontal mode m:TH.{PropertyName}
Custom mode m:X.{PropertyName}

About Custom mode

If you need to handle other modes based on another state (depending on accessibility for example), you can override properties by using m:X.{PropertyName}, m:X2.{PropertyName}, m:X3.{PropertyName}.
In order to define conditions and trigger a custom mode, you have to use the 2 following methods:

  • X.SetModeActivationChecking(() => return ConditionInstruction());
  • X.TriggerModeActivationChecking();

See more in the sample here: https://github.com/rudyspano/MAUI-Adaptive-Properties/tree/main/sources/AdaptiveProperties.Demo/Views/3-CustomMode

Properties

A lot but not all properties of MAUI are available.
You can easily see which ones in the definition class here: https://github.com/rudyspano/MAUI-Adaptive-Properties/blob/main/sources/AdaptiveProperties.Configuration/Code.Configuration.cs

Remarks & Limitations

The real benefit of this Library depends, of course, of your needs. It is really efficient if the amount of adapations is reasonable => if a lot of adaptations are required, you should probably create specific views.
If your adaptations are mainly based on colors, fontSize (...) and do not concern layout properties, you should simply use Theming out-of-the-box features: https://learn.microsoft.com/en-us/dotnet/maui/user-interface/theming?view=net-maui-7.0

For the moment, properties does'nt handle DataBinding with value tracking and it's not really a goal considering efficient existing mechanisms.

If this project interests you, please share or contribute :)

Public API Changes

<VerticalStackLayout>
      <Grid HeightRequest="200"
            BackgroundColor="LightBlue">

          <Label Margin="10" VerticalOptions="Center"
                 FontSize="40"
                 Text="Hello !!!"
                 m:T.Text="Hello Tablet User :)" />
      </Grid>

      <Grid Padding="4" ColumnSpacing="4" RowSpacing="4" RowDefinitions="100,100" ColumnDefinitions="*,*,*"
            m:TH.RowDefinitions="200" m:TH.ColumnDefinitions="*,*,*,*"
            m:TV.RowDefinitions="200,200" m:TV.ColumnDefinitions="*,*">
          <Frame Grid.RowSpan="2"
                 m:T.RowSpan="1"
                 BackgroundColor="Red"
                 CornerRadius="4">
              <Label VerticalTextAlignment="Center"
                     TextColor="White"
                     Text="ShortCut 1" />
          </Frame>
          <Frame Grid.Column="1" Grid.RowSpan="2"
                 m:T.RowSpan="1"
                 BackgroundColor="Orange"
                 CornerRadius="4">
              <Label VerticalTextAlignment="Center"
                     TextColor="White"
                     Text="ShortCut 2" />
          </Frame>
          <Frame Grid.Column="2"
                 m:TV.Column="0" m:TV.Row="1"
                 BackgroundColor="Green"
                 CornerRadius="4">
              <Label VerticalTextAlignment="Center"
                     TextColor="White"
                     Text="ShortCut 3" />
          </Frame>
          <Frame Grid.Row="1" Grid.Column="2"
                 m:TH.Column="3"
                 m:TV.Column="1" m:TV.Row="1"
                 BackgroundColor="Purple"
                 CornerRadius="4">
              <Label VerticalTextAlignment="Center"
                     TextColor="White"
                     Text="ShortCut 4" />
          </Frame>
      </Grid>

      <FlexLayout BindableLayout.ItemsSource="{Binding ShelfList}"
                  JustifyContent="Center" Wrap="Wrap">
          <BindableLayout.ItemTemplate>
              <DataTemplate x:DataType="Model:Shelf">
                  <Grid WidthRequest="180" HeightRequest="150">
                      <Button BackgroundColor="White" BorderColor="Gray"
                              Command="{Binding BindingContext.GotToShelfCommand, Source={x:Reference HomePageInstance}}"
                              CommandParameter="{Binding}"
                              BorderWidth="1" CornerRadius="0" />

                      <Grid HeightRequest="100" VerticalOptions="Center" RowDefinitions="80,20"
                            m:T.HeightRequest="-1" m:T.VerticalOptions="Fill" m:T.RowDefinitions="*"
                            InputTransparent="True">
                          <Image Source="{Binding ImageUrl}"
                                 m:T.Aspect="AspectFill" />
                          <Label Grid.Row="1" HorizontalOptions="Center"
                                 m:T.Row="0" m:T.VerticalOptions="End"
                                 m:T.TextColor="White"
                                 Text="{Binding Name}" />
                      </Grid>
                  </Grid>
              </DataTemplate>
          </BindableLayout.ItemTemplate>
      </FlexLayout>
</VerticalStackLayout>

Intended Use-Case

The goal of this library is to provide a simple way to develop and maintain UI that handles this complexity.

HorizontalWrapLayout unable to scroll to bottom

HorizontalWrapLayout come from the POS MAUI Demo we reused it in our project with the benefit to have the layout similar to the gridview in WPF and WinUI.

Problem: This layout won't allow the scrollviewer reach to the bottom

Usage: MAUIAllControlsPage.xaml

Layout:

  1. HorizontalWrapLayout
  2. HorizontalWrapLayoutManager

[Bug]: CheckboxPage crash application when open in new windows

Contact Details

[email protected]

What happened?

When you on Galley -> Built-in-> Check Box-> More detail to open the new page -> It can't do it and got out of the program
2023-03-13 15-23-42

Version

7.0

What platforms are you seeing the problem on?

Windows

Relevant log output

Exception thrown: 'System.Runtime.InteropServices.COMException' in WinRT.Runtime.dll
An exception of type 'System.Runtime.InteropServices.COMException' occurred in WinRT.Runtime.dll but was not handled in user code
The application called an interface that was marshalled for a different thread. (0x8001010E (RPC_E_WRONG_THREAD))

Code of Conduct

  • I agree to respect and follow this project's rules

Enhance Editor page

I think the editor page still not doing a good job of teaching people how to use it. Also, I think doesn't give us much interaction detail
Navigate here


git fetch origin
git checkout 56-enhance-editor-page

[Bug]: Application need to have ability to check internet connection

Contact Details

[email protected]

What happened?

When the application tries to contact Intranet Cloud, it does not show any relevant failing errors telling the users that their devices don't have an internet connection, and this is important later on every feature that needs to fetch data from our server

Version

7.0

What platforms are you seeing the problem on?

Android, Windows, MacOS, IOS

Relevant log output

None

Code of Conduct

  • I agree to respect and follow this project's rules

SfBadgeView

Description

image

Badges are used to notify users of new or unread messages, notifications, or the status of something.
https://help.syncfusion.com/maui/badge-view/overview

Public API Changes

<badge:SfBadgeView HorizontalOptions="Center" VerticalOptions="Center" >
        <badge:SfBadgeView.Content>
            <Button Text="Primary" WidthRequest="120"  HeightRequest="60"/>
        </badge:SfBadgeView.Content>
</badge:SfBadgeView>
SfBadgeView sfBadgeView = new SfBadgeView();
sfBadgeView.HorizontalOptions = LayoutOptions.Center;
sfBadgeView.VerticalOptions = LayoutOptions.Center;
//Adding image to the content of the badge view.
Button button = new Button();
button.Text = "Primary";
button.WidthRequest = 120;
button.HeightRequest = 60;
sfBadgeView.Content = button;
Content = sfBadgeView;

Intended Use-Case

Position : Position the badge text around the badge content.

Predefined styles : Customize the badge background with predefined colors.

Animation : Use animations for badge text.

[Feature]: Observable properties source generator

Description

Original source: https://learn.microsoft.com/en-us/dotnet/communitytoolkit/mvvm/generators/observableproperty

The ObservableProperty type is an attribute that allows generating observable properties from annotated fields. Its purpose is to greatly reduce the amount of boilerplate that is needed to define observable properties.

Public API Changes

Sleeker way to create property - @ViperTricks task

From this:

public string? Name
{
    get => name;
    set => SetProperty(ref name, value);
}

To this:

[ObservableProperty]
private string? name;

It will also do so with an optimized implementation, so the end result will be even faster.

⚠️ The name of the generated property will be created based on the field name. The generator assumes the field is named either lowerCamel, _lowerCamel or m_lowerCamel, and it will transform that to UpperCamel to follow proper .NET naming conventions. The resulting property will always have public accessors, but the field can be declared with any visibility (private is recommended).

On property changing - @E-vaTRON task

In MVVM it's common that we need to handle custom logic when the property changes, this is why the MVVM Toolkit also give us the ability to do so.
From this:

public string? Name
{
    get => name;
    set
    {
        if (!EqualityComparer<string?>.Default.Equals(name, value))
        {
            OnNameChanging(value);
            OnPropertyChanging();
            name = value;
            OnNameChanged(value);
            OnPropertyChanged();
        }
    }
}

partial void OnNameChanging(string? value);
partial void OnNameChanged(string? value);

To this:

[ObservableProperty]
private string? name;

partial void OnNameChanging(string? value)
{
    Console.WriteLine($"Name is about to change to {value}");
}

partial void OnNameChanged(string? value)
{
    Console.WriteLine($"Name has changed to {value}");
}

Notifying dependent properties - @Seledy219 task

Imagine you had a FullName property you wanted to raise a notification for whenever Name changes. You can do that by using the NotifyPropertyChangedFor attribute, like so:

[ObservableProperty]
[NotifyPropertyChangedFor(nameof(FullName))]
private string? name;

This will result in a generated property equivalent to this:

public string? Name
{
    get => name;
    set
    {
        if (SetProperty(ref name, value))
        {
            OnPropertyChanged("FullName");
        }
    }
}

Notifying dependent commands

Imagine you had a command whose execution state was dependent on the value of this property. That is, whenever the property changed, the execution state of the command should be invalidated and computed again. In other words, ICommand.CanExecuteChanged should be raised again. You can achieve this by using the NotifyCanExecuteChangedFor attribute:

[ObservableProperty]
[NotifyCanExecuteChangedFor(nameof(MyCommand))]
private string? name;
public string? Name
{
    get => name;
    set
    {
        if (SetProperty(ref name, value))
        {
            MyCommand.NotifyCanExecuteChanged();
        }
    }
}

Notify requesting property validation - @Hung9n3, @hatan09, @E-vaTRON - level difficult

[ObservableProperty]
[NotifyDataErrorInfo]
[Required]
[MinLength(2)] // Any other validation attributes too...
private string? name;

That generated ValidateProperty call will then validate the property and update the state of the ObservableValidator object, so that UI components can react to it and display any validation errors appropriately.

Sending notification messages - @Hung9n3, @hatan09, @E-vaTRON - level difficult

If the property is declared in a type that inherits from ObservableRecipient, you can use the NotifyPropertyChangedRecipients attribute to instruct the generator to also insert code to send a property changed message for the property change. This will allow registered recipients to dynamically react to the change. That is, consider this code:

[ObservableProperty]
[NotifyPropertyChangedRecipients]
private string? name;

That generated Broadcast call will then send a new PropertyChangedMessage using the IMessenger instance in use in the current viewmodel, to all registered subscribers.

Intended Use-Case

Starting with version 8.0, the MVVM Toolkit includes brand-new Roslyn source generators that will help significantly reduce boilerplate when writing code using the MVVM architecture. They can simplify scenarios where you need to set up observable properties, commands, and more

[Feature]: SFMap

Description

The .NET MAUI Maps control is a powerful data visualization component that displays statistical information for a geographical area. It has highly interactive and customizable features such as selection, tooltip, legends, markers, bubbles, and color mapping. Using the Maps control, you can generate maps for population density, sales, political boundaries, weather, elections, and routes.

Public API Changes

<map:SfMaps>
  
</map:SfMaps>
SfMaps map = new SfMaps();
	
this.Content = map;

Intended Use-Case

  1. Shape layer - Visualize the map area from GeoJSON or shapefile input data.
  2. Data labels - Provide identification for shapes by displaying their names. If the labels exceed the shape bounds, they are trimmed or hidden.
  3. Markers - Denote a location with built-in symbols or display custom content at a specific latitude and longitude on a map.
  4. Bubbles - Add information to shapes such as population density or number of users. Bubbles can be rendered in different colors and sizes based on the data values of their assigned shapes.
  5. Shape selection - Choose a shape to highlight a region on a map. You can use the event for performing action during the shape selection.
  6. Legend - Use legends to provide clear information on the data plotted in a map.
  7. Colors - Categorize the shapes on a map by assigning their colors based on their underlying values. It is possible to set the shape color for a specific value or for a range of values.
  8. Tooltip - Display additional information about shapes, markers, and bubbles using a customizable tooltip on a map.

SFComboBox

Description

image

Control detail

The .NET MAUI ComboBox control is a selection component that allows users to type a value or choose an option from a list of predefined options. It has many features, such as data binding, editing, searching, clear button and dropdown button customization, and more.

Public API Changes

xmlns:editors="clr-namespace:Syncfusion.Maui.Inputs;assembly=Syncfusion.Maui.Inputs"
<ContentPage.Content>    
    <editors:SfComboBox x:Name="comboBox" />
</ContentPage.Content>

Intended Use-Case

Data binding – Support binding various types of data sources.
Editable mode – Editable and non-editable text boxes to select items from the given data source.
Filtering – The ComboBox filters items based on the entered text and auto-fills with the first suggestion.
Searching – Highlights the matching item in the drop-down list based on the provided input.
Placeholder – Display placeholder text inside the control until the user enters text.

[Enhancement]: Display Error

What is going on?
When I entrance app:

  1. I can't see Search Controls
  2. I click on button Gallery -> It don't display anything you need click back to Home and after that click on Gallery back
  3. When you on Galley -> Syncfusion -> More detail to open the new page -> It can't do it and got out of the program
  4. When you on Galley -> Syncfusion -> SfRadialGauge, SfDataGrid -> More detail to open the new page-> I don't know It empty or no data
  5. When you on Galley -> Built-in-> Check Box-> More detail to open the new page -> It can't do it and got out of the program
  6. When you on Galley -> Built-in-> Application Settings JSON -> Detail and More detail to open the new page -> When I roll to the end and click on Show me those settings -> The program is closed
  7. RefershView do not display all data or because my Windows doesn't assit
  8. StackLayout -> More detail to open the new page -> Some Data missing ?
  9. TabbedPage -> Detal -> I can't back to Menu Galley
  10. VerticalStackLayout -> More detail to open the new page -> It can't do it and got out of the program

Can't navigate backward from controls page to MAUIAllControlsPage

MAUIAllControlsPage
image
Detail Control Page - Notice there's a back button on top
image
When MAUIAllControlsPage navigate to DetailControl is fine but when trying to navigate back nothing is happen

Implementation

private void ControlCardContentView_DetailClicked(string route) {
    viewModel.NavigateToDetailCommand.Execute(route);
}

Location MAUIAllControlsPage.cs

SfAutocomplete

Description

image

The .NET MAUI Autocomplete control is highly optimized to load and populate suggestions quickly from large amounts of data depending on the user’s input characters. It allows users to select an item from the suggestion list. It displays the selected item in the input view with the text and clear button.

Public API Changes

xmlns:editors="clr-namespace:Syncfusion.Maui.Inputs;assembly=Syncfusion.Maui.Inputs"
<ContentPage.Content>    
    <editors:SfAutocomplete x:Name="autocomplete" />
</ContentPage.Content>
SfAutocomplete autocomplete = new SfAutocomplete(); 
Content = autocomplete;

Intended Use-Case

  • Data binding – Provided support to bind various types of data sources.
  • Filtering – The Autocomplete filters items based on the entered text and auto-fills with the first suggestion.
  • Searching – Highlights the matching item in the drop-down list based on the provided input.
  • Placeholder – Display placeholder text inside the control until the user enters text.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.