Usage

	public partial class Program
	{
		private Window _window;
		private PagingTexBlock _pagingTexBlock;
		private Button _buttonPageUp;
		private Button _buttonPageDown;
		private int _index = 1;

		void ProgramStarted()
		{
			Debug.Print("Program Started");

			_window = GlideLoader.LoadWindow(Resources.GetString(Resources.StringResources.window));

			_buttonPageDown = (Button)_window.GetChildByName("buttonPageDown");
			_buttonPageUp = (Button)_window.GetChildByName("buttonPageUp");

			_pagingTexBlock = new PagingTexBlock("ptb", 255, 0, 0, 272, 272);

			_window.AddChild(_pagingTexBlock);

			Glide.MainWindow = _window;

			var str = "";

			for (var i = 0; i < 1500; i++)
			{
				str += i + ": Glide is awesome!\r\n";
			}

			_pagingTexBlock.Text = str;

			_pagingTexBlock.SetPage(_index);

			_pagingTexBlock.Invalidate();

			_buttonPageDown.TapEvent += _buttonPageDown_TapEvent;

			_buttonPageUp.TapEvent += _buttonPageUp_TapEvent;
		}

		void _buttonPageUp_TapEvent(object sender)
		{
			_index++;
			if (_index > _pagingTexBlock.TotalPages)
				_index = _pagingTexBlock.TotalPages;
			_pagingTexBlock.SetPage(_index);
			_pagingTexBlock.Invalidate();
		}

		void _buttonPageDown_TapEvent(object sender)
		{
			_index--;
			if (_index < 1)
				_index = 1;
			_pagingTexBlock.SetPage(_index);
			_pagingTexBlock.Invalidate();
		}
	}

Properties

Property Description
TextAlign
VertiacalTextAlign
Font
FontColor
BackColor
TotalPages
Name
Alpha
X
Y
Width
Height


Methods

Method Description
SetPage Specifyes the page to show.

Last edited Jun 23, 2014 at 4:18 PM by BlackDogSpark, version 3