// Token: 0x060043DA RID: 17370 RVA: 0x00135D94 File Offset: 0x00133F94
        private static void OnContentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            ContentControl contentControl = (ContentControl)d;

            contentControl.SetValue(ContentControl.HasContentPropertyKey, (e.NewValue != null) ? BooleanBoxes.TrueBox : BooleanBoxes.FalseBox);
            contentControl.OnContentChanged(e.OldValue, e.NewValue);
        }
Ejemplo n.º 2
0
        static void content_changed_callback(IntPtr target, IntPtr calldata, IntPtr closure)
        {
            ContentControl cc         = (ContentControl)NativeDependencyObjectHelper.FromIntPtr(closure);
            var            oldContent = Value.ToObject(typeof(object), NativeMethods.content_control_changed_event_args_get_old_content(calldata));
            var            newContent = Value.ToObject(typeof(object), NativeMethods.content_control_changed_event_args_get_new_content(calldata));

            cc.OnContentChanged(oldContent, newContent);
            cc.RaiseUIAContentChanged(oldContent, newContent);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// ContentProperty property changed handler.
        /// </summary>
        /// <param name="d">ContentControl that changed its Content.</param>
        /// <param name="e">DependencyPropertyChangedEventArgs.</param>
        private static void OnContentPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            ContentControl source = d as ContentControl;

            Debug.Assert(source != null,
                         "The source is not an instance of ContentControl!");

            // Notify derived classes of the change
            source.OnContentChanged(e.OldValue, e.NewValue);
        }