Need help with WPF coding

Need help with WPF coding

Postby Leeizazombie » 18 Jul 2013, 14:31

Hey i'm new to making these WPF applications, and I was wondering, how do I link my progressbar to my webbrowser? I know how to set up the web browser, but when I click links the progress bar should be there to show the user its working right? so how? o.o
Owner of:
LeeIzaZombie Freebuild and Lava Survival V2 (Shut Down and updated)
LeeIzaZombie Survival (Comming back soon)

Contact:
Skype: leeizazombie
IRC: irc.geekshed.net, #leeizazombie, #mcclassichosting
User avatar
Leeizazombie
 
Posts: 536
Joined: 10 Jun 2013, 17:45
Location: Ireland.

Re: Need help with WPF coding

Postby Leeizazombie » 18 Jul 2013, 16:00

also I get an error using this:
Code: Select all
  do
            {
               
            } while (chat <= 0);

            string content = new System.Net.WebClient().DownloadString("http://www.leestorage.99k.org/setting/news.txt");
            {
                Thread.Sleep(1000);
                Chat_Box.Text(content);
            }
            }     


Im trying to change the text from my text box with the file on the website, for some reason the .Text part has an error:
Code: Select all
Non-invocable member 'System.Windows.Controls.TextBox' cannot be used like a mothod.
Owner of:
LeeIzaZombie Freebuild and Lava Survival V2 (Shut Down and updated)
LeeIzaZombie Survival (Comming back soon)

Contact:
Skype: leeizazombie
IRC: irc.geekshed.net, #leeizazombie, #mcclassichosting
User avatar
Leeizazombie
 
Posts: 536
Joined: 10 Jun 2013, 17:45
Location: Ireland.

Re: Need help with WPF coding

Postby Breakdown901 » 18 Jul 2013, 16:06

I've never used WPF language before, but try putting "string = content" and the rest of the string, in the same bit as the Thread.Sleep and Chat box, put it above them though.
Owner of:
Breakdown901 Lava Survival/Zombie Survival/Freebuild
Host of NeonGaming Lava Survival.
Breakdown901
 
Posts: 320
Joined: 24 May 2013, 12:54

Re: Need help with WPF coding

Postby ismellike » 18 Jul 2013, 16:44

Leeizazombie wrote:Im trying to change the text from my text box with the file on the website, for some reason the .Text part has an error:


do Chat_Box.Text=content;

Breakdown901 wrote:I've never used WPF language before, but try putting "string = content" and the rest of the string, in the same bit as the Thread.Sleep and Chat box, put it above them though.


Windows Presentation Foundation is c#, except with something called XAML (zammel).
It's just like a newer WinForms.

Leeizazombie wrote:Hey i'm new to making these WPF applications, and I was wondering, how do I link my progressbar to my webbrowser? I know how to set up the web browser, but when I click links the progress bar should be there to show the user its working right? so how? o.o


I recommend you check this website out. [Here]
Instead of the messagebox showing, you can make it start the progressbar.
Idk how to sync the progressbar with progress though :/
What a beast...
User avatar
ismellike
Coder
 
Posts: 731
Joined: 31 Oct 2012, 04:04
Location: Kansas

Re: Need help with WPF coding

Postby Leeizazombie » 18 Jul 2013, 17:04

Thank you so much!
Owner of:
LeeIzaZombie Freebuild and Lava Survival V2 (Shut Down and updated)
LeeIzaZombie Survival (Comming back soon)

Contact:
Skype: leeizazombie
IRC: irc.geekshed.net, #leeizazombie, #mcclassichosting
User avatar
Leeizazombie
 
Posts: 536
Joined: 10 Jun 2013, 17:45
Location: Ireland.

Re: Need help with WPF coding

Postby Leeizazombie » 19 Jul 2013, 16:43

Aslo I have a problem trying to make my browser go to a URL that was entered in a textbox, here is my attempt:
Code: Select all
private void searchUrl(object sender, RoutedEventArgs e)
        {
            String URLcontent = webaddress.Text;
            browser.Navigate(URLcontent);
        }


webaddress is the name of my textbox, and the code is activate by clicking the search button.
Owner of:
LeeIzaZombie Freebuild and Lava Survival V2 (Shut Down and updated)
LeeIzaZombie Survival (Comming back soon)

Contact:
Skype: leeizazombie
IRC: irc.geekshed.net, #leeizazombie, #mcclassichosting
User avatar
Leeizazombie
 
Posts: 536
Joined: 10 Jun 2013, 17:45
Location: Ireland.


Return to Off-Topic

Who is online

Users browsing this forum: No registered users and 1 guest

cron