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 해당 메시지를 포함 하는 자리 표시자에 대 한 태그를 생성 합니다.