Ejemplo n.º 1
0
 /// <summary>
 /// Sets the 'InitialLocation' attached property on the specified proxy.
 /// </summary>
 /// <param name="paneProxy">The <see cref="SplitPaneProxy"/> on which the property value is set.</param>
 /// <param name="value">The value set on the proxy.</param>
 public static void SetInitialLocation(SplitPaneProxy paneProxy, Proxies.Docking.InitialPaneLocation value)
 {
     paneProxy.SetValue(InitialLocationProperty, value);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Finds, or creates, a <see cref="SplitPaneProxy"/> whose associated <see cref="SplitPane"/> has the specified name.
        /// </summary>
        /// <param name="splitPaneName">The name of the pane associated with the proxy to find or create.</param>
        public SplitPaneProxy GetSplitPaneProxyByName(string splitPaneName)
        {
            if (splitPaneName == null)
                throw new ArgumentNullException("splitPaneName");

            SplitPaneProxy splitPaneProxy = _splitPaneProxies.FirstOrDefault(proxy => proxy.SplitPane.Name == splitPaneName);
            if (splitPaneProxy == null)
            {
                splitPaneProxy = new SplitPaneProxy(splitPaneName);
                _splitPaneProxies.Add(splitPaneProxy);
            }

            return splitPaneProxy;
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Returns the value of the 'InitialLocation' attached property.
 /// </summary>
 /// <param name="paneProxy">The <see cref="SplitPaneProxy"/> from which the property value is retrieved.</param>
 public static Proxies.Docking.InitialPaneLocation GetInitialLocation(SplitPaneProxy paneProxy)
 {
     return (Proxies.Docking.InitialPaneLocation)paneProxy.GetValue(InitialLocationProperty);
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Invoked when a <see cref="SplitPane"/> should be added to the dock manager's element tree.
        /// </summary>
        /// <param name="splitPaneProxy">The proxy that contains the pane to be added to the element tree.</param>
        public void AddSplitPaneToElementTree(SplitPaneProxy splitPaneProxy)
        {
            if (splitPaneProxy == null)
                throw new ArgumentNullException("splitPaneProxy");

            if (!_xamDockManager.Panes.Contains(splitPaneProxy.SplitPane))
                _xamDockManager.Panes.Add(splitPaneProxy.SplitPane);
        }