0

사용자 지정 활동을 사용하고 OnMouseDoubleClick 메서드를 재정의했습니다. 모든 것이 잘 작동하지만 활동을 두 번 클릭하면 디자이너에 자체가 표시됩니다. 이는 디자이너에서 전체 워크 플로가 표시되지 않고이 활동 만 표시된다는 것을 의미합니다. 사용자 정의 디자이너에서 자체 개방 활동을 비활성화하는 방법. 다음은 ActivityDesignerOptionsAttribute, 특히 그 AllowDrillIn 속성을 사용했다고 behabiour을 사용하지 않으려면 ActivityDesigner.xaml.cs사용자 지정 활동이 두 번 클릭하고 열기 활동을 자세히 사용하지 않도록 설정합니다.

/// <summary> 
    /// Raises the <see cref="E:System.Windows.Controls.Control.MouseDoubleClick"/> routed event. 
    /// </summary> 
    /// <param name="e">The event data.</param> 
    protected override void OnMouseDoubleClick(MouseButtonEventArgs e) 
    { 
     e.Handled = true; 
     this.OpenDialogOnDoubleClick(); 
    } 

답변

1

내 코드입니다.

활동 클래스에 사용 : IRegisterMetadata를 사용하는 경우


또는 :

internal class Metadata : IRegisterMetadata 
{ 
    private AttributeTable attributes; 

    // Called by the designer to register any design-time metadata. 
    public void Register() 
    { 
     var builder = new AttributeTableBuilder(); 

     builder.AddCustomAttributes(
      typeof(MyActivity), 
      new ActivityDesignerOptionsAttribute{ AllowDrillIn = false }); 

     MetadataStore.AddAttributeTable(builder.CreateTable()); 
    } 
}