code_junkie

XAML designed fails to load as cannot create a custom object

Nov 13th, 2011
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. <Grid Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2">
  2. <views:PageFrame Name="Content_MainPage" Frame.NavigationUIVisibility="Hidden"/>
  3. </Grid>
  4.  
  5. public new BaseView Content
  6. {
  7. get
  8. {
  9. if (DesignerProperties.GetIsInDesignMode(this))
  10. {
  11. return new BaseView();
  12. }
  13. else
  14. {
  15. return (BaseView)base.Content;
  16. }
  17. }
  18. set
  19. {
  20. if (DesignerProperties.GetIsInDesignMode(this))
  21. {
  22. base.Content = new BaseView();
  23. FrameTitle = "design mode";
  24. }
  25. else
  26. {
  27. base.Content = value;
  28. FrameTitle = value.Title;
  29. }
  30. }
  31. }
Add Comment
Please, Sign In to add comment