AmmyUI
AmmyUI copied to clipboard
Useful aliases and mixins
Here few useful aliases and mixins:
alias SolidColorBrush(key, color)
{
SolidColorBrush Key=$key
{
Color: $color
}
}
alias Thickness(key, left, top, right, bottom)
{
Thickness Key=$key
{
Left: $left
Top: $top
Right: $right
Bottom: $bottom
}
}
mixin Size(width=none, height=none) for FrameworkElement
{
Width: $width
Height: $height
}
Good stuff 👍
@ionoy I'm also curious. How can this could be translated in Ammy?
l:Static
is System.Windows.Markup.StaticExtension
the implementation of it is here Gu.Localization.
Yeah i was also wondering about StaticExtensions, more specifically this (the OpeningEffectsOffset
thing). Is it possible to achieve with AmmyUI currently without having to write XAML syntax?
Just import materialDesign
with typeless property:
"xmlns:materialDesign": "clr-namespace: ..."
OpeningEffectsOffset: "{materialDesign:IndexedItemOffsetMultiplier 0:0:0.05}"
or you can do something like this:
<TransitioningContent.OpeningEffectsOffset>
0:0:0.05
</TransitioningContent.OpeningEffectsOffset>