Code Monkey home page Code Monkey logo

sukiui's People

Contributors

auroraziling avatar bia10 avatar deepea avatar dmitrygolubenkov avatar elektrokill avatar feast107 avatar insire avatar kikipoulet avatar nixtar avatar r-yatian avatar sealoyal2018 avatar sirdoombox avatar snake-l avatar stefan-j-98 avatar wmchuang avatar ych98 avatar yjammak avatar yuzh0816 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sukiui's Issues

System.MissingFieldException after upgrading to 5.0.5

After upgrading from 5.0.4 to 5.0.5 application crashes on startup when running Release build. When launching Debug everything works.

Stack trace:

System.MissingFieldException: Field not found: 'Avalonia.Controls.Presenters.ItemsPresenter.AreVerticalSnapPointsRegularProperty'.
   at CompiledAvaloniaXaml.!AvaloniaResources.XamlClosure_324.XamlClosure_325.Build(IServiceProvider)
   at Avalonia.Markup.Xaml.XamlIl.Runtime.XamlIlRuntimeHelpers.<>c__DisplayClass1_0`1.<DeferredTransformationFactoryV2>b__0(IServiceProvider sp)
   at Avalonia.Markup.Xaml.Templates.TemplateContent.Load(Object templateContent)
   at Avalonia.Markup.Xaml.Templates.ControlTemplate.Build(TemplatedControl control)
   at Avalonia.Controls.Primitives.TemplatedControl.ApplyTemplate()
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
   at Avalonia.Layout.Layoutable.Measure(Size availableSize)
   at Avalonia.Controls.DockPanel.MeasureOverride(Size constraint)
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
   at Avalonia.Layout.Layoutable.Measure(Size availableSize)
   at Avalonia.Controls.Grid.MeasureOverride(Size constraint)
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
   at Avalonia.Layout.Layoutable.Measure(Size availableSize)
   at Avalonia.Layout.LayoutHelper.MeasureChild(Layoutable control, Size availableSize, Thickness padding, Thickness borderThickness)
   at Avalonia.Controls.Border.MeasureOverride(Size availableSize)
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
   at Avalonia.Layout.Layoutable.Measure(Size availableSize)
   at Avalonia.Layout.LayoutHelper.MeasureChild(Layoutable control, Size availableSize, Thickness padding, Thickness borderThickness)
   at Avalonia.Controls.Presenters.ContentPresenter.MeasureOverride(Size availableSize)
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
   at Avalonia.Layout.Layoutable.Measure(Size availableSize)
   at Avalonia.Layout.Layoutable.MeasureOverride(Size availableSize)
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
   at Avalonia.Layout.Layoutable.Measure(Size availableSize)
   at Avalonia.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at Avalonia.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged)
   at Avalonia.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at Avalonia.Controls.Grid.MeasureOverride(Size constraint)
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
   at Avalonia.Layout.Layoutable.Measure(Size availableSize)
   at Avalonia.Layout.Layoutable.MeasureOverride(Size availableSize)
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
   at Avalonia.Layout.Layoutable.Measure(Size availableSize)
   at Avalonia.Layout.LayoutHelper.MeasureChild(Layoutable control, Size availableSize, Thickness padding, Thickness borderThickness)
   at Avalonia.Controls.Presenters.ContentPresenter.MeasureOverride(Size availableSize)
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
   at Avalonia.Layout.Layoutable.Measure(Size availableSize)
   at Avalonia.Layout.Layoutable.MeasureOverride(Size availableSize)
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
   at Avalonia.Layout.Layoutable.Measure(Size availableSize)
   at Avalonia.Controls.Grid.MeasureOverride(Size constraint)
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
   at Avalonia.Layout.Layoutable.Measure(Size availableSize)
   at Avalonia.Layout.LayoutHelper.MeasureChild(Layoutable control, Size availableSize, Thickness padding, Thickness borderThickness)
   at Avalonia.Controls.Presenters.ContentPresenter.MeasureOverride(Size availableSize)
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
   at Avalonia.Layout.Layoutable.Measure(Size availableSize)
   at Avalonia.Layout.LayoutHelper.MeasureChild(Layoutable control, Size availableSize, Thickness padding)
   at Avalonia.Controls.Decorator.MeasureOverride(Size availableSize)
   at Avalonia.Controls.Primitives.VisualLayerManager.MeasureOverride(Size availableSize)
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
   at Avalonia.Layout.Layoutable.Measure(Size availableSize)
   at Avalonia.Controls.Grid.MeasureOverride(Size constraint)
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
   at Avalonia.Layout.Layoutable.Measure(Size availableSize)
   at Avalonia.Controls.Grid.MeasureOverride(Size constraint)
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
   at Avalonia.Layout.Layoutable.Measure(Size availableSize)
   at Avalonia.Layout.Layoutable.MeasureOverride(Size availableSize)
   at Avalonia.Controls.Window.MeasureOverride(Size availableSize)
   at Avalonia.Controls.WindowBase.MeasureCore(Size availableSize)
   at Avalonia.Layout.Layoutable.Measure(Size availableSize)
   at Avalonia.Layout.LayoutManager.Measure(Layoutable control)
   at Avalonia.Layout.LayoutManager.ExecuteInitialLayoutPass()
   at Avalonia.Controls.Window.ShowCore(Window owner)
   at Avalonia.Controls.Window.Show()
   at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.ShowMainWindow()
   at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args)
   at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(AppBuilder builder, String[] args, ShutdownMode shutdownMode)
   at D2Oracle.Avalonia.Program.Main(String[] args) in Program.cs:line 22

Libraries:
SukiUI 5.0.5
Avalonia 11.0.4

MainWindow.axaml

Question: Are you/Will you be accepting contributions?

Hey there!

I've been looking through the controls code and I have been making some tweaks to some controls to suit my needs and figured I would ask if you are accepting contributions? A bit of a heads up, I've not really contributed much to open source projects in the past so this is still a relatively new thing to me. This is a quick preview of the changes I made in an example app.

Mainly focussed around the desktop page, menuitems, and settings control:
Animation

Cheers! ๐Ÿ˜„

About SukiUI NuGet Version

Hello, I would like to know about the SukiUI NuGet version. Is the latest update only effective in the preview version? Will the stable version be updated after 3.0.0?thank you.

TimePicker and CalendarDatePicker are not styled

Description

TimePicker and CalendarDatePicker have no styling in SukiUI, and because of that these controls look very bad and noticeable. And if you use Dark theme, the controls become much less readable due to font color changes

Images

image

image

image

image

image

Maybe I'll try to add styles myself in future but I'm not an expert in any frontend things

Other things

FYI, Avalonia.Web is now obsolete and instead Avalonia.Browser should be used

WaveProgress text foreground is not updated when switch theme

In light theme the text foreground is black:
image
When I switched to dark theme, the text foreground is still black:
image
But when I changed the value of the waveprogress, the text foreground will turn to white:
image
How to make the goal that When I switch the light theme to drak theme, the text foreground will auto turn to white, instead change the value manually? Thanks.

MobileNumberPicker MVVM Support

Hello,

I've been playing around with MobileNumberPicker and am finding the lack of value change notifications a bit cumbersome.

I'm not too familiar with AvaloniaProperties but looking at the built-in controls I see they use SetAndRaise instead of SetValue for these kinds of properties.

I've cloned SukiUI and did the following changes to MobileNumberPicker.axaml.cs:

From:

    public static readonly StyledProperty<int> ValueProperty =
        AvaloniaProperty.Register<MobileNumberPicker, int>(nameof(Value), defaultValue: 5);

    public int Value
    {
        get { return GetValue(ValueProperty); }
        set { SetValue(ValueProperty, value ); }
    }

To:

    private int _value;
    
    public static readonly DirectProperty<MobileNumberPicker, int> ValueProperty =
        AvaloniaProperty.RegisterDirect<MobileNumberPicker, int>(nameof(Value), numpicker => numpicker.Value,
            (numpicker, v) => numpicker.Value = v, defaultBindingMode: BindingMode.TwoWay, enableDataValidation: true);

    public int Value
    {
        get { return _value; }
        set
        {
            SetAndRaise(ValueProperty, ref _value, value);
        }
    }

Not sure if this is the "proper" way or if this will cause other issues but it works in my narrow use case.

I see MobileNumericUpDown has the same lack of change notifications also.
Happy to put forward a PR if this is an appropriate method?

The control already has a visual parent

The window designed of suki:DesktopPage, build no error, but axmal previewer report error when changed somewhere.

The control already has a visual parent

Consider a move to making SukiWindow as the new default.

I've been experimenting locally with making a SukiWindow control and theme, removing DesktopPage and InteractiveContainer from the stack entirely, folding their features into the new SukiWindow

This change means that the NakedWindow style will be the standard for everyone, and core Window features can be depended on to exist as SukiWindow will be the base requirement for any SukiUI based app.

The move to desktop only (for what I guess will end up being a 6.0 release at this point) is a good opportunity to make major breaking changes that would make dev experience smoother, no more need for the secret sauce combination of NakedWindow class applied to a window, containing a DesktopPage with an InteractiveContainer inside.

I'm happy to work on this personally, I've got something basic running locally just need to reorganise everything, but obviously this will be a fairly significant breaking change.

Can't run cloned and/or downloaded project

Hello,

I am trying to run the demo to see what type of controls are available. I am getting some errors when trying to run any of the MobileDemo projects using VS 22.

Here is an image of the errors I am getting when running MobileDemo.Desktop (Debug) (Any CPU)
image

Any clues?

Error in preview5

System.MethodAccessException: Attempt by method 'ReaderAvalonia.App.!XamlIlPopulate(System.IServiceProvider, ReaderAvalonia.App)' to access method 'CompiledAvaloniaXaml.!AvaloniaResources.Build:/Theme/Index.xaml(System.IServiceProvider)' failed.
   at ReaderAvalonia.App.!XamlIlPopulate(IServiceProvider, App) in App.axaml:line 11
   at ReaderAvalonia.App.!XamlIlPopulateTrampoline(App)
   at ReaderAvalonia.App.Initialize() in App.axaml.cs:line 16
   at Avalonia.AppBuilder.Setup() in /_/src/Avalonia.Controls/AppBuilder.cs:line 248
   at Avalonia.AppBuilder.SetupWithLifetime(IApplicationLifetime lifetime) in /_/src/Avalonia.Controls/AppBuilder.cs:line 160
   at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(AppBuilder builder, String[] args, ShutdownMode shutdownMode) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 211

preview5 maybe modify something...

Cloned repository can't be opened without errors

Steps to reproduce

  1. Clone the repository
  2. Open the solution in IDE

Output:
image
One or more projects in the solution can't be loaded properly.

Issue

This error occurs because the Suki.sln file contains a project named SukiTest that was not commited to repository.

Solution

There are two solutions:

  1. Remove the reference to a project from commited solution.
  2. Upload the project.

I think that it will be better to upload the project to repository, because when I want to contribure, I need to test my changes. And for that I have to make a new project myself, add a reference to library project, test the changes here, and then choose only some files to commit.
Also, the test application can be used as a sample app where people can test the controls before integrating them into their own application. Many controls libraries have such apps, often named "Gallery". They show all the controls and also provide the XAML and C# code needed used in examples. Some of them are in separate repositories, but I don't think that this is needed for a sample app.

If needed, I think I could build a sample application myself and make a PR, but it will take time.

Also, I think the project should be in folder /Samples/ or something like that, because there could be a second project to show off (or test) mobile controls that are currently not present in repository, but mentioned in README.md

ComboBox button clipping

Hello,

I noticed when hovering ComboBox button it clips on margins:
image

The button doesn't follow ComboBox's CornerRadius.

With Avalonia DevTools:

ComboBox.CornerRadius: 6,6,6,6
ToggleButton.CornerRadius: 0,0,0,0

run fail

Avalonia version: 11.0.0-preview6
Error:
System.MissingMethodException: Method not found: 'Void Avalonia.Controls.Primitives.FlyoutBase.set_Placement(Avalonia.Controls.FlyoutPlacementMode)'.
at CompiledAvaloniaXaml.!AvaloniaResources.XamlClosure_175.Build(IServiceProvider)
at Avalonia.Markup.Xaml.XamlIl.Runtime.XamlIlRuntimeHelpers.<>c__DisplayClass1_0`1.b__0(IServiceProvider sp) in //src/Markup/Avalonia.Markup.Xaml/XamlIl/Runtime/XamlIlRuntimeHelpers.cs:line 37
at Avalonia.Controls.ResourceDictionary.TryGetValue(Object key, Object& value) in /
/src/Avalonia.Base/Controls/ResourceDictionary.cs:line 244
at Avalonia.Controls.ResourceDictionary.TryGetResource(Object key, ThemeVariant theme, Object& value) in //src/Avalonia.Base/Controls/ResourceDictionary.cs:line 189
at Avalonia.Styling.Styles.TryGetResource(Object key, ThemeVariant theme, Object& value) in /
/src/Avalonia.Base/Styling/Styles.cs:line 120
at Avalonia.Markup.Xaml.MarkupExtensions.StaticResourceExtension.ProvideValue(IServiceProvider serviceProvider) in /_/src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/StaticResourceExtension.cs:line 55
at CompiledAvaloniaXaml.!AvaloniaResources.Populate:/Theme/TextBoxStyles.xaml(IServiceProvider, Styles)
at CompiledAvaloniaXaml.!AvaloniaResources.Build:/Theme/TextBoxStyles.xaml(IServiceProvider)
at CompiledAvaloniaXaml.!AvaloniaResources.Populate:/Theme/Index.xaml(IServiceProvider, Styles)
at CompiledAvaloniaXaml.!AvaloniaResources.Build:/Theme/Index.xaml(IServiceProvider)
at SukiUITest.App.!XamlIlPopulate(IServiceProvider, App) in D:\code-chance\DotNetCoreStudy\SukiUITest\SukiUITest\SukiUITest\App.axaml:line 13
at SukiUITest.App.!XamlIlPopulateTrampoline(App)

