LoginViewDesigner.GetEmptyDesignTimeHtml 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
현재 템플릿이 정의되지 않은 경우 디자인 타임에 연결된 컨트롤의 자리 표시자를 렌더링하는 태그를 가져옵니다.
protected:
override System::String ^ GetEmptyDesignTimeHtml();
protected override string GetEmptyDesignTimeHtml();
override this.GetEmptyDesignTimeHtml : unit -> string
Protected Overrides Function GetEmptyDesignTimeHtml () As String
반품
디자인 화면의 자리 표시자에 렌더링되는 태그 텍스트가 포함된 문자열입니다.
예제
다음 코드 예제에서는 디자인 타임에 클래스에서 파생 된 컨트롤의 모양을 변경 하려면 클래스에서 GetEmptyDesignTimeHtml 상속 되는 클래스의 메서드를 LoginViewDesigner 재정 LoginView 의 하는 방법을 보여 집니다. 이 예제에서는 연결된 컨트롤에 대해 정의된 모든 RoleGroup 개체의 이름을 포함하는 자리 표시자에 대한 태그를 생성합니다.
// Generate the design-time markup for the control
// when the template is empty.
protected override string GetEmptyDesignTimeHtml()
{
// Generate a design-time placeholder containing the names of all
// the role groups.
MyLoginView myLoginViewCtl = (MyLoginView)ViewControl;
RoleGroupCollection roleGroups = myLoginViewCtl.RoleGroups;
string roleNames = null;
// If there are any role groups, form a string of their names.
if (roleGroups.Count > 0)
{
roleNames = "Role Groups: <br /> " +
roleGroups[0].ToString();
for( int rgX = 1; rgX < roleGroups.Count; rgX++ )
roleNames +=
"<br /> " + roleGroups[rgX].ToString();
}
return CreatePlaceHolderDesignTimeHtml( roleNames);
} // GetEmptyDesignTimeHtml
' Generate the design-time markup for the control
' when the template is empty.
Protected Overrides Function GetEmptyDesignTimeHtml() As String
' Generate a design-time placeholder containing the names of all
' the role groups.
Dim myLoginViewCtl As MyLoginView = CType(ViewControl, MyLoginView)
Dim roleGroups As RoleGroupCollection = myLoginViewCtl.RoleGroups
Dim RoleNames As String = Nothing
Dim rgX As Integer
' If there are any role groups, form a string of their names.
If roleGroups.Count > 0 Then
roleNames = "Role Groups: <br /> " & _
roleGroups(0).ToString()
For rgX = 1 To roleGroups.Count - 1
roleNames &= "<br /> " & _
roleGroups(rgX).ToString()
Next rgX
End If
Return CreatePlaceHolderDesignTimeHtml(roleNames)
End Function ' GetEmptyDesignTimeHtml
설명
메서드는 GetEmptyDesignTimeHtml 먼저 연결된 LoginView 컨트롤의 현재 템플릿 이름을 지정하고 템플릿이 비어 있음을 지정하는 문자열 메시지의 서식을 지정합니다. 그런 다음 해당 GetEmptyDesignTimeHtml 메시지를 포함하는 자리 표시자에 대한 태그를 생성합니다.