This is a migrated thread and some comments may be shown as answers.

Programmatically cancel reorder mode?

7 Answers 42 Views
DataBoundListBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Philip
Top achievements
Rank 2
Philip asked on 01 Jan 2015, 04:01 PM
The user puts the DataBoundListBox into reorder mode by pressing & holding on an item.

I also have an app bar button that puts the control into checkbox mode if the user wants to delete items from the list. It is possible, although ugly, to have the control in reorder mode and checkbox mode at the same time. What I'd like to do is tell the control to come out of reorder mode before enabling checkbox mode. Is there a way to do that?

7 Answers, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 05 Jan 2015, 12:49 PM
Hi Philip,

While this behavior is not available out of the box, you can achieve it by adding the following code before showing the checkboxes:

listBox.FindChildByType<RadWindow>().IsOpen = false;


Regards,
Tsvyatko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Philip
Top achievements
Rank 2
answered on 05 Jan 2015, 02:33 PM
Hi

Thanks for the suggestion. I have a couple of follow-up questions:

1. What should listBox be? I've tried using the DataBoundListBox control instance but it doesn't have a method FindChildByType.

2. Where is RadWindow defined? VS2013 doesn't offer a Resolve option so it doesn't know anything about it.

Just to clarify, this is for WP8.1 XAML, although I think that is the only platform this control is supported on, but I realised I hadn't stated that explicitly in my original post.

Regards

Philip
0
Tsvyatko
Telerik team
answered on 05 Jan 2015, 04:11 PM
Hello Philip,

In order to use the extension method FindChildOfType you need to add this namespace: 
using Telerik.Windows.Controls;

In the code snippet listbox variable is RadDataBoundListBox instance

Please excuse me for not clarifying this initially.

Regards,
Tsvyatko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Philip
Top achievements
Rank 2
answered on 05 Jan 2015, 04:17 PM
Hi

Sorry - this still isn't working for me.

using Telerik.Windows.Controls; doesn't exist. I only have Charting, Core and UI under Telerik.

Philip

0
Tsvyatko
Telerik team
answered on 06 Jan 2015, 10:01 AM
Hi Philip,

Please excuse me for the misdirection. The code is applicable for WP8. For Windows Phone 8.1 you need to do the following:

 - Modify the template for RadDataBoundListBox and set IsLightDimissEnabled=false to its PART_ItemReorderPopup. This way you can end reorder mode only explicitly

 - In order to close the reorder mode you need to set Popup isOpen to false.


I have prepared sample project demonstrating how to achieve this.




Regards,
Tsvyatko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Philip
Top achievements
Rank 2
answered on 06 Jan 2015, 12:15 PM
Thank you.
0
Philip
Top achievements
Rank 2
answered on 06 Jan 2015, 12:16 PM
Thank you.
Tags
DataBoundListBox
Asked by
Philip
Top achievements
Rank 2
Answers by
Tsvyatko
Telerik team
Philip
Top achievements
Rank 2
Share this question
or