Beispiel #1
0
        /// <summary>
        /// Called when data changed in the main People collection. This can be
        /// a new node added to the collection, updated Person details, and 
        /// updated relationship data.
        /// </summary>
        private void OnFamilyContentChanged(object sender, ContentChangedEventArgs e)
        {
            // Ignore if currently repopulating the diagram.
            if (populating)
                return;

            // Save the person that is being added to the diagram.
            // This is optional and can be null.
            newPerson = e.NewPerson;

            // Redraw the diagram.
            UpdateDiagram();
            this.InvalidateMeasure();
            this.InvalidateArrange();
            this.InvalidateVisual();
        }
        private void RichTextBox_ContentChanged(object sender, ContentChangedEventArgs e)
        {

        }
        /// <summary>
        /// Extends BeginInvoke so that when a state object is not needed, null does not need to be passed.
        /// <example>
        /// contentchangedeventhandler.BeginInvoke(sender, e, callback);
        /// </example>
        /// </summary>
        public static IAsyncResult BeginInvoke(this ContentChangedEventHandler contentchangedeventhandler, Object sender, ContentChangedEventArgs e, AsyncCallback callback)
        {
            if(contentchangedeventhandler == null) throw new ArgumentNullException("contentchangedeventhandler");

            return contentchangedeventhandler.BeginInvoke(sender, e, callback, null);
        }
Beispiel #4
0
        private void richTextBox1_ContentChanged(object sender, ContentChangedEventArgs e)
        {
            var richTextBox = sender as RichTextBox;
            var text = GetRichTextBoxText();

            if (mOriginalValue == NOTSET)
            {
                mOriginalValue = text;
            }
            else
            {
                if (text != mOriginalValue)
                {
                    //Whe have a change
                    richTextBox.Background = new SolidColorBrush(Color.FromArgb(255, 173, 216, 230));
                    HasChanged = true;
                }
                else
                {
                    richTextBox.Background = new SolidColorBrush(Color.FromArgb(255, 255, 255, 255));
                    HasChanged = false;
                }
            }
            Text = text;

            if (ControlChanged != null)
            {
                ControlChanged(this, HasChanged);
            }
        }
Beispiel #5
0
 private void xmlEditor_ContentChanged(object sender, ContentChangedEventArgs e)
 {
     renderProgress.Value = 0;
     status.Text = "";
 }
 private void richTextBox_ContentChanged(object sender, System.Windows.Controls.ContentChangedEventArgs e)
 {
     Text = richTextBox.Xaml;
 }