Problems encountered using Groupbox

image

image

I want to achieve this effect๏ผŒ Then I made some modifications, and I think using grid is better than using stackpanel. Do you think so?

Remove/block MessageBox controls and movement

Currently the Info, Error and Success message boxes allow maximizing, resizing and dragging around.
This behavior is, especially for error messages, not desirable in my opinion.
Could optional arguments or alternatives be added in order to disallow resizing and set the MessageBox to appear on a fixed position of the screen (e.g. Center)?

Images folder contains multiple files with the same filename.

It's a minor issue, but something I can't reasonably fix pulling the repo down in Win10 because the case sensitivity of the files is broken on contact with the FileSystem, so it'd taint any PR I'd try to make.

These are the files causing issues:

  • DataGrid.gif
  • ComboBox.gif
  • TextBox.gif

As far as I can see some of these duplicates were meant as actual replacements, so I guess they could just be deleted, but just renaming them would be fine too.

ComboBoxItem not resizable

Hello,

After applying SukiUI theme to my app the ComboBox items popup seems to have a fixed size and is not resizable.
I am placing the ComboBox in a PanAndZoom.ZoomBorder which seems to resize all controls except the ComboBox items popup.

Is there anything that force the ComboBox to have that fixed size?

Stepper not styled after 5.0

