What's measn in maui "customize a control"

Haviv Elbsz 1,886 Reputation points
2022-09-08T11:23:42.077+00:00

Hi all

What's measn in maui "customize a control"

is it means give it a native property that
don't exist in Maui control or
it's means that you can give it a property
that that don't exist in native properties

say I want to change editor control to
have scrollbars this possible?

thank you.

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,845 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,207 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Leon Lu (Shanghai Wicresoft Co,.Ltd.) 68,176 Reputation points Microsoft Vendor
    2022-09-09T02:41:15.627+00:00

    Hello,

    What's measn in maui "customize a control" is it means give it a native property that don't exist in Maui control

    Yes, you can set a native property that don't exist in MAUI control. You can refer to this document: Customize controls with handlers

    say I want to change editor control to have scrollbars this possible?

    Yes, you do not need to Customize controls, you can use ScrollView wrap the Editor like following code. I set WidthRequest="200" and HeightRequest="50" for testing.

       <ScrollView WidthRequest="200" BackgroundColor="Red" HeightRequest="50" VerticalScrollBarVisibility="Always">  
         
            <Editor Text="this is a test text for long this is a test text for long this is a test text for long" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" ></Editor>  
         
        </ScrollView>  
    

    Best Regards,

    Leon Lu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.