public SpritesView() { //NavigationCacheMode = NavigationCacheMode.Enabled; InitializeComponent(); var bounds = Window.Current.Bounds; double height = bounds.Height * 0.88; double width = bounds.Width * 0.95; CatrobatListView view = this.FindName("ListViewSprites") as CatrobatListView; view.ItemWidthLandscape = (int)height; view.ItemWidthPortrait = (int)width; }
public AddNewScriptBrickView() { InitializeComponent(); var bounds = Window.Current.Bounds; double height = bounds.Height * 0.88; double width = bounds.Width * 0.95; CatrobatListView view = this.FindName("Top") as CatrobatListView; if (view != null) { view.ItemWidthLandscape = (int)height; view.ItemWidthPortrait = (int)width; } }
private void MultiModeEditorCommandBar_OnModeChanged(MultiModeEditorCommandBarMode mode) { CatrobatListView listView = null; if (PivotMain.SelectedItem == PivotActions) { listView = ListViewActions; } else if (PivotMain.SelectedItem == PivotLooks) { listView = ListViewLooks; } else if (PivotMain.SelectedItem == PivotSounds) { listView = ListViewSounds; } if (listView == null) { return; } Debug.Assert(listView != null, "listView != null"); switch (mode) { case MultiModeEditorCommandBarMode.Normal: listView.SelectionEnabled = false; break; case MultiModeEditorCommandBarMode.Select: listView.SelectionEnabled = true; break; default: throw new ArgumentOutOfRangeException("mode"); } }