I am new in C# but was a programmer many years ago. I have "played" and searched a lot to understand what's wrong here:
<Window x:Class="WpfApp1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApp1"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800" Margin="0">
<Grid>
<Border> <-- any time this is here
<Grid.Resources> <-- this gets XLS0415 + XDG0012
...
</Grid.Resources>
<Grid.RowDefinitions> <-- this gets XLS0415 + XDG0012
...
</Grid.RowDefinitions>
<Border> <-- any time this is here
<Grid.ColumnDefinitions> <-- this gets XLS0415 + XDG0012
...
</Grid.ColumnDefinitions>
<Grid.RowDefinitions> <-- this gets XLS0415 + XDG0012
...
</Grid.RowDefinitions>
</Border>
</Grid>
</Border>
</Grid>
</Window>
Where:
XLS0415 = The attachable property 'Resources' was not found in type 'Grid'.
XDG0012 = The member "Resources" is not recognized or is not accessible.
and same for RowDefinitions
and ColumnDefinitions
.
It seems only InteliSense recognizes <Border>
, while the XAML interpreter (or whatever it's called?) DOES NOT.
I've tried moving / modifying the <Border>
statements in any way I could think of, cut&pasted 3 working examples - always with the same (or similar) problems