Пример #1
0
 /// <summary>
 /// Detaches the given frame from the layer.
 /// </summary>
 /// <param name="frame">HelpFrame instance to detach.</param>
 internal void DetachFrame(HelpFrame frame)
 {
     _frames.Remove(frame);
     if (_container != null)
     {
         _container.Children.Remove(frame);
     }
 }
Пример #2
0
        /// <summary>
        /// Attaches the frame to the given element.
        /// </summary>
        /// <param name="element">FrameworkElement instance.</param>
        private static void AttachFrame(FrameworkElement element)
        {
            // get the HelpLayer instance
            var panel = TreeHelpers.GetRootPanel();
            if (panel != null)
            {
                var layer = GetLayer(panel);
                if (layer == null)
                {
                    // create a new layer
                    layer = new HelpLayer();
                    SetLayer(panel, layer);
                    layer.AttachToPage(panel);
                }

                // create a new frame and attach it to the layer
                var frame = new HelpFrame();
                frame.Attach(element);
            }
        }
Пример #3
0
 /// <summary>
 /// Attaches the given frame to the layer.
 /// </summary>
 /// <param name="frame">HelpFrame instance to attach.</param>
 internal void AttachFrame(HelpFrame frame)
 {
     _frames.Add(frame);
 }