Skip to content

Commit cef04cd

Browse files
committed
Updated to public mdxaml beta and prepare for nuget packages
1 parent f4d52b3 commit cef04cd

5 files changed

Lines changed: 26 additions & 5 deletions

File tree

Directory.Build.props

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33

44
<PropertyGroup>
5-
<PackageVersion>1.0.2</PackageVersion>
5+
<PackageVersion>1.0.3</PackageVersion>
66
</PropertyGroup>
7+
<PropertyGroup>
8+
<PackageReadmeFile>README.md</PackageReadmeFile>
9+
<!-- Common NuGet package properties -->
10+
<Authors Condition="'$(Authors)' == ''">MitchCapper</Authors>
11+
<PackageProjectUrl Condition="'$(PackageProjectUrl)' == ''">https://github.com/MitchCapper/PilotAIAssistantControl</PackageProjectUrl>
12+
<RepositoryUrl Condition="'$(RepositoryUrl)' == ''">https://github.com/MitchCapper/PilotAIAssistantControl</RepositoryUrl>
13+
14+
<Copyright Condition="'$(Copyright)' == ''">Copyright © MitchCapper $([System.DateTime]::Now.Year)</Copyright>
15+
<PackageTags Condition="'$(PackageTags)' == ''">AI,AI Agent,windows,winui,wpf</PackageTags>
16+
</PropertyGroup>
17+
<ItemGroup>
18+
<None Include="../README.md" Pack="true" PackagePath="\"/>
19+
</ItemGroup>
720
</Project>

PilotAIAssistantControl.slnx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
<Solution>
2+
<Folder Name="/Solution Items/">
3+
<File Path="Directory.Build.props" />
4+
<File Path="README.md" />
5+
</Folder>
26
<Project Path="PilotAIAssistantControl/PilotAIAssistantControl.shproj" Id="6cd62ff6-5bd0-41d0-a512-a6587e4846da" />
37
<Project Path="PilotAIAssistantControlWinUI/PilotAIAssistantControlWinUI.csproj" Id="eccee9d3-7e61-4fc6-8965-542c96b328a0" />
48
<Project Path="PilotAIAssistantControlWPF/PilotAIAssistantControlWPF.csproj" />

PilotAIAssistantControlWPF/PilotAIAssistantControlWPF.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</PropertyGroup>
1717

1818
<ItemGroup>
19-
<PackageReference Include="MdXaml" Version="1.27.1" />
19+
<PackageReference Include="MdXaml.SyntaxHigh" Version="2.0.0-pre202603081301" />
2020
<PackageReference Include="Microsoft.SemanticKernel" Version="1.73.0" />
2121
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
2222
<PackageReference Include="System.Security.Cryptography.ProtectedData" Version="10.0.3" />

PilotAIAssistantControlWPF/UCAI.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
55
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
66
xmlns:local="clr-namespace:PilotAIAssistantControl"
7-
xmlns:mdxaml="clr-namespace:MdXaml;assembly=MdXaml"
7+
xmlns:mdxamls="clr-namespace:MdXaml.SyntaxHigh;assembly=MdXaml.SyntaxHigh"
88
Loaded="UserControl_Loaded"
99
mc:Ignorable="d"
1010
d:DesignHeight="600" d:DesignWidth="400">
@@ -115,7 +115,7 @@
115115
ToolTip="Copy full response"
116116
Visibility="{Binding IsAI, Converter={StaticResource boolNullVisibilityCollapsedConverter}}"/>
117117
</StackPanel>
118-
<mdxaml:MarkdownScrollViewer Markdown="{Binding Message}"
118+
<mdxamls:MarkdownScrollViewer Markdown="{Binding Message}"
119119
VerticalScrollBarVisibility="Disabled"
120120
Background="Transparent"
121121
MarkdownStyleName="Sasabune"

PilotAIAssistantControlWPF/UCAI.xaml.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ private void HookThemeChangeHandlers() {
8080
}
8181

8282
private void UCAI_Unloaded(object sender, RoutedEventArgs e) {
83-
#if WPF
83+
#if WPF
8484
SystemParameters.StaticPropertyChanged -= SystemParameters_StaticPropertyChanged;
8585
#else
8686
ActualThemeChanged -= UCAI_ActualThemeChanged;
@@ -537,7 +537,11 @@ private void UpdateConnectionStatus(bool connected, string? provider, string? mo
537537
private void ApplyConnectionStyle(bool connected) {
538538
// Use XAML-defined styles with dynamic/theme resources so colors auto-update on theme change.
539539
string styleKey = connected ? "StatusConnected" : "StatusDisconnected";
540+
#if WPF
540541
if (Resources.Contains(styleKey) && Resources[styleKey] is Style style)
542+
#else
543+
if (Resources.TryGetValue(styleKey, out var resource) && resource is Style style)
544+
#endif
541545
TxtCurrentModel.Style = style;
542546
}
543547

0 commit comments

Comments
 (0)