public CollectionViewModel() { using (UserContext db = new UserContext()) { ListOfCillections = new List <Collection>(db.Collections); } AddCommand = new MyICommand <object>(GetNewName); DelCommand = new MyICommand <object>(DeleteCollection); //DetailCommand = new MyICommand<object>(DetailAddCommand); DocumentsViewModelQ = new DocumentsView(); }
private void DetailAddCommand(object destination) { //listDocumentsViewModel.AddNewTab(); var temp = new DocumentsView(); (temp.DataContext as DocumentsViewModel).Test = count; var t = destination as Collection; using (UserContext db = new UserContext()) { //var tempCol = db.Collections.Include("Documents").Where(x=>x.Id == (t).Id).ToList().FirstOrDefault(); //(temp.DataContext as DocumentsViewModel).Documents = tempCol.Documents.ToList(); (temp.DataContext as DocumentsViewModel).Init(t); DocumentsViewModelQ = temp; } // DocumentsViewModelQ = new DocumentsView(); //DocumentsViewModelQ.Test = count; //OnPropertyChanged("DocumentsViewModel"); count++; }
public DocumentsCollectionSource(UICollectionView collectionView, DocumentsView view) : base(collectionView) { collectionView.RegisterNibForCell(UINib.FromName("DocumentCollectionCell", NSBundle.MainBundle), DocumentCollectionCell.Key); this.mDocumentsView = view; }
public CustomCollectionLayoutDelegate(CGSize size, DocumentsView documentView) { mSize = size; mDocumentView = documentView; }
protected override Control CreateContentView() { return(_view ?? (_view = new DocumentsView { Width = 600, Height = 600 }.SetViewModel(ViewModel))); }
public DocumentsSelect(PXGraph graph, Delegate handler) { _Graph = graph; View = new DocumentsView(graph, handler); }
protected override Control CreateContentView() { return(_view ?? (_view = new DocumentsView().SetViewModel(ViewModel))); }