将浮动工具栏使用新控件
This commit is contained in:
@@ -43,6 +43,16 @@ namespace Ink_Canvas.Controls
|
|||||||
|
|
||||||
public GeometryDrawing GeometryDrawing => IconGeometryInternal;
|
public GeometryDrawing GeometryDrawing => IconGeometryInternal;
|
||||||
|
|
||||||
|
public static readonly DependencyProperty IconBrushProperty = DependencyProperty.Register(
|
||||||
|
nameof(IconBrush), typeof(Brush), typeof(ToolbarImageButton),
|
||||||
|
new PropertyMetadata(null, (d, e) => ((ToolbarImageButton)d).IconGeometryInternal.Brush = (Brush)e.NewValue));
|
||||||
|
|
||||||
|
public Brush IconBrush
|
||||||
|
{
|
||||||
|
get => (Brush)GetValue(IconBrushProperty);
|
||||||
|
set => SetValue(IconBrushProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
public new Brush Background
|
public new Brush Background
|
||||||
{
|
{
|
||||||
get => ButtonPanel.Background;
|
get => ButtonPanel.Background;
|
||||||
|
|||||||
@@ -7939,6 +7939,7 @@
|
|||||||
ButtonMouseDown="FloatingBarToolBtnMouseDownFeedback_Panel"
|
ButtonMouseDown="FloatingBarToolBtnMouseDownFeedback_Panel"
|
||||||
ButtonMouseLeave="FloatingBarToolBtnMouseLeaveFeedback_Panel"
|
ButtonMouseLeave="FloatingBarToolBtnMouseLeaveFeedback_Panel"
|
||||||
ButtonMouseUp="SymbolIconDelete_MouseUp"
|
ButtonMouseUp="SymbolIconDelete_MouseUp"
|
||||||
|
IconBrush="{DynamicResource RedBrush}"
|
||||||
Label="{i18n:I18n Key=FloatingBar_Clear}" />
|
Label="{i18n:I18n Key=FloatingBar_Clear}" />
|
||||||
<ikw:SimpleStackPanel Name="StackPanelCanvasControls" Visibility="Visible"
|
<ikw:SimpleStackPanel Name="StackPanelCanvasControls" Visibility="Visible"
|
||||||
Orientation="{Binding ElementName=StackPanelFloatingBar, Path=Orientation}">
|
Orientation="{Binding ElementName=StackPanelFloatingBar, Path=Orientation}">
|
||||||
|
|||||||
@@ -173,8 +173,6 @@ namespace Ink_Canvas
|
|||||||
|
|
||||||
SetAllFloatingBarButtonsToColor(FloatBarForegroundColor);
|
SetAllFloatingBarButtonsToColor(FloatBarForegroundColor);
|
||||||
|
|
||||||
SymbolIconDelete.Icon.Brush = new SolidColorBrush(Color.FromRgb(239, 68, 68));
|
|
||||||
|
|
||||||
switch (_currentToolMode)
|
switch (_currentToolMode)
|
||||||
{
|
{
|
||||||
case "cursor":
|
case "cursor":
|
||||||
|
|||||||
Reference in New Issue
Block a user