Пример #1
0
        public override IEnumerable <Binding> GetBindings(BindingRequest bindingRequest)
        {
            if (bindingRequest.ViewFolder.HasView("bindings.xml") == false)
            {
                return(new Binding[0]);
            }

            var file = bindingRequest.ViewFolder.GetViewSource("bindings.xml");

            using (var stream = file.OpenViewStream())
            {
                using (var reader = new StreamReader(stream))
                {
                    return(LoadStandardMarkup(reader));
                }
            }
        }
Пример #2
0
        public override IEnumerable <Binding> GetBindings(BindingRequest bindingRequest)
        {
            IEnumerable <Binding> enumerable;

            if (!bindingRequest.ViewFolder.HasView("bindings.xml"))
            {
                return(new Binding[0]);
            }
            using (Stream stream = bindingRequest.ViewFolder.GetViewSource("bindings.xml").OpenViewStream())
            {
                using (StreamReader reader = new StreamReader(stream))
                {
                    enumerable = base.LoadStandardMarkup(reader);
                }
            }
            return(enumerable);
        }
Пример #3
0
 public abstract IEnumerable <Binding> GetBindings(BindingRequest bindingRequest);