Пример #1
0
 public void AddBinding(BinderViewBase view, ViewConverterBase converter)
 {
     _binder.AddBinding("Output", view, converter);
 }
Пример #2
0
        public BinderViewBase AutoBind(object viewer, ViewConverterBase converter)
        {
            foreach (IAutoBindingFactory factory in _autoBindings)
            {
                if (factory.CanAutoBind(viewer))
                {
                    BinderViewBase view = factory.CreateView(viewer);

                    AddBinding(FixAutoBindName(factory.GetAutoBindName(viewer)), view, converter);

                    return view;
                }
            }

            throw new InvalidOperationException("No suitable autobinder was found.");
        }
Пример #3
0
 public BinderViewBase()
 {
     _converter = ViewConverterBase.Null;
 }
Пример #4
0
        public void AddBinding(string propertyName, BinderViewBase view,
            ViewConverterBase converter)
        {
            view.Converter = converter;

            EnsureControllerExistsForProperty(propertyName);

            BinderController controller = _properties[propertyName];
            controller.AddView(view);

            if (_boundTo != null) controller.ConnectBoundToObject(_boundTo);
        }