<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.dotnetzone.gr:443/cs/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>.NET Framework</title><link>https://www.dotnetzone.gr:443/cs/forums/14/ShowForum.aspx</link><description>Θέματα για threading, remoting, reflection, exception handling, security, regex κλπ.</description><dc:language>el</dc:language><generator>CommunityServer 2.1 SP3 (Build: 20423.1)</generator><item><title>Απ: Προσθήκη ενός Custom property στο Properties Panel</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/32212.aspx</link><pubDate>Fri, 25 May 2007 07:00:53 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:32212</guid><dc:creator>Παναγιώτης Καναβός</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/32212.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=14&amp;PostID=32212</wfw:commentRss><description>&lt;P&gt;Θα πρέπει στο property του control σου να βάλεις τα Browsable και DesignerSerializationVisibility attributes, όπως στο παρακάτω παράδειγμα. Το πρώτο attribute εμφανίζει το property στον Property Editor.&amp;nbsp;Το δεύτερο λέει ότι η τιμή του property θα πρέπει να αποθηκευτεί στο&amp;nbsp;.designer.cs αρχείο της κάθε φόρμας.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;[Browsable(&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;true&lt;/SPAN&gt;)]&lt;BR&gt;[DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]&lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;public&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;override&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;string&lt;/SPAN&gt; Text&lt;BR&gt;{&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;get&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&lt;/SPAN&gt; &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;base&lt;/SPAN&gt;.Text;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;set&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;base&lt;/SPAN&gt;.Text &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; value;&lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;this&lt;/SPAN&gt;.label1.Text &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; value;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR&gt;}&lt;/SPAN&gt;&lt;/P&gt;</description></item><item><title>Απ: Προσθήκη ενός Custom property στο Properties Panel</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/32210.aspx</link><pubDate>Fri, 25 May 2007 06:22:21 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:32210</guid><dc:creator>pontifikas</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/32210.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=14&amp;PostID=32210</wfw:commentRss><description>Βασικά το ερώτημά μου ήταν γιατί ακόμα και δεν προσθέσω τίποτα, το Text δεν φαίνεται?&lt;br&gt;</description></item><item><title>Απ: Προσθήκη ενός Custom property στο Properties Panel</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/32209.aspx</link><pubDate>Fri, 25 May 2007 06:13:39 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:32209</guid><dc:creator>Παναγιώτης Καναβός</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/32209.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=14&amp;PostID=32209</wfw:commentRss><description>Το UserControl είναι και αυτό Control. Στο documentation θα δεις ότι κάνει inherit το TemplateControl το οποίο κάνει inherit ... το Control. Προσθέτωντας το δικό σου Text property έκρυψες το ήδη υπάρχον Text property.</description></item><item><title>Απ: Προσθήκη ενός Custom property στο Properties Panel</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/32207.aspx</link><pubDate>Fri, 25 May 2007 06:03:55 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:32207</guid><dc:creator>pontifikas</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/32207.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=14&amp;PostID=32207</wfw:commentRss><description>Κάνω inherit την UserControl που δεν έχει Text property και όχι την Control.&lt;br&gt;Αλλά συμβαίνει το εξής. Πράγματι όπως είπες ότι property βάζω προστίθεται στο panel. Το Text όμως όχι.... Γιατί?&lt;br&gt;</description></item><item><title>Απ: Προσθήκη ενός Custom property στο Properties Panel</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/32206.aspx</link><pubDate>Fri, 25 May 2007 05:55:52 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:32206</guid><dc:creator>Παναγιώτης Καναβός</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/32206.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=14&amp;PostID=32206</wfw:commentRss><description>&lt;P&gt;Η κλάση Control ήδη έχει το Text property. Προσθέτωντας ένα ακόμα Text property ουσιαστικά έκρυψες το Control.Text. Αν θέλεις να προσθέσεις το δικό σου κώδικα στο Text property, θα πρέπει να το κάνεις override φροντίζοντας όμως μέσα στις get, set να χρησιμοποιήσεις την base.Text και όχι κάποιο δικό σου πεδίο. Ο λόγος είναι ότι όταν τροποποιείς το Text property, σηκώνεται και το TextChanged event. Αν διαβάσεις το documentation του Control.Text property, θα δεις στα Remarks μία παράγραφο "Note to Inheritors" η οποία λέει ακριβώς αυτά.&lt;/P&gt;
&lt;P&gt;Γενικά, οποιοδήποτε property προσθέτεις εμφανίζεται στον Property Editor. Μπορείς να επηρεάσεις τον τρόπο που εμφανίζονται τα properties με attributes όπως τα DefaultValue, Category, EditorBrowsable, Designer, DesignTimeVisible κλπ.&lt;/P&gt;</description></item><item><title>Προσθήκη ενός Custom property στο Properties Panel</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/32205.aspx</link><pubDate>Fri, 25 May 2007 05:39:49 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:32205</guid><dc:creator>pontifikas</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/32205.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=14&amp;PostID=32205</wfw:commentRss><description>Ας υποθέσουμε ότι έχω φτοιάξει ένα δικό μου Control και του έχω προσθέσει ένα property που το ονόμασα Text .&lt;br&gt;Αυτό, όταν θα πάω σε μια φόρμα να προσθέσω το Control μου, δεν θα φαίνεται στο properties panel. Πώς μπορώ &lt;br&gt;να το κάνω να φανεί?&lt;br&gt;ε?&lt;img src="http://www.dotnetzone.gr/cs/emoticons/emotion-15.gif" alt="Geeked" /&gt;&lt;br&gt;&lt;br&gt;Ευχαριστώ&lt;br&gt;</description></item></channel></rss>