Example #1
0
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            mTxtParagraph1 = GetTemplateChild(PART_Paragraph1) as IPv4ParagraphTextBox;
            if (mTxtParagraph1 != null)
            {
                mTxtParagraph1.TextChanged += mTxtParagraph_TextChanged;
                SetIP(Value);
            }
            mTxtParagraph2 = GetTemplateChild(PART_Paragraph2) as IPv4ParagraphTextBox;
            if (mTxtParagraph2 != null)
            {
                mTxtParagraph2.TextChanged += mTxtParagraph_TextChanged;
                SetIP(Value);
            }
            mTxtParagraph3 = GetTemplateChild(PART_Paragraph3) as IPv4ParagraphTextBox;
            if (mTxtParagraph3 != null)
            {
                mTxtParagraph3.TextChanged += mTxtParagraph_TextChanged;
                SetIP(Value);
            }
            mTxtParagraph4 = GetTemplateChild(PART_Paragraph4) as IPv4ParagraphTextBox;
            if (mTxtParagraph4 != null)
            {
                mTxtParagraph4.TextChanged += mTxtParagraph_TextChanged;
                SetIP(Value);
            }
        }
Example #2
0
 /// <summary>
 /// 设置相关联的前段和后段
 /// </summary>
 /// <param name="left"></param>
 /// <param name="right"></param>
 public void SetNeighbour(IPv4ParagraphTextBox left, IPv4ParagraphTextBox right)
 {
     mLeftParagraph  = left;
     mRightParagraph = right;
 }