2016-05-27 41 views
0

我正在創建一個windows窗體主機來顯示儀表板。c#wpf - windows窗體主機邊框顏色

它顯示一個邊框,我該如何刪除它?

當前有:

創建網格。

<Grid Name="winForms" Grid.Row="1"/> 

將其綁定到儀表板。

// Create the interop host control. 
      System.Windows.Forms.Integration.WindowsFormsHost host = 
       new System.Windows.Forms.Integration.WindowsFormsHost(); 
      this.winForms.Children.Add(host); 



      //THIS SHIT SHOWS A DESIGNER LOL 
      System.Windows.Forms.UserControl uc = new System.Windows.Forms.UserControl(); 
      DevExpress.DashboardWin.DashboardViewer dd = new DevExpress.DashboardWin.DashboardViewer(); 

      dd.BorderStyle = System.Windows.Forms.BorderStyle.None; 


      dd.DashboardSource = "DashboardFiles/KPI.xml"; 
      uc.Controls.Add(dd); 
      dd.Dock = System.Windows.Forms.DockStyle.Fill; 
      //dd.CreateRibbon(); 
      host.Child = uc; 

我以爲邊框屬於儀表板查看器,但它沒有。

enter image description here

回答

0

更改FormBorderStyle屬性在設計視圖或其他你能在後面的代碼設置屬性FormBorderStyle這樣的:

this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;