MahApps / mahapps.com

New web site for MahApps.Metro
https://mahapps.com
MIT License
19 stars 32 forks source link

GlowBrush="{DynamicResource AccentColorBrush}" Unresolved #5

Closed luky1374 closed 3 years ago

luky1374 commented 5 years ago

I followed the Mahapps Quick start guide to code my first Mahapps.Metro WPF application. Using v2.0.0 alpha.

`<Controls:MetroWindow x:Class="MahAppsMetroSample.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Controls="http://metro.mahapps.com/winfx/xaml/controls" xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks" Title="DeepSense" GlowBrush="{DynamicResource AccentColorBrush}" WindowStartupLocation="CenterScreen">

<Controls:MetroWindow.RightWindowCommands>
    <Controls:WindowCommands>
        <Button Content="settings" />
        <Button>
            <StackPanel Orientation="Horizontal">
                <iconPacks:PackIconModern Width="24" Height="24" Kind="FoodCupcake" />
                <TextBlock Margin="4 0 0 0" VerticalAlignment="Center" Text="deploy cupcakes" />
            </StackPanel>
        </Button>
    </Controls:WindowCommands>
</Controls:MetroWindow.RightWindowCommands>

<Grid>
</Grid>

</Controls:MetroWindow>`

The GlowBrush="{DynamicResource AccentColorBrush}" seems unresolved. Is there any reference I have skipped? Unable to troubleshoot, help is appreciated.

Thanks

timunie commented 5 years ago

@luky1374 you can really not know this. There was a breaking change in the latest prerelease where all the resources where renamed. AccentColorBrush is now MahApps.Brushes.Accent. I myself like the new way because it is more consistent and intuitive. I think the documentation is going on.

Happy coding Tim

luky1374 commented 5 years ago

Thanks for your response @timunie .

Still unresolved with MahApps.Brushes.Accent, in fact I'm stuck with most resource references like VSWindowNotificationButtonStyle, VSWindowButtonStyle etc.

Anyway to resolve these till the new documentation comes online?

Mandeep

timunie commented 5 years ago

I am searching in the source code if I don't know the ResourceName. https://github.com/MahApps/MahApps.Metro/tree/develop/src/MahApps.Metro

Happy coding Tim

luky1374 commented 5 years ago

Thanks for your help @timunie

Evangelink commented 5 years ago

@luky1374 In case you are still having some issue with the migration, you can have a look at those 3 PRs: MahApps/MahApps.Metro#3552, MahApps/MahApps.Metro#3557 and MahApps/MahApps.Metro#3560 that contains the different changes that were made.

punker76 commented 5 years ago

@luky1374 @timunie @Evangelink I'll make a guide soon here on wiki.

punker76 commented 3 years ago

The guide can be found here https://mahapps.com/docs/guides/migration-to-v2.0