Results 1 to 2 of 2

Thread: ReadWriteControlDesigner

  1. #1

    Thread Starter
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267

    Question ReadWriteControlDesigner

    Anyone know how to use this thing?

    -----------------------------------------------------

    ReadWriteControlDesigner Class

    Extends design-time behavior for read/write server controls.

    For a list of all members of this type, see
    ReadWriteControlDesigner Members.

    VB Code:
    1. Public Class ReadWriteControlDesigner
    2.    Inherits ControlDesigner

    Code:
    public class ReadWriteControlDesigner : ControlDesigner
    Thread Safety
    Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.

    Remarks
    This control designer provides the ability to drop controls onto the control for this designer.

    Notes to Implementers:Implementors of designers who would like their control to support adding child controls to it should use ReadWriteControlDesigner. If you do not want your control to support child controls, use a designer derived from ControlDesigner.

    Requirements
    Namespace: System.Web.UI.Design

    Platforms: Windows 2000, Windows XP Professional, Windows .NET Server family

    Assembly: System.Design (in System.Design.dll
    Magiaus

    If I helped give me some points.

  2. #2

    Thread Starter
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267
    VB Code:
    1. [Visual Basic]
    2. ' Override the MapPropertyToStyle method to set the
    3. ' Panel.Wrap property to the NoWrap HTML attribute.
    4. Overrides Protected Sub MapPropertyToStyle(propName As String, varPropValue As Object)
    5.    ' Display messages when debugging.
    6.    Debug.Assert(Not (propName = Nothing Or propName.Length <> 0), "Invalid property name passed in.")
    7.    Debug.Assert(Not (varPropValue = Nothing), "Invalid property value passed in.")
    8.  
    9.    ' If the parameters passed to the method are null,
    10.    ' return nothing.
    11.    If ((propName Is Nothing) And (varPropValue Is Nothing)) Then
    12.       Return
    13.    End If
    14.    
    15.    ' If the second parameter is not a null
    16.    ' value, check whether the property name is Wrap.
    17.    If Not (varPropValue Is Nothing) Then
    18.       Try
    19.          ' If property name is wrap, convert
    20.          ' it to the HTML NoWrap attribute.
    21.          If (propName.Equals("Wrap")) Then
    22.             Dim strValue As String = String.Empty
    23.            
    24.             If (CType(varPropValue, Boolean)) Then
    25.                Behavior.SetStyleAttribute("NoWrap", True, strValue, True)
    26.             End If
    27.          Else
    28.            MyBase.MapPropertyToStyle(propName, varPropValue)            
    29.          End If  
    30.        Catch ex As Exception
    31.          Debug.Fail(ex.ToString())
    32.        End Try            
    33.     End If
    34.  End Sub 'MapPropertyToStyle
    Magiaus

    If I helped give me some points.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width