Stepper not have style (or style has been changed in latest version).
In 5.0 version stepper have style on the bottom picture.
image

in 5.0 version
image

Horizontal Scrollbar is reversed

Description

Horizontal scrollbars are.. reversed?
If you move it to the start, the displayed area moves to end, and if you move it to end - the area moves in opposite direction to start

Details

image

image

Full grid:
image

This issue can also be reproduced inside a TextBox:
image

image

Reproduce

You can use this WIP project: https://github.com/DmitryGolubenkov/TempusAvalonia
Start the app and then make the window thinner. Or add a new time period using a blue button on the top and then double click ะšะพะผะผะตะฝั‚ะฐั€ะธะน in that row. Then input a long text use the horizontal scrollbar

Other

Just randomly right clicked on TextBox and discovered that it has a right click menu!
Another candidate to be styled in future

Details

image

Strange ComboBox animation behaviour

Hello!
I am getting this strange visual behaviour when opening comboboxes.
The strange thing is that the cointaining element is a grid (the gray panel with extender) so i don't see how the element could span for the whole width of the uppermost container.
Any ideas?

As a workaround, how could I disable the opening animation trying to fix it?

Thank you!

2023-12-19-15-34-29.mp4

Add title to desktop page

I think it would be a good idea to be able to add a title to the custom desktop page like we can in traditional desktop apps, i'm happy to open a PR for this, the only issue i can see with this is the menu items but it may be worth putting them on a grid column below?

