Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

VS2017 Design View Not Working with Window Binding to Width or Height

$
0
0

Using either VS 2017 or Blend, the rendered XAML does not show in the design view. Can click in the empty window and will jump to elements in the Xaml file.

The rendered view had been showing without issues. As I continued to develop my program it first quit working in VS and then in Blend.

To troubleshoot, copied my solution and started hacking sections out. Finally found in the two lines of code below. Back in my full program can make the problem go away and come back with just these two lines. Also, with lines in, the program functions correctly.

<Windowx:Class="LuaFileParser.MainWindow"Width="{Binding Source={StaticResource Settings}, Path=WindowRect.Height}"Height="{Binding Source={StaticResource Settings}, Path=WindowRect.Width}">

Further testing replicates problem occurring and going away on another solution.

The original program used a setting of System.Windows.Rect. Also tried with individually saved property as double and then as int. No go. Interestingly, out of the Rect, the Top and Left are not an issue.

Top="{Binding Source={StaticResource Settings}, Path=WindowRect.Top}"Left="{Binding Source={StaticResource Settings}, Path=WindowRect.Left}"

What am I not understanding that allows the program to run successfully but not show rendered in the designer? Thanks.



Viewing all articles
Browse latest Browse all 18858

Trending Articles