How to hide base class public API's from derived class in XAML?

Praveen_KPraveen_K Member
edited October 21 in Xamarin.Forms

I have tried the below way but, it only hides the property from code behind( xaml.cs ) and the property is accessible from Xaml file. Can anyone suggest how to achieve this?

Code Snippet:

public class A
{
    public int Age
    {
        get;
        set;
    }
}

public class B: A
{
    // The below code restricts the Age Property from code behind( xaml.cs ) but, it is accessible in XAML file 

    new internal static int Age
    {
        get;
        private set;
    }
}

ScreenShots:


Best Answer

Answers

Sign In or Register to comment.