Default font family name can't be null or empty

11.0.0-preview6,Linux,Unhandled exception. System.InvalidOperationException: Default font family name can't be null or empty.
at Avalonia.Media.FontManager..ctor(IFontManagerImpl platformImpl) in //src/Avalonia.Base/Media/FontManager.cs:line 37
at Avalonia.Media.FontManager.get_Current() in /
/src/Avalonia.Base/Media/FontManager.cs:line 57
at Avalonia.Media.Typeface.get_GlyphTypeface() in //src/Avalonia.Base/Media/Typeface.cs:line 87
at Avalonia.Rendering.Composition.Compositor.get_DiagnosticTextRenderer() in /
/src/Avalonia.Base/Rendering/Composition/Compositor.cs:line 43
at Avalonia.Rendering.Composition.Compositor.CreateCompositionTarget(Func`1 surfaces) in /_/src/Avalonia.Base/Rendering/Composition/Compositor.Factories.cs:line 17

Expanding Multiline Text Blocks

When creating a text block that accepts multiple lines by setting AcceptsReturn to True I'd expect it to expand it's height to fit multiple lines as this is what the default Avalonia control does. Instead, with the latest version of SukiUI (built myself from the repo) a scroll bar will appear and the text block will always stay at one line.

DatePicker control, default formatting

Not sure if I am doing something wrong here but when I use the DatePicker control with SukiUI the dropdown is not very readable, looks like the last character is getting chopped off. I am using version 4.5.3 on Linux and Windows.

The DatePicker:
datepicker1_2022-12-31_14-23

When I click the control, the dropdown opens (and works) but it is not easy to read. In order to select the date you have to scroll up or down, click on the checkbox does not select/unselect.

datepicker2_2022-12-31_14-23

preview6 error

System.MissingMethodException: Method not found: 'Void Avalonia.Controls.Primitives.FlyoutBase.set_Placement(Avalonia.Controls.FlyoutPlacementMode)'.
   at CompiledAvaloniaXaml.!AvaloniaResources.XamlClosure_175.Build(IServiceProvider)
   at Avalonia.Markup.Xaml.XamlIl.Runtime.XamlIlRuntimeHelpers.<>c__DisplayClass1_0`1.<DeferredTransformationFactoryV2>b__0(IServiceProvider sp) in /_/src/Markup/Avalonia.Markup.Xaml/XamlIl/Runtime/XamlIlRuntimeHelpers.cs:line 37
   at Avalonia.Controls.ResourceDictionary.TryGetValue(Object key, Object& value) in /_/src/Avalonia.Base/Controls/ResourceDictionary.cs:line 244
   at Avalonia.Controls.ResourceDictionary.TryGetResource(Object key, ThemeVariant theme, Object& value) in /_/src/Avalonia.Base/Controls/ResourceDictionary.cs:line 189
   at Avalonia.Styling.Styles.TryGetResource(Object key, ThemeVariant theme, Object& value) in /_/src/Avalonia.Base/Styling/Styles.cs:line 120
   at Avalonia.Markup.Xaml.MarkupExtensions.StaticResourceExtension.ProvideValue(IServiceProvider serviceProvider) in /_/src/Markup/Avalonia.Markup.Xaml/MarkupExtensions/StaticResourceExtension.cs:line 55
   at CompiledAvaloniaXaml.!AvaloniaResources.Populate:/Theme/TextBoxStyles.xaml(IServiceProvider, Styles)
   at CompiledAvaloniaXaml.!AvaloniaResources.Build:/Theme/TextBoxStyles.xaml(IServiceProvider)
   at CompiledAvaloniaXaml.!AvaloniaResources.Populate:/Theme/Index.xaml(IServiceProvider, Styles)
   at CompiledAvaloniaXaml.!AvaloniaResources.Build:/Theme/Index.xaml(IServiceProvider)

MobileTabItem can't include other view

I have a demo in https://github.com/j4587698/SukiUiTest

MainView only have a TabControl

  <TabControl Classes="MobileTabView">
      <TabItem Header="Test1" Classes="MobileTabItem">
          <views:TestView></views:TestView>
      </TabItem>
      <TabItem Header="Test2">
          <views:TestView></views:TestView>
      </TabItem>
  </TabControl>

TestView only have a string.

Run it
Test1 page is a empty page
image

Test2 page can show the string
image

Material icons not displaying

Hi,

So i am giving this a test run in an app im building, but the icons are not appearing.
Untitled

this is the code i have in the xamal


...
        xmlns:suki="clr-namespace:SukiUI.Controls;assembly=SukiUI"
...

 <suki:DesktopPage LogoKind="Abacus" LogoColor="#2f54eb">
        <StackPanel>
            <TextBlock HorizontalAlignment="Center">Eliquidate Login</TextBlock>

            <TextBox Watermark="Username" Text="{Binding Username}" />
            <TextBox Watermark="Password" Text="{Binding Password}" PasswordChar="*" />

            <Button Command="{Binding LoginCommand}" Classes="Primary" Content="Login" />
        </StackPanel>
    </suki:DesktopPage>


When SideMenu HeaderContent is empty, Menu Items can conflict with Open/Close button

Steps to reproduce

  1. Create an Avalonia application and import the library
  2. Create DesktopPage component in MainWindow
  3. Create SideMenu component inside, following instructions from readme
  4. Leave HeaderContent empty or remove it, add new MenuItems with icons or just with long text (not necessary)

Result:

The open/close sidebar button and the sidebar items get placed on the same place. Also, the sidebar button becomes unusable.

Screenshot

image
image

Workaround with current library version

Add an empty element to header. Example:

<suki:SideMenuModel.HeaderContent>
      <StackPanel Height="40"></StackPanel>
</suki:SideMenuModel.HeaderContent>

This should move the rest of elements under the button.

Linux window decoration

Under Linux (Wayland?) theres no way to hide the system title bar as far as I know. Would it be possible to change allow hiding the Close button or hide the resulting gap altogether (including the top left corner radius)?

I guess a workaround would be to just not use DesktopPage but that would also disable the (working) custom title bar under windows.

This is latest Gnome using wayland
screencap

Could not load file or assembly 'Avalonia.Visuals

  1. dotnet new -i Avalonia.Templates install Template
  2. update all nuget package to latest(now is 11-preview4)
  3. install SukiUi latest(now is 4.1.0)
  4. add <StyleInclude Source="avares://SukiUI/Theme/Index.xaml"/> to App.xaml
  5. run

It will throw

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.IO.FileNotFoundException: Could not load file or assembly 'Avalonia.Visuals, Version=0.10.13.0, Culture=neutral, PublicKeyToken=c8d484a7012f9a8b'. 
File name: 'Avalonia.Visuals, Version=0.10.13.0, Culture=neutral, PublicKeyToken=c8d484a7012f9a8b'
   at CompiledAvaloniaXaml.!AvaloniaResources.Populate:/Theme/DialogHostStyle.axaml(IServiceProvider , Styles )
   at CompiledAvaloniaXaml.!AvaloniaResources.Build:/Theme/DialogHostStyle.axaml(IServiceProvider )
   at CompiledAvaloniaXaml.!XamlLoader.TryLoad(String )
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Avalonia.Markup.Xaml.AvaloniaXamlLoader.Load(Uri uri, Uri baseUri) in /_/src/Markup/Avalonia.Markup.Xaml/AvaloniaXamlLoader.cs:line 57
   at Avalonia.Markup.Xaml.Styling.StyleInclude.get_Loaded() in /_/src/Markup/Avalonia.Markup.Xaml/Styling/StyleInclude.cs:line 54
   at Avalonia.Markup.Xaml.Styling.StyleInclude.Avalonia.Controls.IResourceProvider.AddOwner(IResourceHost owner) in /_/src/Markup/Avalonia.Markup.Xaml/Styling/StyleInclude.cs:line 98
   at Avalonia.Styling.Styles.Avalonia.Controls.IResourceProvider.AddOwner(IResourceHost owner) in /_/src/Avalonia.Base/Styling/Styles.cs:line 212
   at Avalonia.Markup.Xaml.Styling.StyleInclude.Avalonia.Controls.IResourceProvider.AddOwner(IResourceHost owner) in /_/src/Markup/Avalonia.Markup.Xaml/Styling/StyleInclude.cs:line 98
   at Avalonia.Styling.Styles.InternalAdd(IList items, IResourceHost owner, StyleCache& cache) in /_/src/Avalonia.Base/Styling/Styles.cs:line 257
   at Avalonia.Styling.Styles.OnCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e) in /_/src/Avalonia.Base/Styling/Styles.cs:line 303
   at Avalonia.Collections.AvaloniaList`1.NotifyAdd(T item, Int32 index) in /_/src/Avalonia.Base/Collections/AvaloniaList.cs:line 700
   at Avalonia.Collections.AvaloniaList`1.Add(T item) in /_/src/Avalonia.Base/Collections/AvaloniaList.cs:line 205
   at Avalonia.Styling.Styles.Add(IStyle item) in /_/src/Avalonia.Base/Styling/Styles.cs:line 173
   at testsuki.App.!XamlIlPopulate(IServiceProvider , App ) in D:\dotnet\testsuki\App.axaml:line 5
   at testsuki.App.!XamlIlPopulateTrampoline(App ) in D:\dotnet\testsuki\App.axaml:line 0
   at testsuki.App.Initialize() in D:\dotnet\testsuki\App.axaml.cs:line 11
   at Avalonia.Controls.AppBuilderBase`1.Setup() in /_/src/Avalonia.Controls/AppBuilderBase.cs:line 287
   at Avalonia.Controls.AppBuilderBase`1.SetupWithLifetime(IApplicationLifetime lifetime) in /_/src/Avalonia.Controls/AppBuilderBase.cs:line 148
   at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 208
   at testsuki.Program.Main(String[] args) in D:\dotnet\testsuki\Program.cs:line 12

