These are chat archives for ButchersBoy/Dragablz

21st
Jan 2016
Magnus Lindhe
@mgnslndh
Jan 21 2016 08:41
@ButchersBoy the Card is placed in a DragablzItemsControl which uses a Canvas for layout. The canvas itself is stretched as far as I can tell but I guess a Card on a canvas will not stretch itself, even if HorizontalAlignment is set to stretch?
Does DragablzItemsControl support other panels than Canvas for its ItemsPanel?
Magnus Lindhe
@mgnslndh
Jan 21 2016 09:12
Guess it does but it does not work well for me... ok, food for thought:
The DragablzItemsControl is great for presenting material cards that can be reordered. But it would be nice to have HorizontalContentAlignment property and have it calculate the width of a child item if set to Stretch. But I guess it is also a matter of which Organizer is in use. But it would work well with the VerticalOrganiser.
James Willock
@ButchersBoy
Jan 21 2016 09:49
Ok...glad to hear someone putting the actual items control to use 😃 ...i use it for that kind of stuff a lot myself. Do you wanna log that as a feature request issue? Might take a little while for me to get to it though.
Magnus Lindhe
@mgnslndh
Jan 21 2016 09:50
Sure, i'll create an issue.
If I want to disable dragging of any item onthe DragablzItemsControl, how do I do that? Right now I bind the .Count property of the collection bound to ItemsSource, to FixedItemsCount
James Willock
@ButchersBoy
Jan 21 2016 10:02
That's one way, other way is to re template and remove the thumb
Just thought of a work around for your stretch. You can do a relative source binding to ancestor DragablzItemsControl from width to ActualWidth. You might have to provide a converter so you can add some padding in.
Magnus Lindhe
@mgnslndh
Jan 21 2016 10:07
I tried that binding Width on my card to the ActualWidth of its relative ancestor Canvas but that sloved things down to a halt.
Ok, but thanks for the suggestion. I am using a hardcoded width for now and that will work until the new feature is implemented #77
Magnus Lindhe
@mgnslndh
Jan 21 2016 10:12
About disabling dragging. It would be nice to disable dragging with a property of the ItemsControl. Would you consider that as a feature request? As for now I will solve it by styling
Oh, and the PART_DragElement what is the purpose of that? In the sample you have it on a control that is not the content presenter... I thought it representet the actual content being dragged.
James Willock
@ButchersBoy
Jan 21 2016 11:00
Which sample? Can't find it...can't even remember. PART_Thumb is the important bit.
Magnus Lindhe
@mgnslndh
Jan 21 2016 12:08
I would like to be able to reorder items in DragablzItemsControl by ICommand.
Like move an item up or down when organized vertically.
James Willock
@ButchersBoy
Jan 21 2016 12:09
That's old I think. Has no meaning.
Magnus Lindhe
@mgnslndh
Jan 21 2016 12:10
Ok, I will remove PART_DragElement name from my code
James Willock
@ButchersBoy
Jan 21 2016 12:10
Like a kind of shunt up shunt down thing?
Magnus Lindhe
@mgnslndh
Jan 21 2016 12:11
Yes, if you mean like pushing one item up/down one position (in vertical context)
The display order of items only seems to be changable by dragging.
The tab control listens to notifications from the item source and moves tabs accordingly. But I cannot find a way of doing this with the DragablzItemsControl
Is there any way of changing the order from code, preferably via mvvm?
Magnus Lindhe
@mgnslndh
Jan 21 2016 12:17
Oh, must say I love gitter. Just found out I could edit my last comment by pushing the Up-key :)
James Willock
@ButchersBoy
Jan 21 2016 12:20
Not so easy on a phone...