[Editor] Update script editor bindings
This commit is contained in:
Родитель
2f5059432f
Коммит
ae4250010e
|
@ -7,11 +7,12 @@
|
||||||
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||||
xmlns:sd="http://schemas.stride3d.net/xaml/presentation"
|
xmlns:sd="http://schemas.stride3d.net/xaml/presentation"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="300" d:DesignWidth="300" FocusManager.FocusedElement="{Binding ElementName=CodeEditor}">
|
d:DesignHeight="300" d:DesignWidth="300" d:DataContext="{d:DesignInstance local:ScriptEditorViewModel}"
|
||||||
|
FocusManager.FocusedElement="{Binding ElementName=CodeEditor}">
|
||||||
<i:Interaction.Behaviors>
|
<i:Interaction.Behaviors>
|
||||||
<sd:CommandBindingBehavior RoutedCommand="ApplicationCommands.Save" Command="{Binding Editor.SaveDocumentCommand}" />
|
<sd:CommandBindingBehavior RoutedCommand="ApplicationCommands.Save" Command="{Binding SaveDocumentCommand}" />
|
||||||
</i:Interaction.Behaviors>
|
</i:Interaction.Behaviors>
|
||||||
<Grid DataContext="{Binding Editor}" d:DataContext="{d:DesignInstance local:ScriptEditorViewModel}">
|
<Grid>
|
||||||
<local:SimpleCodeTextEditor x:Name="CodeEditor" x:FieldModifier="private" FontSize="{Binding Code.EditorFontSize}" ContextActionsIcon="{StaticResource Bulb}" />
|
<local:SimpleCodeTextEditor x:Name="CodeEditor" x:FieldModifier="private" FontSize="{Binding Code.EditorFontSize}" ContextActionsIcon="{StaticResource Bulb}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<UserControl x:Class="Stride.Assets.Presentation.AssetEditors.VisualScriptEditor.VisualScriptEditorView"
|
<UserControl x:Class="Stride.Assets.Presentation.AssetEditors.VisualScriptEditor.VisualScriptEditorView"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
xmlns:sd="http://schemas.stride3d.net/xaml/presentation"
|
xmlns:sd="http://schemas.stride3d.net/xaml/presentation"
|
||||||
Focusable="True"
|
Focusable="True"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="300" d:DesignWidth="300">
|
d:DesignHeight="300" d:DesignWidth="300" d:DataContext="{d:DesignInstance local:VisualScriptEditorViewModel}">
|
||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
@ -227,9 +227,9 @@
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
<i:Interaction.Behaviors>
|
<i:Interaction.Behaviors>
|
||||||
<sd:CommandBindingBehavior RoutedCommand="ApplicationCommands.Delete" Command="{Binding Editor.VisibleMethod.DeleteSelectionCommand}" />
|
<sd:CommandBindingBehavior RoutedCommand="ApplicationCommands.Delete" Command="{Binding VisibleMethod.DeleteSelectionCommand}" />
|
||||||
</i:Interaction.Behaviors>
|
</i:Interaction.Behaviors>
|
||||||
<Grid DataContext="{Binding Editor}" d:DataContext="{d:DesignInstance local:VisualScriptEditorViewModel}">
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
<ColumnDefinition Width="5"/>
|
<ColumnDefinition Width="5"/>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче