Ejemplo n.º 1
0
        private static void OnIsSelectedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            ScatterViewItem container      = d as ScatterViewItem;
            bool            newValue       = (bool)e.NewValue;
            ScatterView     parentSelector = container._parent;

            if (newValue)
            {
                parentSelector.SetSelectedItem(container, true);
                container.RaiseEvent(new RoutedEventArgs(Selector.SelectedEvent, container));
                container.OnSelected();
            }
            else
            {
                parentSelector.SetSelectedItem(container, false);
                container.RaiseEvent(new RoutedEventArgs(Selector.UnselectedEvent, container));
                container.OnUnSelected();
            }
        }
 public ScatterViewItem(ScatterView parent)
 {
     _parent = parent;
 }
        protected override void OnInitialized(EventArgs e)
        {
            base.OnInitialized(e);
            if ((ScatterView)this.Parent != null)
                _parent = (ScatterView)this.Parent;

            if (adornerLayer == null)
                adornerLayer = AdornerLayer.GetAdornerLayer(this);
        }
Ejemplo n.º 4
0
 public ScatterViewItem(ScatterView parent)
 {
     _parent = parent;
 }