C# Class Com.Aote.Attachs.ControlAttach

控件附加一些特点,比如回车更新绑定等,主要给文本输入框进行附加
Show file Open project: DuBin1988/restv2

Public Properties

Property Type Description
ContentTemplateProperty System.Windows.DependencyProperty
DefaultButtonProperty System.Windows.DependencyProperty
FixedDragProperty System.Windows.DependencyProperty
FocusProperty System.Windows.DependencyProperty
FocusToOnEnterProperty System.Windows.DependencyProperty
GroupRowTemplateProperty System.Windows.DependencyProperty
HtmlSourceProperty System.Windows.DependencyProperty
InitResourceProperty System.Windows.DependencyProperty
IsButtonDownProperty System.Windows.DependencyProperty
LostFocusProperty System.Windows.DependencyProperty
PageNameProperty System.Windows.DependencyProperty
ShowIndexProperty System.Windows.DependencyProperty
SourceProperty System.Windows.DependencyProperty
UpdateOnEnterProperty System.Windows.DependencyProperty
UpdateOnTextChangedProperty System.Windows.DependencyProperty

Public Methods

Method Description
GetContentTemplate ( System.Windows.Controls.DataGridRowGroupHeader ui ) : System.Windows.DataTemplate
GetDefaultButton ( DependencyObject d ) : string
GetFixedDrag ( TreeViewDragDropTarget ui ) : bool
GetFocus ( FrameworkElement ui ) : string
GetFocusToOnEnter ( FrameworkElement ui ) : string
GetGroupRowTemplate ( System.Windows.Controls.DataGrid ui ) : System.Windows.DataTemplate
GetHtmlSource ( DependencyObject d ) : string
GetInitResource ( FrameworkElement ui ) : bool
GetIsButtonDown ( FrameworkElement ui ) : bool
GetLostFocus ( FrameworkElement ui ) : Delegate
GetPageName ( DependencyObject d ) : string
GetShowIndex ( FrameworkElement ui ) : int
GetSource ( DependencyObject d ) : string
GetTop ( System.Windows.Controls.Panel p ) : string
GetUpdateOnEnter ( FrameworkElement ui ) : string
GetUpdateOnTextChanged ( FrameworkElement ui ) : string
RemoveTop ( System.Windows.Controls.Panel p ) : void
SetContentTemplate ( System.Windows.Controls.DataGridRowGroupHeader ui, System.Windows.DataTemplate value ) : void
SetDefaultButton ( DependencyObject d, string value ) : void
SetFixedDrag ( TreeViewDragDropTarget ui, bool value ) : void
SetFocus ( FrameworkElement ui, string value ) : void
SetFocusToOnEnter ( FrameworkElement ui, string value ) : void
SetGroupRowTemplate ( System.Windows.Controls.DataGrid ui, System.Windows.DataTemplate value ) : void
SetHtmlSource ( DependencyObject d, string value ) : void
SetInitResource ( FrameworkElement ui, bool value ) : void
SetIsButtonDown ( FrameworkElement ui, bool value ) : void
SetLostFocus ( FrameworkElement ui, Delegate value ) : void
SetPageName ( DependencyObject d, string value ) : void
SetShowIndex ( FrameworkElement ui, int value ) : void
SetSource ( DependencyObject d, string value ) : void
SetUpdateOnEnter ( FrameworkElement ui, string value ) : void
SetUpdateOnTextChanged ( FrameworkElement ui, string value ) : void

Private Methods

Method Description
EnableHandle ( object o, System.Windows.DependencyPropertyChangedEventArgs e ) : void
GetChildren ( string name, List frames ) : NameAndFrame
GetPanelPages ( System.Windows.Controls.Panel panel ) : List
LoadHandle ( object o, RoutedEventArgs e ) : void
OnDefaultButtonChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnFixedDragChanged ( DependencyObject obj, System.Windows.DependencyPropertyChangedEventArgs args ) : void
OnFocusChanged ( DependencyObject obj, System.Windows.DependencyPropertyChangedEventArgs args ) : void

界面开始时,默认光标位置,值为默认光标所在元素名

OnFocusToOnEnterChanged ( DependencyObject obj, System.Windows.DependencyPropertyChangedEventArgs args ) : void

回车时光标转移,值为要转移到的元素名

OnGroupRowTemplateChanged ( DependencyObject obj, System.Windows.DependencyPropertyChangedEventArgs args ) : void
OnInitResourceChanged ( DependencyObject obj, System.Windows.DependencyPropertyChangedEventArgs args ) : void
OnLostFocusChanged ( DependencyObject obj, System.Windows.DependencyPropertyChangedEventArgs args ) : void
OnPageNameChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnShowIndexChanged ( DependencyObject obj, System.Windows.DependencyPropertyChangedEventArgs args ) : void
OnSourceChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnUpdateOnEnterChanged ( DependencyObject obj, System.Windows.DependencyPropertyChangedEventArgs args ) : void

回车时更新绑定,值为要更新的属性名,一般情况下,为Text

OnUpdateOnTextChanged ( DependencyObject obj, System.Windows.DependencyPropertyChangedEventArgs args ) : void

回车时更新绑定,值为要更新的属性名,一般情况下,为Text

Method Details

GetContentTemplate() public static method

public static GetContentTemplate ( System.Windows.Controls.DataGridRowGroupHeader ui ) : System.Windows.DataTemplate
ui System.Windows.Controls.DataGridRowGroupHeader
return System.Windows.DataTemplate

GetDefaultButton() public static method

public static GetDefaultButton ( DependencyObject d ) : string
d System.Windows.DependencyObject
return string

GetFixedDrag() public static method

public static GetFixedDrag ( TreeViewDragDropTarget ui ) : bool
ui TreeViewDragDropTarget
return bool

GetFocus() public static method

public static GetFocus ( FrameworkElement ui ) : string
ui System.Windows.FrameworkElement
return string

GetFocusToOnEnter() public static method

public static GetFocusToOnEnter ( FrameworkElement ui ) : string
ui System.Windows.FrameworkElement
return string

GetGroupRowTemplate() public static method

public static GetGroupRowTemplate ( System.Windows.Controls.DataGrid ui ) : System.Windows.DataTemplate
ui System.Windows.Controls.DataGrid
return System.Windows.DataTemplate

GetHtmlSource() public static method

public static GetHtmlSource ( DependencyObject d ) : string
d System.Windows.DependencyObject
return string

GetInitResource() public static method

public static GetInitResource ( FrameworkElement ui ) : bool
ui System.Windows.FrameworkElement
return bool

GetIsButtonDown() public static method

public static GetIsButtonDown ( FrameworkElement ui ) : bool
ui System.Windows.FrameworkElement
return bool

GetLostFocus() public static method

public static GetLostFocus ( FrameworkElement ui ) : Delegate
ui System.Windows.FrameworkElement
return System.Delegate

GetPageName() public static method

public static GetPageName ( DependencyObject d ) : string
d System.Windows.DependencyObject
return string

GetShowIndex() public static method

public static GetShowIndex ( FrameworkElement ui ) : int
ui System.Windows.FrameworkElement
return int

GetSource() public static method

public static GetSource ( DependencyObject d ) : string
d System.Windows.DependencyObject
return string

GetTop() public static method

public static GetTop ( System.Windows.Controls.Panel p ) : string
p System.Windows.Controls.Panel
return string

GetUpdateOnEnter() public static method

public static GetUpdateOnEnter ( FrameworkElement ui ) : string
ui System.Windows.FrameworkElement
return string

GetUpdateOnTextChanged() public static method

public static GetUpdateOnTextChanged ( FrameworkElement ui ) : string
ui System.Windows.FrameworkElement
return string

RemoveTop() public static method

public static RemoveTop ( System.Windows.Controls.Panel p ) : void
p System.Windows.Controls.Panel
return void

SetContentTemplate() public static method

public static SetContentTemplate ( System.Windows.Controls.DataGridRowGroupHeader ui, System.Windows.DataTemplate value ) : void
ui System.Windows.Controls.DataGridRowGroupHeader
value System.Windows.DataTemplate
return void

SetDefaultButton() public static method

public static SetDefaultButton ( DependencyObject d, string value ) : void
d System.Windows.DependencyObject
value string
return void

SetFixedDrag() public static method

public static SetFixedDrag ( TreeViewDragDropTarget ui, bool value ) : void
ui TreeViewDragDropTarget
value bool
return void

SetFocus() public static method

public static SetFocus ( FrameworkElement ui, string value ) : void
ui System.Windows.FrameworkElement
value string
return void

SetFocusToOnEnter() public static method

public static SetFocusToOnEnter ( FrameworkElement ui, string value ) : void
ui System.Windows.FrameworkElement
value string
return void

SetGroupRowTemplate() public static method

public static SetGroupRowTemplate ( System.Windows.Controls.DataGrid ui, System.Windows.DataTemplate value ) : void
ui System.Windows.Controls.DataGrid
value System.Windows.DataTemplate
return void

SetHtmlSource() public static method

public static SetHtmlSource ( DependencyObject d, string value ) : void
d System.Windows.DependencyObject
value string
return void

SetInitResource() public static method

public static SetInitResource ( FrameworkElement ui, bool value ) : void
ui System.Windows.FrameworkElement
value bool
return void

SetIsButtonDown() public static method

public static SetIsButtonDown ( FrameworkElement ui, bool value ) : void
ui System.Windows.FrameworkElement
value bool
return void

SetLostFocus() public static method

public static SetLostFocus ( FrameworkElement ui, Delegate value ) : void
ui System.Windows.FrameworkElement
value System.Delegate
return void

SetPageName() public static method

public static SetPageName ( DependencyObject d, string value ) : void
d System.Windows.DependencyObject
value string
return void

SetShowIndex() public static method

public static SetShowIndex ( FrameworkElement ui, int value ) : void
ui System.Windows.FrameworkElement
value int
return void

SetSource() public static method

public static SetSource ( DependencyObject d, string value ) : void
d System.Windows.DependencyObject
value string
return void

SetUpdateOnEnter() public static method

public static SetUpdateOnEnter ( FrameworkElement ui, string value ) : void
ui System.Windows.FrameworkElement
value string
return void

SetUpdateOnTextChanged() public static method

public static SetUpdateOnTextChanged ( FrameworkElement ui, string value ) : void
ui System.Windows.FrameworkElement
value string
return void

Property Details

ContentTemplateProperty public static property

public static DependencyProperty,System.Windows ContentTemplateProperty
return System.Windows.DependencyProperty

DefaultButtonProperty public static property

public static DependencyProperty,System.Windows DefaultButtonProperty
return System.Windows.DependencyProperty

FixedDragProperty public static property

public static DependencyProperty,System.Windows FixedDragProperty
return System.Windows.DependencyProperty

FocusProperty public static property

public static DependencyProperty,System.Windows FocusProperty
return System.Windows.DependencyProperty

FocusToOnEnterProperty public static property

public static DependencyProperty,System.Windows FocusToOnEnterProperty
return System.Windows.DependencyProperty

GroupRowTemplateProperty public static property

public static DependencyProperty,System.Windows GroupRowTemplateProperty
return System.Windows.DependencyProperty

HtmlSourceProperty public static property

public static DependencyProperty,System.Windows HtmlSourceProperty
return System.Windows.DependencyProperty

InitResourceProperty public static property

public static DependencyProperty,System.Windows InitResourceProperty
return System.Windows.DependencyProperty

IsButtonDownProperty public static property

public static DependencyProperty,System.Windows IsButtonDownProperty
return System.Windows.DependencyProperty

LostFocusProperty public static property

public static DependencyProperty,System.Windows LostFocusProperty
return System.Windows.DependencyProperty

PageNameProperty public static property

public static DependencyProperty,System.Windows PageNameProperty
return System.Windows.DependencyProperty

ShowIndexProperty public static property

public static DependencyProperty,System.Windows ShowIndexProperty
return System.Windows.DependencyProperty

SourceProperty public static property

public static DependencyProperty,System.Windows SourceProperty
return System.Windows.DependencyProperty

UpdateOnEnterProperty public static property

public static DependencyProperty,System.Windows UpdateOnEnterProperty
return System.Windows.DependencyProperty

UpdateOnTextChangedProperty public static property

public static DependencyProperty,System.Windows UpdateOnTextChangedProperty
return System.Windows.DependencyProperty