private void LoadProject_Click(object sender, RoutedEventArgs e) { if (load == null) { List<string> filter = new List<string>(new string[] { "*.asgproj" }); load = new LoadDialog(ActiveSessionManager, this, filter, LoadDialog.LoadDialogType.Project); } ScatterViewItem newItem = Container.ItemContainerGenerator.ContainerFromItem(load) as ScatterViewItem; if (newItem == null) { Container.Items.Add(load); newItem = Container.ItemContainerGenerator.ContainerFromItem(load) as ScatterViewItem; newItem.Orientation = 0; newItem.Height = this.Height / 1.5; newItem.Width = this.Width / 3; newItem.Center = CanvasItem.ActualCenter; } }
private void LoadImage_Click(object sender, RoutedEventArgs e) { List<string> filter = new List<string>( new string[] {"*.gif","*.jpg","*.jpeg","*.png"}); load = new LoadDialog(ActiveSessionManager, this, filter, LoadDialog.LoadDialogType.BackgroundImage); Container.Items.Add(load); ScatterViewItem newItem = Container.ItemContainerGenerator.ContainerFromItem(load) as ScatterViewItem; newItem.Orientation = 0; newItem.Height = load.MinHeight + 50; newItem.Width = load.MinWidth + 50; newItem.Center = CanvasItem.ActualCenter; }