Can't Seem to Remove this Border

5 posts, 1 answers
  1. Corey
    Corey avatar
    26 posts
    Member since:
    Nov 2012

    Posted 26 Nov 2012 Link to this post

    Hi, I'm using a RadDocking control and have a few RadPaneGroups being used inside of it.  I'm trying to remove all the borders from each of them in order to make the screen look a little less cluttered.  However, I can't seem to remove/hide the inner border of a tabbed document.  I have managed to hide the border for each RadPaneGroup, but I have so far been unable to locate where the inner border is accessible so I can hide it.  I have outlined the border I'm talking about in red in the included picture.

    Also, I should note that I am doing these programmatically.

    Thanks
  2. Masha
    Admin
    Masha avatar
    355 posts

    Posted 29 Nov 2012 Link to this post

    Hi Corey,

    To remove inner border inside the docking you need to modify PaneGroup_DocumentFrameTemplate. Simply hide Borders with names BorderLayer3 and BorderLayer2:

    <Border x:Name="BorderLayer3" BorderThickness="{StaticResource PaneGroup_DocumentFrameL3_Thickness}" BorderBrush="{StaticResource PaneGroup_DocumentFrameL3_Brush}" CornerRadius="{StaticResource PaneGroup_DocumentFrameL3_CornerRadius}">
            <Border x:Name="BorderLayer2" BorderThickness="{StaticResource PaneGroup_DocumentFrameL2_Thickness}" BorderBrush="{StaticResource PaneGroup_DocumentFrameL2_Brush}" CornerRadius="{StaticResource PaneGroup_DocumentFrameL2_CornerRadius}">
              <Border x:Name="BorderLayer1" BorderThickness="{StaticResource PaneGroup_DocumentFrameL1_Thickness}" BorderBrush="{StaticResource PaneGroup_DocumentFrameL1_Brush}" CornerRadius="{StaticResource PaneGroup_DocumentFrameL1_CornerRadius}">
                <ContentPresenter />
              </Border>
            </Border>
          </Border>

    Hope it helps.

    Kind regards,
    Maria
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. Corey
    Corey avatar
    26 posts
    Member since:
    Nov 2012

    Posted 29 Nov 2012 Link to this post

    Thanks for the reply Maria.

    I have no doubt that is what I need to edit, but I was wondering if there was any way to access and edit its BorderLayer3 and BorderLayer2 using only c# code.  I have done all my coding programmatically with very little use of XAML.  Therefore, I don't have any XAML code (that I know of) to find and edit PaneGroup_DocumentFrameTemplate.

    I am rather new to programming with Telerik and even quite new to c# and XAML.  I've looked into my own problem and though I haven't gotten a solution yet, I have learned a bit more.  The problem with the inner border lies within the Document Host.  Currently, I have only a RadSplitContainer as my Document Host and in my example, I only have one RadPane (and thus one RadPaneGroup) attached to my Document Host.

    I have tried finding my solution using c# and the ever so useful intellisense with Visual Studio 2012.  I tried looking for docHost.DocumentFrameTemplate and even RadPane.PaneGroup.DocumentFrameTemplate but to no avail.  All I have found is either Template (for each of them) or DocumentHostTemplate (only in RadPane and RadPaneGroup).

    I believe I can set up a control template for my RadPane, RadPaneGroup, or DocumentHost using a ResourceDictionary.  But to be honest, doing that seems like I would have to manually type everything for that control just to edit its borders.  If that's the only way, I can try it if you wouldn't mind pointing me in the direction of some XAML code that shows what a typical control template looks like.  But preferably I would like to find a solution involving c# code if there is one.

    Thanks again.
  5. Answer
    Masha
    Admin
    Masha avatar
    355 posts

    Posted 05 Dec 2012 Link to this post

    Hi,

    Unfortunately there is no way to achieve this in the code behind. In the attached project I demonstrated how to merge and modify the desire template in the App.xaml.

    If you still experience any difficulties styling the outer border of RadPaneGroup, please send me a runnable project and I will be glad to help you.

    Greetings,
    Maria
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  6. Corey
    Corey avatar
    26 posts
    Member since:
    Nov 2012

    Posted 05 Dec 2012 Link to this post

    Oh my god.  Thank you Maria.  After messing with the sample you provided and tweaking it to work (kept getting errors trying to resolve some of your resource dictionaries), that border is finally gone.

    Now to make sure that these XAML changes don't break something else, but it seems to be ok.

    Thanks again.
Back to Top
DevCraft banner