Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
755
How to inherent from theme manager
posted

Hi all,

I am using theme manager on my user controls as follow:

<UserControl x:Class="BackupCustomizing.Views.NavigationView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:ig="http://schemas.infragistics.com/xaml"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <Style x:Key="_btn" TargetType="{x:Type Button}">
            <Setter Property="Margin" Value="10 10 0 0" />
        </Style>
    </UserControl.Resources>

    
    <Grid x:Name="_navi">
        <ig:ThemeManager.Theme>
            <ig:Office2013Theme StyleMicrosoftControls="True" />
        </ig:ThemeManager.Theme>

        <Grid.RowDefinitions>
            <RowDefinition Height="50" />
            <RowDefinition Height="50" />
            <RowDefinition Height="50" />
            <RowDefinition Height="50" />
            <RowDefinition Height="50" />
        </Grid.RowDefinitions>
        <Button Grid.Row="0" Content="Server" Margin="10 10 0 0"/>
        <Button Grid.Row="1" Content="Organisation Unit" Margin="10 10 0 0"/>
        <Button Grid.Row="2" Content="Folders" Margin="10 10 0 0"/>
        <Button Grid.Row="3" Content="Users" Margin="10 10 0 0"/>
    </Grid>
</UserControl>

How can I inherent it for changing for margin:

<Style x:Key="_btn" TargetType="{x:Type Button}" BasedOn="???????">
     <Setter Property="Margin" Value="10 10 0 0" />
</Style>

Which class I have to basedOn?

Thanks