Click here to Skip to main content
15,919,434 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Image loading Pin
Pete O'Hanlon28-Jul-09 1:41
mvePete O'Hanlon28-Jul-09 1:41 
GeneralRe: Image loading Pin
#realJSOP28-Jul-09 12:30
professional#realJSOP28-Jul-09 12:30 
GeneralRe: Image loading Pin
Pete O'Hanlon28-Jul-09 21:35
mvePete O'Hanlon28-Jul-09 21:35 
AnswerRe: Image loading Pin
Christian Graus27-Jul-09 23:33
protectorChristian Graus27-Jul-09 23:33 
GeneralRe: Image loading Pin
Jacquers28-Jul-09 0:20
Jacquers28-Jul-09 0:20 
GeneralRe: Image loading Pin
Christian Graus28-Jul-09 11:13
protectorChristian Graus28-Jul-09 11:13 
QuestionParametrize WPF code generator Pin
califax2k26-Jul-09 22:43
califax2k26-Jul-09 22:43 
QuestionCan't find System.ServiceModel.Syndication Pin
Nekkantidivya26-Jul-09 21:50
Nekkantidivya26-Jul-09 21:50 
AnswerRe: Can't find System.ServiceModel.Syndication Pin
Pete O'Hanlon26-Jul-09 22:38
mvePete O'Hanlon26-Jul-09 22:38 
AnswerRe: Can't find System.ServiceModel.Syndication Pin
Pete O'Hanlon27-Jul-09 1:50
mvePete O'Hanlon27-Jul-09 1:50 
Questionselecting iterms from Listbox and displaying in ListView using C#, XAML Pin
Krishna Aditya26-Jul-09 21:01
Krishna Aditya26-Jul-09 21:01 
AnswerRe: selecting iterms from Listbox and displaying in ListView using C#, XAML Pin
Christian Graus26-Jul-09 21:52
protectorChristian Graus26-Jul-09 21:52 
QuestionWPF: Window 7 CustomWindowManager for UserControl [Help] Pin
Kunal Chowdhury «IN»26-Jul-09 20:16
professionalKunal Chowdhury «IN»26-Jul-09 20:16 
AnswerRe: WPF: Window 7 CustomWindowManager for UserControl [Solved] Pin
Kunal Chowdhury «IN»26-Jul-09 21:16
professionalKunal Chowdhury «IN»26-Jul-09 21:16 
QuestionListView selecteditem Pin
Jacob Dixon26-Jul-09 15:23
Jacob Dixon26-Jul-09 15:23 
QuestionProblems Merging a MediaPlayer SL2Gallery Template into an Existing SL 2 App Pin
SBJ26-Jul-09 7:50
SBJ26-Jul-09 7:50 
AnswerRe: Problems Merging a MediaPlayer SL2Gallery Template into an Existing SL 2 App Pin
Michael Sync28-Jul-09 6:04
Michael Sync28-Jul-09 6:04 
GeneralRe: Problems Merging a MediaPlayer SL2Gallery Template into an Existing SL 2 App Pin
SBJ28-Jul-09 12:32
SBJ28-Jul-09 12:32 
GeneralRe: Problems Merging a MediaPlayer SL2Gallery Template into an Existing SL 2 App Pin
Michael Sync29-Jul-09 5:12
Michael Sync29-Jul-09 5:12 
GeneralRe: Problems Merging a MediaPlayer SL2Gallery Template into an Existing SL 2 App Pin
SBJ11-Aug-09 15:31
SBJ11-Aug-09 15:31 
QuestionHow to build a WPF report for WPF application ? Pin
error197926-Jul-09 6:19
error197926-Jul-09 6:19 
AnswerRe: How to build a WPF report for WPF application ? Pin
Sperneder Patrick26-Jul-09 7:46
professionalSperneder Patrick26-Jul-09 7:46 
AnswerRe: How to build a WPF report for WPF application ? Pin
Pete O'Hanlon26-Jul-09 10:25
mvePete O'Hanlon26-Jul-09 10:25 
QuestionBackGroundWorker In WPF Problem Pin
Member 306874125-Jul-09 14:56
Member 306874125-Jul-09 14:56 
This is very basic BackgroundWorker Example but I dont know why the progress bar run 2 times. It should run only 1 time. anyone can help me.

Imports Microsoft.VisualBasic
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Text
Imports System.Threading
Imports System.Windows
Imports System.Windows.Controls
Imports System.Windows.Data
Imports System.Windows.Documents
Imports System.Windows.Input
Imports System.Windows.Media
Imports System.Windows.Media.Imaging
Imports System.Windows.Shapes


Namespace WindowsApplication1
	

	Partial Public Class Window1
		Inherits System.Windows.Window
        Private WithEvents _worker As BackgroundWorker
		Public Sub New()
			InitializeComponent()
		End Sub

		Private Sub StartWorker(ByVal sender As Object, ByVal e As RoutedEventArgs)

		End Sub

        

		Private Sub button1_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
            _worker = New BackgroundWorker()
			_worker.WorkerReportsProgress = True
			_worker.WorkerSupportsCancellation = True

            AddHandler _worker.DoWork, AddressOf DoWorkEventHandler


            AddHandler _worker.ProgressChanged, AddressOf ProgressChangedEventHandler
            AddHandler _worker.RunWorkerCompleted, AddressOf RunWorkerCompletedEventHandler
			_worker.RunWorkerAsync()
			_btnStart.IsEnabled = False
			_btnCancel.IsEnabled = True
		End Sub
		
		
        Private Sub DoWorkEventHandler(ByVal s As Object, ByVal args As DoWorkEventArgs) Handles _worker.DoWork
            Dim worker As BackgroundWorker = TryCast(s, BackgroundWorker)
            For i As Integer = 0 To 4
                If worker.CancellationPending Then
                    args.Cancel = True
                    Return
                End If
                Thread.Sleep(100)
                worker.ReportProgress(i + 1)
            Next i
        End Sub
		
        Private Sub ProgressChangedEventHandler(ByVal s As Object, ByVal args As ProgressChangedEventArgs) Handles _worker.ProgressChanged
            _progressBar.Value = args.ProgressPercentage

        End Sub
		
        Private Sub RunWorkerCompletedEventHandler(ByVal s As Object, ByVal args As RunWorkerCompletedEventArgs) Handles _worker.RunWorkerCompleted
            _btnStart.IsEnabled = True
            _btnCancel.IsEnabled = False
            _progressBar.Value = 0

        End Sub
        Private Sub CancelWorker(ByVal sender As Object, ByVal e As RoutedEventArgs)
            _worker.CancelAsync()
        End Sub
	End Class
End Namespace

AnswerRe: BackGroundWorker In WPF Problem Pin
Mark Salsbery27-Jul-09 5:21
Mark Salsbery27-Jul-09 5:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.