예제 #1
0
        public MultimediaControl()
        {
            _source           = new ObservableCollection <ContentItemViewModel>();
            _autoInferManager = new AutoInferManager(_source);

            _slideshowTimer       = new DispatcherTimer();
            _slideshowTimer.Tick += slideshowTimer_Tick;

            PointerPressed += MultimediaControl_PointerPressed;
            AddHandler(PointerReleasedEvent, new PointerEventHandler(MultimediaControl_PointerReleased), true);

            ItemsSource = _source;

            _windowOperationsBus    = EventBusManager.Instance.GetOrCreateBus("WindowOperationBus");
            _remoteMultimediaOpsBus = EventBusManager.Instance.GetOrCreateBus("RemoteMultimediaOpsBus");

            _remoteEventBus = EventBusManager.Instance.GetRemoteEventBus();

            _windowOperationsBus.EventBroadcasted    += WindowOperationsBus_EventBroadcasted;
            _remoteMultimediaOpsBus.EventBroadcasted += RemoteMultimediaOpsBus_EventBroadcasted;

            SelectionChanged += MultimediaControl_SelectionChanged;

            Loaded += MultimediaControl_Loaded;
        }
예제 #2
0
 public GalleryControl()
 {
     _source           = new ObservableCollection <ContentItemViewModel>();
     DefaultStyleKey   = typeof(GalleryControl);
     _autoInferManager = new AutoInferManager(_source);
 }