Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 15:15
    Build #1826 passed
  • 15:05
    batzen review_requested #4300
  • 15:05
    batzen labeled #4300
  • 15:05
    batzen labeled #4300
  • 15:05
    batzen labeled #4300
  • 15:05
    batzen opened #4300
  • May 19 21:57
    bsr203 commented #4292
  • May 19 06:48
    punker76 commented #4292
  • May 19 00:55
    bsr203 commented #4292
  • May 18 21:05
    bsr203 commented #4292
  • May 18 20:02
    timunie commented #4292
  • May 18 16:48
    bsr203 commented #4292
  • May 18 12:57
    AlexanderGipp edited #4299
  • May 18 12:57
    AlexanderGipp closed #4299
  • May 18 09:41
    dnfadmin commented #4025
  • May 18 09:07
    AlexanderGipp labeled #4299
  • May 18 09:07
    AlexanderGipp opened #4299
  • May 18 02:35
    dnfadmin commented #4007
  • May 13 13:23
    seba30 labeled #4298
  • May 13 13:23
    seba30 opened #4298
Tim
@timunie
@DMtsdt best would be if you can provide a sample via GitHub.
Daniel Mittelstadt
@DMtsdt
I should try first without the attached behaviour, otherwise it'd be too ambiguous
TripleNico
@TripleNico
Hi all! I just noticed today that there is a "MaterialDesignThemes.MahApps" Nuget package. What does this bring to the UI?
Jan Karger ツ ☀
@punker76
@TripleNico It has styles for MaterialDesignInXaml for some controls of MahApps. It’s from MDIX itself.
Fela Ameghino
@FrayxRulez
:wave: I was wondering if there's any way to show the system title bar while using MetroWindow...
(Might sound dumb, but I need to change this programmatically)
Tim
@timunie
Hi
@FrayxRulez I don't see an eays root here in WPF
I think you can either use the MetroWindow or normal Window
Fela Ameghino
@FrayxRulez
Oh noooo
That's what I was afraid of. I mean, I guess I can sort it out (in the end I have to decide if I need system chrome or not before opening the window)
Tim
@timunie
What's the reason?
Moreover if you are just at the beginning: Consider using Avalonia instead of WPF
Fela Ameghino
@FrayxRulez
Oh, unfortunately I'm not at the beginning :) We want to run the app on Mac using Wine and we want to have native native titlebar there
Tim
@timunie
Again sounds like Avaloia could help you. At least for the future.
Mac is native supported I think
Fela Ameghino
@FrayxRulez
I know, but we have a lot of closed source dependencies :grin:
Trevor Fradsham
@TrevorFradsham_twitter
I have seen Avalonia mentioned a couple times, Is there a roadmap, or plan, or discussion regarding MahApps.Metro running on any of these platforms: Avalonia, Uno, .Net Maui? I have been using MahApps.metro for a few years and really enjoy it, but would like to see if I can plan on using it well into the future for new applications.
Tim
@timunie
@TrevorFradsham_twitter no MahApps is WPF only.
I just mentioned Avalonia here because of the need of certain functions WPF cannot offer.
Trevor Fradsham
@TrevorFradsham_twitter
thanks for the info
Tim
@timunie
This looks close to MahApps, Jan found it.
Haven't tested it yet as I like the Fluent Style in Avalonia
yaunchen
@yaunchen
RadarCha.gif
Excuse me please allow me to share a WPF project https://github.com/yanjinhuagood/WPFDevelopers
David Hejj
@dil-DHejj
Hi I was wondering why there is no Window style listed in the MahApps styles: https://mahapps.com/docs/styles/
Can anyone help me out, what a style for the window should be based on if it is inherited from MetroWindow?
Jan Karger ツ ☀
@punker76
@dil-DHejj There is no explicit key for the style. If you need to inherit from the default style you must do this
<Style x:Key="CustomStyle" BasedOn="{StaticResource {x:Type mah:MetroWindow}}" TargetType="{x:Type YourCustomMetroWindow}"></Style>
1 reply
TripleNico
@TripleNico
Hello Hello! Back again for a short question :-) I want to use the ClearTextButton on a ComboBox and only show it when an item is selected. For TextBoxes i use this binding which works like a charm mah:TextBoxHelper.ClearTextButton="{Binding Path=(mah:TextBoxHelper.HasText), RelativeSource={RelativeSource Mode=Self}}" but not for a ComboBox. Is there an easy way to modify this OR do i have to apply a custom style?
Tim
@timunie
@TripleNico you could create a converter and check SelectedIndex or SelectedItem
Jan Karger ツ ☀
@punker76

