码迷,mamicode.com
首页 > 其他好文 > 详细

TreeListControl拖动模板设计

时间:2014-08-03 04:34:10      阅读:674      评论:0      收藏:0      [点我收藏+]

标签:des   os   io   cti   ar   line   size   type   

 

  大家用的上的就直接用吧,就是一些小知识,不说废话了,用过了,帮忙支持一下就行,谢谢:

<DataTemplate x:Key="dragelementTemplate">

                <Grid>

                    <StackPanel>

                        <Image Source="/MapSolution;component/Images/qOrange.png" Width="24" Height="24" Margin="2" Visibility="{Binding Path=DraggingRows[0].Content.IsGunCamera,Converter={StaticResource int2CollosedConverter}}"/>

                        <Image Source="/MapSolution;component/Images/oOrange.png" Width="24" Height="24" Margin="2" Visibility="{Binding Path=DraggingRows[0].Content.IsGunCamera,Converter={StaticResource int2VisibilityConverter}}"/>

                        <TextBlock FontFamily="微软雅黑" FontSize="24" Text="{Binding Path=DraggingRows[0].Content.Name}"/>

                    </StackPanel>

                </Grid>

 

            </DataTemplate>

 

 

<dxg:TreeListControl x:Name="treeList" Grid.Row="2" ItemsSource="{Binding Ships}" ShowBorder="False"

                               SelectionMode="{Binding SelectionMode}" FilterCriteria="{Binding FilterCriteria, ElementName=searchControl}">

                <dxg:TreeListControl.Columns>

                    <dxg:TreeListColumn FieldName="CameraID" VisibleIndex="0" Header="编码"/>

                    <dxg:TreeListColumn FieldName="Name" VisibleIndex="1" Header="名称"/>

                    <!--<dxg:TreeListColumn FieldName="FullName" UnboundType="String"

                                    UnboundExpression="[FirstName] + ‘ ‘ + [LastName]" VisibleIndex="1" ReadOnly="True" />

                    <dxg:TreeListColumn FieldName="City" VisibleIndex="2" />

                    <dxg:TreeListColumn FieldName="AddressLine1" Header="Address" VisibleIndex="3" />

                    <dxg:TreeListColumn FieldName="Phone" VisibleIndex="4" />-->

                </dxg:TreeListControl.Columns>

                <dxg:TreeListControl.TotalSummary>

                    <dxg:TreeListSummaryItem FieldName="CameraID" SummaryType="Count"/>

                </dxg:TreeListControl.TotalSummary>

                <dxg:TreeListControl.View>

 

                    <dxg:TreeListView x:Name="view"

                                  ParentFieldName="ParentID" KeyFieldName="NodeID"

                                  EditorShowMode="MouseUpFocused" AutoExpandAllNodes="True" NodeImageSelector="{StaticResource categoryImageSelector}"

                                  AutoWidth="True" ShowTotalSummary="True" ShowFilterPanelMode="Never" ShowNodeImages="True" ShowColumnHeaders="False" ShowIndicator="False" ShowHorizontalLines="False" ShowVerticalLines="False">

                

                    </dxg:TreeListView>

                </dxg:TreeListControl.View>

                <i:Interaction.Behaviors>

                    <dxg:TreeListDragDropManager x:Name="dragDropManager" AllowDrag="True" DragOver="dragDropManager_DragOver_1" DragElementTemplate="{StaticResource dragelementTemplate}">

                       

                    </dxg:TreeListDragDropManager>

                </i:Interaction.Behaviors>

            </dxg:TreeListControl>

 

private void dragDropManager_DragOver_1(object sender, DevExpress.Xpf.Grid.DragDrop.TreeListDragOverEventArgs e)

        {

            e.ShowDragInfo = true;

e.ShowDropMarker = true;

        }

 

TreeListControl拖动模板设计,布布扣,bubuko.com

TreeListControl拖动模板设计

标签:des   os   io   cti   ar   line   size   type   

原文地址:http://www.cnblogs.com/wuhaijing/p/3887873.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!