public ZoomPreviewControl() { InitializeComponent(); _host = new ElementHost(); _scale = new ScaleTransform(); _host.Dock = System.Windows.Forms.DockStyle.Fill; Controls.Add(_host); _host.BringToFront(); }
public ZoomPreviewControl() { InitializeComponent(); _host = new ElementHost(); _scale = new ScaleTransform(); _host.Dock = System.Windows.Forms.DockStyle.Fill; Controls.Add(_host); _host.BringToFront(); }
private void InitializePicturePrintControl() { PicturePreviewHost = new ElementHost(); PicturePreviewHost.Dock = DockStyle.Fill; PicturePrint = new PicturePrintControl(); PicturePreviewHost.Child = PicturePrint; this.splitContainerControl1.Panel2.Controls.Add(PicturePreviewHost); PicturePreviewHost.BringToFront(); SubscribeEvents(); }
partial void Init() { // this sets up the images for use in the model explorer. They don't come out of Dsl::Resources.resx directly, but are named the same // See EFModelElementTreeNode.GetExplorerNodeImageName (below) for how this happens. foreach (KeyValuePair <string, Image> image in ClassShape.PropertyImages.Union(ClassShape.ClassImages)) { ObjectModelBrowser.ImageList.Images.Add(image.Key, image.Value); } ObjectModelBrowser.ImageList.Images.Add(nameof(Resources.Enumerator_16x), Resources.Enumerator_16x); ObjectModelBrowser.ImageList.Images.Add(nameof(Resources.Enumerator_16xVisible), Resources.Enumerator_16xVisible); // shoehorn the search widget into the list SuspendLayout(); Controls.Remove(ObjectModelBrowser); Control label = Controls[0]; Controls.Add(SearchControlHost = new ElementHost { Location = new Point(3, label.Height) , Name = "SearchControlHost" , Size = new Size(Width, 25) , Dock = DockStyle.Top , Padding = new Padding(0, 3, 0, 0) , TabIndex = 1 , Text = string.Empty , Child = null }); SearchControlHost.BringToFront(); ObjectModelBrowser.TabIndex = 2; ObjectModelBrowser.Location = new Point(3, label.Height); Controls.Add(ObjectModelBrowser); ObjectModelBrowser.BringToFront(); ResumeLayout(false); PerformLayout(); ObjectModelBrowser.NodeMouseDoubleClick += ObjectModelBrowser_OnNodeMouseDoubleClick; ObjectModelBrowser.ItemDrag += ObjectModelBrowser_OnItemDrag; InitSearch(); }
private void loginButton_Click(object sender, EventArgs e) { try { this.Cursor = Cursors.WaitCursor; api.Login(userName.Text, password.Text); } catch (Exception exep) { userName.Text = ""; password.Text = ""; this.Cursor = Cursors.Default; MessageBox.Show(exep.Message); return; } // this.Hide(); // не наддо скрывать а раскрыть для вывода таблицы wpf this.loginButton.Hide(); this.userNameLabel.Hide(); this.userName.Hide(); this.password.Hide(); this.userNameLabel.Hide(); this.passwordLabel.Hide(); this.ClientSize = new System.Drawing.Size(1320, 640); this.Text = "sianODDS"; // MainWindow dashboard = new MainWindow(account); // dashboard.Show(); // запуск wpf user control ElementHost TableHost = new ElementHost(); TableHost.Dock = DockStyle.Fill; UCTable ucobj = new UCTable(account); TableHost.BringToFront(); TableHost.Child = ucobj; this.Controls.Add(TableHost); TableHost.Show(); return; }
public override System.Windows.Forms.Control CreateControlPane() { ResourceDictionary myResourceDictionary = new ResourceDictionary(); myResourceDictionary.Source = new Uri("/TUM.CMS.VplControl;component/Themes/Generic.xaml", UriKind.Relative); //System.Windows.Application.Current.Resources.MergedDictionaries.Add(myResourceDictionary); Autodesk.Navisworks.Gui.Common.View.WPFApp.Current.Resources.MergedDictionaries.Add(myResourceDictionary); // Autodesk.Navisworks.Gui.Common.View.WPFApp.ResourceAssembly = GetAssemblyByName("TUM.CMS.VplControl") ; //create an ElementHost ElementHost eh = new ElementHost(); ////assign the control eh.AutoSize = true; eh.Child = new MainWindow(); eh.CreateControl(); eh.BringToFront(); //return the ElementHost return(eh); }
partial void Init() { foreach (KeyValuePair <string, Image> image in ClassShape.PropertyImages) { ObjectModelBrowser.ImageList.Images.Add(image.Key, image.Value); } // shoehorn the search widget into the list SuspendLayout(); Controls.Remove(ObjectModelBrowser); Control label = Controls[0]; Controls.Add(SearchControlHost = new ElementHost { Location = new Point(3, label.Height) , Name = "SearchControlHost" , Size = new Size(Width, 25) , Dock = DockStyle.Top , Padding = new Padding(0, 3, 0, 0) , TabIndex = 1 , Text = "" , Child = null }); SearchControlHost.BringToFront(); ObjectModelBrowser.TabIndex = 2; ObjectModelBrowser.Location = new Point(3, label.Height); Controls.Add(ObjectModelBrowser); ObjectModelBrowser.BringToFront(); ResumeLayout(false); PerformLayout(); ObjectModelBrowser.NodeMouseDoubleClick += ObjectModelBrowser_OnNodeMouseDoubleClick; ObjectModelBrowser.ItemDrag += ObjectModelBrowser_OnItemDrag; InitSearch(); }