Git Product home page Git Product logo

avaloniaui / avalonia Goto Github PK

View Code? Open in Web Editor NEW
23.8K 466.0 2.1K 170.9 MB

Develop Desktop, Embedded, Mobile and WebAssembly apps with C# and XAML. The most popular .NET UI client technology

Home Page: https://avaloniaui.net

License: MIT License

C# 98.17% PowerShell 0.02% Shell 0.02% C++ 0.04% Objective-C++ 1.21% Objective-C 0.11% C 0.02% TypeScript 0.40% HTML 0.01% JavaScript 0.01% Batchfile 0.01%
c-sharp xaml gui avalonia avaloniaui cross-platform dotnet csharp desktop mobile

avalonia's People

Contributors

affederaffe avatar ahopper avatar amwx avatar danielmayost avatar deadpikle avatar donandren avatar emmauss avatar gillibald avatar grokys avatar jkoritzinsky avatar jmacato avatar jp2masa avatar kekekeks avatar marchingcube avatar maxkatz6 avatar mikolaytis avatar mrjul avatar ncarrillo-zz avatar pr8x avatar robloo avatar rstm-sf avatar sdoroff avatar simoncropp avatar takoooooo avatar timunie avatar tomedwardsenscape avatar wieslawsoltes avatar workgroupengineering avatar worldbeater avatar yohdeadfall 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  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

avalonia's Issues

Fix arrow keys in SelectingItemsControl

The implementation is very naive at the moment, and also not very good. My current thoughts on this:

  • Add an INavigablePanel interface.
  • In SelectingItemsControl, if the panel implements this interface, then use it to get the control to the top/left/right/bottom.
  • If not, we could do a search.

Add inherent DI support

Being that this is a new stack, it would be great is if was designed with IoC in mind from the get go.

This means ideally then runtime and all its components can be constructed via a container. Custom user components like controls could have dependencies injected as well, all via ctor injection.

I would recommend looking to Fubu MVC and also ASP.NET MVC/Web API for inspiration.

Allow styles to be attached/detached.

Currently once a style is attached to a control it is there for good. Need to allow styles to be removed from the tree, which will cause the style to be detached from all attached controls, and attached to the tree.

TextAlignment enumeration

The enum doesn't match WPF equivalent enum ("Centered" is "Center")

    public enum TextAlignment
    {
        Left,
        Centered,
        Right,
    }

Make RoutedEvent class handler an IObservable

In PerspexProperty we have a .Changed observable that fires every time a property of the type changes, and then we have .AddClassHandler to route the event to the interested class. It might be a tidier to use the same pattern on RoutedEvent rather than having .AddClassHandler directly on RoutedEvent.

Remove Splat.

We only use it for two things:

  • Service location
  • Logging

It's not particularly well suited to our needs for either.

@SuperJMN had some ideas about refactoring service location. Something will need to be done about logging.

Implement minimum size for Window.

At the moment if you create a window with a small TextBlock the window can't resize itself small enough to fit to content and a black portion of background is shown.

This is related to #24.

Add StackPanel scroll support

WPF StackPanel implements IScrollInfo thus when the user press PageDown, PageUp the content scrolls by one, need to
add some sort of scroll content to ScrollViewer, this is handled by IScrollInfo in WPF.

Wrong text rendering

I have a StackPanel with 10 buttons, as you can see the "HELLO WORLD 9" Button gets clipped, probably this is some issue with TextLayout.

wrongtext

Grid sizing is broken with Grid.ColumnSpan.

