|
Hello!
At the moment for the Win-platform are not implemented settings that remove the CloseButton.
Settings will appear in the 13th version of the Xafari.
But you can implement the settings yourself.
For this you need:
1. Add "ShowCloseButton" property to an IModelDockPanel.
To add new property to an IModelDockPanel, you should first define an interface and expose the property:
public interface IModelMyDockPanel : IModelDockPanel
{
[Category("Appearance")]
[Description("Specifies whether a DockPanel close button is displayed. 'True' if the button is displayed; otherwise, 'False'.")]
[DefaultValue(true)]
bool ShowCloseButton { get; set; }
}
Then, extend the IModelMyDockPanel node in your Module or Controller. Override the ModuleBase.ExtendModelInterfaces method or implement the IModelExtender interface, respectively.
public sealed partial class MySolutionModule : ModuleBase {
// ...
public override void ExtendModelInterfaces(ModelInterfaceExtenders extenders) {
base.ExtendModelInterfaces(extenders);
extenders.Add<IModelDockPanel, IModelMyDockPanel>();
}
// ...
}
2. Inherit from the XafariDockingWinWindowController controller:
public class CustomizeDocPanelsViewController : XafariDockingWinWindowController
{
protected override void OnEndInit()
{
base.OnEndInit();
foreach (var supportInitialize in this.AllPanels.Values.OfType())
{
var dockPanelItem = (DockPanelItemWin)supportInitialize;
var model = dockPanelItem.Model as IModelMyDockPanel;
if (model != null)
dockPanelItem.DockPanel.Options.ShowCloseButton =
model.ShowCloseButton;
}
this.RefreshActionItems(true);
}
}
Let us know if you need further assistance.
Regards,
Mariya
On behalf of Xafari Client Services Team
|