wpfspark icon indicating copy to clipboard operation
wpfspark copied to clipboard

clipborder over parentelement

Open LTa2022 opened this issue 3 years ago • 1 comments

Hi! Do you still support 4.7.2? I got the following glitch: (ignore the news thing) Screenshot - 7_2_2021 , 2_54_37 PM

When I resize the parent control it jumps to normal and scales properly. Same when I change BackgroundBorder.BorderThickness. It just seems when loading, it does not refresh.

The xaml could be reduced to the following: (its grid{basic border, clipborder{canvas}} canvas' background is the gray image, the purple is the first borders background)

          <local:ItemBorder   x:Name="mainborder" Visibility="{Binding ElementName=thiscontrol,Path=ItemLayout.BackgroundVisibility}"
                                 Background="{Binding ElementName=thiscontrol,
                                                         Path=BackgroundBorder.Background}"
                                
                                        BorderThickness="{Binding ElementName=thiscontrol,
                                                         Path=BackgroundBorder.BorderThickness.AsString}"
                                 
                                        CornerRadius="{Binding ElementName=thiscontrol,
                                                         Path=BackgroundBorder.CornerRadius.AsString}"
                                 BorderBrush="{Binding ElementName=thiscontrol,
                                                         Path=BackgroundBorder.BorderBrush}" Canvas.Top="10"
                      Grid.Row="1" Grid.Column="1"
                       
                      >
                
                        </local:ItemBorder>

                        <local:ClipBorder            x:Name="clipborder"           Grid.Row="1" Grid.Column="1"
                                 BorderThickness="{Binding ElementName=thiscontrol,
                                                         Path=BackgroundBorder.BorderThickness.AsString}"
                                 CornerRadius="{Binding ElementName=thiscontrol,
                                                         Path=BackgroundBorder.CornerRadius.AsString}"

>
                        

                            <Canvas  x:Name="img"   Background="{Binding ElementName=thiscontrol,Path=IconBrush, FallbackValue=blue}" MinHeight="30" 
                         Visibility="{Binding ItemLayout.ImageVisibility, ElementName=thiscontrol}"     DataContext="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType=local:uc_item}}"   MinWidth="30"  
		HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                        >


                            </Canvas>

                        </local:ClipBorder>

LTa2022 avatar Jul 02 '21 13:07 LTa2022

Hi @lturek, I am not sure if I fully understand your question here... do you have a sample project which can replicate this issue?

Another thing... have you considered overriding the MeasureOverride / ArrangeOverride methods to ensure that the rendering is done properly during load?

ratishphilip avatar Jul 03 '21 15:07 ratishphilip