Exemple #1
0
        static void TextPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
        {
            InfoTextBox itb = (InfoTextBox)sender;

            bool actuallyHasText = itb.Text.Length > 0;

            if (actuallyHasText != itb.HasText)
            {
                itb.SetValue(HasTextPropertyKey, actuallyHasText);
            }
        }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.button1 = ((System.Windows.Controls.Button)(target));
     
     #line 15 "..\..\..\MainWindow.xaml"
     this.button1.Click += new System.Windows.RoutedEventHandler(this.AddRecipeClick);
     
     #line default
     #line hidden
     return;
     case 2:
     this.stack = ((System.Windows.Controls.StackPanel)(target));
     return;
     case 3:
     this.textBlock1 = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 4:
     this.treeView1 = ((System.Windows.Controls.TreeView)(target));
     return;
     case 5:
     this.expander1 = ((System.Windows.Controls.Expander)(target));
     
     #line 31 "..\..\..\MainWindow.xaml"
     this.expander1.Collapsed += new System.Windows.RoutedEventHandler(this.Expander1Collapsed);
     
     #line default
     #line hidden
     
     #line 31 "..\..\..\MainWindow.xaml"
     this.expander1.Expanded += new System.Windows.RoutedEventHandler(this.Expander1Expanded);
     
     #line default
     #line hidden
     return;
     case 6:
     this.recipeNameSearch = ((PixelLab.Wpf.InfoTextBox)(target));
     
     #line 38 "..\..\..\MainWindow.xaml"
     this.recipeNameSearch.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.Search);
     
     #line default
     #line hidden
     return;
     case 7:
     this.recipeTypeSearch = ((PixelLab.Wpf.InfoTextBox)(target));
     
     #line 39 "..\..\..\MainWindow.xaml"
     this.recipeTypeSearch.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.Search);
     
     #line default
     #line hidden
     return;
     case 8:
     this.recipeIngrSearch = ((PixelLab.Wpf.InfoTextBox)(target));
     
     #line 40 "..\..\..\MainWindow.xaml"
     this.recipeIngrSearch.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.Search);
     
     #line default
     #line hidden
     return;
     case 9:
     this.delRecipeButton = ((System.Windows.Controls.Button)(target));
     
     #line 43 "..\..\..\MainWindow.xaml"
     this.delRecipeButton.Click += new System.Windows.RoutedEventHandler(this.DelRecipeButtonClick);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.grid = ((System.Windows.Controls.Grid)(target));
     return;
     case 2:
     this.label1 = ((System.Windows.Controls.Label)(target));
     return;
     case 3:
     this.label5 = ((System.Windows.Controls.Label)(target));
     return;
     case 4:
     this.addRecipeButton = ((System.Windows.Controls.Button)(target));
     
     #line 10 "..\..\..\AddWindow.xaml"
     this.addRecipeButton.Click += new System.Windows.RoutedEventHandler(this.AddRecipeClick);
     
     #line default
     #line hidden
     return;
     case 5:
     this.label6 = ((System.Windows.Controls.Label)(target));
     return;
     case 6:
     this.recipeName = ((PixelLab.Wpf.InfoTextBox)(target));
     
     #line 25 "..\..\..\AddWindow.xaml"
     this.recipeName.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.RecipeNameTextChanged);
     
     #line default
     #line hidden
     return;
     case 7:
     this.recipeType = ((System.Windows.Controls.ComboBox)(target));
     
     #line 26 "..\..\..\AddWindow.xaml"
     this.recipeType.GotFocus += new System.Windows.RoutedEventHandler(this.RecipeTypeGotFocus);
     
     #line default
     #line hidden
     return;
     case 8:
     this.addRowButton = ((System.Windows.Controls.Button)(target));
     
     #line 27 "..\..\..\AddWindow.xaml"
     this.addRowButton.Click += new System.Windows.RoutedEventHandler(this.AddRowClick);
     
     #line default
     #line hidden
     return;
     case 9:
     this.dataGrid1 = ((System.Windows.Controls.DataGrid)(target));
     return;
     case 10:
     this.dgCombo2 = ((System.Windows.Controls.DataGridComboBoxColumn)(target));
     return;
     case 11:
     this.recipeText = ((PixelLab.Wpf.InfoTextBox)(target));
     return;
     }
     this._contentLoaded = true;
 }