StreamLink for Silverlight
SetWindow Method (windowStartIndex, windowSize)
StreamLink for SilverlightCaplin.StreamLink.Subscription.ContainerIContainerSubscriptionSetWindow(Int32, Int32)
Changes the window into the container. Call this method to receive updates for a subset of the container elements.
Declaration Syntax
C#Visual BasicVisual C++
void SetWindow(
	int windowStartIndex,
	int windowSize
)
Sub SetWindow ( _
	windowStartIndex As Integer, _
	windowSize As Integer _
)
void SetWindow(
	int windowStartIndex, 
	int windowSize
)
Parameters
windowStartIndex (Int32)
Start index of the first element in the window.
windowSize (Int32)
The number of elements in the window.
Remarks
If no start index and window size have been set on the parameters when the object was constructed, there is no window set, so updates can be received for any of the elements in the container.

If an IContainerSubscription is bound to a grid view within a UI, then it is of benefit to only subscribe to the elements which are currently in view. As a user scrolls the window pain, your application can call the SetWindow() method to change which elements are supplied by the Liberator.

CopyC#
using System;
using System.Collections.Generic;
using System.Text;
using Caplin.StreamLink.Subscription.Container;

namespace StreamLinkExamples.Container
{
    public class ChangingContainerWindowExample
    {

        public void ChangeContainerWindow(IContainerSubscription subscription)
        {
            // We now want to change the container window so that
            // the start of the window is the 5th element and the window
            // contains 25 elements.
            // To do this, call SetWindow() on the container subscription

            int containerStartIndex = 4;
            int containerElementCount = 25;

            subscription.SetWindow(containerStartIndex, containerElementCount);
        }

    }
}

Assembly: Caplin.StreamLink.Silverlight (Module: Caplin.StreamLink.Silverlight) Version: 5.0.22.0 (5.0.22.0)