We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Use of GroupViewItemDragStartCommand with syncfusion:GroupView.ItemContainerStyle in a WPF MVVM application

Thread ID:





108188 Apr 8,2013 04:47 PM UTC Apr 19,2013 06:39 AM UTC WPF 1
Tags: Tools
Peter O''Hanlon
Asked On April 8, 2013 04:47 PM UTC

So, I've used the following code to create a GroupView that binds to an ObservableCollection. What I want to do is associate the GroupViewItemDragStartCommand.Command with the items in the GroupView. As you can appreciate, you can't associate GroupViewItemDragStartCommand.Command with the style, so does anyone have any suggestions on associating this?
<syncfusion:GroupView x:Name="gView" Orientation="Horizontal" ItemsSource="{Binding SomeCollection}">
        <Style TargetType="{x:Type syncfusion:GroupViewItem}" BasedOn="{StaticResource BlendGroupViewItemStyle}">
            <Setter Property="Text" Value="{Binding Name, Mode=OneWay}"/>
            <Setter Property="Height" Value="50" />
            <Setter Property="Width" Value="50" />
            <Setter Property="IsManipulationEnabled" Value="True" />
            <Setter Property="ImageSource" Value="{Binding ImagePath, Mode=OneWay}"/>

Dinesh Kumar P [Syncfusion]
Replied On April 19, 2013 06:39 AM UTC

Hi Peter,

Sorry for the delay.

We can set 'GroupViewItemDragStartCommand.Command' in the Setter by binding a command with that. We have created a simple sample which can be download attached with this forum. In the sample, we have binded GroupView with an ObservableCollection and associated 'GroupViewItemDragStartCommand' in the ItemContainerStyle of GroupView control. Whenever 'DragStart' occurs 'ExecuteDragStart()' in Model class would get fired.

Please let us know in case of any other queries.

Thanks and Regards,
Dinesh Kumar P



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon