diff --git a/ClassToXaml.Windows/ClassToXaml.Windows.csproj b/ClassToXaml.Windows/ClassToXaml.Windows.csproj
index 9e99db0..bebdafd 100644
--- a/ClassToXaml.Windows/ClassToXaml.Windows.csproj
+++ b/ClassToXaml.Windows/ClassToXaml.Windows.csproj
@@ -12,7 +12,7 @@
False
False
SHA256
- True
+ False
False
True
Never
diff --git a/ClassToXaml.Windows/Package.appxmanifest b/ClassToXaml.Windows/Package.appxmanifest
index 7eda2a0..648e5c2 100644
--- a/ClassToXaml.Windows/Package.appxmanifest
+++ b/ClassToXaml.Windows/Package.appxmanifest
@@ -1,4 +1,4 @@
-
+
+
+
+
+ 0
+ 1.0.0.*
+ True
+ Release
+ False
+ true
+ True
+ Disk
+ True
+ False
+ True
+ False
+ x64
+ bin\Release\net8.0-windows10.0.19041.0\win-x64\app.publish\
+ bin\publish\
+ ClickOnce
+ True
+ True
+ win-x64
+ True
+ (none)
+ False
+ false
+ net8.0-windows10.0.19041.0
+ False
+ Foreground
+ False
+ Publish.html
+
+
\ No newline at end of file
diff --git a/ClassToXaml.Windows/Properties/PublishProfiles/win-arm64.pubxml b/ClassToXaml.Windows/Properties/PublishProfiles/win-arm64.pubxml
deleted file mode 100644
index ceed00b..0000000
--- a/ClassToXaml.Windows/Properties/PublishProfiles/win-arm64.pubxml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
- FileSystem
- x64
- win-x64
- bin\\\win-arm64\publish\
- true
- true
- False
- true
- Release
- net8.0-windows10.0.19041.0
- false
-
-
-
-
\ No newline at end of file
diff --git a/ClassToXaml/App.cs b/ClassToXaml/App.cs
index cb567d9..0740dcb 100644
--- a/ClassToXaml/App.cs
+++ b/ClassToXaml/App.cs
@@ -36,7 +36,7 @@ private static void RegisterRoutes(IViewRegistry views, IRouteRegistry routes)
views.Register(
new ViewMap(ViewModel: typeof(ShellViewModel)),
new ViewMap(),
- new DataViewMap()
+ new ViewMap()
);
routes.Register(
diff --git a/ClassToXaml/Assets/logo.png b/ClassToXaml/Assets/logo.png
new file mode 100644
index 0000000..04ed920
Binary files /dev/null and b/ClassToXaml/Assets/logo.png differ
diff --git a/ClassToXaml/Presentation/MainPage.xaml b/ClassToXaml/Presentation/MainPage.xaml
index a176077..73f1743 100644
--- a/ClassToXaml/Presentation/MainPage.xaml
+++ b/ClassToXaml/Presentation/MainPage.xaml
@@ -24,26 +24,44 @@
Grid.ColumnSpan="2"
Margin="0,0,0,4"
Content="Class To XAML(UWP, WinUI, WPF, MAUI)" />
-
-
-
-
-
-
-
-
+ Orientation="Horizontal">
+
+
+
+
+
+
+
+
+
+
+
+ CornerRadius="4">
+
+
+
+
+ CornerRadius="4">
+
+
+
+
");
+ xamlText.AppendLine(GenerateXaml(text, columnCount));
+ }
+ }
+ else if (classMatches.Count == 1)
+ {
+ return GenerateXaml(classText, columnCount);
+ }
+ return xamlText.ToString();
+ }
+
+ private string GenerateXaml(string classText, int columnCount)
+ {
var properties = GetPublicProperty(classText);
if (properties == null || !properties.Any())
{
@@ -225,7 +300,7 @@ private string AddMargin()
}
return $"Margin=\"{Margin}\"";
}
- Dictionary typeMap = new(StringComparer.OrdinalIgnoreCase)
+ private Dictionary typeMap = new(StringComparer.OrdinalIgnoreCase)
{
{ "TextBlock", "Label" },
{ "TextBox", "Entry" },
@@ -272,11 +347,7 @@ private void GenerateControlText(int columnCount, StringBuilder xamlBuilder, int
}
}
- public ICommand GoToSecond { get; }
-
- private async Task GoToSecondView()
- {
- await _navigator.NavigateViewModelAsync(this, data: new Entity(Name!));
- }
+ public ICommand GoToSecond => new AsyncRelayCommand(async () => await _navigator.NavigateViewModelAsync(this));
+ public ICommand ExampleCommand => new RelayCommand(() => InputText = placeHolder);
}
diff --git a/ClassToXaml/Presentation/SecondPage.xaml b/ClassToXaml/Presentation/SecondPage.xaml
index 755ff11..c6a66dd 100644
--- a/ClassToXaml/Presentation/SecondPage.xaml
+++ b/ClassToXaml/Presentation/SecondPage.xaml
@@ -1,36 +1,48 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
diff --git a/ClassToXaml/Presentation/SecondViewModel.cs b/ClassToXaml/Presentation/SecondViewModel.cs
index 6ecf447..dc0b436 100644
--- a/ClassToXaml/Presentation/SecondViewModel.cs
+++ b/ClassToXaml/Presentation/SecondViewModel.cs
@@ -1,5 +1,5 @@
namespace ClassToXaml.Presentation;
-public partial record SecondViewModel(Entity Entity)
+public partial record SecondViewModel()
{
}