-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Current Version of AdonisUI does not work (?) #17
Comments
It seems that there was no <Application x:Class="WpfApp1.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:adonisUi="clr-namespace:AdonisUI;assembly=AdonisUI"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="{x:Static adonisUi:ResourceLocator.LightColorScheme}"/>
<ResourceDictionary Source="{x:Static adonisUi:ResourceLocator.ClassicTheme}"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
If you want to see another example application, I'm currently developing one called Stein. |
In your case, the |
I agree with @nkristek . Is there a reason why you created the Regarding the warnings you receive in your resources, I can only say that they disappear as soon as I deactivate the XAML Designer. Unfortunately, the designer sometimes shows errors or warnings which are not real (much too often if you ask me). In the past I was not able to resolve those warnings but I am not willing to give up fancy features just because the designer is broken :). If someone comes up with a solution that fixes the warnings but does not involve a change of AdonisUI's interface, I will include it as well. Until then, you might have to live with the warnings, disable the XAML Designer or hope for fixes from Microsoft. The bold font you receive is set by the default style of I hope this addresses all your issues. Please let me know if you have further questions. |
Thank you for your detailed answers but i guess you misunderstood this a bit. I tried the normal WPF project structure and it did not work. (using the information given by the readme and the demo project). I uploaded the other project to show how others may implement a single AdonisUI window into their otherwise console, winforms or "another framework" wpf application. And i think you should think more about the designer instead of just avoiding it. It gives a great preview on what you are doing in xaml right now. I guess no one is really using the drag and drop gui features here. |
Ok now I understand your use case of creating a WPF window in a non-WPF application. I will add a null check in the You say you created your application the normal way first, but that didn't work either. So what did not work there? I know of at least 3 applications (plus the AdonisUI demo app) that use the current version and all of them work fine. Could you send a version of your project which does not work for you having the normal structure so we can investigate further? The XAML Designer works for me at least in normal WPF applications. It shows previews of views and applies AdonisUI's styles as it should (although they look a bit different than during runtime). It just display warnings saying that it cannot resolve resources which I don't know how to fix. Is that different for you? |
The normal application "works" when your definition of working is that errors in "design time" and a not correctly displaying designer are okay. (dont take that wrong 😃) Disclaimer: i get the normal wpf style in my designer. Did i mention that i am using Visual Studio 2017? Errors (i removed some of the auto generated lines to make it a bit shorter): <Application
xmlns:adonisUi="clr-namespace:AdonisUI;assembly=AdonisUI"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/AdonisUI;component/ColorSchemes/Dark.xaml"/>
<ResourceDictionary Source="pack://application:,,,/AdonisUI.ClassicTheme;component/Resources.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
<Application
xmlns:adonisUi="clr-namespace:AdonisUI;assembly=AdonisUI"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="{x:Static adonisUi:ResourceLocator.DarkColorScheme}"/>
<ResourceDictionary Source="{x:Static adonisUi:ResourceLocator.ClassicTheme}" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application> I am doing nothing else than creating a new WPF application using visual studio, downloading both Adonis NuGet packages, writing the <Window.Style>
<Style TargetType="Window" BasedOn="{StaticResource {x:Type Window}}"/>
</Window.Style> to the MainWindow.xaml Even if it compiles that way it's not really good that way. In regards to the other issue when using a non standard wpf window: i am hoping to see these things fixed in the future because i really liked this one and i want to use it more |
I tweaked the Now you have the option to specify a place where the AdonisUI resources live instead of public MainWindow()
{
AdonisUI.SpaceExtension.SetSpaceResourceOwnerFallback(this);
InitializeComponent();
this.MouseLeftButtonDown += (object sender, MouseButtonEventArgs e) => DragMove();
} Hope this helps. |
Thank you for your quick workarround. I will also take a look on how other ui frameworks handle this and will report back if i find a better solution. |
Hey.
The problem here is that the newest version of AdonisUI does not seem to work correctly in different projects. I also tested version 1.6 which seems to work correctly.
Also a side note that i noticed that my fonts seem to be always bold when i use AdonisUI.
I dont know if this is intended because i did not had enough time testing this UI framework.
The issues i got when starting with a new project are
When creating a new window in an existing application i got the following issues
I of course followed the examples and the instructions given in this repository.
Thank you for your time :)
The text was updated successfully, but these errors were encountered: