File size: 33,595 Bytes
8c763fb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 | // Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#region StyleCop Suppression - generated code
using System;
using System.ComponentModel;
using System.Windows;
using System.Windows.Automation.Peers;
using System.Windows.Controls;
using System.Windows.Input;
namespace Microsoft.Management.UI.Internal
{
/// <summary>
/// Interaction logic for ManagementList.
/// </summary>
[TemplatePart(Name="PART_ViewManager", Type=typeof(ListOrganizer))]
[TemplatePart(Name="PART_ViewSaver", Type=typeof(PickerBase))]
[Localizability(LocalizationCategory.None)]
partial class ManagementList
{
//
// Fields
//
private ListOrganizer viewManager;
private PickerBase viewSaver;
//
// ViewsChanged RoutedEvent
//
/// <summary>
/// Identifies the ViewsChanged RoutedEvent.
/// </summary>
public static readonly RoutedEvent ViewsChangedEvent = EventManager.RegisterRoutedEvent("ViewsChanged",RoutingStrategy.Bubble,typeof(RoutedEventHandler),typeof(ManagementList));
/// <summary>
/// Occurs when any of this instance's views change.
/// </summary>
public event RoutedEventHandler ViewsChanged
{
add
{
AddHandler(ViewsChangedEvent,value);
}
remove
{
RemoveHandler(ViewsChangedEvent,value);
}
}
//
// ClearFilter routed command
//
/// <summary>
/// Informs the ManagementList that it should clear the filter that is applied.
/// </summary>
public static readonly RoutedCommand ClearFilterCommand = new RoutedCommand("ClearFilter",typeof(ManagementList));
static private void ClearFilterCommand_CommandCanExecute(object sender, CanExecuteRoutedEventArgs e)
{
ManagementList obj = (ManagementList) sender;
obj.OnClearFilterCanExecute( e );
}
static private void ClearFilterCommand_CommandExecuted(object sender, ExecutedRoutedEventArgs e)
{
ManagementList obj = (ManagementList) sender;
obj.OnClearFilterExecuted( e );
}
/// <summary>
/// Called to determine if ClearFilter can execute.
/// </summary>
protected virtual void OnClearFilterCanExecute(CanExecuteRoutedEventArgs e)
{
OnClearFilterCanExecuteImplementation(e);
}
partial void OnClearFilterCanExecuteImplementation(CanExecuteRoutedEventArgs e);
/// <summary>
/// Called when ClearFilter executes.
/// </summary>
/// <remarks>
/// Informs the ManagementList that it should clear the filter that is applied.
/// </remarks>
protected virtual void OnClearFilterExecuted(ExecutedRoutedEventArgs e)
{
OnClearFilterExecutedImplementation(e);
}
partial void OnClearFilterExecutedImplementation(ExecutedRoutedEventArgs e);
//
// SaveView routed command
//
/// <summary>
/// Informs the PickerBase that it should close the dropdown.
/// </summary>
public static readonly RoutedCommand SaveViewCommand = new RoutedCommand("SaveView",typeof(ManagementList));
static private void SaveViewCommand_CommandCanExecute(object sender, CanExecuteRoutedEventArgs e)
{
ManagementList obj = (ManagementList) sender;
obj.OnSaveViewCanExecute( e );
}
static private void SaveViewCommand_CommandExecuted(object sender, ExecutedRoutedEventArgs e)
{
ManagementList obj = (ManagementList) sender;
obj.OnSaveViewExecuted( e );
}
/// <summary>
/// Called to determine if SaveView can execute.
/// </summary>
protected virtual void OnSaveViewCanExecute(CanExecuteRoutedEventArgs e)
{
OnSaveViewCanExecuteImplementation(e);
}
partial void OnSaveViewCanExecuteImplementation(CanExecuteRoutedEventArgs e);
/// <summary>
/// Called when SaveView executes.
/// </summary>
/// <remarks>
/// Informs the PickerBase that it should close the dropdown.
/// </remarks>
protected virtual void OnSaveViewExecuted(ExecutedRoutedEventArgs e)
{
OnSaveViewExecutedImplementation(e);
}
partial void OnSaveViewExecutedImplementation(ExecutedRoutedEventArgs e);
//
// StartFilter routed command
//
/// <summary>
/// Informs the ManagementList that it should apply the filter.
/// </summary>
public static readonly RoutedCommand StartFilterCommand = new RoutedCommand("StartFilter",typeof(ManagementList));
static private void StartFilterCommand_CommandCanExecute(object sender, CanExecuteRoutedEventArgs e)
{
ManagementList obj = (ManagementList) sender;
obj.OnStartFilterCanExecute( e );
}
static private void StartFilterCommand_CommandExecuted(object sender, ExecutedRoutedEventArgs e)
{
ManagementList obj = (ManagementList) sender;
obj.OnStartFilterExecuted( e );
}
/// <summary>
/// Called to determine if StartFilter can execute.
/// </summary>
protected virtual void OnStartFilterCanExecute(CanExecuteRoutedEventArgs e)
{
OnStartFilterCanExecuteImplementation(e);
}
partial void OnStartFilterCanExecuteImplementation(CanExecuteRoutedEventArgs e);
/// <summary>
/// Called when StartFilter executes.
/// </summary>
/// <remarks>
/// Informs the ManagementList that it should apply the filter.
/// </remarks>
protected virtual void OnStartFilterExecuted(ExecutedRoutedEventArgs e)
{
OnStartFilterExecutedImplementation(e);
}
partial void OnStartFilterExecutedImplementation(ExecutedRoutedEventArgs e);
//
// StopFilter routed command
//
/// <summary>
/// Informs the ManagementList that it should stop filtering that is in progress.
/// </summary>
public static readonly RoutedCommand StopFilterCommand = new RoutedCommand("StopFilter",typeof(ManagementList));
static private void StopFilterCommand_CommandCanExecute(object sender, CanExecuteRoutedEventArgs e)
{
ManagementList obj = (ManagementList) sender;
obj.OnStopFilterCanExecute( e );
}
static private void StopFilterCommand_CommandExecuted(object sender, ExecutedRoutedEventArgs e)
{
ManagementList obj = (ManagementList) sender;
obj.OnStopFilterExecuted( e );
}
/// <summary>
/// Called to determine if StopFilter can execute.
/// </summary>
protected virtual void OnStopFilterCanExecute(CanExecuteRoutedEventArgs e)
{
OnStopFilterCanExecuteImplementation(e);
}
partial void OnStopFilterCanExecuteImplementation(CanExecuteRoutedEventArgs e);
/// <summary>
/// Called when StopFilter executes.
/// </summary>
/// <remarks>
/// Informs the ManagementList that it should stop filtering that is in progress.
/// </remarks>
protected virtual void OnStopFilterExecuted(ExecutedRoutedEventArgs e)
{
OnStopFilterExecutedImplementation(e);
}
partial void OnStopFilterExecutedImplementation(ExecutedRoutedEventArgs e);
//
// AddFilterRulePicker dependency property
//
/// <summary>
/// Identifies the AddFilterRulePicker dependency property key.
/// </summary>
private static readonly DependencyPropertyKey AddFilterRulePickerPropertyKey = DependencyProperty.RegisterReadOnly( "AddFilterRulePicker", typeof(AddFilterRulePicker), typeof(ManagementList), new PropertyMetadata( null, AddFilterRulePickerProperty_PropertyChanged) );
/// <summary>
/// Identifies the AddFilterRulePicker dependency property.
/// </summary>
public static readonly DependencyProperty AddFilterRulePickerProperty = AddFilterRulePickerPropertyKey.DependencyProperty;
/// <summary>
/// Gets the filter rule picker.
/// </summary>
[Bindable(true)]
[Category("Common Properties")]
[Description("Gets the filter rule picker.")]
[Localizability(LocalizationCategory.None)]
public AddFilterRulePicker AddFilterRulePicker
{
get
{
return (AddFilterRulePicker) GetValue(AddFilterRulePickerProperty);
}
private set
{
SetValue(AddFilterRulePickerPropertyKey,value);
}
}
static private void AddFilterRulePickerProperty_PropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
{
ManagementList obj = (ManagementList) o;
obj.OnAddFilterRulePickerChanged( new PropertyChangedEventArgs<AddFilterRulePicker>((AddFilterRulePicker)e.OldValue, (AddFilterRulePicker)e.NewValue) );
}
/// <summary>
/// Occurs when AddFilterRulePicker property changes.
/// </summary>
public event EventHandler<PropertyChangedEventArgs<AddFilterRulePicker>> AddFilterRulePickerChanged;
/// <summary>
/// Called when AddFilterRulePicker property changes.
/// </summary>
protected virtual void OnAddFilterRulePickerChanged(PropertyChangedEventArgs<AddFilterRulePicker> e)
{
OnAddFilterRulePickerChangedImplementation(e);
RaisePropertyChangedEvent(AddFilterRulePickerChanged, e);
}
partial void OnAddFilterRulePickerChangedImplementation(PropertyChangedEventArgs<AddFilterRulePicker> e);
//
// CurrentView dependency property
//
/// <summary>
/// Identifies the CurrentView dependency property key.
/// </summary>
private static readonly DependencyPropertyKey CurrentViewPropertyKey = DependencyProperty.RegisterReadOnly( "CurrentView", typeof(StateDescriptor<ManagementList>), typeof(ManagementList), new PropertyMetadata( null, CurrentViewProperty_PropertyChanged) );
/// <summary>
/// Identifies the CurrentView dependency property.
/// </summary>
public static readonly DependencyProperty CurrentViewProperty = CurrentViewPropertyKey.DependencyProperty;
/// <summary>
/// Gets or sets current view.
/// </summary>
[Bindable(true)]
[Category("Common Properties")]
[Description("Gets or sets current view.")]
[Localizability(LocalizationCategory.None)]
public StateDescriptor<ManagementList> CurrentView
{
get
{
return (StateDescriptor<ManagementList>) GetValue(CurrentViewProperty);
}
private set
{
SetValue(CurrentViewPropertyKey,value);
}
}
static private void CurrentViewProperty_PropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
{
ManagementList obj = (ManagementList) o;
obj.OnCurrentViewChanged( new PropertyChangedEventArgs<StateDescriptor<ManagementList>>((StateDescriptor<ManagementList>)e.OldValue, (StateDescriptor<ManagementList>)e.NewValue) );
}
/// <summary>
/// Occurs when CurrentView property changes.
/// </summary>
public event EventHandler<PropertyChangedEventArgs<StateDescriptor<ManagementList>>> CurrentViewChanged;
/// <summary>
/// Called when CurrentView property changes.
/// </summary>
protected virtual void OnCurrentViewChanged(PropertyChangedEventArgs<StateDescriptor<ManagementList>> e)
{
OnCurrentViewChangedImplementation(e);
RaisePropertyChangedEvent(CurrentViewChanged, e);
}
partial void OnCurrentViewChangedImplementation(PropertyChangedEventArgs<StateDescriptor<ManagementList>> e);
//
// Evaluator dependency property
//
/// <summary>
/// Identifies the Evaluator dependency property.
/// </summary>
public static readonly DependencyProperty EvaluatorProperty = DependencyProperty.Register( "Evaluator", typeof(ItemsControlFilterEvaluator), typeof(ManagementList), new PropertyMetadata( null, EvaluatorProperty_PropertyChanged) );
/// <summary>
/// Gets or sets the FilterEvaluator.
/// </summary>
[Bindable(true)]
[Category("Common Properties")]
[Description("Gets or sets the FilterEvaluator.")]
[Localizability(LocalizationCategory.None)]
public ItemsControlFilterEvaluator Evaluator
{
get
{
return (ItemsControlFilterEvaluator) GetValue(EvaluatorProperty);
}
set
{
SetValue(EvaluatorProperty,value);
}
}
static private void EvaluatorProperty_PropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
{
ManagementList obj = (ManagementList) o;
obj.OnEvaluatorChanged( new PropertyChangedEventArgs<ItemsControlFilterEvaluator>((ItemsControlFilterEvaluator)e.OldValue, (ItemsControlFilterEvaluator)e.NewValue) );
}
/// <summary>
/// Occurs when Evaluator property changes.
/// </summary>
public event EventHandler<PropertyChangedEventArgs<ItemsControlFilterEvaluator>> EvaluatorChanged;
/// <summary>
/// Called when Evaluator property changes.
/// </summary>
protected virtual void OnEvaluatorChanged(PropertyChangedEventArgs<ItemsControlFilterEvaluator> e)
{
OnEvaluatorChangedImplementation(e);
RaisePropertyChangedEvent(EvaluatorChanged, e);
}
partial void OnEvaluatorChangedImplementation(PropertyChangedEventArgs<ItemsControlFilterEvaluator> e);
//
// FilterRulePanel dependency property
//
/// <summary>
/// Identifies the FilterRulePanel dependency property key.
/// </summary>
private static readonly DependencyPropertyKey FilterRulePanelPropertyKey = DependencyProperty.RegisterReadOnly( "FilterRulePanel", typeof(FilterRulePanel), typeof(ManagementList), new PropertyMetadata( null, FilterRulePanelProperty_PropertyChanged) );
/// <summary>
/// Identifies the FilterRulePanel dependency property.
/// </summary>
public static readonly DependencyProperty FilterRulePanelProperty = FilterRulePanelPropertyKey.DependencyProperty;
/// <summary>
/// Gets the filter rule panel.
/// </summary>
[Bindable(true)]
[Category("Common Properties")]
[Description("Gets the filter rule panel.")]
[Localizability(LocalizationCategory.None)]
public FilterRulePanel FilterRulePanel
{
get
{
return (FilterRulePanel) GetValue(FilterRulePanelProperty);
}
private set
{
SetValue(FilterRulePanelPropertyKey,value);
}
}
static private void FilterRulePanelProperty_PropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
{
ManagementList obj = (ManagementList) o;
obj.OnFilterRulePanelChanged( new PropertyChangedEventArgs<FilterRulePanel>((FilterRulePanel)e.OldValue, (FilterRulePanel)e.NewValue) );
}
/// <summary>
/// Occurs when FilterRulePanel property changes.
/// </summary>
public event EventHandler<PropertyChangedEventArgs<FilterRulePanel>> FilterRulePanelChanged;
/// <summary>
/// Called when FilterRulePanel property changes.
/// </summary>
protected virtual void OnFilterRulePanelChanged(PropertyChangedEventArgs<FilterRulePanel> e)
{
OnFilterRulePanelChangedImplementation(e);
RaisePropertyChangedEvent(FilterRulePanelChanged, e);
}
partial void OnFilterRulePanelChangedImplementation(PropertyChangedEventArgs<FilterRulePanel> e);
//
// IsFilterShown dependency property
//
/// <summary>
/// Identifies the IsFilterShown dependency property.
/// </summary>
public static readonly DependencyProperty IsFilterShownProperty = DependencyProperty.Register( "IsFilterShown", typeof(bool), typeof(ManagementList), new PropertyMetadata( BooleanBoxes.TrueBox, IsFilterShownProperty_PropertyChanged) );
/// <summary>
/// Gets or sets a value indicating whether the filter is shown.
/// </summary>
[Bindable(true)]
[Category("Common Properties")]
[Description("Gets or sets a value indicating whether the filter is shown.")]
[Localizability(LocalizationCategory.None)]
public bool IsFilterShown
{
get
{
return (bool) GetValue(IsFilterShownProperty);
}
set
{
SetValue(IsFilterShownProperty,BooleanBoxes.Box(value));
}
}
static private void IsFilterShownProperty_PropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
{
ManagementList obj = (ManagementList) o;
obj.OnIsFilterShownChanged( new PropertyChangedEventArgs<bool>((bool)e.OldValue, (bool)e.NewValue) );
}
/// <summary>
/// Occurs when IsFilterShown property changes.
/// </summary>
public event EventHandler<PropertyChangedEventArgs<bool>> IsFilterShownChanged;
/// <summary>
/// Called when IsFilterShown property changes.
/// </summary>
protected virtual void OnIsFilterShownChanged(PropertyChangedEventArgs<bool> e)
{
OnIsFilterShownChangedImplementation(e);
RaisePropertyChangedEvent(IsFilterShownChanged, e);
}
partial void OnIsFilterShownChangedImplementation(PropertyChangedEventArgs<bool> e);
//
// IsLoadingItems dependency property
//
/// <summary>
/// Identifies the IsLoadingItems dependency property.
/// </summary>
public static readonly DependencyProperty IsLoadingItemsProperty = DependencyProperty.Register( "IsLoadingItems", typeof(bool), typeof(ManagementList), new PropertyMetadata( BooleanBoxes.FalseBox, IsLoadingItemsProperty_PropertyChanged) );
/// <summary>
/// Gets or sets a value indicating whether items are loading.
/// </summary>
[Bindable(true)]
[Category("Common Properties")]
[Description("Gets or sets a value indicating whether items are loading.")]
[Localizability(LocalizationCategory.None)]
public bool IsLoadingItems
{
get
{
return (bool) GetValue(IsLoadingItemsProperty);
}
set
{
SetValue(IsLoadingItemsProperty,BooleanBoxes.Box(value));
}
}
static private void IsLoadingItemsProperty_PropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
{
ManagementList obj = (ManagementList) o;
obj.OnIsLoadingItemsChanged( new PropertyChangedEventArgs<bool>((bool)e.OldValue, (bool)e.NewValue) );
}
/// <summary>
/// Occurs when IsLoadingItems property changes.
/// </summary>
public event EventHandler<PropertyChangedEventArgs<bool>> IsLoadingItemsChanged;
/// <summary>
/// Called when IsLoadingItems property changes.
/// </summary>
protected virtual void OnIsLoadingItemsChanged(PropertyChangedEventArgs<bool> e)
{
OnIsLoadingItemsChangedImplementation(e);
RaisePropertyChangedEvent(IsLoadingItemsChanged, e);
}
partial void OnIsLoadingItemsChangedImplementation(PropertyChangedEventArgs<bool> e);
//
// IsSearchShown dependency property
//
/// <summary>
/// Identifies the IsSearchShown dependency property.
/// </summary>
public static readonly DependencyProperty IsSearchShownProperty = DependencyProperty.Register( "IsSearchShown", typeof(bool), typeof(ManagementList), new PropertyMetadata( BooleanBoxes.TrueBox, IsSearchShownProperty_PropertyChanged) );
/// <summary>
/// Gets or sets a value indicating whether the search box is shown.
/// </summary>
[Bindable(true)]
[Category("Common Properties")]
[Description("Gets or sets a value indicating whether the search box is shown.")]
[Localizability(LocalizationCategory.None)]
public bool IsSearchShown
{
get
{
return (bool) GetValue(IsSearchShownProperty);
}
set
{
SetValue(IsSearchShownProperty,BooleanBoxes.Box(value));
}
}
static private void IsSearchShownProperty_PropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
{
ManagementList obj = (ManagementList) o;
obj.OnIsSearchShownChanged( new PropertyChangedEventArgs<bool>((bool)e.OldValue, (bool)e.NewValue) );
}
/// <summary>
/// Occurs when IsSearchShown property changes.
/// </summary>
public event EventHandler<PropertyChangedEventArgs<bool>> IsSearchShownChanged;
/// <summary>
/// Called when IsSearchShown property changes.
/// </summary>
protected virtual void OnIsSearchShownChanged(PropertyChangedEventArgs<bool> e)
{
OnIsSearchShownChangedImplementation(e);
RaisePropertyChangedEvent(IsSearchShownChanged, e);
}
partial void OnIsSearchShownChangedImplementation(PropertyChangedEventArgs<bool> e);
//
// List dependency property
//
/// <summary>
/// Identifies the List dependency property key.
/// </summary>
private static readonly DependencyPropertyKey ListPropertyKey = DependencyProperty.RegisterReadOnly( "List", typeof(InnerList), typeof(ManagementList), new PropertyMetadata( null, ListProperty_PropertyChanged) );
/// <summary>
/// Identifies the List dependency property.
/// </summary>
public static readonly DependencyProperty ListProperty = ListPropertyKey.DependencyProperty;
/// <summary>
/// Gets the list.
/// </summary>
[Bindable(true)]
[Category("Common Properties")]
[Description("Gets the list.")]
[Localizability(LocalizationCategory.None)]
public InnerList List
{
get
{
return (InnerList) GetValue(ListProperty);
}
private set
{
SetValue(ListPropertyKey,value);
}
}
static private void ListProperty_PropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
{
ManagementList obj = (ManagementList) o;
obj.OnListChanged( new PropertyChangedEventArgs<InnerList>((InnerList)e.OldValue, (InnerList)e.NewValue) );
}
/// <summary>
/// Occurs when List property changes.
/// </summary>
public event EventHandler<PropertyChangedEventArgs<InnerList>> ListChanged;
/// <summary>
/// Called when List property changes.
/// </summary>
protected virtual void OnListChanged(PropertyChangedEventArgs<InnerList> e)
{
OnListChangedImplementation(e);
RaisePropertyChangedEvent(ListChanged, e);
}
partial void OnListChangedImplementation(PropertyChangedEventArgs<InnerList> e);
//
// SearchBox dependency property
//
/// <summary>
/// Identifies the SearchBox dependency property key.
/// </summary>
private static readonly DependencyPropertyKey SearchBoxPropertyKey = DependencyProperty.RegisterReadOnly( "SearchBox", typeof(SearchBox), typeof(ManagementList), new PropertyMetadata( null, SearchBoxProperty_PropertyChanged) );
/// <summary>
/// Identifies the SearchBox dependency property.
/// </summary>
public static readonly DependencyProperty SearchBoxProperty = SearchBoxPropertyKey.DependencyProperty;
/// <summary>
/// Gets the search box.
/// </summary>
[Bindable(true)]
[Category("Common Properties")]
[Description("Gets the search box.")]
[Localizability(LocalizationCategory.None)]
public SearchBox SearchBox
{
get
{
return (SearchBox) GetValue(SearchBoxProperty);
}
private set
{
SetValue(SearchBoxPropertyKey,value);
}
}
static private void SearchBoxProperty_PropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
{
ManagementList obj = (ManagementList) o;
obj.OnSearchBoxChanged( new PropertyChangedEventArgs<SearchBox>((SearchBox)e.OldValue, (SearchBox)e.NewValue) );
}
/// <summary>
/// Occurs when SearchBox property changes.
/// </summary>
public event EventHandler<PropertyChangedEventArgs<SearchBox>> SearchBoxChanged;
/// <summary>
/// Called when SearchBox property changes.
/// </summary>
protected virtual void OnSearchBoxChanged(PropertyChangedEventArgs<SearchBox> e)
{
OnSearchBoxChangedImplementation(e);
RaisePropertyChangedEvent(SearchBoxChanged, e);
}
partial void OnSearchBoxChangedImplementation(PropertyChangedEventArgs<SearchBox> e);
//
// ViewManagerUserActionState dependency property
//
/// <summary>
/// Identifies the ViewManagerUserActionState dependency property.
/// </summary>
public static readonly DependencyProperty ViewManagerUserActionStateProperty = DependencyProperty.Register( "ViewManagerUserActionState", typeof(UserActionState), typeof(ManagementList), new PropertyMetadata( UserActionState.Enabled, ViewManagerUserActionStateProperty_PropertyChanged) );
/// <summary>
/// Gets or sets the user interaction state of the view manager.
/// </summary>
[Bindable(true)]
[Category("Common Properties")]
[Description("Gets or sets the user interaction state of the view manager.")]
[Localizability(LocalizationCategory.None)]
public UserActionState ViewManagerUserActionState
{
get
{
return (UserActionState) GetValue(ViewManagerUserActionStateProperty);
}
set
{
SetValue(ViewManagerUserActionStateProperty,value);
}
}
static private void ViewManagerUserActionStateProperty_PropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
{
ManagementList obj = (ManagementList) o;
obj.OnViewManagerUserActionStateChanged( new PropertyChangedEventArgs<UserActionState>((UserActionState)e.OldValue, (UserActionState)e.NewValue) );
}
/// <summary>
/// Occurs when ViewManagerUserActionState property changes.
/// </summary>
public event EventHandler<PropertyChangedEventArgs<UserActionState>> ViewManagerUserActionStateChanged;
/// <summary>
/// Called when ViewManagerUserActionState property changes.
/// </summary>
protected virtual void OnViewManagerUserActionStateChanged(PropertyChangedEventArgs<UserActionState> e)
{
OnViewManagerUserActionStateChangedImplementation(e);
RaisePropertyChangedEvent(ViewManagerUserActionStateChanged, e);
}
partial void OnViewManagerUserActionStateChangedImplementation(PropertyChangedEventArgs<UserActionState> e);
//
// ViewSaverUserActionState dependency property
//
/// <summary>
/// Identifies the ViewSaverUserActionState dependency property.
/// </summary>
public static readonly DependencyProperty ViewSaverUserActionStateProperty = DependencyProperty.Register( "ViewSaverUserActionState", typeof(UserActionState), typeof(ManagementList), new PropertyMetadata( UserActionState.Enabled, ViewSaverUserActionStateProperty_PropertyChanged) );
/// <summary>
/// Gets or sets the user interaction state of the view saver.
/// </summary>
[Bindable(true)]
[Category("Common Properties")]
[Description("Gets or sets the user interaction state of the view saver.")]
[Localizability(LocalizationCategory.None)]
public UserActionState ViewSaverUserActionState
{
get
{
return (UserActionState) GetValue(ViewSaverUserActionStateProperty);
}
set
{
SetValue(ViewSaverUserActionStateProperty,value);
}
}
static private void ViewSaverUserActionStateProperty_PropertyChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
{
ManagementList obj = (ManagementList) o;
obj.OnViewSaverUserActionStateChanged( new PropertyChangedEventArgs<UserActionState>((UserActionState)e.OldValue, (UserActionState)e.NewValue) );
}
/// <summary>
/// Occurs when ViewSaverUserActionState property changes.
/// </summary>
public event EventHandler<PropertyChangedEventArgs<UserActionState>> ViewSaverUserActionStateChanged;
/// <summary>
/// Called when ViewSaverUserActionState property changes.
/// </summary>
protected virtual void OnViewSaverUserActionStateChanged(PropertyChangedEventArgs<UserActionState> e)
{
OnViewSaverUserActionStateChangedImplementation(e);
RaisePropertyChangedEvent(ViewSaverUserActionStateChanged, e);
}
partial void OnViewSaverUserActionStateChangedImplementation(PropertyChangedEventArgs<UserActionState> e);
/// <summary>
/// Called when a property changes.
/// </summary>
private void RaisePropertyChangedEvent<T>(EventHandler<PropertyChangedEventArgs<T>> eh, PropertyChangedEventArgs<T> e)
{
if (eh != null)
{
eh(this,e);
}
}
//
// OnApplyTemplate
//
/// <summary>
/// Called when ApplyTemplate is called.
/// </summary>
public override void OnApplyTemplate()
{
PreOnApplyTemplate();
base.OnApplyTemplate();
this.viewManager = WpfHelp.GetTemplateChild<ListOrganizer>(this,"PART_ViewManager");
this.viewSaver = WpfHelp.GetTemplateChild<PickerBase>(this,"PART_ViewSaver");
PostOnApplyTemplate();
}
partial void PreOnApplyTemplate();
partial void PostOnApplyTemplate();
//
// Static constructor
//
/// <summary>
/// Called when the type is initialized.
/// </summary>
static ManagementList()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(ManagementList), new FrameworkPropertyMetadata(typeof(ManagementList)));
CommandManager.RegisterClassCommandBinding( typeof(ManagementList), new CommandBinding( ManagementList.ClearFilterCommand, ClearFilterCommand_CommandExecuted, ClearFilterCommand_CommandCanExecute ));
CommandManager.RegisterClassCommandBinding( typeof(ManagementList), new CommandBinding( ManagementList.SaveViewCommand, SaveViewCommand_CommandExecuted, SaveViewCommand_CommandCanExecute ));
CommandManager.RegisterClassCommandBinding( typeof(ManagementList), new CommandBinding( ManagementList.StartFilterCommand, StartFilterCommand_CommandExecuted, StartFilterCommand_CommandCanExecute ));
CommandManager.RegisterClassCommandBinding( typeof(ManagementList), new CommandBinding( ManagementList.StopFilterCommand, StopFilterCommand_CommandExecuted, StopFilterCommand_CommandCanExecute ));
StaticConstructorImplementation();
}
static partial void StaticConstructorImplementation();
//
// CreateAutomationPeer
//
/// <summary>
/// Create an instance of the AutomationPeer.
/// </summary>
/// <returns>
/// An instance of the AutomationPeer.
/// </returns>
protected override System.Windows.Automation.Peers.AutomationPeer OnCreateAutomationPeer()
{
return new ExtendedFrameworkElementAutomationPeer(this,AutomationControlType.Pane);
}
}
}
#endregion
|