@TripleNico You can get this by using this converter (works only with non editable ComboBox)

[ValueConversion(typeof(object), typeof(bool))]
public sealed class IsNotNullConverter : IValueConverter
{
    /// <summary>
    /// Gets a static default instance of <see cref="IsNotNullConverter "/>.
    /// </summary>
    public static readonly IsNotNullConverter Instance = new();

    public object? Convert(object? value, Type targetType, object? parameter, System.Globalization.CultureInfo culture)
    {
        return value is not null;
    }

    public object? ConvertBack(object? value, Type targetType, object? parameter, System.Globalization.CultureInfo culture)
    {
        return Binding.DoNothing;
    }
}

usage:

<ComboBox Width="200"
          Margin="{StaticResource ControlMargin}"
          mah:TextBoxHelper.ClearTextButton="{Binding Path=SelectedItem, RelativeSource={RelativeSource Mode=Self}, Converter={x:Static local:IsNotNullConverter.Instance}}"
          mah:TextBoxHelper.Watermark="Please select an item..."
          SelectedIndex="0">
    <ComboBoxItem Content="Item 1" />
    <ComboBoxItem Content="Item 2" />
    <ComboBoxItem Content="Very long Item 3 for MahApps.Metro" />
    <ComboBoxItem Content="Item 4" />
</ComboBox>
TripleNico
@TripleNico
@timunie and @punker76 thanks for your swift replies, solved it with a convert and works like a charm. Would be great however if HasText would also work on a ComboBox. Maybe something for the ComboBoxHelper class?
Jan Karger ツ ☀
@punker76
@TripleNico Yes this is not implemented, I’ll re-implement the IsMonitoring thing. Thx
DanSagher
@DanSagher
Is there a way to set ProgressDialog with an extra Button? we want one button for canceling and the other for minimizing the dialog.
Tim
@timunie
@DanSagher I think you will need to implement it on your own, as far as I remember. As MahApps is open source you may get your self the code and modify it to your needs
DanSagher
@DanSagher
Thanks (:
makingbloke
@makingbloke
Hi, I'm using MahApps with MvvmLight in a medium sized WPF app. It all works pretty well, I've just upgraded to .Net 6 with no issues :) The problem is that MvvmLight has gone end of life. So, my question is, what frameworks does everybody else use? and is there anything I can drop in that is compatible with MahApps and needs minimal changes? Cheers
Zeleksonob
@Zeleksonob
Hi All,
Is there a way to give the user the option to minimize the application while showing the ProgressDialog?
Zeleksonob
@Zeleksonob
Thanks I found is ,I just set the property
metroWindow.ShowDialogsOverTitleBar to false
it*
makingbloke
@makingbloke
@timunie Thanks for that I'll take a look.
TripleNico
@TripleNico
Hello! Almost weekend :-) Quick question, is there a simpel way to increase the OpenTime for the MahApps.Styles.ToolTip?
TripleNico
@TripleNico
Yeah i thought you would link that one ;-) I would however prefer a style in Application.xaml so it applies to all ToolTips. Unfortuanlly this doesnt work:
            <Style BasedOn="{StaticResource MahApps.Styles.ToolTip}" TargetType="{x:Type ToolTip}">
                <Setter Property="ToolTipService.ShowDuration" Value="10000" />
            </Style>
Jan Karger ツ ☀
@punker76
@TripleNico The ToolTipService.ShowDuration is for the root element which holds the ToolTip
TripleNico
@TripleNico
Alright so how would you apply it to all controls that can use a tooltip?