These are chat archives for AvaloniaUI/Avalonia

21st
Mar 2016
Darnell Williams
@Seeker1437
Mar 21 2016 02:07
@grokys how to do I get access to all open windows?
Steven Kirk
@grokys
Mar 21 2016 07:43
@Seeker1437 i don't think we have a collection of open windows currently. @jkoritzinsky when you implemented Application.Exit you did it without adding an open windows collection, right?
i will take a look at your PR in more depth, but my gut feeling is that having Perspex.Controls and Perspex.Controls.Base doesn't feel right
especially because this is being done essentially for one class: Application
Alexey
@flcl42
Mar 21 2016 11:15
What render and input platform are used on windows?
I've not found and refs on Win32Platform, that why am asking
*any
Darnell Williams
@Seeker1437
Mar 21 2016 11:24
Ok
For rendering we use D2D
This message was deleted
This message was deleted
This message was deleted
This message was deleted
then you cannuse skia alternatively
Alexey
@flcl42
Mar 21 2016 11:32
Oh wow, it does the magic through hardcoded platform names and reflection, all clear now
Steven Kirk
@grokys
Mar 21 2016 12:50
yeah, that will all probably need to be changed at some point though
danwalmsley
@danwalmsley
Mar 21 2016 14:55
@grokys any lightbulb moments regarding virtualization recently?
Darnell Williams
@Seeker1437
Mar 21 2016 16:19
When I was rewriting the lyout system for Perspex (lol) and looking at the virtulization tuff I have some theories, but zI am not talented enough for the entire system.
@groskys is there any special requirements for an oepn widndow collections? I need it to continue wth my prject.
Jeremy Koritzinsky
@jkoritzinsky
Mar 21 2016 16:25
@grokys I did it without an open windows collection.
About the pr: I also wanted to do it for IApplicationLifecycle. That really doesn't need to be with the controls. The idea I was thinking was to have one assembly that has the infrastructure for controls and one that has the actual controls. We can just merge the assemblies if you think that will work better. I'll put together a pr for that.
Steven Kirk
@grokys
Mar 21 2016 17:02
yeah, i think i'd prefer just to move Application to Controls... i know what you mean about infrastructure vs actual controls, but to me having a Perspex.Controls.Base assembly just kinda feels wrong
in the end i was thinking we'll probably just merge all the assemblies into one Perspex.dll anyway
the separation is there to enforce e.g. no special handling for certain controls in the layout code etc
which you see all over if you look at the WPF source! ugh..
given that that was the original intention of splitting the assemblies, i think just putting everything above a certain level into Controls is ok
because when you get to that level you kinda need everything
Steven Kirk
@grokys
Mar 21 2016 17:07
@Seeker1437 we can add an open windows collection, no problem
Steven Kirk
@grokys
Mar 21 2016 17:58
@wieslawsoltes just added a test for issue #284 with the tree data template and it seems to work
so i think i need to try it in Core2D to work out why it's not working for you
could you tell me how to repro?
Wiesław Šoltés
@wieslawsoltes
Mar 21 2016 17:59
Run Core2D -> New Project
on Left-Top panel Right-Click on Document -> Add Page
this should add page to Document, but treeview is not updated
it only updated when you add new Document
danwalmsley
@danwalmsley
Mar 21 2016 18:14
@wieslawsoltes where can I find your port for Xaml.Behaviours?
NuGet package is currently only on MyGet https://www.myget.org/F/xamlbehaviors-nightly/api/v2
danwalmsley
@danwalmsley
Mar 21 2016 18:17
thanks, is there a behaviour for if mouses hovers (with a delay 500ms or so)?
Wiesław Šoltés
@wieslawsoltes
Mar 21 2016 18:17
no, the original did not have this
but its very easy to create you own
this are my custom behaviors, you can use FocusOnPointerMovedBehavior as start
danwalmsley
@danwalmsley
Mar 21 2016 18:20
@wieslawsoltes that's really helpful thanks a lot
Wiesław Šoltés
@wieslawsoltes
Mar 21 2016 18:20
no problem
danwalmsley
@danwalmsley
Mar 21 2016 18:20
I think @Seeker1437 is almost done with Docking, so you might be able to use it in Core2D
Wiesław Šoltés
@wieslawsoltes
Mar 21 2016 18:21
great
where I can find sources
yes
Wiesław Šoltés
@wieslawsoltes
Mar 21 2016 18:22
do you have some example
danwalmsley
@danwalmsley
Mar 21 2016 18:22
its a port of Dragablz
Darnell Williams
@Seeker1437
Mar 21 2016 18:22
Not yet ready for usage yet though couple things I need to push and then styling
danwalmsley
@danwalmsley
Mar 21 2016 18:22
not yet @Seeker1437 says still a little more to do
@Seeker1437 hey!
Darnell Williams
@Seeker1437
Mar 21 2016 18:23
Yeah then I plan to add the samples in next
Hey!
Wiesław Šoltés
@wieslawsoltes
Mar 21 2016 18:24
oh so its like TabControl
danwalmsley
@danwalmsley
Mar 21 2016 18:25
Its like a main document area in the middle (tab control) with general docking around that
like Avalon dock
visual studio, etc
Darnell Williams
@Seeker1437
Mar 21 2016 18:25
Yep basically a DockItem acts as a tab and HeaderedDockItem wuld be used if creating tool windows
danwalmsley
@danwalmsley
Mar 21 2016 18:25
you don't have to have tabs though I suppose
Wiesław Šoltés
@wieslawsoltes
Mar 21 2016 18:26
that should be easy to integrate as I use TabControl for my panels
Darnell Williams
@Seeker1437
Mar 21 2016 18:26
Nope, you can use DockItemsCOntrol Directly and bypass tabs
no you cant xD
Sorry that will be the plan after initially working
But this will also handle creation of toplevel windows
By defaut it will bassically mimic chrome like feel
but you can use the IManualTabController to specifiy the behavior you want instead
danwalmsley
@danwalmsley
Mar 21 2016 18:28
@wieslawsoltes I assume you can use behaviours inside templates also?
Darnell Williams
@Seeker1437
Mar 21 2016 18:28
IManualInterTabController
Wiesław Šoltés
@wieslawsoltes
Mar 21 2016 18:28
it should work evrywhere
Steven Kirk
@grokys
Mar 21 2016 18:28
@wieslawsoltes ok, after a little investigating it seems that the expression observer for XDocument.Pages is getting collected
so this may be more difficult than i originally thought ;)
Wiesław Šoltés
@wieslawsoltes
Mar 21 2016 18:29
it just attaches to any PerspexObject
@grokys :(
can I do something in my xaml to make it not collected
Steven Kirk
@grokys
Mar 21 2016 18:30
not sure... i'm not sure if it's something you need to do or something in perspex...
Darnell Williams
@Seeker1437
Mar 21 2016 18:31
Do you think that neat breakpoint generator plugin for VS would help? Lol?
Helps with large or complex projects they caim XD'
Steven Kirk
@grokys
Mar 21 2016 18:34
what's that?
Darnell Williams
@Seeker1437
Mar 21 2016 18:36
Bascallly when an issue offers it is supposed to automatically insert breakpoints into points of interest based off the stack at the time it's requested for you so that you don't have to keep tryig to debug in circles
Steven Kirk
@grokys
Mar 21 2016 18:38
do you have a link?
Wiesław Šoltés
@wieslawsoltes
Mar 21 2016 18:41
@grokys The TreeDataTemplate ItemsSource should probably behave more like ListBox Items property ?
Steven Kirk
@grokys
Mar 21 2016 18:42
in what way?
thing is, that TreeViewItem does have an Items property - it's that which the template's ItemsSource sets
danwalmsley
@danwalmsley
Mar 21 2016 18:49
@wieslawsoltes forgive me iv not used behaviours much before... ok so I use your pointer moved on focus as a starting point, I can add in the delay I want, etc
how would you interface a behaviour to get it to control a tooltip for example?
(it will need to access data in view model to do this, perhaps it might be a command binding or something?)
Wiesław Šoltés
@wieslawsoltes
Mar 21 2016 18:51
no sure what is your goal
        <Button Content="Open Project">
            <i:Interaction.Behaviors>
                <behaviors:FocusOnPointerMovedBehavior/>
            </i:Interaction.Behaviors>
        </Button>
the AssociatedObject in FocusOnPointerMovedBehavior is the Button you have attached to
Darnell Williams
@Seeker1437
Mar 21 2016 18:52
Ah basically instead of focusing he wants to wait 500 ms before displaying a tooltip
Wiesław Šoltés
@wieslawsoltes
Mar 21 2016 18:53
well ToolTip has builtin delay
not sure if you can force tooltip to display, did not try
Darnell Williams
@Seeker1437
Mar 21 2016 18:53
true, Well in wpf you could use TooltipService, not sure about Perspex
Wiesław Šoltés
@wieslawsoltes
Mar 21 2016 18:54
oh
danwalmsley
@danwalmsley
Mar 21 2016 18:54
yeh, my difficulty is that I need to get the delayed hover event, then in code query for information
Wiesław Šoltés
@wieslawsoltes
Mar 21 2016 18:54
check this sample
danwalmsley
@danwalmsley
Mar 21 2016 18:54
then if information is returned show the tooltip
Wiesław Šoltés
@wieslawsoltes
Mar 21 2016 18:54
I think it does what you want
danwalmsley
@danwalmsley
Mar 21 2016 18:55
ah ok, so a behaviour can do an action?
or just some?
Wiesław Šoltés
@wieslawsoltes
Mar 21 2016 18:55
depends on what behavior you use
danwalmsley
@danwalmsley
Mar 21 2016 18:57
I see the ActionsCollection
ok thanks that seems like what I need
Wiesław Šoltés
@wieslawsoltes
Mar 21 2016 18:58
more examples
Wiesław Šoltés
@wieslawsoltes
Mar 21 2016 19:03
danwalmsley
@danwalmsley
Mar 21 2016 19:04
awesome, that's what I need.
cheers
important think for me is having it get a viewmodel of a certain type depending on whats hovered on
Wiesław Šoltés
@wieslawsoltes
Mar 21 2016 19:05
not sure how to handle OnMouseEnter OnMouseLeave
well it can bind
            <Button Content="Data Context Binding (MVVM)">
                <i:Interaction.Behaviors>
                    <tt:ToolTipBehavior Content="{Binding Content, Mode=OneWay}"
                        Header="{Binding Header, Mode=OneWay}"
                        Category="Informational" />
                </i:Interaction.Behaviors>
            </Button>