//-------------------------------------------- private void Button_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e) { //var img = sender as Button; var pWindow = new Preview(pictures, lbPictures.SelectedIndex) { Owner = this }; //pWindow.PreviewImage.Source = img.Tag as ImageSource; pWindow.ShowInTaskbar = false; pWindow.WindowStyle = WindowStyle.ToolWindow; pWindow.ShowDialog(); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.PreviewWindow = ((PhotoGallery.Preview)(target)); return; case 2: this.iPreviewImage = ((System.Windows.Controls.Image)(target)); return; case 3: #line 32 "..\..\Preview.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonPreview_Click); #line default #line hidden return; case 4: #line 36 "..\..\Preview.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonStop_Click); #line default #line hidden return; case 5: #line 40 "..\..\Preview.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonPlay_Click); #line default #line hidden return; case 6: #line 44 "..\..\Preview.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonNext_Click); #line default #line hidden return; } this._contentLoaded = true; }