Fabio Carucci's WebLogs

"...You may say I'm a dreamer, but I'm not the only one..." (Imagine)
posts - 51, comments - 41, trackbacks - 27

My Links

News



PER CONSULENZE SCRIVERE SU "CONTACT"

Contattami se sono online!

This is my personal blog. These postings are provided "AS IS" with no warranties, and confer no rights. The views expressed on this weblog are mine alone and do not necessarily reflect the views of my employer.








View Fabio Carucci's profile on LinkedIn

Vuoi ricevere i miei post nella tua email? Iscriviti

Add to Technorati Favorites



http://www.csthota.com/blogmap/



Locations of visitors to this page





Tag Cloud

Archives

Post Categories

1 - Pubblicazioni

2 - Conferenze

3 - Links

4 - Blogs

L'arte di lavorare con le WebPart - #11

Quando lavoriamo con i Verbs, per default nel menù a tendina, accanto ai verbi, non appaiono immagini che rendono più user friendly la nostra webpart.

Per ovviare a ciò, mediante l'uso della property ImageUrl contenuta nella classe WebPartVerb, possiamo ad esempio creare una zona custom e, ogni webpart che verrà inserita in essa, acquisirà i verbi di default e quelli aggiunti, nonchè le immagini (nei formati soliti) che appariranno accanto ad ogni verbo

Ecco un esempio del codice

internal class CustomWebPartVerb : WebPartVerb { private const String _copyImageUrl = "~/Copy.ico"; internal CustomWebPartVerb(WebPartEventHandler serverClickHandler) : base("CustomVerb", serverClickHandler) { } public override bool Enabled { get { return base.Enabled; } set { base.Enabled = value; } } public override string ImageUrl { get { return _copyImageUrl; } set { ; } } }

Print | posted on martedì 30 gennaio 2007 0.21 | Filed Under [ ASP.NET 2.0 WebPart ]

Feedback

No comments posted yet.

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 8 and 6 and type the answer here:

Powered by: