473,326 Members | 2,255 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

WPF usercontrol wont work.

The problem im having is that when i try to set the property "Percentage" in a separate project it wont set the property.

Heres the source code of both projects:

UIProgressBar - This is the Usercontrol
Expand|Select|Wrap|Line Numbers
  1.  Public Class UIProgressBar
  2.     Public Property Percentage
  3.         Get
  4.             Return ReturnPercentageWork()
  5.         End Get
  6.         Set(ByVal value)
  7.             SetPercentageWork(value)
  8.         End Set
  9.     End Property
  10.     Private Function ReturnPercentageWork()
  11.         Dim Percentage_Return As Boolean = FillRec.Width / 2
  12.         Return Percentage_Return
  13.     End Function
  14.     Private Sub SetPercentageWork(ByVal value As Double)
  15.         Dim Percentage_Set As Double = value * 2
  16.         FillRec.Width = Percentage_Set
  17.     End Sub
  18. End Class
  19.  
This is the other project:
Expand|Select|Wrap|Line Numbers
  1. Class MainWindow 
  2.  Private Sub MainWindow_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded
  3.         Dim UIPB As New UICore.UIProgressBar
  4.         UIPB.Percentage = 100
  5.         Grid1.Children.Add(UIPB)
  6.     End Sub
  7.  Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button1.Click
  8.     End Sub
  9. End Class
  10.  
Please help if you can. :)
Sep 28 '10 #1
0 983

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Oliver Spiesshofer | last post by:
Hi, I have a script that calls an fopen() on an external URL. I can run the script from the server as an url fine. When however the script should be run from crontab, it does not work. I get ...
5
by: Catherine | last post by:
I am having a problem viewing asp pages on iis version 5.1 xp pro. HTML pages are viewable on http://localhost but .asp pages are not. I have created a test program called timetest.asp with the...
19
by: Allen Thompson | last post by:
sorry for the simple question, haven't done this in a while. when I use the following script it keeps displaying the value of "x" like a string. for example, if I type the number 7 in the prompt,...
0
by: Sebastian Sosna | last post by:
Hi there! iam trying a code snippet from MSDN heres the link : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netdir/netds/creating_groups.asp ive tried the code but it...
7
by: Christine | last post by:
My code has a split function that should split the text file of numbers. I've run this in previous programs as it is here and it worked, but now it wont work for some reason and returns...
1
by: Gary | last post by:
I have the following in my web.config.... <customErrors mode="RemoteOnly" defaultRedirect="Applicationerror.aspx"/> but, my error page does not display. Instead a 'Runtime Error' page...
14
by: squash | last post by:
The following code works fine in Firefox/Netscape but wont work in IE. I suspect the problem is with one of these two simple functions. If there is no obvious error Ill paste the entire code. ...
8
by: Mark12345 | last post by:
Hi folks, thanks for looking. I have a database that takes down order details. Each customer has there own priceid in the price table. the errors that I get say enter parameter value for:...
2
by: jcollins1991 | last post by:
im trying to make a program thats supposed to check whether 2 strings are anagrams of each other (anagram = same letters in both strings, but in different orders... "cool as wet art" , and "cs at...
2
by: Admiral | last post by:
Hi, Anyone knows how this works? I have made a textbox called Editbox1 and 10 buttons. b0, b1, b2 etc. What i want to do is when i press a button, b1 for example, a number 1 appears into...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.