HandyControl icon indicating copy to clipboard operation
HandyControl copied to clipboard

使用 HandyControl 组件之后, Button 按钮在 xaml 设计器中现实异常问题

Open 91270 opened this issue 2 years ago • 1 comments

Describe the bug

Button 布局 - 全部填充模式 失效

<Window x:Class="AppTest.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        Height="450" Width="800"  TextElement.FontWeight="Medium" TextElement.FontSize="14" Foreground="LightGray" FontFamily="Microsoft YaHei" 
        WindowStartupLocation="CenterScreen"  ShowInTaskbar="True" HorizontalAlignment="Center"  ResizeMode="NoResize"
        Title="PaperWeight System" WindowStyle="None">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="30*"/>
            <RowDefinition Height="30*"/>
            <RowDefinition Height="40*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="10*"/>
            <ColumnDefinition Width="10*"/>
        </Grid.ColumnDefinitions>

        <Button Grid.Column="0" Name="BtnPrint" Grid.Row="0" Content="标签打印" FontSize="30" FontWeight="DemiBold"  HorizontalAlignment="Stretch" Height="Auto" VerticalAlignment="Stretch" Margin="5" 
                       Foreground="White" Background="BlueViolet"/>
        <Button Grid.Column="1" Name="BtnLable" Grid.Row="0" Content="标签设置" FontSize="30" FontWeight="DemiBold" HorizontalAlignment="Stretch" Height="Auto" VerticalAlignment="Stretch" Margin="5"
                       Foreground="White" Background="BlueViolet"/>
        <Button Grid.Column="0" Name="BtnChooseTeam" Grid.Row="1" Content="选择班组" FontSize="30" FontWeight="DemiBold"  HorizontalAlignment="Stretch" Height="Auto" VerticalAlignment="Stretch" Margin="5"
                       Foreground="White" Background="BlueViolet"/>
        <Button Grid.Column="1" Name="BtnChoosePlan" Grid.Row="1" Content="选择工单" FontSize="30" FontWeight="DemiBold"  HorizontalAlignment="Stretch" Height="Auto" VerticalAlignment="Stretch" Margin="5"
                       Foreground="White" Background="BlueViolet"/>
        <Button Grid.Column="0" Name="BtnProcess"  Grid.Row="2"  Grid.ColumnSpan="2" Content="收纸称重" FontSize="30" FontWeight="DemiBold"  
                HorizontalAlignment="Stretch" Height="Auto" VerticalAlignment="Stretch" Margin="5" Foreground="White" Background="BlueViolet"/>
    </Grid>
</Window>

Steps to reproduce the bug

1、未使用组件时

image image

2、使用组件时

image image

Expected behavior

No response

Screenshots

No response

NuGet package version

HandyControl 3.4.0

IDE

Visual Studio 2022

Framework type

.Net 6.0, .Net Framework 4.8

Windows version

Windows 11 (22000)

Additional context

No response

91270 avatar Jul 03 '23 09:07 91270

HandyConytrol对控件有默认全局样式,你不使用就好

Anonymy avatar Aug 08 '23 01:08 Anonymy

height = auto

NaBian avatar Mar 07 '24 04:03 NaBian