Skip to content

Commit 6464291

Browse files
committed
chore: コマンドメッセージ表示設定のボタンレイアウト変更 (#1938)
1 parent 61ae21c commit 6464291

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

NeeView/Setting/EditCommandWindow.xaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
66
xmlns:local="clr-namespace:NeeView.Setting"
77
xmlns:nv="clr-namespace:NeeView"
8+
xmlns:nwp="clr-namespace:NeeView.Windows.Property"
89
xmlns:properties="clr-namespace:NeeView.Properties"
910
mc:Ignorable="d"
1011
Style="{StaticResource ChromeDialogStyle}"
@@ -43,8 +44,10 @@
4344
</Grid>
4445
</TabItem.Header>
4546
<DockPanel Margin="10,20">
46-
<CheckBox DockPanel.Dock="Top" Content="{properties:TextBinding EditCommandWindow.Visible}" IsChecked="{Binding IsShowMessage}"
47-
FocusVisualStyle="{StaticResource NVBorderFocusVisual}" />
47+
<nwp:PropertyInspector x:Name="GeneralInspector" DockPanel.Dock="Top" Document="{Binding GeneralDocument}" KeyboardNavigation.TabNavigation="Local"
48+
IsStretch="True"
49+
IsResetButtonVisible="False"
50+
ColumnRate="0.4"/>
4851
<StackPanel DockPanel.Dock="Bottom" VerticalAlignment="Bottom">
4952
<TextBlock Text="{properties:TextBinding EditCommandWindow.Remarks}" FontWeight="Bold"/>
5053
<TextBlock Text="{Binding Note}" Margin="0,5,0,20" TextWrapping="Wrap"/>

NeeView/Setting/EditCommandWindow.xaml.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using CommunityToolkit.Mvvm.ComponentModel;
22
using CommunityToolkit.Mvvm.Input;
33
using NeeView.Properties;
4+
using NeeView.Windows.Property;
45
using System;
56
using System.ComponentModel;
67
using System.Diagnostics.CodeAnalysis;
@@ -26,6 +27,7 @@ public enum EditCommandWindowTab
2627
[INotifyPropertyChanged]
2728
public partial class EditCommandWindow : Window
2829
{
30+
private readonly PropertyDocument _generalDocument;
2931
private CommandCollection _memento;
3032
private string _key;
3133
private bool _isShowMessage;
@@ -36,6 +38,10 @@ public EditCommandWindow(string key, EditCommandWindowTab start)
3638
InitializeComponent();
3739
this.DataContext = this;
3840

41+
_generalDocument = new PropertyDocument();
42+
_generalDocument.AddProperty(PropertyMemberElement.Create(this, nameof(IsShowMessage)));
43+
_generalDocument.SetVisualType<PropertyValue_Boolean>(PropertyVisualType.ToggleSwitch);
44+
3945
MouseHorizontalWheelService.SubscribeHorizontalWheelEvent(this);
4046

4147
this.Loaded += EditCommandWindow_Loaded;
@@ -45,6 +51,7 @@ public EditCommandWindow(string key, EditCommandWindowTab start)
4551
}
4652

4753

54+
[PropertyMember(Name = "EditCommandWindow.Visible")]
4855
public bool IsShowMessage
4956
{
5057
get => _isShowMessage;
@@ -55,6 +62,8 @@ public bool IsShowMessage
5562

5663
public string Note { get; private set; }
5764

65+
public PropertyDocument GeneralDocument => _generalDocument;
66+
5867

5968
private void EditCommandWindow_Loaded(object? sender, RoutedEventArgs e)
6069
{

0 commit comments

Comments
 (0)