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

SearchControl控件使用研究

时间:2014-08-03 04:30:05      阅读:2037      评论:0      收藏:0      [点我收藏+]

标签:des   使用   os   io   cti   ar   line   new   

 研究了一下DevExpress的SearchControl,供大家参考使用:

<dxe:SelectorEditColumnProvider x:Name="columnProvider" OwnerEdit="{Binding Path=., ElementName=treeList}"/>

                <dxe:SearchControl x:Name="searchControl" Margin="6 0 5 0" MinHeight="22" MinWidth="200" VerticalAlignment="Center"

                                   ColumnProvider="{Binding Path=., ElementName=columnProvider}" FilterByColumnsMode="Custom" SearchTextPostDelay="100"/>

 

 

<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>

 

this.columnProvider.CustomColumns = new ObservableCollection<string>() {"Name"};

SearchControl控件使用研究,布布扣,bubuko.com

SearchControl控件使用研究

标签:des   使用   os   io   cti   ar   line   new   

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

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