Ejemplo n.º 1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.exTextBox = ((LivetPractice.Views.Controls.ExTextBox)(target));
                return;

            case 2:
                this.exTextBox1 = ((LivetPractice.Views.Controls.ExTextBox)(target));
                return;

            case 3:
                this.exTextBox2 = ((LivetPractice.Views.Controls.ExTextBox)(target));
                return;

            case 4:
                this.txtExIsReadOnly = ((LivetPractice.Views.Controls.ExTextBox)(target));
                return;

            case 5:
                this.button = ((System.Windows.Controls.Button)(target));

            #line 42 "..\..\..\..\Views\MainWindow.xaml"
                this.button.Click += new System.Windows.RoutedEventHandler(this.button_Click);

            #line default
            #line hidden
                return;

            case 6:
                this.txtIsReadOnly = ((System.Windows.Controls.TextBox)(target));
                return;

            case 7:
                this.button1 = ((System.Windows.Controls.Button)(target));

            #line 44 "..\..\..\..\Views\MainWindow.xaml"
                this.button1.Click += new System.Windows.RoutedEventHandler(this.button1_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// スタティックコンストラクタ
 /// </summary>
 static ExTextBox()
 {
     //依存関係プロパティのメタデータのオーバーライド
     //IsReadOnlyプロパティが変更された時の動作
     IsReadOnlyProperty.OverrideMetadata(
         typeof(ExTextBox)
         , new FrameworkPropertyMetadata(
             false
             , (sender, e) =>
     {
         ExTextBox textBox = sender as ExTextBox;
         if (textBox == null)
         {
             return;
         }
         MessageBox.Show(textBox.IsReadOnly.ToString());
     }));
 }