Click here to Skip to main content
15,912,296 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: tv tuner and directShow Pin
gsipes1-Jul-09 2:45
gsipes1-Jul-09 2:45 
GeneralRe: tv tuner and directShow Pin
BrowniePoints6-Jul-09 6:00
BrowniePoints6-Jul-09 6:00 
GeneralRe: tv tuner and directShow Pin
gsipes8-Jul-09 3:21
gsipes8-Jul-09 3:21 
Questionhow to retrive attachment files from gmail Pin
Nekkantidivya29-Jun-09 18:33
Nekkantidivya29-Jun-09 18:33 
AnswerRe: how to retrive attachment files from gmail Pin
Pete O'Hanlon29-Jun-09 21:12
mvePete O'Hanlon29-Jun-09 21:12 
QuestionHow do I get from data bound to a row in a ListView to the UI representing the row so I can apply a style to the row? Pin
fjparisIII29-Jun-09 16:42
fjparisIII29-Jun-09 16:42 
AnswerRe: How do I get from data bound to a row in a ListView to the UI representing the row so I can apply a style to the row? (SOLVED) Pin
fjparisIII29-Jun-09 18:11
fjparisIII29-Jun-09 18:11 
QuestionControl drag and drop in Grid Pin
krishnan.s29-Jun-09 16:41
krishnan.s29-Jun-09 16:41 
QuestionOpening file search dialog in WPF with XAML Pin
David Shapira29-Jun-09 11:02
David Shapira29-Jun-09 11:02 
AnswerRe: Opening file search dialog in WPF with XAML Pin
Christian Graus29-Jun-09 11:14
protectorChristian Graus29-Jun-09 11:14 
GeneralRe: Opening file search dialog in WPF with XAML Pin
David Shapira29-Jun-09 11:27
David Shapira29-Jun-09 11:27 
GeneralRe: Opening file search dialog in WPF with XAML Pin
Christian Graus29-Jun-09 13:35
protectorChristian Graus29-Jun-09 13:35 
GeneralRe: Opening file search dialog in WPF with XAML Pin
David Shapira29-Jun-09 14:19
David Shapira29-Jun-09 14:19 
AnswerRe: Opening file search dialog in WPF with XAML Pin
gsipes30-Jun-09 3:28
gsipes30-Jun-09 3:28 
GeneralRe: Opening file search dialog in WPF with XAML Pin
David Shapira30-Jun-09 4:40
David Shapira30-Jun-09 4:40 
QuestionComboBox and Binding Pin
zlakob29-Jun-09 10:28
zlakob29-Jun-09 10:28 
AnswerRe: ComboBox and Binding Pin
User 27100929-Jun-09 15:39
User 27100929-Jun-09 15:39 
QuestionFloating control at the bottom of the web page?? Pin
Sunil P V29-Jun-09 7:44
Sunil P V29-Jun-09 7:44 
AnswerRe: Floating control at the bottom of the web page?? Pin
Mark Salsbery29-Jun-09 9:25
Mark Salsbery29-Jun-09 9:25 
GeneralRe: Floating control at the bottom of the web page?? Pin
Sunil P V30-Jun-09 5:53
Sunil P V30-Jun-09 5:53 
GeneralRe: Floating control at the bottom of the web page?? Pin
Mark Salsbery30-Jun-09 7:08
Mark Salsbery30-Jun-09 7:08 
GeneralRe: Floating control at the bottom of the web page?? Pin
Sunil P V30-Jun-09 22:15
Sunil P V30-Jun-09 22:15 
QuestionProgressBar Pin
Ranger4929-Jun-09 7:33
Ranger4929-Jun-09 7:33 
private void button1_Click(object sender, RoutedEventArgs e)
{
    Random rnd = new Random();
    Pen p = new Pen();
    byte red, green, blue;

    for (int i = 0; i < 100; i++)
    {
        SolidColorBrush brush = new SolidColorBrush();

        Line line = new Line();
        red = (byte)rnd.Next(0, 255);
        green = (byte)rnd.Next(0, 255);
        blue = (byte)rnd.Next(0, 255);
        Color col = new Color();
        col.R = red;
        col.G = green;
        col.B = blue;
        col.A = 255;
        brush.Color = col;

        line.X2 = rnd.Next(0, (int)canvas1.ActualWidth);
        line.Y2 = rnd.Next(0, (int)canvas1.ActualHeight);
        line.X1 = rnd.Next(0, (int)canvas1.ActualWidth);
        line.Y1 = rnd.Next(0, (int)canvas1.ActualHeight);
        line.Stroke = brush;
        line.StrokeThickness = 1.0;
        canvas1.Children.Add(line);

    }
}


I would like to use a ProgressBar for this loop, but when I tried it my ProgressBar only updated itself once after the loop had been completed when it went from 0% to 100%. I reckon canvas1.Children.Add(line) functions like a stack, maybe I need to override some virtual method to make the ProgessBar show progress. Could anybody here give me a hint on how to do this?

Thankyou,
Ranger.

PS, What I tried was in the i-loop a command this.progressBar.Value = i; I tried my code in a sample program that only had an i-loop that did nothing and there my progressBar worked fine...
AnswerRe: ProgressBar [modified] Pin
Mark Salsbery29-Jun-09 9:00
Mark Salsbery29-Jun-09 9:00 
GeneralRe: ProgressBar [modified] Pin
Ranger4929-Jun-09 9:33
Ranger4929-Jun-09 9:33 

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.