This repository has been archived by the owner on Nov 25, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Antonius Riha
committed
Jan 6, 2014
1 parent
0fb038f
commit 6ba5296
Showing
6 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
82 changes: 82 additions & 0 deletions
82
class/PresentationFramework/System.Windows.Data/CollectionViewGroup.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
// | ||
// CollectionViewGroup.cs | ||
// | ||
// Author: | ||
// Antonius Riha <antoniusriha@gmail.com> | ||
// | ||
// Copyright (c) 2012 Antonius Riha | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files (the "Software"), to deal | ||
// in the Software without restriction, including without limitation the rights | ||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
// copies of the Software, and to permit persons to whom the Software is | ||
// furnished to do so, subject to the following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be included in | ||
// all copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
// THE SOFTWARE. | ||
using System; | ||
using System.Collections.ObjectModel; | ||
using System.ComponentModel; | ||
|
||
namespace System.Windows.Data | ||
{ | ||
public abstract class CollectionViewGroup : INotifyPropertyChanged | ||
{ | ||
readonly object name; | ||
|
||
protected CollectionViewGroup (object name) | ||
{ | ||
if (name == null) | ||
throw new ArgumentNullException ("name"); | ||
this.name = name; | ||
} | ||
|
||
public abstract bool IsBottomLevel { get; } | ||
|
||
public int ItemCount { | ||
get { | ||
throw new NotImplementedException (); | ||
} | ||
} | ||
|
||
public ReadOnlyObservableCollection<object> Items { | ||
get { | ||
throw new NotImplementedException (); | ||
} | ||
} | ||
|
||
public object Name { | ||
get { return name; } | ||
} | ||
|
||
protected int ProtectedItemCount { get; set; } | ||
|
||
protected ObservableCollection<object> ProtectedItems { | ||
get { | ||
throw new NotImplementedException (); | ||
} | ||
} | ||
|
||
protected virtual void OnPropertyChanged (PropertyChangedEventArgs e) | ||
{ | ||
if (PropertyChanged != null) | ||
PropertyChanged (this, e); | ||
} | ||
|
||
protected virtual event PropertyChangedEventHandler PropertyChanged; | ||
|
||
event PropertyChangedEventHandler INotifyPropertyChanged.PropertyChanged { | ||
add { PropertyChanged += value; } | ||
remove { PropertyChanged -= value; } | ||
} | ||
} | ||
} |