Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 11:13
    dnfadmin commented #4007
  • May 22 15:13
    dnfadmin commented #4025
  • May 20 20:55
    Build #1827 passed
  • May 20 20:48
    punker76 commented #4247
  • May 20 20:47

    punker76 on develop

    Update MessageDialog.cs Fix De… Merge pull request #4247 from c… (compare)

  • May 20 20:47
    punker76 closed #4247
  • May 20 20:47
    punker76 edited #4247
  • May 20 20:46
    punker76 milestoned #4247
  • May 20 20:46
    punker76 labeled #4247
  • May 20 20:46
    punker76 edited #4247
  • May 20 19:59
    punker76 closed #4275
  • May 20 19:57

    punker76 on develop

    Updated readme with some additi… Merge pull request #4296 from n… (compare)

  • May 20 19:57
    punker76 closed #4296
  • May 20 15:15
    Build #1826 passed
  • May 20 15:05
    batzen review_requested #4300
  • May 20 15:05
    batzen labeled #4300
  • May 20 15:05
    batzen labeled #4300
  • May 20 15:05
    batzen labeled #4300
  • May 20 15:05
    batzen opened #4300
  • May 19 21:57
    bsr203 commented #4292
Tim
@timunie
if you don't inherit yes
BasedOn="{StaticResource MahApps.Styles.ComboBox}"
Torchok19081986
@Torchok19081986
It works now, many thanks again, Tim.
👍👍👍
Tim
@timunie
:+1:
bolt-b
@bolt-b

hello everyone,
I "composed" a style for tooglebutton. It seems the style and the button itself live different lifes
Could someone look at code?

App.xaml

 <Style
                x:Key="CustomToggleButtonStyle"
                BasedOn="{StaticResource MahApps.Styles.ToggleButton.Flat}"
                TargetType="{x:Type ToggleButton}">
                <Setter Property="Background" Value="WhiteSmoke" />
                <Setter Property="BorderBrush" Value="Black" />
                <Setter Property="BorderThickness" Value="1" />
                <Setter Property="Padding" Value="0" />
                <Setter Property="Margin" Value="6" />
                <Setter Property="MaxWidth" Value="35" />
                <Setter Property="Focusable" Value="False" />
                <Setter Property="ContentTemplate" Value="{DynamicResource Template.Button.ViewBox}" />
                <Style.Triggers>
                    <Trigger Property="IsMouseOver" Value="True">
                        <Setter Property="Background" Value="LightGray" />
                        <Setter Property="Foreground" Value="Black" />
                    </Trigger>
                    <Trigger Property="IsChecked" Value="True">
                        <Setter Property="Background" Value="LimeGreen" />
                        <Setter Property="Foreground" Value="Black" />
                    </Trigger>
                </Style.Triggers>
            </Style>

MainWindow.xaml

  <ToggleButton                       
                                Grid.Row="0"
                                Content="Toggle me"
                                IsChecked="{Binding BooleanValue, Mode=OneWay}"
                                Style="{StaticResource CustomToggleButtonStyle}">                         
  </ToggleButton>

The issue is: it seems there's no response upon binding. In other words it becomes green by itself,
not by binding. What I'm dong wrong?

Tim
@timunie
@bolt-b why is your Binding OneWay?
I think this will break connection as soon as one clicks the button.
bolt-b
@bolt-b
@timunie , I've tried all "BindingWays" variants. That makes no difference.
The button continues living its own life whilst the binding is living its own life.
Is there a way to disable button's internal links and leave binding link only? It needs to have white-green only by binding, not by pushing button.
Tim
@timunie
Can you show me your Property you bind do?
is it public AND implements INotifyPropertyChanged?
Meanwhile let me test it in the demo App
bolt-b
@bolt-b
The property is ok, visible in intellisense and boolean. Based on MVVM light. There have not been any problems with.
ok please test that.
Tim
@timunie
it works on my side
bolt-b
@bolt-b
is there a difference in code?
Tim
@timunie
not in XAML
Ok Mode=TwoWay
bolt-b
@bolt-b
where?
Tim
@timunie
Maybe the property
I have not your Property
image.png
image.png
bolt-b
@bolt-b
...and it works by true coming from binding only?
Tim
@timunie
yep
And I think there is an issue in your MVVM
So please share your code of the Property
bolt-b
@bolt-b
nothing special... standard property made by code snippet.
I have got hundreds identical ones, all working.
 public bool BooleanValue
        {
            get { return _booleanValue; }
            set { Set(ref _booleanValue, value); }
        }
        private bool _booleanValue;
Tim
@timunie
very strange, but not MahApps related as it works in the demo
bolt-b
@bolt-b
@timunie thank you, seems I found a culprit. it was App specific issue. Not WPF and Mahapps.
Tim
@timunie
I sent you a private link
It's a tool which helped me in the past
bolt-b
@bolt-b
Oh, I see.
JendolaRajda
@JendolaRajda
Hello there! I've been using MahApps for some time now, but only now am I really getting into utilizing the ThemeManager within my apps and have a little question or a possible feature request: Are there any brushes within each of the themes that could give me the Accent colour when using a Light theme, but a dark grey colour when using a Dark theme? Or perhaps vice versa - a brush that would produce accented colour for Dark theme and a shade of dark grey for the Light theme? There's a lot of brushes that switch between dark grey and white depending on the theme, but I haven't found any that would switch between the accent and grey.
Tim
@timunie
Hi @JendolaRajda
You can roll your own ThemeManager and adjust it the way you need to.
Have a look at
Override the LibraryThemeProvider
Happy theming
Tim
TripleNico
@TripleNico
Hi all! Is there a helper function in Mahapps to start a MetroWindow on it's own thread instead of the MainWindow thread?
rabster007
@rabster007
Hi! Does anyone have any experience with TextBoxHelper.IsWaitingForData? Is there a way to change the color of the effect? When my theme is set to dark, the effect isn't visible.
Tim
@timunie
Hi @TripleNico This is normal WPF and not MahApps related.
Anyway you can find more information about this here: https://is.gd/uEQ4Yw
Happy coding, Tim
Tim
@timunie
Hi @rabster007
I think you can override this effect by overriding this DynamicResource in your App.xaml or in any Resources section
Just try to copy&paste the lines given in the link and modify to your needs. I have not tested it yet, so if it doesn't work please come back.
Happy coding, Tim