by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 16:27

    grokys on itemsrepeater-as-itemspresenter2

    WIP WIP WIP and 1 more (compare)

  • 16:22
    grokys opened #4470
  • 16:22

    grokys on bump-version

    Bump version to 0.10.999 for CI… (compare)

  • 15:17
    Martin005 commented #4468
  • 14:26
    grokys opened #4469
  • 14:23

    grokys on direct-property-metadata

    Move some tests. Tests for `Av… Expose OverrideMetadata for dir… Added property metadata tests. (compare)

  • 14:09
    rstm-sf synchronize #4418
  • 13:19
    xiangzhai commented #4086
  • 12:26
    Gillibald commented #4048
  • 09:52
    JaggerJo commented #4048
  • 09:44
    grokys commented #4048
  • 09:43
    grokys labeled #4048
  • 09:43
    grokys labeled #4461
  • 09:43
    grokys commented #4461
  • 09:39
    chancezheng opened #4468
  • 09:24
    kekekeks commented #4423
  • 08:57
    grokys commented #4048
  • 08:09
    mate1213 commented #4426
  • 07:57
    mate1213 commented #4426
  • 07:41
    xiangzhai commented #4086
danwalmsley
@danwalmsley
no problem, remember anytime your tempted to write code behind (.xaml.cs) to directly manipulate a control like that, just create a behavior, that way you maintain MVVM pattern, you wont run into issues later either or make your app difficult to maintain.
Jose C Gomez
@josegomez
yeah that makes a lot of sense
I was heading down the OnAttached Event, search controls, set Control.Focus() path
thank you for straightening me out
danwalmsley
@danwalmsley
behaviors are reusable, so you wont have to re-write that code over and over on every view
Jose C Gomez
@josegomez
btw is there an Avalonia built in / Sanctioned way of parsing / reading from command line params?
danwalmsley
@danwalmsley
no, but there are several nuget packages that can do that for you I beleive
Jose C Gomez
@josegomez
I ended up using Environment.CommandLine
just didn't know if there was a way to pass args[] directly into App.cs
danwalmsley
@danwalmsley
well you can pass args[] to your App class, or Viewmodel
Jose C Gomez
@josegomez
fair enough works fine just wanted to make sure I wasn't hacking my away around stuff
danwalmsley
@danwalmsley
prob Environment.CommandLine is good
Jose C Gomez
@josegomez
yeah thanks I tested it in Nix too and works. BTW WSL is working great too now so thank you again for that
I get about 2 billion angry looking warnings on console
but it works
danwalmsley
@danwalmsley
haha
Jose C Gomez
@josegomez
ok things are getting a bit hairy now LoL not even sure if this is an Avalonia specific question but throwing it out there. I have a thread that does some IPC (inter process communication) I need to from that thread to get a hold of the Window and set its focus.
var x = AvaloniaLocator.Current.GetService<MainWindow>();
I can do that and I get the Window, but when I try to set focus I get a cross thread operation error... normally this is resolved by using x.Invoke() but Window doesn't have Invoke as an option
any ideas?
Dariusz Komosiński
@MarchingCube
Dispatcher.UIThread.Post is the equivalent
same story as in WPF
Jose C Gomez
@josegomez
amazing! thank you
ahopper
@ahopper
@grokys @Gillibald Just pondering the options, svg sources will be just as verbose unless there is some type converter or they are also stored as svgimagesource resources in a resource. There are many uses where the same icon is shown repeatedly (eg a file browser) so it would be good to identify a lightweight best practice. Animation is interesting, I have always treated Drawings as effectively frozen and shareable, is there an example of an unshareable animated drawing?
Benedikt Stebner
@Gillibald
Currently Drawing isn't animatable but it should be. For loading svg assets you would just supply a uri source that is automatically converting to IImage.
ahopper
@ahopper
there is an argument for keeping Drawing non animateable for this very reason, wpf has two classes of geometry for this reason. I bet there will be people who want animateable svg :)
Chris
@Rfvgyhn
when writing unit tests for a class inAvalonia.Controls.DataGrid, should they be in a new project called Avalonia.Controls.DataGrid.UnitTests or should they go in the existing Avalonia.Controls.UnitTests project? If the former, should Avalonia.Controls.DataGrid.AssemblyInfo not expose internals to Avalonia.Controls.UnitTests?[assembly: InternalsVisibleTo("Avalonia.Controls.UnitTests")]
any suggestions?
looking to fix #2801. just not sure where to put the unit tests
Steven Kirk
@grokys
@Rfvgyhn they should probably go in Avalonia.Controls.DataGrid.UnitTests i'd say
and yeah the InternalsVisibleTo should then be changed
at one point DataGrid was in Avalonia.Controls which is why things are the way they are i imagine
Chris
@Rfvgyhn
cool, thanks
Benedikt Stebner
@Gillibald
@ahopper Drawing under Wpf is by design animatable. Avalonia and Wpf use Drawing in a different way. For Wpf Drawing is the single source of vector shapes to pass to the renderer. Under the hood everything is a Drawing. Under Avalonia Drawing just has the same name.
I think Avalonia's DrawingOperation is property WPS's Drawing
ahopper
@ahopper
@Gillibald I was really referring to wpf's shape vs geometry. That aside there are many cases where the same icon could be wanted huge numbers of times in lists etc and I'm intrigued as to the best way to do this in Avalonia. As an experiment I've added an optional DrawingImage output to iconpacks.
John Buczkowski
@SCLD-JBuczkowski
Hey Folks, new to Avalonia and new to Gitter. Is this correct forum to discuss and help resolve Avalonia issues?
Benedikt Stebner
@Gillibald
This is the right place to ask questions etc.
John Buczkowski
@SCLD-JBuczkowski
I've got an existing .NetCore UI built using DevExpress. I'm attempting to integrate this into the Avalonia platform. I've been in contact with the folks @ DevExpress and they told me that internally they are using native WPF controls internally.
In theory, is this a viable option?
I have the following pretty simple view definition:
<Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:dxnav="http://schemas.devexpress.com/winfx/2008/xaml/navigation" xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol" xmlns:dxwui="http://schemas.devexpress.com/winfx/2008/xaml/windowsui" xmlns:vm="clr-namespace:MyMvvmApp.ViewModels;assembly=MyMvvmApp" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" x:Class="MyMvvmApp.Views.MainWindow" Icon="/Assets/avalonia-logo.ico" Title="MyMvvmApp">

<dxnav:OfficeNavigationBar >
<dxnav:NavigationBarItem>One</dxnav:NavigationBarItem>
<dxnav:NavigationBarItem>Two</dxnav:NavigationBarItem>
</dxnav:OfficeNavigationBar>

</Window>
John Buczkowski
@SCLD-JBuczkowski
I get the following compile time errors:
Severity Code Description Project File Line Suppression State
Error Unable to resolve type OfficeNavigationBar from namespace http://schemas.devexpress.com/winfx/2008/xaml/navigation (line 43 position 10) Line 43, position 10. MyMvvmApp C:\avalonia\sandbox\MyMvvmAppWithDevExpress\Views\MainWindow.xaml 43
Error XAMLIL Unable to resolve type OfficeNavigationBar from namespace http://schemas.devexpress.com/winfx/2008/xaml/navigation (line 15 position 10) Line 15, position 10. MyMvvmApp C:\avalonia\sandbox\MyMvvmAppWithDevExpress\Views\MainWindow.xaml 15
I pretty much copied from existing WPF project. I'm not sure how to go about trying to figure out this issue.
Is it a namespace resolution issue?
Benedikt Stebner
@Gillibald
This will not work. The DevExpress components need to be built against Avalonia and that will require more than just a recompile.
Avalonia is very similar to WPF but not a 1:1 replacement
Splitwirez
@Splitwirez
I'm noticing there are a lot of Issue posts regarding window transparency on Windows, to many of which the response has been something to the effect of "once Windows 7 support ends, we can use DwmEnableBlurBehindWindow or DwmExtendFrameIntoClientAreato get blurred transparency on Windows". Problem is, that's straight-up incorrect - those APIs only produce blur on Windows Vista and 7. On Windows 8 and newer, they just produce an opaque solid colour, and in all cases, the affected window is, in one way, or another, coloured to match the user's Window frames. The only time you'd get blur out of those APIs on Windows 8 or newer is with that Aeroglass program installed ( http://glass8.eu/ )...surely that's not going to be required, right?
John Buczkowski
@SCLD-JBuczkowski
@Gillibald : I think we have access to the DevExpress source. If I were to be ambitious and try to rebuild DevExpress with Avalonia, are there any additional libraries/packages that I would need?
Benedikt Stebner
@Gillibald
@SCLD-JBuczkowski It depends on the API's that are being used. If they directly use DirectX to render some components like Telerik does this would be much more work. Also, Storyboards are currently not supported. I think we need some kind of compatibility check for migrating from WPF to Avalonia in the future to make this task easier.
Nikita Tsukanov
@kekekeks
I don't think that we should consider Win7 to be not supported at least until 2023...