添加自定义菜单图标
This commit is contained in:
43
Control/Other/CustomIconUrlDialog.xaml
Normal file
43
Control/Other/CustomIconUrlDialog.xaml
Normal file
@@ -0,0 +1,43 @@
|
||||
<Border x:Class="GeekDesk.Control.Other.CustomIconUrlDialog"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
CornerRadius="3"
|
||||
Width="400"
|
||||
Height="230"
|
||||
Opacity="0.95">
|
||||
<Border.Resources>
|
||||
<Style x:Key="LeftTB" TargetType="TextBlock" BasedOn="{StaticResource TextBlockBaseStyle}">
|
||||
<Setter Property="Width" Value="100"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
</Style>
|
||||
</Border.Resources>
|
||||
<Border.Background>
|
||||
<SolidColorBrush Color="AliceBlue" Opacity="1"/>
|
||||
</Border.Background>
|
||||
<hc:SimplePanel Margin="10">
|
||||
<Grid Margin="8,20,8,20">
|
||||
|
||||
<hc:UniformSpacingPanel Spacing="10" Margin="0,10,0,-10">
|
||||
<TextBlock Text="SVG 图标地址:" Style="{StaticResource LeftTB}"/>
|
||||
<TextBox x:Name="IconUrl" Text="{Binding Name, Mode=OneWay}" Width="240" FontSize="14"/>
|
||||
</hc:UniformSpacingPanel>
|
||||
|
||||
<hc:UniformSpacingPanel Spacing="10" Margin="0,58.276,0,-58.276">
|
||||
<TextBlock Text="JSON 配置地址:" Style="{StaticResource LeftTB}"/>
|
||||
<TextBox x:Name="JsonUrl" Text="{Binding Name, Mode=OneWay}" Width="240" FontSize="14"/>
|
||||
</hc:UniformSpacingPanel>
|
||||
|
||||
<!--<hc:UniformSpacingPanel Spacing="10" Margin="246.206,124.551,-246.206,-124.551">
|
||||
<Button Content="取消" Click=""
|
||||
/>
|
||||
<Button Content="保存" Click=""
|
||||
Background="#5BC0DE"
|
||||
Foreground="White"/>
|
||||
</hc:UniformSpacingPanel>-->
|
||||
</Grid>
|
||||
<!--<Button Width="22" Height="22" Command="hc:ControlCommands.Close" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" hc:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,4,4,0"/>-->
|
||||
</hc:SimplePanel>
|
||||
</Border>
|
||||
30
Control/Other/CustomIconUrlDialog.xaml.cs
Normal file
30
Control/Other/CustomIconUrlDialog.xaml.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using GeekDesk.Util;
|
||||
using GeekDesk.ViewModel;
|
||||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
|
||||
namespace GeekDesk.Control.Other
|
||||
{
|
||||
/// <summary>
|
||||
/// TextDialog.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class CustomIconUrlDialog
|
||||
{
|
||||
|
||||
public CustomIconUrlDialog(AppConfig appConfig)
|
||||
{
|
||||
this.DataContext = appConfig;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public CustomIconUrlDialog()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -19,12 +19,6 @@
|
||||
</Border.Background>
|
||||
<hc:SimplePanel Margin="10">
|
||||
<Grid Margin="8,20,8,20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="93*"/>
|
||||
<ColumnDefinition Width="38*"/>
|
||||
<ColumnDefinition Width="126*"/>
|
||||
<ColumnDefinition Width="7*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<hc:UniformSpacingPanel Spacing="10" Grid.ColumnSpan="4">
|
||||
<TextBlock Text="名称:" Style="{StaticResource LeftTB}"/>
|
||||
<TextBox x:Name="IconName" Text="{Binding Name, Mode=OneWay}" Width="180" FontSize="14"/>
|
||||
|
||||
Reference in New Issue
Block a user