DockingManager header alignment

Hello Syncfusion Team

would someone please help me how can I change the red part with black part ? 
actually i want to Right To Left it

i attach the picture as rar file

thanks in advance

Attachment: ask2_6087aba.rar

3 Replies

DR Durga Rajan Syncfusion Team May 22, 2018 12:19 PM UTC

Hi sads, 

Thanks for contacting Syncfusion support.  

We have checked your query “How to change the alignment of the elements in Dock window header” in DockingManager and prepared sample which tries to meet your requirement. In this sample, we have retrieved the DockPanel (which is used to arrange the elements in Dock window Header) and update the flow direction of the DockPanel with desired value. Please refer the below code example, 

        private void UpdateFlowDirectionofHeader(FlowDirection direction) 
        { 
            foreach (FrameworkElement child in DockingManager.Children) 
            { 
                if (DockingManager.GetDockHeaderPresenter(child) != null) 
                { 
                    DockHeaderPresenter presenter = DockingManager.GetDockHeaderPresenter(child); 
                    if (presenter != null) 
                    { 
                        DockPanel panel = VisualUtils.FindDescendant(presenter as Visual, typeof(DockPanel)) as DockPanel; 
                        if (panel != null) 
                        { 
                            panel.FlowDirection = direction; 
                        } 
                    } 
                } 
                else 
                { 
                    if(DockingManager.GetState(child) == DockState.Document) 
                    { 
                        MDIWindow window = VisualUtils.FindAncestor(child as Visual, typeof(MDIWindow)) as MDIWindow; 
                        if(window != null) 
                        { 
                            DocumentHeader header = window.Template.FindName("PART_DocumentHeader", window) as DocumentHeader; 
                            if(header != null) 
                            { 
                                header.FlowDirection = direction; 
                            } 
                        } 
                    } 
                } 
            } 
        } 
  
Please download the sample for the same, 


Screenshot : 

 

If we have misunderstood your query please get back to us with more details. This would help us to provide solution at earliest.  

Regards, 
Durga S. 



SA sads May 23, 2018 04:51 AM UTC

Thanks mate
you are awesome  :)


DR Durga Rajan Syncfusion Team May 24, 2018 06:03 AM UTC

Hi sads, 

We are glad to know that the provided solution has been worked at your end. Please let us know if you need any further assistance. 

Regards, 
Durga S. 


Loader.
Up arrow icon