WPFDevelopersOrg / WPFDevelopers

🎉 Welcome to follow the "WPFDevelopers" public account! This is a sample project we share daily, covering WPF's basic controls and custom control libraries. The project will be continuously updated, welcome to give us ⭐️
MIT License
1.5k stars 240 forks source link

ScreenCut控件绝少取消按钮 #57

Closed liangxuan2 closed 1 year ago

liangxuan2 commented 1 year ago

screenCapturer = new ScreenCapture(); 调用这个控件,缺少取消按钮

yanjinhuagood commented 1 year ago

原因:查看源码按钮还存在的,只不过取消按钮的Path颜色无效了。

 <Button
                                        x:Name="PART_ButtonCancel"
                                        Margin="4,0"
                                        Style="{DynamicResource WD.PathButton}"
                                        ToolTip="取消">
                                        <Button.Content>
                                            <Path
                                                Width="14"
                                                Height="14"
                                                Data="{StaticResource WD.CancelGeometry}"
                                                Fill="{DynamicResource WD.DrawPrizeDualSolidColorBrush}"
                                                Stretch="Fill" />
                                        </Button.Content>
                                    </Button>

临时方案:通过源码看到取消按钮的ContentPathFill设置颜色为资源WD.DrawPrizeDualSolidColorBrush,所以可以在APP.xaml中添加颜色资源:

    <SolidColorBrush x:Key="WD.DrawPrizeDualSolidColorBrush" Color="Red" />
yanjinhuagood commented 1 year ago

已修复,请更新至最新版 nuget预览包

liangxuan2 commented 1 year ago

解决