Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clipborder over parentelement #14

Open
LTa2022 opened this issue Jul 2, 2021 · 1 comment
Open

clipborder over parentelement #14

LTa2022 opened this issue Jul 2, 2021 · 1 comment

Comments

@LTa2022
Copy link

LTa2022 commented Jul 2, 2021

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>
@ratishphilip
Copy link
Owner

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants