/// <summary>
        /// Create cells for the provided state view.
        /// </summary>
        /// <param name="context">Context used to build the cell view tree.</param>
        /// <param name="parentCellView">The parent cell view.</param>
        public override IFrameCellView BuildNodeCells(IFrameCellViewTreeContext context, IFrameCellViewCollection parentCellView)
        {
            IFrameNodeState State = context.StateView.State;
            int             Value = NodeTreeHelper.GetEnumValue(State.Node, PropertyName);

            Debug.Assert(Value >= 0 && Value < Items.Count);

            IFrameKeywordFrame KeywordFrame = Items[Value];
            IFrameDiscreteContentFocusableCellView CellView = CreateDiscreteContentFocusableCellView(context.StateView, parentCellView, KeywordFrame);

            ValidateDiscreteContentFocusableCellView(context, KeywordFrame, CellView);

            return(CellView);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Creates a IxxxDiscreteContentFocusableCellView object.
 /// </summary>
 private protected override IFrameDiscreteContentFocusableCellView CreateDiscreteContentFocusableCellView(IFrameNodeStateView stateView, IFrameCellViewCollection parentCellView, IFrameKeywordFrame keywordFrame)
 {
     ControllerTools.AssertNoOverride(this, Type.FromTypeof <FocusDiscreteFrame>());
     return(new FocusDiscreteContentFocusableCellView((IFocusNodeStateView)stateView, (IFocusCellViewCollection)parentCellView, this, PropertyName, (IFocusKeywordFrame)keywordFrame));
 }
Exemplo n.º 3
0
 private protected override void ValidateDiscreteContentFocusableCellView(IFrameCellViewTreeContext context, IFrameKeywordFrame keywordFrame, IFrameDiscreteContentFocusableCellView cellView)
 {
     Debug.Assert(((IFocusDiscreteContentFocusableCellView)cellView).StateView == ((IFocusCellViewTreeContext)context).StateView);
     Debug.Assert(((IFocusDiscreteContentFocusableCellView)cellView).Frame == this);
     Debug.Assert(((IFocusDiscreteContentFocusableCellView)cellView).KeywordFrame == (IFocusKeywordFrame)keywordFrame);
     IFocusCellViewCollection ParentCellView = ((IFocusDiscreteContentFocusableCellView)cellView).ParentCellView;
 }
 bool ICollection <IFrameKeywordFrame> .Remove(IFrameKeywordFrame item)
 {
     return(Remove((ILayoutKeywordFrame)item));
 }
 private protected virtual void ValidateDiscreteContentFocusableCellView(IFrameCellViewTreeContext context, IFrameKeywordFrame keywordFrame, IFrameDiscreteContentFocusableCellView cellView)
 {
     Debug.Assert(cellView.StateView == context.StateView);
     Debug.Assert(cellView.Frame == this);
     Debug.Assert(cellView.KeywordFrame == keywordFrame);
     IFrameCellViewCollection ParentCellView = cellView.ParentCellView;
 }
 void ICollection <IFrameKeywordFrame> .Add(IFrameKeywordFrame item)
 {
     Add((ILayoutKeywordFrame)item);
 }
 bool ICollection <IFrameKeywordFrame> .Contains(IFrameKeywordFrame value)
 {
     return(Contains((ILayoutKeywordFrame)value));
 }
 void IList <IFrameKeywordFrame> .Insert(int index, IFrameKeywordFrame item)
 {
     Insert(index, (ILayoutKeywordFrame)item);
 }
 int IList <IFrameKeywordFrame> .IndexOf(IFrameKeywordFrame value)
 {
     return(IndexOf((ILayoutKeywordFrame)value));
 }
Exemplo n.º 10
0
 /// <summary>
 /// Creates a IxxxDiscreteContentFocusableCellView object.
 /// </summary>
 private protected override IFrameDiscreteContentFocusableCellView CreateDiscreteContentFocusableCellView(IFrameNodeStateView stateView, IFrameCellViewCollection parentCellView, IFrameKeywordFrame keywordFrame)
 {
     ControllerTools.AssertNoOverride(this, typeof(LayoutDiscreteFrame));
     return(new LayoutDiscreteContentFocusableCellView((ILayoutNodeStateView)stateView, (ILayoutCellViewCollection)parentCellView, this, PropertyName, (ILayoutKeywordFrame)keywordFrame));
 }
Exemplo n.º 11
0
 /// <summary>
 /// Creates a IxxxDiscreteContentFocusableCellView object.
 /// </summary>
 private protected virtual IFrameDiscreteContentFocusableCellView CreateDiscreteContentFocusableCellView(IFrameNodeStateView stateView, IFrameCellViewCollection parentCellView, IFrameKeywordFrame keywordFrame)
 {
     ControllerTools.AssertNoOverride(this, typeof(FrameDiscreteFrame));
     return(new FrameDiscreteContentFocusableCellView(stateView, parentCellView, this, PropertyName, keywordFrame));
 }
Exemplo n.º 12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FrameDiscreteContentFocusableCellView"/> class.
 /// </summary>
 /// <param name="stateView">The state view containing the tree with this cell.</param>
 /// <param name="parentCellView">The collection of cell views containing this view. Null for the root of the cell tree.</param>
 /// <param name="frame">The frame that created this cell view.</param>
 /// <param name="propertyName">Property corresponding to the component of the node.</param>
 /// <param name="keywordFrame">The keyword frame that was used to create this cell.</param>
 public FrameDiscreteContentFocusableCellView(IFrameNodeStateView stateView, IFrameCellViewCollection parentCellView, IFrameFrame frame, string propertyName, IFrameKeywordFrame keywordFrame)
     : base(stateView, parentCellView, frame, propertyName)
 {
     KeywordFrame = keywordFrame;
 }