private void SetItemBinding(SwipeListViewItem item, string origin, DependencyProperty destination)
        {
            var binding = new Binding();
            binding.Source = this;
            binding.Path = new PropertyPath(origin);

            BindingOperations.SetBinding(item, destination, binding);
        }
Example #2
0
        private void SetItemBinding(SwipeListViewItem item, string origin, DependencyProperty destination)
        {
            var binding = new Binding();

            binding.Source = this;
            binding.Path   = new PropertyPath(origin);

            BindingOperations.SetBinding(item, destination, binding);
        }
        protected override DependencyObject GetContainerForItemOverride()
        {
            var container = new SwipeListViewItem(this);
            SetItemBinding(container, "ItemLeftContentTemplate", SwipeListViewItem.LeftContentTemplateProperty);
            SetItemBinding(container, "ItemLeftBackground", SwipeListViewItem.LeftBackgroundProperty);
            SetItemBinding(container, "ItemLeftBehavior", SwipeListViewItem.LeftBehaviorProperty);

            SetItemBinding(container, "ItemRightContentTemplate", SwipeListViewItem.RightContentTemplateProperty);
            SetItemBinding(container, "ItemRightBackground", SwipeListViewItem.RightBackgroundProperty);
            SetItemBinding(container, "ItemRightBehavior", SwipeListViewItem.RightBehaviorProperty);

            return container;
        }
Example #4
0
        protected override DependencyObject GetContainerForItemOverride()
        {
            var container = new SwipeListViewItem(this);

            SetItemBinding(container, "ItemLeftContentTemplate", SwipeListViewItem.LeftContentTemplateProperty);
            SetItemBinding(container, "ItemLeftBackground", SwipeListViewItem.LeftBackgroundProperty);
            SetItemBinding(container, "ItemLeftBehavior", SwipeListViewItem.LeftBehaviorProperty);

            SetItemBinding(container, "ItemRightContentTemplate", SwipeListViewItem.RightContentTemplateProperty);
            SetItemBinding(container, "ItemRightBackground", SwipeListViewItem.RightBackgroundProperty);
            SetItemBinding(container, "ItemRightBehavior", SwipeListViewItem.RightBehaviorProperty);

            return(container);
        }