Click here to Skip to main content
15,886,572 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys, I'm new in Xamarin Studio, I'm trying to create a custom attribute in XAML, in a cross plataform solution, I'm using the xmlns:android="http://schemas.android.com/apk/res/android" reference, but when I use the prefix android:textStyle="Italic", and I run the solution it show me an error of "property 'textStyle' was not found" at this line of code.

XAML Code:

<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns:a="http://xamarin.com/schemas/2014/forms" 
			xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 
			x:Class="Push_Money_N.Droid.Prueba"
			xmlns:android="http://schemas.android.com/apk/res/android">


	<ContentPage.Content>

		<Label Text="Hellow Word"
				android:textStyle="Italic">
		</Label>

	</ContentPage.Content >
</ContentPage>


Manifest Code:

<?xml version="1.0" encoding="utf-8"?> 
    <manifest xmlns:android="http://schemas.android.com/apk/res/android" 
          android:versionCode="1" 
          android:versionName="1.0" 
          package="app.monodroid">  
        <uses-sdk android:minSdkVersion="15" />     
        <application android:label="Push_Money_N">
        </application> 
    </manifest>


Error:

No Property of name textStyle found

Thanks for any help, I have been trying for many days to solve this problem. I'm very new to Xamarin Studio, and I've worked with Android Studio before and in it I can use this custom attribute. Thanks.

What I have tried:

I´m very new at Xamarin Studio, and I've been looking examples of custom attributes in others IDEs like AndroidStudio and they work fine, and can be used at the begin of the project.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900