Icon problems

Hello,
I recently upgraded to the latest SukiUI, but i get some sort of weird behaviour with embedded icons, for example this is an expander.

image

These are the combobox checkmarks

image

I never changed anything, used to have normal looking "plus" signs for expander and tick marks for checkboxes.
Also, reverting to the older release doesn't seem to fix the thing now.

Any ideas?
Thank you

SideMenu Clicking outside the panel [bug]

When you click outside of the side menu on the main page, the menu retracts to the smaller size like it's supposed to but doesn't change to the smaller menu when you click the arrow (so just the icons).

Updating has broken the vm

Since updating, and using the desktop page the properties in my main vm, im thinking this is because the datacontext of anything within the desktop page is now DesktopPageViewModel.cs, but im not 100% sure if this is why. but essentially i have a tab view within the desktop page and it doesn't register any of my properties for anything within the desktop page. I hope this makes sense.

Avalonia 11 RC issue

Hello, I am getting the following error with SukiUI 4.8 after upgrading to the Avalonia 11 RC packages.

image

System.MissingMethodException
HResult=0x80131513
Message=Method not found: 'Void Avalonia.Styling.StyleBase.Add(Avalonia.Styling.ISetter)'.
Source=SukiUI
StackTrace:
at CompiledAvaloniaXaml.!AvaloniaResources.Populate:/Theme/ComboBoxStyles.xaml(IServiceProvider , Styles )
at CompiledAvaloniaXaml.!AvaloniaResources.Populate:/Theme/Index.xaml(IServiceProvider , Styles )
at CompiledAvaloniaXaml.!AvaloniaResources.Build:/Theme/Index.xaml(IServiceProvider )
at Homesteadrr.App.!XamlIlPopulate(IServiceProvider , App ) in C:\Users\shayn\source\repos\homesteadrr\Homesteadrr\App.axaml:line 12
at Homesteadrr.App.!XamlIlPopulateTrampoline(App )
at Homesteadrr.App.Initialize() in C:\Users\shayn\source\repos\homesteadrr\Homesteadrr\App.axaml.cs:line 14
at Avalonia.AppBuilder.SetupUnsafe()
at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(AppBuilder builder, String[] args, ShutdownMode shutdownMode)
at Homesteadrr.Program.Main(String[] args) in C:\Users\shayn\source\repos\homesteadrr\Homesteadrr\Program.cs:line 18

