void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.PART_GradientDialog = ((Imagin.Controls.Extended.GradientDialog)(target)); return; case 2: this.PART_GradientEditor = ((Imagin.Controls.Extended.GradientEditor)(target)); return; case 3: #line 27 "..\..\..\..\Dialogs\GradientDialog.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.OnSave); #line default #line hidden return; case 4: #line 31 "..\..\..\..\Dialogs\GradientDialog.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.OnCancel); #line default #line hidden return; } this._contentLoaded = true; }
/// <summary> /// /// </summary> /// <returns></returns> public override bool?ShowDialog() { var Dialog = new GradientDialog(Title, Value.As <Brush>().Duplicate(), this); var Result = Dialog.ShowDialog(); if (Result.Value || Dialog.Result == Common.WindowResult.Cancel) { Value = Dialog.InitialValue; } else if (!IsSynchronized) { Value = Dialog.Value; } return(Result); }