ComponentDesigner.InvokeGetInheritanceAttribute メソッド
アセンブリ: System.Design (system.design.dll 内)

Protected Function InvokeGetInheritanceAttribute ( _ toInvoke As ComponentDesigner _ ) As InheritanceAttribute
Dim toInvoke As ComponentDesigner Dim returnValue As InheritanceAttribute returnValue = Me.InvokeGetInheritanceAttribute(toInvoke)
protected function InvokeGetInheritanceAttribute ( toInvoke : ComponentDesigner ) : InheritanceAttribute
戻り値
指定したデザイナの InheritanceAttribute。

Public Class DesignerSample Inherits ComponentDesigner Public Overrides ReadOnly Property Verbs() As DesignerVerbCollection Get ' Specifies a new verb that will show up in the context menu for the component. Dim clickVerb As New DesignerVerb("Click Me!", New EventHandler(AddressOf OnVerbClicked)) Return New DesignerVerbCollection(New DesignerVerb() {clickVerb}) End Get End Property Private Sub OnVerbClicked(sender As Object, e As EventArgs) MessageBox.Show("This verb was clicked") End Sub 'OnVerbClicked End Class 'DesignerSample <br /><span space="preserve">...</span><br /> <Designer(GetType(DesignerSample))> _ Public Class DesignerComponent Inherits Component End Class 'DesignerComponent _
public class DesignerSample : ComponentDesigner { public override DesignerVerbCollection Verbs { get { // Specifies a new verb that will show up in the shortcut menu for the component. DesignerVerb clickVerb = new DesignerVerb("Click Me!", new EventHandler(OnVerbClicked)); return new DesignerVerbCollection(new DesignerVerb[] {clickVerb}); } } private void OnVerbClicked(object sender, EventArgs e) { MessageBox.Show("This verb was clicked"); } } <br /><span space="preserve">...</span><br />[Designer(typeof(DesignerSample))] public class DesignerComponent : Component { }
public ref class DesignerSample: public ComponentDesigner { public: property DesignerVerbCollection^ Verbs { virtual DesignerVerbCollection^ get() override { // Specifies a new verb that will show up in the shortcut menu for the component. DesignerVerb^ clickVerb = gcnew DesignerVerb( "Click Me!",gcnew EventHandler( this, &DesignerSample::OnVerbClicked ) ); array<DesignerVerb^>^myArray = {clickVerb}; return gcnew DesignerVerbCollection( myArray ); } } private: void OnVerbClicked( Object^ /*sender*/, EventArgs^ /*e*/ ) { MessageBox::Show( "This verb was clicked" ); } }; <br /><span space="preserve">...</span><br /> [Designer(DesignerSample::typeid)] public ref class DesignerComponent: public Component{};
public class DesignerSample extends ComponentDesigner { /** @property */ public DesignerVerbCollection get_Verbs() { // Specifies a new verb that will show up in the shortcut menu for the // component. DesignerVerb clickVerb = new DesignerVerb("Click Me!", new EventHandler(OnVerbClicked)); return new DesignerVerbCollection(new DesignerVerb[] { clickVerb }); } //get_Verbs private void OnVerbClicked(Object sender, EventArgs e) { MessageBox.Show("This verb was clicked"); } //OnVerbClicked } //DesignerSample <br /><span space="preserve">...</span><br />/** @attribute Designer(DesignerSample.class) */ public class DesignerComponent extends Component { } //DesignerComponent


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- ComponentDesigner.InvokeGetInheritanceAttribute メソッドのページへのリンク