csharp System.Windows.Forms.Design.Behavior.Adorner.Enabled类(方法)实例源码

下面列出了csharp System.Windows.Forms.Design.Behavior.Adorner.Enabled 类(方法)源码代码实例,从而了解它的用法。

作者:.NET开发    项目:System.Windows.Forms.Design.Behavio   
// The AnchorGlyph objects should mimic the resize glyphs;
// they should only be visible when the control is the 
// primary selection. The adorner is enabled when the 
// control is the primary selection and disabled when 
// it is not.

void selectionService_SelectionChanged(object sender, EventArgs e)
{
    if (object.ReferenceEquals(
        this.selectionService.PrimarySelection,
        this.relatedControl))
    {
        this.ComputeBounds();
        this.anchorAdorner.Enabled = true;
    }
    else
    {
        this.anchorAdorner.Enabled = false;
    }
}


问题


面经


文章

微信
公众号

扫码关注公众号