The following code:

        new Grid
        {
            ColumnDefinitions = new ColumnDefinitions
            {
                new ColumnDefinition(GridLength.Auto),
                new ColumnDefinition(new GridLength(4, GridUnitType.Pixel)),
                new ColumnDefinition(GridLength.Auto),
            },
            RowDefinitions = new RowDefinitions
            {
                new RowDefinition(GridLength.Auto),
                new RowDefinition(new GridLength(4, GridUnitType.Pixel)),
                new RowDefinition(GridLength.Auto),
                new RowDefinition(new GridLength(4, GridUnitType.Pixel)),
                new RowDefinition(GridLength.Auto),
                new RowDefinition(new GridLength(4, GridUnitType.Pixel)),
                new RowDefinition(GridLength.Auto),
            },
            Children = new Controls
            {
                new TextBlock
                {
                    Text = "Log In",
                    FontSize = 24,
                    HorizontalAlignment = HorizontalAlignment.Center,
                    [Grid.ColumnSpanProperty] = 3,
                },
                new TextBlock
                {
                    Text = "Username",
                    VerticalAlignment = VerticalAlignment.Center,
                    [Grid.RowProperty] = 2,
                },
                new TextBox
                {
                    MinWidth = 120,
                    [Grid.ColumnProperty] = 2,
                    [Grid.RowProperty] = 2,
                },
                new TextBlock
                {
                    Text = "Password",
                    VerticalAlignment = VerticalAlignment.Center,
                    [Grid.RowProperty] = 4,
                },
                new TextBox
                {
                    MinWidth = 120,
                    [Grid.ColumnProperty] = 2,
                    [Grid.RowProperty] = 4,
                },
            },
        };

Produces this:

image

The central column should be 4 pixels, but it's being stretched by the first row's Grid.ColumnSpan property. Grid was ported from Moonlight so I have no idea why it's not working.

Grid does not arrange correctly with columns Auto,*,Auto.

...and a fixed Width. Demonstrated in the issue-3-grid-problem branch.

Our Grid implementation comes from Moonlight but was converted from C++ to C#. Maybe the problem arises because that conversion missed something, but I can't see where. Perhaps the problem was also present in Moonlight.

Make AdornerLayer track adorned elements.

If an adorned control moves then the position of the adorner is not updated. This needs to be fixed by listening for movement of the adorned element and its ancestors.

Rendering system

Would it be possible to use also OpenGL as a rendering subsystem?

Which requirements are necessary for the rendering subsystem?

  • Which features should the system have?
  • What is the common denominator?
  • Is there a basic class for the rendering system?

Ever thought about retained mode and OpenGL

One of the fascinating things of wpf is is's using non effiicently but fast a retained mode and directX3D.
I was interested in making Perspex runing in an opengl window and maybe even with 10bit per channel.
Have you forseen this in one or another way?
I'd be also interested in doing it.

Tests to write

Random list of tests to write, as I think of them while doing something else...

  • Make sure TabStrip/TabControl first tab is initially selected
  • Make sure TabStrip/TabControl tabs are selected when tabs removed

Improve DropDown keyboard behavior

DropDown needs a bit of work to match the standard ComboBox keyboard behavior on Windows:

  • Arrow keys should change selection when popup not open
  • Changing selection in popup with keyboard shouldn't update selection until Enter pressed
  • Pressing Down when no selection and popup open should select first item

Implement Window.SizeToContent

Currently there is now way to just use the default window size - it's either fixed by setting Width/Height or sized to content.

Allow embedding into Perspex

I would like to embed my DirectX11 rendering widget inside the application, in WPF is done using D3DImage or WindowsForms host using interop, how would this be possible here?

Same logic goes on GTK with OpenGL.

Work out how to handle lazily-evaluated ItemsControl.Items

If a lazily-evaluated IEnumerable is assigned to ItemsControl.Items then stuff breaks, as the sequence gets re-enumerated every time the control accesses the items.

Some possible solutions:

  1. Have two separate properties as in WPF: Items and ItemsSource. This feels a little messy to me, having two properties to do essentially the same thing, and making one read-only in certain situations etc as in WPF.
  2. Change the type of Items from IEnumerable to ICollection.
  3. Throw an exception if value doesn't implement ICollection or IList etc.

@SuperJMN thoughts? Any other ideas?

Not DPI aware on Windows

I am using a 4k Monitor with dpi around 132 and the example program looks uncool, since it is scaled up.
I had a succesful try to make User32 know Perspex is DPI aware and I get it to display 1:1 (unscaled). Of course quite smallish, then.
My Idea now is to change the Window and Popup-Style to have the RenderTransform > 1.0
But how shall this be communicated through the layers. Maybe just inside the Win32Platform as a static used when Windows are opened (they also have to be larger). But the themes are elsewhere.

So what is the consensus about a global ScaleFactor-DP for the Themes?

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.