These are chat archives for AvaloniaUI/Avalonia

16th
Dec 2015
danwalmsley
@danwalmsley
Dec 16 2015 09:31
@grokys iv put my findings so far in logical tree over at avalonstudio room
danwalmsley
@danwalmsley
Dec 16 2015 10:05
@grokys I would like to implement some kind of extension system in AvalonStudio... basically for different project types..
this will mean that a dll will be provided and the program will see the dll and load it
Nikita Tsukanov
@kekekeks
Dec 16 2015 10:05
Mono.Addins
danwalmsley
@danwalmsley
Dec 16 2015 10:06
the dll will inject new menus and context options for that project type
is it possible to have a menuitems injected into an existing perspex menu?
view and viewmodel
@kekekeks thanks will have a look...
Nikita Tsukanov
@kekekeks
Dec 16 2015 10:06
Bind it to something observable
danwalmsley
@danwalmsley
Dec 16 2015 10:07
will that mean having the menu provide a content presenter...?
or just have extensions inherit from menuitemviewmodel or something like that?
Nikita Tsukanov
@kekekeks
Dec 16 2015 10:08
Ehm
That's not how addins work
Usually you provide addin with a set of interfaces to use or implement
danwalmsley
@danwalmsley
Dec 16 2015 10:08
ok
Nikita Tsukanov
@kekekeks
Dec 16 2015 10:08
So there will be IShell, IMainMenu, etc
danwalmsley
@danwalmsley
Dec 16 2015 10:09
ok
@kekekeks if you see this screenshot for example
blob
the entire layout and view of that page
would come from an extension
Nikita Tsukanov
@kekekeks
Dec 16 2015 10:10
I recommend you to see how it's done in MonoDevelop/Visual Studio
danwalmsley
@danwalmsley
Dec 16 2015 10:10
the extension wont just be providing an extra option on that page... so the extension will need to provide some xaml right?
Nikita Tsukanov
@kekekeks
Dec 16 2015 10:11
Yep, it should provide user control
danwalmsley
@danwalmsley
Dec 16 2015 10:11
ok I will do a little more research
Nikita Tsukanov
@kekekeks
Dec 16 2015 10:11
To be inserted as a tab page or as an elemen in existing one
Nikita Tsukanov
@kekekeks
Dec 16 2015 10:12
In case of menus it's simple, since MenuItem can be represented by
public class MenuItem
{
     public ICommand Command;
     public string Text;
}
danwalmsley
@danwalmsley
Dec 16 2015 10:23
@kekekeks @grokys thanks for this guys
@grokys are MEF and Prism something you use together
or are they 2 different solutions to the same problem?
Steven Kirk
@grokys
Dec 16 2015 10:25
i think they have 2 slightly different purposes
Prism is kinda like a MVVM framework too
MEF i believe is more general
danwalmsley
@danwalmsley
Dec 16 2015 10:26
ah ok so MEF I can use for loading assemblies and extracting the extensions, etc....
Steven Kirk
@grokys
Dec 16 2015 10:26
i think (though i may be wrong) that VS uses MEF
danwalmsley
@danwalmsley
Dec 16 2015 10:26
the Prism helps me with the mvvm parts of integrating the extension
ok... im sure this is going to exponentially explode the complexity of my app... but it has to be done
Steven Kirk
@grokys
Dec 16 2015 10:26
yeah, possibly - i'm not an expert on either though, so take what i say with a pinch of salt
danwalmsley
@danwalmsley
Dec 16 2015 10:27
thanks, though Id never heard of mef so it gives me that starting point i needed
José Manuel Nieto
@SuperJMN
Dec 16 2015 12:52

i think (though i may be wrong) that VS uses MEF

Visual Studio DOES USE MEF

you're right :)

ah ok so MEF I can use for loading assemblies and extracting the extensions, etc....

MEF can create catalogs of objects in runtime, for instance

