ComponentOne TileView for WPF and Silverlight
TileView for WPF and Silverlight Task-Based Help / Disabling Drag-and-Drop Functionality
In This Topic
    Disabling Drag-and-Drop Functionality
    In This Topic

    By default drag-and-drop functionality is enabled, allowing users to re-order C1TileViewItem elements at run time. If you choose, however, you can disable drag-and-drop functionality by setting the CanUserReorder property to False.

    At Design Time

    To disable drag-and-drop functionality in the C1TileView control in the Properties window at design time, complete the following steps:

    1. Click the C1TileView control once to select it.
    2. Navigate to the Properties window, and locate the CanUserReorder property.
    3. Click the drop-down arrow next to the CanUserReorder property and select False.

    This disables drag-and-drop functionality.

    In XAML

    To disable drag-and-drop functionality in the C1TileView control in XAML, add CanUserReorder="False" to the <c1:TileView> element so that it appears similar to the following:

    XAML
    Copy Code
    <c1:C1TileView Name="C1TileView1" CanUserReorder="False">
    

    In Code

    Right-click the window and select View Code to open the Code Editor. Add code to the Window1_Loaded event handler, so it appears similar to the following:

    for WPF

    WPF Visual Basic
    Copy Code
    Window1_Loaded(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles MyBase.Loaded
        Me.C1TileView1.CanUserReorder = False
    End Sub
    

     

    WPF C#
    Copy Code
    private void Window_Loaded(object sender, RoutedEventArgs e)
    {
        this.c1TileView1.CanUserReorder = false;
    }
    

    for Silverlight

    Silverlight Visual Basic
    Copy Code
    Public Sub New()
    InitializeComponent()
        Me.C1TileView1.CanUserReorder = False
    End Sub
    

     

    Silverlight C#
    Copy Code
    MainPage(){
    InitializeComponent();
        this.c1TileView1.CanUserReorder = false;
    }
    

    Run your project and observe that now the user cannot perform drag-and-drop operations at run time.

    See Also