2012 Visual Studio Custom Control Xaml / Style Designer - How to edit common xaml styles?

I delved into the Internet and in the stack overflow, but maybe I am not asking the question correctly.

I am trying to edit my universal / standard usercontrol style without opening Blend. I want to know how to change the default style for a user control in VS2012. This will not allow you to "Change the current", and I can not find the equivalent window in VS2012, for example, in the blend, where you can see all the resources and styles you listed.

Does anyone know where this is located? The new Xaml editor material in VS2012 is fantastic, but the user controls and default styles are really important.

Launch VS2012 Ultimate - Update 2

Thanks!

Edit Current unavailable

cannot be edited in design view

+4
source share
1 answer

You cannot do it directly in VS (that’s why Blend exists, I think :), but you can try using XamlWriter to get the xaml code of the control you want to change.

Just create a new WPF application, add the control you want to change, and a button with a click handler.

Write the following inside the button click handler:

private void OnGetXamlButtonClick(object sender, RoutedEventArgs e) { string xaml = XamlWriter.Save(MyControl.Style); } 
0
source

Source: https://habr.com/ru/post/1478891/


All Articles