1. Tag Results
disable-selection (3)
1 - 3 of 3
How to disable the element which state is document in WPF DockingManager?
By default, child element of DockingManager (which has state as Document) will be added as content of TabItemExt in DocumentTabControl. To disable the document child element of WPF DockingManager, we must retrieve the TabItemExt element from DocumentTabControl and set IsEnabled as false to the retrieved element. For instance, we have disabled all the items in the DocumentTabControl, except SelectedItem. The following code demonstrate the same, MainWindow.xaml: <syncfusion:DockingManager x:Name="dockingManager" Grid.Row="1" ShowTabItemContextMenu="False" ShowTabListContextMenu="False" IsTDIDragDropEnabled="False" EnableMouseHoverBackground="False" IsTabPreviewEnabled="False" UseDocumentContainer="True">   <!-- Sample Window -->            <ContentControl syncfusion:DockingManager.State="Document" syncfusion:DockingManager.Header="TAB_1" x:Name="tab1" syncfusion:DockingManager.DocumentTabOrderIndex="1" />   <ContentControl syncfusion:DockingManager.State="Document" syncfusion:DockingManager.Header="TAB_2" x:Name="tab2" syncfusion:DockingManager.DocumentTabOrderIndex="2" />   <ContentControl syncfusion:DockingManager.State="Document" syncfusion:DockingManager.Header="TAB_3" x:Name="tab3" syncfusion:DockingManager.DocumentTabOrderIndex="3" /> </syncfusion:DockingManager> Code to disable the child element of DockingManager: private void DisableOtherTabs(string nameForFind, bool value) {   foreach (TabItemExt element in documenttab.Items)   {     if (nameForFind != element.Header.ToString())     {       element.IsEnabled = value;                      }   }         } MainWindow.cs: public partial class MainWindow : Window {   public MainWindow()   {     InitializeComponent();     (dockingManager.DocContainer as DocumentContainer).Loaded += MainWindow_Loaded;              }     DocumentTabControl documenttab = null;   private void MainWindow_Loaded(object sender, RoutedEventArgs e)   {     documenttab = VisualUtils.FindDescendant(sender as Visual, typeof(DocumentTabControl)) as DocumentTabControl;              }          private void btnDisable_Click(object sender, RoutedEventArgs e)   {     string header = (documenttab.SelectedItem as TabItemExt).Header.ToString();     DisableOtherTabs(header, false);                 }     private void DisableOtherTabs(string nameForFind, bool value)   {     foreach (TabItemExt element in documenttab.Items)     {       if (nameForFind != element.Header.ToString())       {         element.IsEnabled = value;                        }     }           }     private void Button_Click(object sender, RoutedEventArgs e)   {     string header = (documenttab.SelectedItem as TabItemExt).Header.ToString();     DisableOtherTabs(header, true);              } } View sample in GitHub.
Is it possible to warn the user, when the disable items in the DropDownList are selected
Description: We can able to show the “warning” message, when the disabled items in the DropDownList is hovered. This can be achieved by adding the additional span tag to the “li” elements of the DropDownList in the client side event called “create”. Solution: Render the DropDownList as follows     JavaScript <div class="control">     <div class="ctrllabel">Select your skill</div>     <input type="text" id="skillsets" />     <button id="btn">Disable</button> </div>   <script type="text/javascript">     var target;     $(function () {         var skillset = [             { skill: "ASP.NET" }, { skill: "ActionScript" }, { skill: "Basic" },             { skill: "C++" }, { skill: "C#" }, { skill: "dBase" }, { skill: "Delphi" },             { skill: "ESPOL" }, { skill: "F#" }, { skill: "FoxPro" }, { skill: "Java" },             { skill: "J#" }, { skill: "Lisp" }, { skill: "Logo" }, { skill: "PHP" }         ];         $('#skillsets').ejDropDownList({             dataSource: skillset,             fields: { text: "skill" },             showCheckbox: true,             enableFilterSearch: true,             create : "myFunc"         });         $("#btn").ejButton({             showRoundedCorner: true,             size: "mini",         click : "onClick"         });         target = $('#skillsets').data("ejDropDownList");     }); </script>   Upon clicking to the Disable button, certain element in the DropDownList will be disabled.   JavaScript function onClick(args){         target.disableItemsByIndices("1,3,5,7");       }     In the “create” event of DropDownList, we have appended the span element to the all items (li element) in the DropDownList.   JavaScript function myFunc(args){         this._getLi().append($("<span class='e-msg e-icon'> </span>"));       }   When hover to the disable items in the popup wrapper, the warning icon will be shown.     In this example, we have used “font icon” for the warning message. Apply the following CSS     CSS <style type="text/css" class="cssStyles">     .control {         margin-left: 20px;     }       #btn {         margin-left: 200px;     }       .ctrllabel {         padding-top: 15px;     }       .e-ddl-popup div > ul li.e-disable:hover > span.e-msg:before {         float: right;         margin-top: 5px;         content: "\e64c";         color: red;     } </style>    
How to disable mouse hover effect and selection changed manually in TabControlExt?
Mouse interaction with TabItemExt can be restricted by setting IsHitTestVisible property as false. It will disable the MouseHover effect on TabItemExt header and SelectionChanged in TabControlExt manually. The following code has been explained as below,    
No articles found
No articles found
1 of 1 pages (3 items)