I have an issue with my XAML window in Visual Studio 2017, however the issue is only happening in one of my two projects.
I have a <grid>
in both projects and I had many rows in said grid, so in an effort to clean up my code I found https://rachel53461.wordpress.com/2011/09/17/wpf-grids-rowcolumn-count-properties/ which allows me to specify the columns and rows like this:
<Grid Common:GridHelpers.ColumnCount="2"
Common:GridHelpers.StarColumns="0"
Common:GridHelpers.RowCount="14">
...
</Grid>
Now in my program where everything works you see the following:
Now in my program where the XAML in Visual Studio is failing:
As you can see, for some reason, in one of the projects the XAML window doesn't seem to know how many rows I have defined, yet I know it works properly because in the other project it displays it as expected.
When I run the program, the grid is drawn correctly at run time, this is purely a XAML issue, but I have no error messages, no warnings, it simply doesn't draw in Visual Studio correctly for one of my two projects.
Does anyone have any ideas why Visual Studio isn't doesn't seem to realize how many rows there are defined for one project but it does for another?
I found my issue, in case someone else encounters this problem.
In my project that was having a problem, I had previously clicked the "Disable project code" in the XAML window so it wasn't executing the required custom code.
Here's an image I found on Google:
Whoops!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.