Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/azure build fix #60

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
<ProjectReference Include="..\..\..\..\Meadow.ProjectLab\Source\Meadow.ProjectLab\Meadow.ProjectLab.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="app.build.yaml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="app.config.yaml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
Expand Down
2 changes: 2 additions & 0 deletions Source/Azure/ProjectLab_AzureIoTHub/app.build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Deploy:
NoLink: [ ProjectLab ]
2 changes: 1 addition & 1 deletion Source/Meadow.Desktop/AvaloniaMeadow/App.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
</Application.DataTemplates>

<Application.Styles>
<FluentTheme Mode="Light"/>
<FluentTheme />
</Application.Styles>
</Application>
2 changes: 1 addition & 1 deletion Source/Meadow.Desktop/AvaloniaMeadow/App.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace AvaloniaMeadow
{
public partial class App : AvaloniaMeadowApplication<Windows>
public partial class App : AvaloniaMeadowApplication<Meadow.Windows>
{
public override void OnFrameworkInitializationCompleted()
{
Expand Down
15 changes: 10 additions & 5 deletions Source/Meadow.Desktop/AvaloniaMeadow/AvaloniaMeadow.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,17 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Avalonia" Version="0.10.18" />
<PackageReference Include="Avalonia.Desktop" Version="0.10.18" />
<PackageReference Include="Avalonia" Version="11.2.1" />
<PackageReference Include="Avalonia.Desktop" Version="11.2.1" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.2.1" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.2.1" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.2.1" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="0.10.18" />
<PackageReference Include="Avalonia.ReactiveUI" Version="0.10.18" />
<PackageReference Include="XamlNameReferenceGenerator" Version="1.5.1" />
<PackageReference Include="Avalonia.Diagnostics" Version="11.2.1">
<IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets>
<PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>
</PackageReference>

</ItemGroup>

<ItemGroup>
Expand Down
14 changes: 7 additions & 7 deletions Source/Meadow.Desktop/AvaloniaMeadow/ViewLocator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@ namespace AvaloniaMeadow
{
public class ViewLocator : IDataTemplate
{
public IControl Build(object data)
public bool Match(object data)
{
return data is ViewModelBase;
}

Control? ITemplate<object?, Control?>.Build(object? param)
{
var name = data.GetType().FullName!.Replace("ViewModel", "View");
var name = param.GetType().FullName!.Replace("ViewModel", "View");
var type = Type.GetType(name);

if (type != null)
Expand All @@ -19,10 +24,5 @@ public IControl Build(object data)

return new TextBlock { Text = "Not Found: " + name };
}

public bool Match(object data)
{
return data is ViewModelBase;
}
}
}
Loading