Code snippet for control wrapping properties

29 בDecember 2009

tags: , ,
no comments

Code snippet for control wrapping properties

Hello everyone.

many of us,  I’m sure, needed to wrap inner controls of a user\custom control 
with public properties. That’s in order to have their control encapsulated,
and to add some code flexibility (If the control is changing, all I need to do is
change the code of my property and the rest remains intact.

Therefore I’ve made a code snippet for myself that allow me to write these kind
of properties easily, and figured why not let everyone use it.

I hope you’ll find it useful.


<?xml version="1.0" encoding="utf-8" ?>

<CodeSnippets  xmlns="">

    <CodeSnippet Format="1.0.0">


            <Title>Control Property</Title>


            <Description>Code snippet for property with get and set accessors 

      that wraps an inner control</Description>

            <Author>Ran Wahle</Author>









                    <ToolTip>Property type</ToolTip>






          <ToolTip>Property name</ToolTip>





          <ToolTip>Control Name</ToolTip>





          <ToolTip>Control Inner property</ToolTip>



            <Code Language="csharp">


        /// <summary>

        /// Put summary for $name$

        /// </summary>

        public $type$ $name$




                return $controlName$.$controlInnerProperty$;




                $controlName$.$controlInnerProperty$ = value;








kick it on

Add comment
facebook linkedin twitter email

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>