liu jian
Posts: 3
Joined: 2019-10-29
|
hi, i want to hide splitter,i try to set Splitter to None and IsHiddenStateAllowed to false, but Splitter size always keep 4px, how can i to do it ? thank you! |
|
Andrei Smolin
Add-in Express team
Posts: 18823
Joined: 2006-05-11
|
Hello Liu,
Below is an Excel-oriented code sample based on principles described at https://www.add-in-express.com/creating-addins-blog/2016/05/31/customize-appearance-excel-task-panes-outlook-regions/.
Andrei Smolin
Add-in Express Team Leader
namespace MyAddin18
{
public partial class ADXExcelTaskPane1 : AddinExpress.XL.ADXExcelTaskPane
{
public ADXExcelTaskPane1()
{
InitializeComponent();
}
protected override Type GetContainerControlType()
{
return typeof(MyTaskPane);
}
}
public class MyTaskPane : ADXContainerControlXL
{
public override Padding Padding
{
get
{
var padding = base.Padding;
padding.Right = -4;
return padding;
}
}
}
} |
|
liu jian
Posts: 3
Joined: 2019-10-29
|
hi, i try to do this, but get this error:
error CS0433: typename?Â?Ð?ìADXContainerControlPP?Â?Ð?íexists in both?Â?Ð?ìAddinExpress.WD.2005, Version=9.4.4644.0, Culture=neutral, PublicKeyToken=e69a7e0f3592d2b8?Â?Ð?íand?Â?Ð?ìAddinExpress.XL.2005, Version=9.4.4644.0, Culture=neutral, PublicKeyToken=e69a7e0f3592d2b8?Â?Ð?í
i find this error code from https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/cs0433, is there anyother solution? thank you |
|
Andrei Smolin
Add-in Express team
Posts: 18823
Joined: 2006-05-11
|
Hello Liu,
There are two ways. You can split the add-ins so that they inhabit different assemblies. Another way is this. You create another class library project and move the MyTaskPane to it. This requires that this project has a reference to AddinExpress.XL.2005.dll.
In your add-in project, you add a reference to the class library project above and modify protected override Type GetContainerControlType() so that it returns the type of MyTaskPane from the class library.
Andrei Smolin
Add-in Express Team Leader |
|