Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 14:09
    dnfadmin commented #4075
  • Aug 17 14:03
    Build #1874 passed
  • Aug 17 13:52

    batzen on develop

    Preparing code for ControlzEx 6 Replacing all PInvoke code from… emitSingleFile = false and 15 more (compare)

  • Aug 17 13:52
    batzen closed #4300
  • Aug 16 16:41
    Build #1873 passed
  • Aug 16 16:31
    batzen synchronize #4300
  • Aug 15 20:33
    batzen synchronize #4300
  • Aug 14 09:19
    dnfadmin commented #4290
  • Aug 14 03:23
    dnfadmin commented #4247
  • Aug 09 10:15
    dnfadmin commented #4290
  • Aug 08 09:00
    dnfadmin commented #4335
  • Aug 06 06:54
    dnfadmin commented #4007
  • Aug 06 05:14
    dnfadmin commented #4075
  • Aug 05 04:47
    sawanhai edited #4337
  • Aug 05 04:46
    sawanhai edited #4337
  • Aug 05 04:43
    sawanhai edited #4337
  • Aug 05 04:42
    sawanhai edited #4337
  • Aug 05 04:42
    sawanhai edited #4337
  • Aug 05 03:46
    sawanhai reopened #4337
  • Aug 05 03:46
    sawanhai edited #4337
TripleNico
@TripleNico
Thanks, will have a look! Though isn't there something simpler without adding another package?
Torchok19081986
@Torchok19081986
have a look to validation method
may is possible to achieve same with custom way. Second link to validator. Validationname Method
Tim
@timunie
@Torchok19081986 that is something differnt. The package is great, but it is not related to the appereance
@TripleNico you will have to set it via the attached property Validaten.ErrorTemplate="{StaticResource MahApps.Templates.ValidationError}"
Torchok19081986
@Torchok19081986
ok, thanks Tim. I thought with Validator , i can achive same like IDataErrorInfo Interface.
bolt-b
@bolt-b
Hello everyone,
I can't understand an issue. Whether it depends on this framework or this is native WPF issue or so. Perhaps professionals will give me an advice.
Tim
@timunie
@bolt-b then post your question 😊
This chat is not in real time
bolt-b
@bolt-b
<Path

                            Width="46"
                            Height="88"
                           Data="F1 M 384.165,185.705L 302.608,32.3512L 131.861,0.499878L 0.5,114.136L 7.44214,287.69L 147.46,390.471L 315.117,345.084L 384.165,185.705 Z "
                            Stretch="Fill"
                            Stroke="#FF000000"
                            StrokeLineJoin="Round">
                            <Path.Style>
                                <Style TargetType="{x:Type Path}">
                                    <Style.Triggers>
                                        <DataTrigger Binding="{Binding firstColour}" Value="false">
                                            <Setter Property="Path.Fill" Value="Red" />
                                        </DataTrigger>
                                        <DataTrigger Binding="{Binding secondColour}" Value="true">
                                            <Setter Property="Path.Fill" Value="Blue" />
                                        </DataTrigger>
                                    </Style.Triggers>
                                </Style>
                            </Path.Style>

                        </Path>
I can't understand why the trigger works properly when true, and doesn't work when false. The polygone remains "Blue". Thanks
Tim
@timunie
Hi @bolt-b
try to add a default setter
                            <Path.Style>
                                <Style TargetType="{x:Type Path}">
                                    <Setter Property="Path.Fill" Value="[YourFallbackValue]" />
                                    <Style.Triggers>
                                        <DataTrigger Binding="{Binding firstColour}" Value="false">
                                            <Setter Property="Path.Fill" Value="Red" />
                                        </DataTrigger>
                                        <DataTrigger Binding="{Binding secondColour}" Value="true">
                                            <Setter Property="Path.Fill" Value="Blue" />
                                        </DataTrigger>
                                    </Style.Triggers>
                                </Style>
                            </Path.Style>
bolt-b
@bolt-b
@timunie, thanks, this works. However, it looks not logically. Or? I can simply delete "false" part of trigger. Use default setter and "true" part.
Tim
@timunie

First of all this is normal WPF, not MahApps related.

And for me it makes sense: How else should the style know, which color is the normal

But I am not a programmer, so maybe my engineers understanding is wrong ^^
bolt-b
@bolt-b
Yes I agree this is not related to your framework. The style is said explicitly "when false" fill with "Red", though.
Tim
@timunie
No it does not
firstColour vs secondColour
bolt-b
@bolt-b
I can't find any info about this misbehaving. Anyway thank you a lot.
Tim
@timunie
:+1:
TripleNico
@TripleNico
Morning everyone! Today i got a simple question, is there a poperty i can set to hide the last vertical gridline of a datagrid? It seems that the example app does this but if i try the same the vertical gridline of the last column is always shown.
6 replies
Andrew
@andrewissac

Hey everyone!

We wrote a touchscreen keyboard usercontrol that is placed into a SimpleChildWindow. Then we make us of the ChildWindowManager to show and close the touchscreen keyboard on demand.

But now we have a scenario where we have metro dialogs (using the metro IDialogCoordinator) with input fields and would need the SimpleChildWindow to appear in front of the dialog. Is there any way to achieve this or should we rather use an ordinary Window instead of the SimpleChildWindow in this case?

Would be glad for any hint :)

Tim
@timunie
@andrewissac I think I would go for a ordinary window and just hide it from the taskbar and make it topmost.
TripleNico
@TripleNico
I'm banging my head with a bug i just discovered which is described here: MahApps/MahApps.Metro#2483
In short setting AllowsTransparency to True breaks the Maximize window and possibly other things. So my guesting is: How would one fade in the MainWindow after a splashscreen is done loading? The fade in is simply done by a StoryBoard:
        <Storyboard x:Key="sbFadeMainWindowIn">
            <DoubleAnimation
                AutoReverse="False"
                Storyboard.TargetName="wMain"
                Storyboard.TargetProperty="Opacity"
                From="0.0"
                To="1.0"
                Duration="0:0:0.5" />
        </Storyboard>
Andrew
@andrewissac
@andrewissac I think I would go for a ordinary window and just hide it from the taskbar and make it topmost.
Thank you for your opinion! @timunie
Torchok19081986
@Torchok19081986
Hallo, everyone. I have some trobles to add waterwamark to ComboBox Element. For TextBox exists mahapps.TextBoxHeler.Watermark = "some text", but same way to add it to comboBox doesnt work.
Tim
@timunie
it is also TextBoxHelper
if you have your own ComboBox.Template make sure you have the Watermark implemented
Torchok19081986
@Torchok19081986
ok, thx Tim. And Custom Style overides Style of MahApps, right?
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