DropShadowEffect on Rectangle causes the whole interface broken
Hello. I have a problem. I am using unigine with noiesisgui. I have several interface files.
The problem is when there is a DropShadowEffect in a style xaml file the whole interface shifts and scales like half of size from it.
The only one button spoils entire window. I tried to comment out this directive and it works fine.
I would like to keep the effect but fix it.
The problem is when there is a DropShadowEffect in a style xaml file the whole interface shifts and scales like half of size from it.
The only one button spoils entire window. I tried to comment out this directive and it works fine.
I would like to keep the effect but fix it.
Code: Select all
<Button Content="Login" Margin="1490,809,17,6" Style="{DynamicResource KeyGray}"
Command="..." />
<Style x:Key="KeyGray" TargetType="{x:Type Button}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border SnapsToDevicePixels="true" CornerRadius="6">
<Grid>
<Rectangle x:Name="background" Fill="#B5B5B5" RadiusX="7" RadiusY="7" />
<Rectangle x:Name="backgroundBlur" RadiusX="7" RadiusY="7" Stroke="#5C5C5C"
StrokeThickness="5">
<Rectangle.Effect>
<DropShadowEffect BlurRadius="10" ShadowDepth="10" Opacity="0.5"/>
</Rectangle.Effect>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
-
-
sfernandez
Site Admin
- Posts: 3363
- Joined:
Re: DropShadowEffect on Rectangle causes the whole interface broken
Hi, there is a minor issue in the xaml code you pasted, you forgot to close the Rectangle tag.
Anyway I don't think that would be the source of the problem, it looks more like an issue with the Unigine integration. It might have something wrong with the offscreen rendering phase. You should take a look at the integration guide: https://www.noesisengine.com/docs/Gui.C ... Guide.html
Code: Select all
<Style x:Key="KeyGray" TargetType="{x:Type Button}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border SnapsToDevicePixels="true" CornerRadius="6">
<Grid>
<Rectangle x:Name="background" Fill="#B5B5B5" RadiusX="7" RadiusY="7" />
<Rectangle x:Name="backgroundBlur" RadiusX="7" RadiusY="7" Stroke="#5C5C5C"
StrokeThickness="5">
<Rectangle.Effect>
<DropShadowEffect BlurRadius="10" ShadowDepth="10" Opacity="0.5"/>
</Rectangle.Effect>
</Rectangle>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>Who is online
Users browsing this forum: No registered users and 4 guests