Giter VIP home page Giter VIP logo

avantgarde's People

Contributors

dryadxon avatar gigas002 avatar icecryptonym avatar kuiperzone avatar mimoguz avatar moucha19 avatar odalet-addup avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

avantgarde's Issues

Projects using class libraries have issues finding the Avalonia version

I have a project with a class library which seemed to cause issues for the editor when I opened it and set my App project. I managed to find a workaround but I think I narrowed down the issue.

image

The class library includes avalonia and everything else needed to run things properly but the .client.desktop project doesn't include Avalonia itself which the previewer complained about saying "Version cannot be 'null'". I managed to fix this by including Avalonia in the client.desktop project file but it would be cool if the previewer was able to find the Avalonia version the class library used.

image

It didn't seem able to resolve $(AvaloniaVersion) (to be fair I don't have any idea where this is defined either) in the project file, but I've just set the specific version.

It'd be cool if the desktop project would use the Avalonia version of the class library, and maybe also resolve the version somehow.

Thanks for the awesome project though โค

Very slow performance

Hello,

I tried using AvantGarde for my project and the UI froze a lot...

My setup:

Windows 11 x64
Intel Core i5
16GB RAM

High CPU usage on Linux

First off, this project is awesome. I mean seriously, I can't believe it isn't listed in the awesome avalonia directory. I tried Rider and didn't like it nor the price tag, and this works wonderfully with VS Code. Seriously, thank you for such an awesome application.

With that said, I have encountered one thing that I want to run by you and see if this is expected or not. I am developing what is currently a very basic UI and it works great, but the CPU usage seems to be much higher than I would expect it to be. See below for screenshot and system specs. Is this sort of CPU usage expected?

Thanks in advance!

System

CPU: AMD Ryzen 5 3600 (6 core)
RAM: 16 GB DDR4
OS: Linux Mint 21

flip@magneto:~$ dotnet --info
.NET SDK:
 Version:   7.0.100
 Commit:    e12b7af219

Runtime Environment:
 OS Name:     linuxmint
 OS Version:  21
 OS Platform: Linux
 RID:         linux-x64
 Base Path:   /usr/share/dotnet/sdk/7.0.100/

Host:
  Version:      7.0.0
  Architecture: x64
  Commit:       d099f075e4

.NET SDKs installed:
  7.0.100 [/usr/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 7.0.0 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 7.0.0 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  DOTNET_ROOT       [/usr/share/dotnet]

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

Screenshots

image
image

Last but definitely not least, is there somewhere I can donate as a "thank you" for the work you've already put into this? I checked the README and open collective and didn't find anything.

Preview fails with bound dimensions

Subject

Preview fails if the dimensions of the control cannot be directly obtain from the XML by converting the attribute value to a number (e.g. when the value is bound to a data model variable).

Details

If the preview-able control has Width / MinWidth / MaxWidth and / or Height / MinHeight / MaxHeight bound to a data model variable, not just simple numbers in the XML, the preview fails with the error The input string '{Binding Path=ViewWidth}' was not in a correct format.

Screenshot

preview-fails-with-dimension-bound

Proposed solution (workaround?)

The following patch fixes the issue for me:

diff --git a/AvantGarde/Loading/PreviewFactory.cs b/AvantGarde/Loading/PreviewFactory.cs
index 898068a..afdbeb7 100644
--- a/AvantGarde/Loading/PreviewFactory.cs
+++ b/AvantGarde/Loading/PreviewFactory.cs
@@ -73,8 +73,16 @@ namespace AvantGarde.Loading
                             var root = doc.Root ?? throw new XmlException("No root element");
                             _source.DesignWidth = ParseOrNaN(GetLocalAttribute(root, "DesignWidth")?.Value, "DesignWidth");
                             _source.DesignHeight = ParseOrNaN(GetLocalAttribute(root, "DesignHeight")?.Value, "DesignHeight");
-                            _source.Width = GetDimension(root, "Width", "MinWidth", "MaxWidth");
-                            _source.Height = GetDimension(root, "Height", "MinHeight", "MaxHeight");
+
+                            try {
+                               _source.Width = GetDimension(root, "Width", "MinWidth", "MaxWidth");
+                               _source.Height = GetDimension(root, "Height", "MinHeight", "MaxHeight");
+                            }
+                            catch(Exception e) {
+                               _source.Width = ControlDimension.Empty;
+                               _source.Height = ControlDimension.Empty;
+                               Debug.WriteLine("Cannot get view dimensions (width and / or height); " + e.Message);
+                            }
 
                             Debug.WriteLine("Root Name: " + root.Name.LocalName);
 

Note: If the above patch looks technically offending :-) please take into consideration I don't have any previous experience with the AvantGarde source code, and I only spent about 5 minutes investigating the problem.

Thank you

Please allow me to take this opportunity to thank you and express my infinite gratitude for developing this indispensable tool.

Issue with dotnet cli on MacOSX

I cloned the source code and build for MacOSX-Arm64 (using the m2 macbook pro).

The issue is as appears in the photo, every preview shows this error message, it is independent of the location of the executable of AvantGarde, and the project location.

There is also no way that I've found to configure location of the dotnet cli.

SCR-20231209-lukz

Avant Garde blocks project from building

Avant Garde blocks project from building for me.
It seems that to reproduce this issue you need to open solution in Avant Garde, open a view to preview and then make some change to xaml code. After that C# project is no longer buildable giving this error message.

The process cannot access
the file 'C:\Users\Kacper\RiderProjects\MyApp\MyApp\bin\Debug\net7.0\MyApp.dll' because it is being used by another pro
cess.

OS: Windows 11

It would really be nice if I could compile my project without closing Avant Garde.

Works on MacOS

This isn't an actual issue but I wanted to let you know that I cloned the code and built on MacOS (Intel CPU) and so far, it seems to be working! I haven't tried anything too advanced, but it previews a newly created Avalonia project fine.

This is pretty awesome. I didn't want to buy Rider to have axaml previews while developing on my Mac and this looks like it will solve that problem!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.