Cannot open MenuItem on click

I cannot open my MenuItem "File" with my mouse but I can with a keyboard

Code:

<Window [...]
        Classes="NakedWindow Blurred">
    <suki:DesktopPage Title="OrigamiEditor"
                      MenuVisibility="True">
        <suki:DesktopPage.LogoContent>
            <Image Source="avares://OrigamiEditor/assets/logo.ico" MaxHeight="16"/>
        </suki:DesktopPage.LogoContent>
        <suki:DesktopPage.MenuItems>
                <MenuItem Header="File">
                    <MenuItem Header="Test" Foreground="{DynamicResource SukiText}" />
                    <MenuItem Header="Test" Foreground="{DynamicResource SukiText}" />
                    <MenuItem Header="Test" Foreground="{DynamicResource SukiText}" />
                    <MenuItem Header="Test" Foreground="{DynamicResource SukiText}" />
                </MenuItem>
                <MenuItem Header="Edit" Foreground="{DynamicResource SukiText}" />
                <MenuItem Header="Help" Foreground="{DynamicResource SukiText}" />
        </suki:DesktopPage.MenuItems>    
    </suki:DesktopPage>
</Window>

Actual behavior:
image

Expected behavior:
image

native aot support

This project is wonderful! But in AOT compilation, the controls are lost, mostly the information is shown as below

