예제 #1
0
 private void Init(object sender, EventArgs e)
 {
     _app = Application.Current;
     _myWindow = (MainWindow)_app.MainWindow;
     _myWindow.SizeToContent = SizeToContent.WidthAndHeight;
     wfh.TabIndex = 10;
     _initFontSize = wfh.FontSize;
     _initFontWeight = wfh.FontWeight;
     _initFontFamily = wfh.FontFamily;
     _initFontStyle = wfh.FontStyle;
     _initBackBrush = (SolidColorBrush) wfh.Background;
     _initForeBrush = (SolidColorBrush) wfh.Foreground;
     (wfh.Child as MyControl).OnButtonClick += Pane1_OnButtonClick;
     _uiIsReady = true;
 }
예제 #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.window = ((WPFApp.MainWindow)(target));
                return;

            case 2:

            #line 36 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btn_EditClick);

            #line default
            #line hidden
                return;

            case 3:
                this.TaskListBox = ((System.Windows.Controls.ListBox)(target));
                return;

            case 4:
                this.Edit_Grid = ((System.Windows.Controls.Grid)(target));
                return;

            case 5:
                this.tbx_Input = ((System.Windows.Controls.TextBox)(target));
                return;

            case 6:

            #line 52 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btn_Save);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }