Border will not show in WPF Control

I'm trying to programmatically set a border in class that is derived from System.Windows.Controls.Control.

I set the BorderBrush and BorderThickness properties and made sure opacity is set to 1, but the border still does not show.

_titleBar = GetTemplateChild("PART_TitleBar") as ChartPanelTitleBar;
_titleBar.Background = Brushes.Tomato;
_titleBar.BorderBrush = Brushes.Blue;
_titleBar.BorderThickness = new Thickness(1, 1, 1, 1);

ChartPanelTitleBar is derived from Control. Changing the Background works, so shouldn't the BorderBrush work too?


You should wrap your element in a Border

Need Your Help

jquery ajax & preemptive basic auth

javascript jquery basic-authentication preemptive

I am trying to reach some RESTful services that are running under Apache preemtive basic authentication. I am using jquery Ajax, and sending the user and password with the 'Authentication' header.

C# Selecting same index on multiple listBox

c# events select listbox

Okay, so I have four listBox controls. I want to select the same index on all four listBox when one item is clicked on any of them. To be mentioned, I do change the index sometimes in the program. I

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.