public override void Load() { ItemsProperty.Clear(); for (int i = 0; i < MainManager.instance.CharacterList.Count; i++) { ItemsProperty.Add(new CharacterItemContext(MainManager.instance.CharacterList[i].Name, i, this)); } base.Load(); Select(MainManager.instance.CurrentSelectCharacterId); }
private void ConnectItems(IDomain domain, IArea currentArea, IObject currentObject, ref bool IsConnected) { IResource Resource = ItemsResource; IObject Object = ItemsObject; IObjectPropertyStringList ObjectProperty = ItemsObjectProperty; IsConnected |= ItemsProperty.ConnectToStringList(domain, currentArea, currentObject, ref Resource, ref Object, ref ObjectProperty); ItemsResource = Resource; ItemsObject = Object; ItemsObjectProperty = ObjectProperty; ItemsObjectProperty?.SetIsRead(); }
/// <summary> /// Called after the view and its children has been loaded. /// </summary> protected override void AfterLoad() { base.AfterLoad(); if (IsStaticProperty.IsUndefined(this) && ItemsProperty.IsUndefined(this)) { // if items property isn't defined assume tab panel is meant to be static IsStatic = true; } if (IsStatic) { CreateStaticTabItems(); } else { ItemsChanged(); } }
get => (VisualObjectCollection)GetValue(ItemsProperty); set => SetValue(ItemsProperty, value);
set => SetValue(ItemsProperty, value);
/// <inheritdoc/> protected override string OnComputeId() { return($"{GetType().Name}[{ChangeType?.ToString() + ": " + ItemsProperty?.ToString()}]"); }
private set => this.SetValue(ItemsProperty, value);
static TagsBox() { ItemsProperty.OverrideMetadata <TagsBox>( new DirectPropertyMetadata <IEnumerable?>(enableDataValidation: true)); }
get => (IEnumerable <IExplorerControlBrowsableObjectInfoViewModel>)GetValue(ItemsProperty); set => SetValue(ItemsProperty, value);