I'm trying to get access to the properties shown by the properties window when a WPF control is selected.
The problem is that although I've managed to add my own content in the properties window, I have not found a way to obtain a reference to the one used by the WPF designer to display control properties.
private IVsWindowFrame _frame;
...
if(_frame == null) {
var shell = parent.GetVsService(typeof(SVsUIShell)) as IVsUIShell;
if(shell != null) {
var guidPropertyBrowser = new Guid(ToolWindowGuids.PropertyBrowser);
shell.FindToolWindow(
(uint) __VSFINDTOOLWIN.FTW_fFindFirst, ref guidPropertyBrowser, out _frame
);
}
}
As you can see I already have a reference to the Properties Window but unfortunately I have no idea how to get the properties listed.
In case it's relevant the reason I'm trying to do this is because I want to remove(or hide) some properties shown for the WPF controls in the designer.
Can you please check How to enumerate all dependency properties of control?
I think this will help you for what you are looking for...
Regards,