internal WordCompletionPresenter(IPopupIntellisensePresenter source)
 {
     _popupIntellisensePresenter = source;
     _intellisenseCommandTarget = source as IIntellisenseCommandTarget;
     _mouseProcessor = source as IMouseProcessor;
     _disposable = source as IDisposable;
     _componentConnector = source as IComponentConnector;
 }
Example #2
0
 internal WordCompletionPresenter(IPopupIntellisensePresenter source)
 {
     _popupIntellisensePresenter = source;
     _intellisenseCommandTarget  = source as IIntellisenseCommandTarget;
     _mouseProcessor             = source as IMouseProcessor;
     _disposable         = source as IDisposable;
     _componentConnector = source as IComponentConnector;
 }
Example #3
0
        // Token: 0x06007974 RID: 31092 RVA: 0x002273F8 File Offset: 0x002255F8
        private void InitializeComponent(PageFunctionBase pageFunction)
        {
            IComponentConnector componentConnector = pageFunction as IComponentConnector;

            if (componentConnector != null)
            {
                componentConnector.InitializeComponent();
            }
        }
Example #4
0
        private void InitializeComponent(PageFunctionBase pageFunction)
        {
            // Need to explicitly add a call to InitializeComponent() for Page
            IComponentConnector iComponentConnector = pageFunction as IComponentConnector;

            if (iComponentConnector != null)
            {
                iComponentConnector.InitializeComponent();
            }
        }
Example #5
0
 public override void SetConnectionId(object root, int connectionId, object instance)
 {
     try
     {
         IComponentConnector connector = root as IComponentConnector;
         if (connector != null)
         {
             connector.Connect(connectionId, instance);
         }
     }
     catch (Exception exception)
     {
         if (CriticalExceptions.IsCriticalException(exception))
         {
             throw;
         }
         throw this.CreateException(System.Xaml.SR.Get("SetConnectionId"), exception);
     }
 }
Example #6
0
        // The ordering of how things are created and which methods are called are ABSOLUTELY critical
        // Getting this order slightly off will result in several issues that are very hard to debug.
        //
        // The order must be:
        //      Register name to the TemplateNameScope (Either the real name specified by x:Name or
        //              RuntimeNameProperty or a fake name that we have to generate to call
        //              RegisterName.  This is CRUCIAL since RegisterName sets the TemplatedParent
        //              and the TemplateChildIndex on the object
        //      If we're dealing with the root, wire the object to the parent (via FE.TemplateChild
        //          if we're dealing with an FE as the container or using FEF if it's not an FE)
        //      Invalidate properties on the object
        private DependencyObject LoadOptimizedTemplateContent(DependencyObject container,
            IComponentConnector componentConnector,
            IStyleConnector styleConnector, List<DependencyObject> affectedChildren, UncommonField<Hashtable> templatedNonFeChildrenField)
        {
            if (Names == null)
            {
                Names = new XamlContextStack<Frame>(() => new Frame());
            }
            DependencyObject rootObject = null;

            if (TraceMarkup.IsEnabled)
            {
                TraceMarkup.Trace(TraceEventType.Start, TraceMarkup.Load);
            }

            FrameworkElement feContainer = container as FrameworkElement;
            bool isTemplatedParentAnFE = feContainer != null;

            TemplateNameScope nameScope = new TemplateNameScope(container, affectedChildren, this);
            XamlObjectWriterSettings settings = System.Windows.Markup.XamlReader.CreateObjectWriterSettings(_templateHolder.ObjectWriterParentSettings);
            settings.ExternalNameScope = nameScope;
            settings.RegisterNamesOnExternalNamescope = true;

            IEnumerator<String> nameEnumerator = ChildNames.GetEnumerator();

            // Delegate for AfterBeginInit event
            settings.AfterBeginInitHandler =
                delegate(object sender, System.Xaml.XamlObjectEventArgs args)
                {
                    HandleAfterBeginInit(args.Instance, ref rootObject, container, feContainer, nameScope, nameEnumerator);
                    if (XamlSourceInfoHelper.IsXamlSourceInfoEnabled)
                    {
                        XamlSourceInfoHelper.SetXamlSourceInfo(args.Instance, args, null);
                    }
                };
            // Delegate for BeforeProperties event
            settings.BeforePropertiesHandler =
                delegate(object sender, System.Xaml.XamlObjectEventArgs args)
                {
                    HandleBeforeProperties(args.Instance, ref rootObject, container, feContainer, nameScope);
                };
            // Delegate for XamlSetValue event
            settings.XamlSetValueHandler =
                delegate(object sender, System.Windows.Markup.XamlSetValueEventArgs setArgs)
            {
                setArgs.Handled = ReceivePropertySet(sender, setArgs.Member, setArgs.Value, container);
            };

            XamlObjectWriter objectWriter = _templateHolder.ObjectWriterFactory.GetXamlObjectWriter(settings);

            try
            {
                LoadTemplateXaml(objectWriter);
            }
            finally
            {
                if (TraceMarkup.IsEnabled)
                {
                    TraceMarkup.Trace(TraceEventType.Stop, TraceMarkup.Load, rootObject);
                }
            }
            return rootObject;
        }
 internal TemplateComponentConnector( IComponentConnector componentConnector, IStyleConnector styleConnector )
 {
     _styleConnector = styleConnector;
     _componentConnector = componentConnector;
 }
 // Token: 0x06002256 RID: 8790 RVA: 0x000AAC86 File Offset: 0x000A8E86
 internal TemplateComponentConnector(IComponentConnector componentConnector, IStyleConnector styleConnector)
 {
     this._styleConnector     = styleConnector;
     this._componentConnector = componentConnector;
 }
 private void Clear()
 {
     _connector = null;
     _objects.Clear();
 }
 public LoadContext(IComponentConnector connector)
 {
     _connector = connector;
 }