Скажите, у меня есть этот UserControl и вы хотите переместить атрибуты в стиль без необходимости делать это вручную?
<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="Testing.MainPage" Width="640" Height="480"> <Grid x:Name="LayoutRoot" Background="White"> <Button x:Name="mybutton" Content="Button" BorderThickness="5" Background="Red" /> </Grid> </UserControl>
Итак, я хочу создать новый стиль и переместить BorderThickness и Background в новый стиль?
очевидно, вы можете сделать это.
Проверьте это: http://dotneteers.net/blogs/vbandi/archive/2010/01/19/extract-styles-in-expression-blend.aspx