Trim analysis warning IL2026: SukiUI.Controls.SideMenu.XamlClosure_29.Build(IServiceProvider): Using member 'Avalonia.Markup.Xaml.MarkupExtensions.ReflectionBindingExtension.ReflectionBindingExtension(String)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. BindingExpression and ReflectionBinding heavily use reflection. Consider using CompiledBindings instead.

So I think maybe we shall change something to make it work.

P.S the official controls are just working fine.

SideMEnu Child items data context

So i have been playing with the sidemenu control and i'm unsure of how to set the data context of the child items, it could just be me.

But i have it setup like so

                <suki:SideMenu>
                    <suki:SideMenu.DataContext>
                        <suki:SideMenuModel>
                            <suki:SideMenuModel.HeaderContent>
                                <TextBlock Text="Eliquidate!"></TextBlock>
                            </suki:SideMenuModel.HeaderContent>

                            <suki:SideMenuModel.MenuItems>
                                <suki:SideMenuItem Header="Home" Icon="CircleOutline">
                                    <suki:SideMenuItem.Content>
                                        <view:HomePage />
                                    </suki:SideMenuItem.Content>
                                </suki:SideMenuItem>
                                <suki:SideMenuItem Header="Admin" Icon="Settings">
                                    <suki:SideMenuItem.Content>
                                        <view:AdminPage />
                                    </suki:SideMenuItem.Content>
                                </suki:SideMenuItem>
                            </suki:SideMenuModel.MenuItems>
                        </suki:SideMenuModel>
                    </suki:SideMenu.DataContext>
                </suki:SideMenu>

But the datacontext of both the homepage and adminpage are SideMenuModel instead of the reactiveuserobject<> i set in the codebehind.

Unable to resolve XAML Resource "Dark.axaml"

Hello,

thanks for sharing your project.

Currently i try to follow your Wiki-Guide, but when i want to load the dark theme at start-up like its mentioned in the personalization chapter i get the following error:

App.axaml(13, 23): [AVLN:0004] Unable to resolve XAML resource "avares://SukiUI/ColorTheme/Dark.axaml" in the "SukiUI" assembly. Make sure this file exists and is public. Line 13, position 23.

In my App.axaml file i include the styles like:

    <Application.Styles>
        <StyleInclude Source="avares://SukiUI/Theme/Index.xaml" />
        <StyleInclude Source="avares://SukiUI/ColorTheme/Dark.axaml" />
    </Application.Styles>

Any suggestions?

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.