[EditorBrowsable(EditorBrowsableState.Never)]
[TypeConverter(typeof(TypeTypeConverter))]
[Obsolete("Use Source")]
- public Type MergedWith {
+ public Type MergedWith
+ {
get { return _mergedWith; }
- set {
+ set
+ {
if (_mergedWith == value)
return;
/// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
[TypeConverter(typeof(RDSourceTypeConverter))]
- public Uri Source {
+ public Uri Source
+ {
get { return _source; }
- set {
+ set
+ {
if (_source == value)
return;
throw new InvalidOperationException("Source can only be set from XAML."); //through the RDSourceTypeConverter
/// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- public ICollection<ResourceDictionary> MergedDictionaries {
- get {
- if (_mergedDictionaries == null) {
+ public ICollection<ResourceDictionary> MergedDictionaries
+ {
+ get
+ {
+ if (_mergedDictionaries == null)
+ {
var col = new ObservableCollection<ResourceDictionary>();
col.CollectionChanged += MergedDictionaries_CollectionChanged;
_mergedDictionaries = col;
void StyleSheetsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
{
- switch (e.Action) {
- case NotifyCollectionChangedAction.Add:
+ switch (e.Action)
+ {
+ case NotifyCollectionChangedAction.Add:
ValuesChanged?.Invoke(this, ResourcesChangedEventArgs.StyleSheets);
- break;
+ break;
}
}
IList<ResourceDictionary> _collectionTrack;
_collectionTrack = _collectionTrack ?? new List<ResourceDictionary>();
// Collection has been cleared
- if (e.Action == NotifyCollectionChangedAction.Reset) {
+ if (e.Action == NotifyCollectionChangedAction.Reset)
+ {
foreach (var dictionary in _collectionTrack)
dictionary.ValuesChanged -= Item_ValuesChanged;
return _innerDictionary.GetEnumerator();
}
- internal IEnumerable<KeyValuePair<string, object>> MergedResources {
- get {
+ internal IEnumerable<KeyValuePair<string, object>> MergedResources
+ {
+ get
+ {
if (MergedDictionaries != null)
foreach (var r in MergedDictionaries.Reverse().SelectMany(x => x.MergedResources))
yield return r;