it can populate catalogs and have it inject "services" view constructor to your classes
I have used it with a great success in the past
danwalmsley
@danwalmsley
Dec 16 2015 12:54
@SuperJMN just going through long tutorials now
José Manuel Nieto
@SuperJMN
Dec 16 2015 12:54
however, if offers nothing that you cannot do with Unity or Castle Windsor
danwalmsley
@danwalmsley
Dec 16 2015 12:54
this is going to make AvalonStudio really powerful
what would you recommend?
basically I want to end up with an ide that is like a shell
and people can create plugins
José Manuel Nieto
@SuperJMN
Dec 16 2015 12:55
you can use MEF, it will serve your purpose really well
danwalmsley
@danwalmsley
Dec 16 2015 12:55
and all functionality is provided with plugins
like c/c++ compilers, language support, git integration, debugging tools
all provided by seperate plugins
José Manuel Nieto
@SuperJMN
Dec 16 2015 12:56
you just have to decorate the classes with Import Export
danwalmsley
@danwalmsley
Dec 16 2015 12:56
then people can create a re-badged ide that suits their platform just by providing the right plugins
José Manuel Nieto
@SuperJMN
Dec 16 2015 12:56
and use [ImportingConstructor] to have your components injected
danwalmsley
@danwalmsley
Dec 16 2015 12:56
ok cool
José Manuel Nieto
@SuperJMN
Dec 16 2015 12:56
feel free to ask me
:)
danwalmsley
@danwalmsley
Dec 16 2015 12:56
so no advantage / disadvantage to using any of the others?
@SuperJMN thanks mate.. this is all really great stuff
José Manuel Nieto
@SuperJMN
Dec 16 2015 12:57
no, but it's easy to use and doesn't really need a lot of configuration
danwalmsley
@danwalmsley
Dec 16 2015 12:57
did you try compiling application in VitalElement studio other day, did it work for you?
ok so sounds like MEF is the way to go
José Manuel Nieto
@SuperJMN
Dec 16 2015 12:57
continued in private!
danwalmsley
@danwalmsley
Dec 16 2015 12:57
:D
Nikita Tsukanov
@kekekeks
Dec 16 2015 13:42
@danwalmsley consider porting gemini
danwalmsley
@danwalmsley
Dec 16 2015 13:42
gemini?
Nikita Tsukanov
@kekekeks
Dec 16 2015 13:42
it already has extensibility that you need
danwalmsley
@danwalmsley
Dec 16 2015 13:43
oh yeh
i remember
danwalmsley
@danwalmsley
Dec 16 2015 13:43
well it was already quite similar to what I had in VitalElement studio
in that its based on AvalonDock and AvalonEdit
so yeh might be a good idea
thanks for pointer
didnt realise it had mef support already
Wiesław Šoltés
@wieslawsoltes
Dec 16 2015 14:00
@grokys Is issue Perspex/Perspex#365 hard to fix, I would like test latest fixes to OmniXaml made by @SuperJMN but this issue will make it much harder
Steven Kirk
@grokys
Dec 16 2015 14:00
i can take a look later - it shouldn't be so hard
like i said, it should already work
Wiesław Šoltés
@wieslawsoltes
Dec 16 2015 15:17

@grokys Does Perspex support setting attached property

        public static readonly PerspexProperty<BehaviorCollection> BehaviorsProperty =
            PerspexProperty.RegisterAttached<Interaction, PerspexObject, BehaviorCollection>("Behaviors");

where Value is collection:

       public sealed class BehaviorCollection : PerspexList<PerspexObject>
