batzen on develop
Preparing code for ControlzEx 6 Replacing all PInvoke code from⦠emitSingleFile = false and 15 more (compare)
Validaten.ErrorTemplate="{StaticResource MahApps.Templates.ValidationError}"
<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
<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>
firstColour
vs secondColour
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 :)
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>
ComboBox.Template
make sure you have the Watermark
implemented
BasedOn="{StaticResource MahApps.Styles.ComboBox}"
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?
Mode=TwoWay