UIEventAdapter is a DependencyObject which enable registering 1+ UIEventProcessor to UIEventHub in xaml, using it's Processors property.

<uc:ListViewEx ... >
        <bc:UIEventAdapter.Processors>
            <bc:TouchGestureEventProcessor Gesture="FlickLeft" Command="NavigationCommands.BrowseBack" />
        
            <bc:InputBindingsEventProcessor > <!-- Key and Mouse bindings -->
                <bc:InputBindingsEventProcessor.InputBindings>
                    <MouseBinding Command="ApplicationCommands.Open" MouseAction="LeftDoubleClick" />
                    <KeyBinding Key="Back" Modifiers="Control" Command="NavigationCommands.BrowseHome" /> 

                </bc:InputBindingsEventProcessor.InputBindings>
            </bc:InputBindingsEventProcessor>

            <bc:DragDropEventProcessor EnableDrag="{Binding EnableDrag}" EnableDrop="{Binding EnableDrop}" />
            <bc:MultiSelectEventProcessor EnableMultiSelect="{Binding EnableMultiSelect}"  
                                    IsCheckboxEnabled="{Binding IsCheckBoxVisible, Mode=OneWay}"/>

            <bc:ContextMenuEventProcessor>
                <bc:ContextMenuEventProcessor.ContextMenu>
                    <ContextMenu ItemsSource="{Binding Commands.ToolbarCommands.CommandModels.All}" 
                            ItemContainerStyle="{StaticResource CommandModelContextMenuMenuItemStyle}" />
                </bc:ContextMenuEventProcessor.ContextMenu>
            </bc:ContextMenuEventProcessor>
        </bc:UIEventAdapter.Processors>
</uc:ListViewEx>


Last edited Mar 7, 2014 at 8:09 AM by lycj, version 2

Comments

No comments yet.