Steven Kirk
@grokys
Dec 16 2015 15:18
it should do yeah
Wiesław Šoltés
@wieslawsoltes
Dec 16 2015 15:21
I think the issue I'm having is doing this in Xaml
danwalmsley
@danwalmsley
Dec 16 2015 15:29
@kekekeks did you manage to add support for maximize, minimize and restore when working Window stuff?
Amer Koleci
@amerkoleci
Dec 16 2015 16:48
@danwalmsley Nice stuff around AvalonStudio
@danwalmsley did you managed to support docking and editing like AvalonEdit features?
danwalmsley
@danwalmsley
Dec 16 2015 17:20
@amerkoleci the editor is nearly there
its a cut down port of avalonedit
so doesnt support everything
but the important features for me are there
and @ImaBrokeDude is working on a Docking system
would be nice if you have any ideas
my wpf version used avalon edit and avalon dock and they work perfectly.
Darnell Williams
@Seeker1437
Dec 16 2015 17:59
Hi! yeah I have beem working on the docking system, it is really neat and will be a nice too to have.
Amer Koleci
@amerkoleci
Dec 16 2015 18:28
@danwalmsley @ImaBrokeDude Soon I'll start moving my editor to Perspex and see whats will happen, I'm using WPF and Gemini framework
@danwalmsley @ImaBrokeDude with MEF of course
danwalmsley
@danwalmsley
Dec 16 2015 18:29
@amerkoleci what is your project can I see?
id be very happy to use your editor once ported
Amer Koleci
@amerkoleci
Dec 16 2015 18:30
@danwalmsley I'm working on game engine
@danwalmsley Entire core and rendering, physics is written in C++
danwalmsley
@danwalmsley
Dec 16 2015 18:30
ah ok
Amer Koleci
@amerkoleci
Dec 16 2015 18:30
@danwalmsley but editor is WPF atm
danwalmsley
@danwalmsley
Dec 16 2015 18:30
im wondering about porting Gemini to Perspex
Amer Koleci
@amerkoleci
Dec 16 2015 18:30
@danwalmsley But i would love to have cross platform support for editors too
@danwalmsley Would be neat, but not so easy, you need to port Caliburn.Micro first
@danwalmsley or replace with portable version of Calburn.Micro, probably version 3.0.+
danwalmsley
@danwalmsley
Dec 16 2015 18:31
ah well AvalonStudio is making good progress to become a version of Gemmini any way
once its ready you could use it for your 3d engine...
lets continue this conversation in the AvalonStudio room
Amer Koleci
@amerkoleci
Dec 16 2015 18:32
@danwalmsley I definetelly like the look and feel, as it seams more VS like
danwalmsley
@danwalmsley
Dec 16 2015 18:33
did you find avalonstudio room?
Amer Koleci
@amerkoleci
Dec 16 2015 18:34
@danwalmsley Nope, cant find it
Steven Kirk
@grokys
Dec 16 2015 19:02
ok @wieslawsoltes #365 should now be fixed
Wiesław Šoltés
@wieslawsoltes
Dec 16 2015 19:23
@grokys Great, thanks!
Steven Kirk
@grokys
Dec 16 2015 22:46
ok guys, just committed a massive change to master
it should fix the leaks that @donandren found
though more importantly it moves certain stuff from the visual tree to the logical tree
such as applying styles
which means that controls are styled independently of whether they're in the visual tree
which should speed up e.g. switching tabs
Darnell Williams
@Seeker1437
Dec 16 2015 22:48
Whats the cost?
40k 50k?
Steven Kirk
@grokys
Dec 16 2015 22:48
haha
Darnell Williams
@Seeker1437
Dec 16 2015 22:48
100k
5000k haha xD
Steven Kirk
@grokys
Dec 16 2015 22:48
shouldn't be any cost
it's just doing stuff the way it should have been done in the first place
Darnell Williams
@Seeker1437
Dec 16 2015 22:49
Yay!
When Microsoft did Vista, they sold 7 :(
Steven Kirk
@grokys
Dec 16 2015 22:49
??
Darnell Williams
@Seeker1437
Dec 16 2015 22:49
When you did your work you fixed your work free hehe
Windows 7 == what Vista was meant to be xzd
Steven Kirk
@grokys
Dec 16 2015 22:50
i do sometimes wonder if you are replying to the correct chat ;)
danwalmsley
@danwalmsley
Dec 16 2015 22:50
@grokys spot on
Darnell Williams
@Seeker1437
Dec 16 2015 22:50
My appologies, I was trying to make a funny in this chat.
Steven Kirk
@grokys
Dec 16 2015 22:51
;) just kidding myself
danwalmsley
@danwalmsley
Dec 16 2015 22:51
@grokys will pull in new build and see how it goes
Steven Kirk
@grokys
Dec 16 2015 22:52
cool! don't think anything should have broken since last time you tried
danwalmsley
@danwalmsley
Dec 16 2015 22:53
fingers crossed...
Johan Larsson
@JohanLarsson
Dec 16 2015 22:54
have any of you implemented ICustomTypeDescriptor?
Steven Kirk
@grokys
Dec 16 2015 22:55
nope! didn't even know it existed
Johan Larsson
@JohanLarsson
Dec 16 2015 22:56
perhaps best so :)
the dark corners of the framework
Darnell Williams
@Seeker1437
Dec 16 2015 22:56
lol
danwalmsley
@danwalmsley
Dec 16 2015 22:59
@grokys i think it has broke a minor thing for me
blob
those maximize buttons in the top right
Darnell Williams
@Seeker1437
Dec 16 2015 22:59
@grokys I was curious, does Perspex support the binding the way that WPF works like I posted in AvalonStudio chat?
danwalmsley
@danwalmsley
Dec 16 2015 22:59
matched the background colour before the update
Its set in a style perhaps its not being applied correctly now?
Steven Kirk
@grokys
Dec 16 2015 23:24
i will take a look
danwalmsley
@danwalmsley
Dec 16 2015 23:25
you can get that build from my master branch now
Johan Larsson
@JohanLarsson
Dec 16 2015 23:27
yay, progress
implementing IList always makes me sad
Steven Kirk
@grokys
Dec 16 2015 23:33
@danwalmsley Perspex doesn't seem to be up-to-date on your master
danwalmsley
@danwalmsley
Dec 16 2015 23:34
iv definately pushed it with update... did you pull it down before id pushed maybe?
should be this commit VitalElement/AvalonStudio@d16b962
Steven Kirk
@grokys
Dec 16 2015 23:37
here it says perspex is at 6d8263b: https://github.com/VitalElement/AvalonStudio
danwalmsley
@danwalmsley
Dec 16 2015 23:37
ah
its using nuget again.. sorry forgot to say
Steven Kirk
@grokys
Dec 16 2015 23:38
but the last commit to perspex master is cd721f1ae8280ff0c11932504ac9372d43ecc331
ahhh
was it too difficult doing the submodule thing?
danwalmsley
@danwalmsley
Dec 16 2015 23:39
it was on another branch
il probably go back and do it again on master
it wasnt as good as it could have been had nuget been better
Steven Kirk
@grokys
Dec 16 2015 23:39
yeah
they say the new project.json stuff should fix that problem, so we'll see
danwalmsley
@danwalmsley
Dec 16 2015 23:40
is that a replacement for nuget?
Steven Kirk
@grokys
Dec 16 2015 23:42
no, it's a replacement for .csproj
just fixed a devtools crash
danwalmsley
@danwalmsley
Dec 16 2015 23:45
haha amazing
in AvalonStudio... the project format is json!!!
whens project.json coming out?
Steven Kirk
@grokys
Dec 16 2015 23:47
not sure - with .net core i guess?