These are chat archives for AvaloniaUI/Avalonia

19th
Mar 2016
Darnell Williams
@Seeker1437
Mar 19 2016 10:25

@grokys Couple of questions as I try to learn a bit

Do we have something like

Translates a point related to this element to coordinates that related to the specified element.

Point Visual.TranslatePoint(Point point, Control control);

Is this the same is PointToCLient almost?

Darnell Williams
@Seeker1437
Mar 19 2016 11:35

Also

what is the equivalent to
object ItemContainerGenerator.ItemFromContainer(UIElement)

ah nvm on the second question, I can use Index and remove that way
danwalmsley
@danwalmsley
Mar 19 2016 11:58
@Seeker1437 the first of your questions there is definately a function to do that
Let me look
Darnell Williams
@Seeker1437
Mar 19 2016 11:59
thanks! once I finish all the event's I can really test layout and stuff XD
Darnell Williams
@Seeker1437
Mar 19 2016 13:52

In wpf there are three overrides that iexist for controls:

GetContainerForItemOverride
PrepareContainerForItemOverride
ClearingContainerForItemOverride

where would be the best place for me to put the logic for these things?

Darnell Williams
@Seeker1437
Mar 19 2016 14:01
ah and also the same for
IsItemItsOwnContainerOverride
oh and thank @danwalmsley !
Steven Kirk
@grokys
Mar 19 2016 14:12
we don't really have anything like those overrides because list virtualization isn't implemented yet
though i think i should move that method to an extension method
Darnell Williams
@Seeker1437
Mar 19 2016 14:17
Could I then use the matrix to get a point (basically gets the relative point that I would be using for an InputHitTest)
Steven Kirk
@grokys
Mar 19 2016 14:18
yeah, just multiply your point by the matrix
Darnell Williams
@Seeker1437
Mar 19 2016 14:18
cool :D
Wiesław Šoltés
@wieslawsoltes
Mar 19 2016 18:26
@grokys Any plans regarding this issue Perspex/Perspex#284
Steven Kirk
@grokys
Mar 19 2016 18:34
no, i need to address that - is it affecting you?
Wiesław Šoltés
@wieslawsoltes
Mar 19 2016 18:34
yes
the TreeView is not updating
Steven Kirk
@grokys
Mar 19 2016 18:35
it shouldn't be that hard to fix to be honest, i just haven't decided the best way to do it
Wiesław Šoltés
@wieslawsoltes
Mar 19 2016 18:36
yeah that would be great
its really annoying bug
Steven Kirk
@grokys
Mar 19 2016 18:41
ok, i will make that my priority
Wiesław Šoltés
@wieslawsoltes
Mar 19 2016 18:41
thanks
Steven Kirk
@grokys
Mar 19 2016 18:45
actually, thinking about it, a recent change i made to the binding system makes this really easy i think
Steven Kirk
@grokys
Mar 19 2016 19:00
ok, I think i've fixed it but i've not got time to test properly
i've got to go out
tests pass though - should I just commit and hope? ;)
Wiesław Šoltés
@wieslawsoltes
Mar 19 2016 19:00
can you push to branch
Steven Kirk
@grokys
Mar 19 2016 19:00
sure
let me know if it fixes it or not!
Wiesław Šoltés
@wieslawsoltes
Mar 19 2016 19:02
ok
Wiesław Šoltés
@wieslawsoltes
Mar 19 2016 19:08
@grokys Tested, did not help :(
Steven Kirk
@grokys
Mar 19 2016 19:09
oh :(
as far as i can see, it should've fixed it... but i guess i need to actually test to be sure ;)
i will try to do it tomorrow if i get chance
Wiesław Šoltés
@wieslawsoltes
Mar 19 2016 19:10
ok
Steven Kirk
@grokys
Mar 19 2016 19:11
the property that ItemsSource is bound to notifies changes using INotifyPropertyChanged right?
Wiesław Šoltés
@wieslawsoltes
Mar 19 2016 19:12
yes
Steven Kirk
@grokys
Mar 19 2016 19:12
and it is the root that's changing, or a child?
Wiesław Šoltés
@wieslawsoltes
Mar 19 2016 19:14
ItemsSource="{Binding Pages, Mode=TwoWay}"
the INPC is raised for Pages property
Steven Kirk
@grokys
Mar 19 2016 19:14
ok, that gives me an idea where to look, thanks!
Wiesław Šoltés
@wieslawsoltes
Mar 19 2016 19:14
        public ImmutableArray<XPage> Pages
        {
            get { return _pages; }
            set { Update(ref _pages, value); }
        }
Darnell Williams
@Seeker1437
Mar 19 2016 22:06
@grokys just a brain check, the MouseDevice.Instance.Position is the real position of the Mouse ont he screen correct? not the visual system coords
Darnell Williams
@Seeker1437
Mar 19 2016 22:13
Okay I am confused, because I don

tsee other control do that,

ItemsControl is an Items Property the is IEnumerable, however I can't do add, remove, or count operations on an IEnumerable, so I often end up casting.

Could I doing something wrong to the point where I can't have the control access it's own property without a cast?