WPF component not fully developed



  • There is a window with an improvised component that is consumed. It's like some invisible area of the side (showed by the yellow line) that covers it (similar to the bottom). If you change the size of the window, it moves.

    баг

    Window code

    <Window>
        <Grid>
    
        &lt;Button x:Name="btnUpdate" Content="↻" Margin="10,10,0,0" Click="Button_Click_1" HorizontalAlignment="Left" Width="20" Height="20" VerticalAlignment="Top" /&gt;
    
        &lt;local:Clock x:Name="clock" Width="250" Height="250" Margin="10,10,72,33" HorizontalAlignment="Left" VerticalAlignment="Top" /&gt;
    
        &lt;Label x:Name="labelHours" Content="0 h." HorizontalAlignment="Right" Margin="0,0,10,10" VerticalAlignment="Bottom" FontSize="21.333" /&gt;
        &lt;Label x:Name="labelPass" Content="0 h." HorizontalAlignment="Left" Margin="10,0,0,10" VerticalAlignment="Bottom" FontSize="21.333" /&gt;
    
    &lt;/Grid&gt;
    

    </Window>

    The component itself has the following structure

    <UserControl>
    <Canvas Width="200" Height="200">
    <!-- далее несколько внутренних canvas-ов -->
    <Canvas>
    <Path/>
    </Canvas>
    </Canvas>
    </UserControl>

    Who's gonna tell you what's the problem, what's he burning up?



  • On the advice of the commentary, the margin and size of the component were removed, which solved the problem.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2