Home > OS >  The type 'StackPanel' was not found in Visual Studio for Mac
The type 'StackPanel' was not found in Visual Studio for Mac

Time:07-29

Photos of the code: Open project references

Add PresentationFramework

If that doesn't help read this post and it's comment: The type was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built

Try adding the reference in your code with something like this

<Window x:Class="YourClassName"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="StackPanel" Height="160" Width="300">

Some links:

https://www.infragistics.com/help/wpf/adding-assembly-to-a-visual-studio-project

https://wpf-tutorial.com/panels/stackpanel/

https://docs.microsoft.com/en-us/dotnet/desktop/wpf/advanced/xaml-namespaces-and-namespace-mapping-for-wpf-xaml?view=netframeworkdesktop-4.8

Hope these can help explain a bit more

  • Related