コード例 #1
0
        private static void DisableToolTipsGroupCommand_Execute(object parameter)
        {
            ToolTipBeacon beacon    = parameter as ToolTipBeacon;
            string        groupName = null;

            if (beacon != null)
            {
                beacon.HideToolTip();
                groupName = GetInheritedGroupName(beacon);
            }
            else
            {
                groupName = parameter as string;
            }
            if (String.IsNullOrWhiteSpace(groupName))
            {
                return;
            }
            ToolTipGroupVisibility ttgv = new ToolTipGroupVisibility();

            if (disabledToolTipGroupsDictionary.Contains(groupName))
            {
                (disabledToolTipGroupsDictionary[groupName] as ToolTipGroupVisibility).IsEnabled = false;
            }
            else
            {
                disabledToolTipGroupsDictionary.Add(groupName, new ToolTipGroupVisibility {
                    GroupName = groupName, IsEnabled = false
                });
            }
            SaveDisabledToolTipGroups();
        }
コード例 #2
0
 public static void SetAttachedBeacon(DependencyObject obj, ToolTipBeacon value)
 {
     obj.SetValue(AttachedBeaconProperty, value);
 }