コード例 #1
0
        private void BindInterests(ViewInterest vi)
        {
            var bc = FindBindingContext(vi.View);

            foreach (var interest in vi.Interests)
            {
                interest.BindingContext = bc;
            }
        }
コード例 #2
0
 /// <summary>
 /// Utility function to locate a specific interest
 /// </summary>
 /// <param name="view">The view that has the interest</param>
 /// <param name="interestedin">The collection of <see cref="GestureInterest"/></param>
 /// <returns>A <see cref="ViewInterest"/></returns>
 internal void RegisterInterests(View view,IEnumerable<GestureInterest>interestedin )
 {
     var vi = _viewInterests.FirstOrDefault(x => x.View == view);
     if (vi == null)
     {
         vi = new ViewInterest { View = view };
         _viewInterests.Add(vi);
     }
      vi.Interests=new List<GestureInterest>(interestedin.ToList());
     BindInterests(vi);
 }
コード例 #3
0
        /// <summary>
        /// Utility function to locate a specific interest
        /// </summary>
        /// <param name="view">The view that has the interest</param>
        /// <param name="interestedin">The collection of <see cref="GestureInterest"/></param>
        /// <returns>A <see cref="ViewInterest"/></returns>
        internal void RegisterInterests(View view, IEnumerable <GestureInterest> interestedin)
        {
            var vi = _viewInterests.FirstOrDefault(x => x.View == view);

            if (vi == null)
            {
                vi = new ViewInterest {
                    View = view
                };
                _viewInterests.Add(vi);
            }
            vi.Interests = new List <GestureInterest>(interestedin.ToList());
            BindInterests(vi);
        }
コード例 #4
0
 private void BindInterests(ViewInterest vi)
 {
         var bc = FindBindingContext(vi.View);
         foreach (var interest in vi.Interests)
         {
                 if (interest.BindingContext == null)
                         interest.BindingContext = bc;
         }
 }