public void PositionOptionsChanged(bool top, bool right, bool bottom, bool left) { var positionOptions = new PositionOptions { Top = new Location(top), Right = new Location(right), Bottom = new Location(bottom), Left = new Location(left) }; Model.Reposition(positionOptions); }
public StripedBar() { _positionInfo = new PositionOptions { Top = new Location(available: true, selected: true), Right = new Location(available: false, selected: false), Bottom = new Location(available: true, selected: false), Left = new Location(available: false, selected: false) }; Image thumbnailImage = Resources.theme_solid; const string friendlyName = "Striped Bar"; _info = new BarInfo(thumbnailImage, friendlyName); }
public DottedBar() { Image thumbnailImage = Resources.theme_dotted; const string friendlyName = "Dotted Bar"; _barInfo = new BarInfo(thumbnailImage, friendlyName); _positionOptions = new PositionOptions { Top = new Location(available: true, selected: true), Right = new Location(available: true, selected: false), Bottom = new Location(available: true, selected: false), Left = new Location(available: true, selected: true) }; }
public void Reposition(PositionOptions positionOptions) { GetCurrentBar().PositionOptions.Top.Selected = positionOptions.Top.Selected; GetCurrentBar().PositionOptions.Right.Selected = positionOptions.Right.Selected; GetCurrentBar().PositionOptions.Bottom.Selected = positionOptions.Bottom.Selected; GetCurrentBar().PositionOptions.Left.Selected = positionOptions.Left.Selected; Add(GetCurrentBar()); AlignmentOptionsChanged(GetCurrentBar().PositionOptions); }