MaterialDesignInXamlToolkit: Breaking 3.0.0 changes

This is an issue to keep track of breaking changes that I would like to see go into the 3.0.0 release. I am open to additional suggestions as well:

  • Card defaults its VerticalAlignment to Top. Suggest defaulting to Stretch.
  • Flipper defaults its VerticalAlignment to Top. Suggest defaulting to Stretch.
  • Remove obsolete PalleteHelper methods.
  • Remove obsolete members in SmartHint
  • Remove obsolete DialogClosingEventArgs.Content. Use DialogClosingEventArgs.Session.Content instead.
  • Remove unused DialogClosingEventArgs constructors
  • Rename MaterialDataGridComboBoxColumn to DataGridComboBoxColumn. Since using the custom column in an app will require specifying the namespace, having the Material prefix adds very little.
  • Vertical alignment of Label, TextBlock and TextBox should have VerticalAlignment=Stretch, and VerticalContentAlignment=Top
  • Source code is no longer included in the NuGet package.
  • MaterialDesignToolBar no longer sets FontFamily to MaterialDesignFont
  • Popup in default DialogHost template no longer sets FontFamily to MaterialDesignFont
  • MaterialDesignTitleTextBlock => MaterialDesignHeadline6TextBlock
  • MaterialDesignHeadlineTextBlock => MaterialDesignHeadline5TextBlock
  • MaterialDesignSubheadingTextBlock => MaterialDesignSubtitle1TextBlock
  • MaterialDesignDisplay4TextBlock => MaterialDesignHeadline1TextBlock
  • MaterialDesignDisplay3TextBlock => MaterialDesignHeadline2TextBlock
  • MaterialDesignDisplay2TextBlock => MaterialDesignHeadline3TextBlock
  • MaterialDesignDisplay1TextBlock => MaterialDesignHeadline4TextBlock

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 16 (10 by maintainers)

Commits related to this issue

Most upvoted comments

labels textboxs and textblocks have different VerticalAlignment by default and if you put them in stackpanel next to each other they won’t be on the same line

<StackPanel Orientation="Horizontal">
        <Label Content="Label"/>
        <TextBlock Text="TextBlock"/>
        <TextBox Text="TextBox" Width="100"/>
</StackPanel>

image

@csutcliff you can’t mix and match MahApps 2.0 and MaterialDesignThemes.MahApps which should only target MahApps 1.6.0

To say it in another way: No work has been put into MaterialDesignThemes.MahApps to update it to NetCoreApp or target MahApps 2.0

@MovGP0 yes .NET Core 3.0 support will be in the 3.0.0 release. It is there now if you download the latest 3.0.0 preview NuGet.

@ahmedflix25 I believe I have gotten it as close to “it just works” as possible. This now has all three controls aligned vertically.

<StackPanel Orientation="Horizontal">
    <Label Content="Label"/>
    <TextBlock Text="TextBlock" Style="{StaticResource MaterialDesignTextBlock}"/>
    <TextBox Text="TextBox" Width="100"/>
</StackPanel>

I have created a new base styled for TextBlock, MaterialDesignTextBlock. Because the TextBox requires some internal padding to support things like the underline, we need to pad the other controls to match. So I adjusted the Label’s default padding from 5 to 4, and created a new style for TextBlock with the appropriate default padding. We can’t universally apply this TextBlock style implicitly like we do so many other styles because TextBlocks are used internally inside of any content control that displays text. In fact it would then double the padding on the Label breaking the initial fix.

Maybe also worth mentioning that the Hyperlink styles changed along with the TextBlock styles. For example, I had to change the following in some code of mine:

MaterialDesignSubheadingHyperlink => MaterialDesignSubtitle1Hyperlink MaterialDesignDisplay1Hyperlink => MaterialDesignHeadline4Hyperlink