Beispiel #1
0
        /// <summary>
        ///     Call back -  when PagnationProvider changed
        /// <summary>
        private static void OnIndicatorProviderChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            JFlipViewIndicator indicatorControl = d as JFlipViewIndicator;

            if (indicatorControl != null)
            {
                if (indicatorControl.IndicatorProvider == null)
                {
                    JFlipView flipView = e.NewValue as JFlipView;
                    indicatorControl.SubscribeToFlipViewEvents(ref flipView);
                }
            }
        }
Beispiel #2
0
        private void SubscribeToFlipViewEvents(ref JFlipView flipView)
        {
            if (flipView == null)
            {
                throw new ArgumentException("Invalid Refrence passed in PaginatinProvider - It must be JISoft.Flipview Element");
            }
            IndicatorProvider = flipView;
            Binding selectedIndexBinding = new Binding();

            selectedIndexBinding.Path        = new PropertyPath("SelectedIndex");
            selectedIndexBinding.ElementName = "IndicatorProvider";
            selectedIndexBinding.Mode        = BindingMode.TwoWay;
            selectedIndexBinding.Source      = IndicatorProvider;
            ListViewIndicator.SetBinding(ListView.SelectedIndexProperty, selectedIndexBinding);
        }