Un petit post bien sympa pour se faciliter la vie...
Lorsque nous construisons des contrôles graphiques (exemple : librairie de contrôles), il arrive que nous utilisions des propriétés qui retournent des membres d'énumération.
Lorsque l'on vient à déclarer ces contrôles dans un fichier xaml, et que l'on appelle la propriété en question pour lui affecter une valeur ...
rien ne se passe : l'intellisense est dans les choux !
Pour corriger cet "intelli-ignorance", il suffit d'appliquer un geste très simple :
1. déclarer le namespace dans le fichier AssemblyInfo.cs de la façon suivante :
[assembly: XmlnsDefinition("http://monTruxAMoi.com/wpf/", "nameSpaceDeLenumeration")]
où XmlnsDefinition provient de System.Windows.Markup.
2. Je compile,
3. Enfin, dans le Xaml ou je désire utiliser mon contrôle, j'ajoute une déclaration xmlns:monTrux="http://monTruxAMoi.com/wpf/"
Hélas cela ne fonctionne "correctement" qu'en WPF ...
En Silverlight (même 3), Visual Studio ne résoud pas correctement les using dans les fichiers xxx.g.cs
du coup, on perd l'intellisense côté C# ... pas pratique !
Affichage des articles dont le libellé est Silverlight. Afficher tous les articles
Affichage des articles dont le libellé est Silverlight. Afficher tous les articles
mercredi 19 août 2009
vendredi 13 mars 2009
Silverlight : 2 Major evolutions !
One step behind in Silverlight Open World :
A new version of Moonlight (Silverlight for Linux World) has been released, it support all Silverlight 1 behaviours. The Silverlight 2 version will be released on Sept 2009, but it is available in pre alpha version for testing... an more !
http://www.mono-project.com/Moonlight
Silverlight 2 Microsoft controls code has just been published. It is under Microsoft Public License, and can be download here : http://www.microsoft.com/downloads/details.aspx?FamilyID=EB83ED4C-AC85-4DE9-8395-285628EE2254&displaylang=en
Enjoy
A new version of Moonlight (Silverlight for Linux World) has been released, it support all Silverlight 1 behaviours. The Silverlight 2 version will be released on Sept 2009, but it is available in pre alpha version for testing... an more !
http://www.mono-project.com/Moonlight
Silverlight 2 Microsoft controls code has just been published. It is under Microsoft Public License, and can be download here : http://www.microsoft.com/downloads/details.aspx?FamilyID=EB83ED4C-AC85-4DE9-8395-285628EE2254&displaylang=en
Enjoy
Inscription à :
Articles (Atom)