Create flat button in WPF
More simple solution here using already defined ToolBar button style : <Button Style=”{StaticResource {x:Static ToolBar.ButtonStyleKey}}” Content=”You know I’m flat…” />
More simple solution here using already defined ToolBar button style : <Button Style=”{StaticResource {x:Static ToolBar.ButtonStyleKey}}” Content=”You know I’m flat…” />
You forgot the unset() in there bro. function buildTree(array &$elements, $parentId = 0) { $branch = array(); foreach ($elements as $element) { if ($element[‘parent_id’] == $parentId) { $children = buildTree($elements, $element[‘id’]); if ($children) { $element[‘children’] = $children; } $branch[$element[‘id’]] = $element; unset($elements[$element[‘id’]]); } } return $branch; }