Skip to main content

Microsoft Silverlight

Unanswered Question Two custom controls strange debug behavior with < link to a code sample of the controls >RSS Feed

(0)

Epsilone3
Epsilone3

Member

Member

248 points

138 Posts

Two custom controls strange debug behavior with < link to a code sample of the controls >

Hi. I've have ASP project with 2 silverlight  projects attach to him.
 
One of the projects is custom control reference to another custom control:
 
Link to the code sample :
 
 
 
 
Here is some of the code...
 
 
 <My SilverLight Custom Control that reference to another *.dll CC>
 
.....
 
Namespace Screencast.SilverlightControls;
 
Namespace PyramUI
 
{
public class PyramidUI : Control
 
{
 
   private FrameworkElement PyControl; 
 
   private Screencast.SilverlightControls.GlassButton pyrmInBox = null;
 
   private Canvas PyramidMainGrid = new Canvas(); 
  
   public PyramidUI() 
 
  {
     System.IO.Stream s = this.GetType().Assembly.GetManifestResourceStream("PyramUI.PyramidUI.xaml");         
     PyControl = this.InitializeFromXaml(new System.IO.StreamReader(s).ReadToEnd());
 
  }
 
   public PyramidUI ( Rectangle ca, int _numberInsidedBox):this ()
   {
       PyramidMainGrid.Height = ca.Height; 
       PyramidMainGrid.Width = ca.Width; 
       numInsideBoxs = _numberInsidedBox;
   }
 
   public void createUInsideBoxs()
  {
  
   double _pyrmMainUIHeight = PyramidMainGrid.Height;
   
   double _pyrmMainUIWidth = PyramidMainGrid.Width;
 
   } 
 
 
 
 
//   OK this is the structure of my custom control ..in his xaml there's nothing special!   ///
//   just <Canvas...with xmlns:.. />     ////
 
  
   And here Is my TestControl :
 
 
  using PyramUI;
 
  namespace TestControls
 
 {
 
   public partial class TestControl : Canvas
 
   {
   
     private PyramidUI pyrUI;
   
     public void Page_Loaded(object o, EventArgs e)
 
    {
        // Required to initialize variables InitializeComponent();
  
       LoadCustomControl();
 
    }
 
    private void LoadCustomControl()
 
   {
  
      Rectangle rect = new Rectangle();
 
      rect.Width = 500;rect.Height = 500;
 
 
      int NumberOfBox = 6;
 
 
 
 ///  Here is my problem  !! Here I've got a break point  that when I pass here ( F10 ) the TestControl  
      windows appears and the break point don't continues to the next line …     pyrUI.createUIInsideBoxs ( ) //
 
 
      pyrUI = new PyramidUI();   /// After debugging this line a window appears. What ??
 
     pyrUI.createUInsideBoxs();
 
   }
} 
 
 
 
 
Any ideals Guys ?
 
 
10X;
 
Guy.
 

Epsilone3
Epsilone3

Member

Member

248 points

138 Posts

Re: Two custom controls strange behavior.

I just upload a sample of my project  :

                                                                               Please download the code sample from here    :

                                                                               http://myfiles.co.il/file/25179/TestControlsASP-zip.html

                                                                               Or from here :

                                                                               http://upload-il.com/file/67202/TestControlsASP.zip.html

                                                                                Or here :

                                                                                http://www.f2h.co.il/912309

                                                                               That download sites strangely goes offline : so I post it in 3 place :-).

 

 


 

Can any one tell me why the debug doesn't enter into :

pyrUI.createUInsideBoxs();  ?

 

 

Epsilone3
Epsilone3

Member

Member

248 points

138 Posts

Re: Two custom controls strange behavior.

Guy who's download my code sample . 

Even if you could not figure the  answer and got the same problem with the debug !.

Please post it here, so I know  ,that is maybe a VS 2008 problem.

10x: allot for your replies.

Guy.

 

Epsilone3
Epsilone3

Member

Member

248 points

138 Posts

Re: Two custom controls strange behavior.

Guy' 120 people and no one could solve it !! /?

It's just  a break point that don't continues to the next line that all !!! ///  :-).

Just some adding to my code sample :

Open him a web - page from the inside TestControlAsp folder..

In the VS if you don't see 3 project named

TestControlASP

PyramUI

&

TestControl

 

Please go to solution -> Add exist Project and add PyramUI & TestControl to the TestControlASP .

Then just from the TestControlASP -> Add silverlight link to both of the project and you ready to run.

 

OK silverlight master's just little break-point bug  !!!

Help me .

 

Day 3.

 

Doe's any one download the code-sampe and can tell me ...what happend ?

 

 

 

Epsilone3
Epsilone3

Member

Member

248 points

138 Posts

Re: Two custom controls strange behavior.

Guys :

 

Day 4 no :

Solution to this thread ?

 

Any one download the code ?

Please :

notify me I move back to ( XBAP  that is really great )

Because of this bug !!.

Please comment !!

 

 

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities