Code Usage

TileSlider can either be a stand alone control, or you can bind your MVVM model to it. Either or.

Add the reference to your page's references:

xmlns:ScottIsAFool_Controls="clr-namespace:ScottIsAFool.Controls;assembly=TileSlider"

Then just add in your tile:

<ScottIsAFool_Controls:TileSlider LongText="woooooo wooooo yeah" TextSlidesFrom="Top" Click="TileSlider_Click" 
TextStyle="{StaticResource PhoneTextLargeStyle}" TileBackground="{StaticResource PhoneAccentBrush}" 
Size="173" Text="super long really long message that might actually run over into the image if im realy lreally
lucky" ImageSource="/WindowsPhoneApplication1;component/Images/Background.png"/>

Or you can create it in code behind

using ScottIsAFool.Controls;

TileSlider tile = new TileSlider();
tile.TileBackground = new SolidColorBrush(Colors.Cyan);
tile.Text = "hello all";
tile.TextStyle = (Style)Application.Current.Resources["PhoneTextNormalStyle"];
tile.LongText = "this could be a facebook status";
tile.ImageSource = new BitmapImage(new Uri("http://example.com/image.png"));
tile.TextSlidesFrom = SlideDirection.Top;

Last edited May 21, 2011 at 7:45 PM by ScottIsAFool, version 3

Comments

chandanchoubey Jul 10, 2013 at 1:41 AM 
This is cool! How do I change font color and style? Thanks Scott.