This is a migrated thread and some comments may be shown as answers.

Expression VisualTree rendering issue

3 Answers 95 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 03 Aug 2009, 05:16 PM
Hello,

I've been building a prototype (SketchFlow) SL3 application using Expression Blend 3 RTM and the Telerik RadControls for Silverlight (see exact versions at bottom).

I had the basic layout completed, packaged and had a few users look at it.  Since then, I've updated the code to load a gridview from the built-in Expression sample data tool.  However, today I've started to get some odd behavior in Expression Blend.  Two problems noticed:
  1. Headers on RadPane started disappearing in the design layout.  The corresponding XAML has the property set.  If I edit the Header property in the Properties toolpane or edit the value in the XAML, that tab's header displays in the design window until I reload the app or build it (I can send the XAML if you want to see that).
  2. An Expression design-time exception that seems to be sourced in the following XAML:

   <telerikDocking:RadDocking.DocumentHost>
    <telerikDocking:RadSplitContainer>
     <telerikDocking:RadPaneGroup>
      <telerikDocking:RadDocumentPane  Title="Welcome">
       <Grid x:Name="grdWelcome">
        <ScrollViewer Margin="8,8,8,8">
         <TextBlock TextWrapping="Wrap" FontSize="14.667"><Run FontWeight="Bold" Text="Welcome to the prototype!"/><LineBreak/><Run Text=""/></TextBlock>
        </ScrollViewer>
       </Grid>
      </telerikDocking:RadDocumentPane>
     </telerikDocking:RadPaneGroup>
    </telerikDocking:RadSplitContainer>
   </telerikDocking:RadDocking.DocumentHost>

With the above code in the page, after working with the page awhile, I get the following error in Expression (can't determine the root cause):
    at System.Windows/System.Windows.Media/VisualTreeHelper.cs
    InvalidOperationException: Reference is not a valid visual DependencyObject

At this point, my DocumentHost control (and all child controls) disappears from the Expression Objects and Timeline tree and from the design surface.  The XAML is still there.  I've tried shutting down and restarting but it's still missing.  I looked for invalid characters in the XAML but didn't find any within and around that code block.  If I cut out that block of code, and paste it back in, it reappears in the design surface but not the tree.  Selecting any part of the controls in that code block selects the parent radDocking control.  In order to get it working again, I have to remove that code block and then recreate it from the Expression Asset area. I can then build and work with the solution for a awhile (until I get the InvalidOperationException error again).

I am using:

  • Microsoft Expression Blend 3 + SketchFlow v3.0.1927.0
  • Telerik RadControls for Silverlight 2009_3_724 Trial
  • Visual Studio 2008 v9.0.30729.1 SP
  • Windows Server 2008 Standard Edition SP1

Best Regards,
Paul from Minneapolis

 

3 Answers, 1 is accepted

Sort by
0
Accepted
Miroslav Nedyalkov
Telerik team
answered on 06 Aug 2009, 07:41 AM
Hello Paul,

I wasn't able to reproduce the problem. Could you please try to summarize what you do after adding the code that causes the problem to make the Blend throw an exception? If you could send us the whole piece of XAML you would help us to figure out what the problem is. We will continue to investigate the problem.

Regards,
Miroslav Nedyalkov
the Telerik team

Instantly find answers to your questions on the newTelerik Support Portal.
Check out the tipsfor optimizing your support resource searches.
0
Paul
Top achievements
Rank 1
answered on 06 Aug 2009, 02:59 PM
Miroslav,

Thanks for the reply.  The stated problem seemed to go away on Aug 4 without knowing why.  However, in a similar vein I regularly get Silverlight parser errors, yet the project builds and runs fine.

The errors I've seen are:
1. Unexpected ATTRIBUTE in parse rule PropertyElement ::= . PROPERTYELEMENT Content? ENDTAG.. Line 1 Column 1
  and
2. Value does not fall within the expected range

From researching #1 is a problem in the XAML parsing/rendering engine that has nothing to do with Telerik controls.  Typically it can be addressed by ripping out XAML until it works, then adding it back in slowly to find the offending portion.  In my case, it worked after finding a Visibility attribute where it didn't belong. 

The #2 error continues to occasionally haunt me.  Everything renders and builds fine for awhile then at unexpected moments in Expression the UI rendering pane throws this error.  I'm guessing maybe an Attribute value it couldn't deal with?  I've fixed it by rebooting or by cutting out XAML and just pasting it back in.

I think Microsoft could improve their reporting on what lines the parser threw exceptions upon instead of defaulting to Line 1 Column 1.  Rebuilding XAML on very large pages can be very tedious.

Thanks for your support as always!
-Paul from Minneapolis
0
Accepted
Hristo
Telerik team
answered on 10 Aug 2009, 01:01 PM
Hello Paul,

Thank you for sharing your findings with us.

Please let us know if you have other questions or feedback.

Best wishes,
Hristo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Docking
Asked by
Paul
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Paul
Top achievements
Rank 1
Hristo
Telerik team
Share this question
or