PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, November 8, 2022

[FIXED] How to get android:title from IMenuItem in Xamarin C#?

 November 08, 2022     android, c#, menu, xamarin     No comments   

Issue

I have added items to the toolbar menu programmatically. Now I want to access the item's title attribute. I know you can use item.getTitle() to get the title in Java, but how do would you get the title associated to that item in C#?


Solution

if you look at the docs for IMenuItem you will see that it has a TitleFormatted property that maps to the Android getTitle method.

Generally Android getPropertyName methods are mapped to C# PropertyName properties in Xamarin.



Answered By - Jason
Answer Checked By - David Marino (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing