Is XAML inheritance possible?

AdrianKnightAdrianKnight USMember ✭✭✭✭

I have a base content page where I define a static resource:

      <OnPlatform x:Key="MyHeight" x:TypeArguments="x:Double" Android="50" iOS="70" WinPhone="50"/>

I have another content page that derives from this base content page. When I try to use HeightRequest="{x:StaticResource MyHeight}", I'm getting a runtime error which says that MyHeight is not defined.

I'm thinking maybe I could define this variable in App.xaml, but I don't understand why defining it in the base page does not work. I even tried adding x:FieldModifier="protected"

Sign In or Register to comment.