forked from Misaki/GhostEngine
Refactor project structure and enhance UI components
Changed connection string format in ProjectRepository.cs and updated application data path retrieval. Added project reference to Ghost.Engine in Ghost.Database.csproj. Added new property Packages in TemplateInfo.cs. Changed XamlControlsResources source in App.xaml for clarity. Changed App.xaml.cs to include new Host property and updated OnLaunched method. Removed unused image files related to branding. Updated Ghost.Editor.csproj to change target framework and organize content files. Changed display name in Package.appxmanifest from "Ghost.Editor" to "GhostEngine". Enhanced UI layout and data binding in CreateProjectPage.xaml and its code-behind. Changed LandingWindow to use WindowEx for improved functionality. Updated CreateProjectViewModel to implement INavigationAware for better navigation handling. Updated AssemblyInfo.cs for internal visibility to Ghost.Database. Added new files for activation handling and game object management in Ghost.Core and Ghost.Engine. Introduced SystemUtilities for folder picker dialog functionality. Created PropertyField control with corresponding XAML for UI consistency. Added TemplateInfoWarper for managing template information. Introduced HostHelper class to set up application services. Overall, these changes reflect a significant restructuring of the project, enhancing architecture, improving UI components, and establishing clearer separation of concerns.
This commit is contained in:
24
Ghost.Editor/Controls/BasicInput/PropertyField.cs
Normal file
24
Ghost.Editor/Controls/BasicInput/PropertyField.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
|
||||
namespace Ghost.Editor.Controls;
|
||||
|
||||
public sealed partial class PropertyField : ContentControl
|
||||
{
|
||||
public string Label
|
||||
{
|
||||
get => (string)GetValue(LabelProperty);
|
||||
set => SetValue(LabelProperty, value);
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty LabelProperty = DependencyProperty.Register(
|
||||
nameof(Label),
|
||||
typeof(string),
|
||||
typeof(PropertyField),
|
||||
new PropertyMetadata(default(string)));
|
||||
|
||||
public PropertyField()
|
||||
{
|
||||
DefaultStyleKey = typeof(PropertyField);
|
||||
}
|
||||
}
|
||||
33
Ghost.Editor/Controls/BasicInput/PropertyField.xaml
Normal file
33
Ghost.Editor/Controls/BasicInput/PropertyField.xaml
Normal file
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="using:Ghost.Editor.Controls">
|
||||
|
||||
<Style TargetType="local:PropertyField">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="local:PropertyField">
|
||||
<Grid Height="32" Margin="2,4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="125" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock
|
||||
Grid.Column="0"
|
||||
Margin="0,0,0,4"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource BodyTextBlockStyle}"
|
||||
Text="{TemplateBinding Label}"
|
||||
TextTrimming="CharacterEllipsis" />
|
||||
|
||||
<ContentPresenter
|
||||
Grid.Column="1"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
6
Ghost.Editor/Controls/EditorControls.xaml
Normal file
6
Ghost.Editor/Controls/EditorControls.xaml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="/Controls/BasicInput/PropertyField.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user