/// <summary> /// Gets resolved data from this or any Chained data item /// where data is valid for view. /// </summary> /// <param name="view"></param> /// <returns></returns> public object GetData(string view) { if (string.IsNullOrEmpty(view) || IsCurrentValidForView(view)) { return(Data); } else if (ChainedDataItem != null && ChainedDataItem.IsValidForView(view)) { return(ChainedDataItem.GetData(view)); } else { return(null); } }
/// <summary> /// Gets the data control appropriate for the identified view /// </summary> /// <param name="view"></param> /// <returns></returns> public IDataContextInvokable GetDataControl(string view) { if (IsCurrentValidForView(view)) { return(DataControl); } else if (ChainedDataItem != null) { return(ChainedDataItem.GetDataControl(view)); } else { return(null); } }
public DataItem GetViewSpecificDataItem(string view) { if (IsCurrentValidForView(view)) { return(this); } else if (ChainedDataItem != null) { return(ChainedDataItem.GetViewSpecificDataItem(view)); } else { return(null); } }
/// <summary> /// Tests to see if this data item or (chained data item) /// is valid for the specified view /// </summary> /// <param name="viewName"></param> public bool IsValidForView(string viewName) { if (IsCurrentValidForView(viewName)) { return(true); } else if (ChainedDataItem != null) { return(ChainedDataItem.IsValidForView(viewName)); } else { return(false); } }