Using AvalonDock I created the ToolBoxControl and now I am planning to disable certain top level activities (want it visible just greyed out). I wanted to know the ways I can do it.
The image below, the activities circled in red, I want either to grey them out or change font colour. This way I can differentiate the users using the software.
The code used for this in XAML is
<xcad:DockingManager Grid.Row="1"
AllowMixedOrientation="True"
BorderBrush="Black"
BorderThickness="1">
<xcad:LayoutRoot x:Name="LayoutRoot">
<xcad:LayoutPanel Orientation="Horizontal">
<xcad:LayoutAnchorablePane DockWidth="200">
<xcad:LayoutAnchorable Title="Toolbox" CanClose="False" CanFloat="False" CanHide="False" ContentId="toolbox" x:Name="CtrlToolbox">
</xcad:LayoutAnchorable>
<xcad:LayoutAnchorable Title="Outline" CanClose="False" CanFloat="False" CanHide="False" ContentId="outline" x:Name="CtrlOutline">
</xcad:LayoutAnchorable>
</xcad:LayoutAnchorablePane>
The .cs version of this is :
private void AddToolBox()
{
ToolboxControl tc = GetToolboxControl(); //CreateToolboxControls();
CtrlToolbox.Content = tc;
}
private ToolboxControl GetToolboxControl()
{
// Create the ToolBoxControl.
ToolboxControl ctrl = new ToolboxControl();
ToolboxCategory categoryFlowChart = new ToolboxCategory("Flow Chart");
ToolboxCategory categoryStateMachine = new ToolboxCategory("State Machine");
ToolboxCategory categoryExport = new ToolboxCategory("File System");
ToolboxCategory categoryWindowsApp = new ToolboxCategory("Windows App");
ToolboxCategory categorySSH = new ToolboxCategory("SSH");
ToolboxCategory categoryVBScript = new ToolboxCategory("VB Script");
ToolboxCategory categoryCommunication = new ToolboxCategory("Communication");
ToolboxCategory categoryDatabase = new ToolboxCategory("Database");
// Add the category to the ToolBox control.
ctrl.Categories.Add(categoryFlowChart);
ctrl.Categories.Add(categoryDatabase);
ctrl.Categories.Add(categoryStateMachine);
ctrl.Categories.Add(categoryWindowsApp);
ctrl.Categories.Add(categorySSH);
ctrl.Categories.Add(categoryCommunication);
ctrl.Categories.Add(categoryVBScript);
return ctrl
}
Any other information I need to provide please let me know. Just need to be able to disable the top level activity.