Different LineHeight in Blend and Unity
Hello,
Trying to harmonize the layout in Unity and Blend, the LineHeight seems to be interpreted differently in Blend and Unity and its a problem when the height of a control (a button for example) depends of the LineHeight.
(The property LineHeight doesn't change a thing)
Is there a solution to avoid these different interpretation ?
Thanks !
Trying to harmonize the layout in Unity and Blend, the LineHeight seems to be interpreted differently in Blend and Unity and its a problem when the height of a control (a button for example) depends of the LineHeight.
(The property LineHeight doesn't change a thing)
Is there a solution to avoid these different interpretation ?
Thanks !
Re: Different LineHeight in Blend and Unity
What version of Noesis are you using?
Could you please attach images with corresponding XAML showing the differences?
Could you please attach images with corresponding XAML showing the differences?
Re: Different LineHeight in Blend and Unity
I use the NoesisGUI v3.0.0rc7
Here the result in Unity and Blend :
Here the template (whitout triggers) :
Here the style which apply the template :
Here the result in Unity and Blend :
Here the template (whitout triggers) :
Code: Select all
<ControlTemplate x:Key="RoundButtonTemplate" TargetType="{x:Type ButtonBase}">
<Border x:Name="Bg"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="1"
Padding="12,0,12,0"
CornerRadius="4">
<TextBlock Text="{TemplateBinding Content}" Margin="0,0,0,2" x:Name="TextButton">
<TextBlock.Effect>
<DropShadowEffect Color="#01020a3C" Direction="330" ShadowDepth="2" BlurRadius="4"/>
</TextBlock.Effect>
</TextBlock>
</Border>
</ControlTemplate>
Here the style which apply the template :
Code: Select all
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource DefaultControlStyle}">
<Setter Property="BorderBrush" Value="{StaticResource DarkCyanBrush}"/>
<Setter Property="Background" Value="{StaticResource GdBlue}"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="Foreground" Value="{StaticResource WhiteBrush}"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Template" Value="{StaticResource RoundButtonTemplate}"/>
</Style>
Re: Different LineHeight in Blend and Unity
It seems to me, you are using different fonts for Blend and Unity? Fast way to fix this is applying our theme to blend. That way the default font is the same.
Re: Different LineHeight in Blend and Unity
Ok You're right, Unity applied its default font which overides the fonts I defined in code.
Thank for bring to light this !
Thank for bring to light this !
Re: Different LineHeight in Blend and Unity
Great! Glad to help
Who is online
Users browsing this forum: kashif and 12 guests