Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 169679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T12:40:26+00:00 2026-05-11T12:40:26+00:00

I’m using a Datagrid from the WPFtoolkit and am running into a problem with

  • 0

I’m using a Datagrid from the WPFtoolkit and am running into a problem with the RowDetailsTemplate.

My RowDetailsTemplate contains 3 items: 2 Rich Text Boxes and a button. What I would like to have happen is the button stay docked to the right edge of the window and the two rich text boxes expand to fill the rest of the space. The problem I’m having is that if I dock the button to the right of the window, when I enlarge the window the button moves correctly and stays on the outside edge, but if I shrink the window back it doesn’t shrink and keeps the same spacing. This causes it to be located outside the window and not visible. Is this the expected behavior? If anyone knows a workaround or a solution to setup the whole details template as I described I would appreciate some advice.

Relevant code:

<toolkit:DataGrid.RowDetailsTemplate>     <DataTemplate> <DockPanel Width='Auto'>     <DockPanel DockPanel.Dock='Right'>         <Button Height='50' Width='75' Margin='5 5 0 5' DockPanel.Dock='Right'>             <Image Source='Resources/ArrowOutOfBox.bmp' />         </Button>     </DockPanel>     <StackPanel Margin='20 0 20 0' Orientation='Horizontal' HorizontalAlignment='Left' DockPanel.Dock='Left'>         <StackPanel>             <ToolBar>                 <ToggleButton MinWidth='20' Command='EditingCommands.ToggleBold' CommandTarget='{Binding ElementName=rtbNewComment}' TextBlock.FontWeight='Bold' Content='B' />                 <ToggleButton MinWidth='20' Command='EditingCommands.ToggleItalic' CommandTarget='{Binding ElementName=rtbNewComment}' TextBlock.FontStyle='Italic' Content='I' />                 <ToggleButton MinWidth='20' Command='EditingCommands.ToggleUnderline' CommandTarget='{Binding ElementName=rtbNewComment}'>                     <TextBlock TextDecorations='Underline'>U</TextBlock>                 </ToggleButton>             </ToolBar>             <RichTextBox                                      x:Name='rtbNewComment'                                     Height='100'                                     Margin='5 5 0 5'                                     FlowDirection='LeftToRight'                                      VerticalScrollBarVisibility='Auto'                                     IsReadOnly='False'                                      SpellCheck.IsEnabled='true'                                      >             </RichTextBox>         </StackPanel>         <StackPanel>             <RichTextBox                                      x:Name='rtbCommentHistory'                                     Height='125'                                     Margin='5 5 0 5'                                     FlowDirection='LeftToRight'                                      VerticalScrollBarVisibility='Auto'                                     IsReadOnly='True'                                      SpellCheck.IsEnabled='true'                                      >                 <RichTextBox.Resources>                     <Style TargetType='{x:Type Paragraph}'>                         <Setter Property='Margin' Value='0' />                     </Style>                 </RichTextBox.Resources>             </RichTextBox>         </StackPanel>     </StackPanel>  </DockPanel> </DataTemplate> </toolkit:DataGrid.RowDetailsTemplate> 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T12:40:26+00:00Added an answer on May 11, 2026 at 12:40 pm

    Turns out what happens is the DockPanel in the DetailsTemplate was trying to center itself, but center is was calculating would go up but not down. By setting HorizontalAlignment=’Left’ it fixed the problem. I would still like a way to make all items resize proportional to their current sizes to fill the box, but no luck so far.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 223k
  • Answers 223k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I would try adding the path to SQLite in PATH.… May 13, 2026 at 12:34 am
  • Editorial Team
    Editorial Team added an answer Hi Do the following to create a group. actually its… May 13, 2026 at 12:34 am
  • Editorial Team
    Editorial Team added an answer You can do it through the designer. Add an ImageList… May 13, 2026 at 12:34 am

Related Questions

In order to apply a triggered animation to all ToolTip s in my app,
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I want use html5's new tag to play a wav file (currently only supported
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have a French site that I want to parse, but am running into

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.