protected override Size ArrangeOverride(Size arrangeSize) { double used_width; if (Bullet != null) { //HACK double bullet_top; if (Child == null) { bullet_top = 0; } else { TextBlock text_block = ((ContentPresenter)Child).Content as TextBlock; double height_to_center_to = text_block == null ? Child.DesiredSize.Height : text_block.FontSize; bullet_top = height_to_center_to < Bullet.DesiredSize.Height ? 0 : ((height_to_center_to - Bullet.DesiredSize.Height) / 2); } Bullet.Arrange(new Rect(new Point(0, bullet_top), Bullet.DesiredSize)); used_width = Bullet.DesiredSize.Width; } else { used_width = 0; } if (Child != null) { Child.Arrange(new Rect(new Point(used_width, 0), Child.DesiredSize)); } return(arrangeSize); }