Skip to content

修复:在最大化窗口时,新建窗口没有顶部操作按钮 #9

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

Open
wants to merge 2 commits into
base: master
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
10 changes: 4 additions & 6 deletions Example/Example.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@
<Reference Include="PresentationFramework">
<RequiredTargetFramework>3.0</RequiredTargetFramework>
</Reference>
<Reference Include="WPF.MDI, Version=1.1.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\WPF.MDI.1.1.3\lib\net40-client\WPF.MDI.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
Expand Down Expand Up @@ -108,12 +111,6 @@
</Compile>
<AppDesigner Include="Properties\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\WPF.MDI\WPF.MDI.csproj">
<Project>{BE1ED569-5E0B-4DF0-8964-33AD2AAE4C4A}</Project>
<Name>WPF.MDI</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Resource Include="OriginalLogo.png" />
</ItemGroup>
Expand All @@ -136,6 +133,7 @@
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
4 changes: 4 additions & 0 deletions Example/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="WPF.MDI" version="1.1.3" targetFramework="net40-client" />
</packages>
2 changes: 1 addition & 1 deletion WPF.MDI/MdiContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,9 @@ private void Children_CollectionChanged(object sender, NotifyCollectionChangedEv
MdiChild mdiChild = Children[e.NewStartingIndex],
topChild = ActiveMdiChild;

mdiChild.Loaded += (s, a) => ActiveMdiChild = mdiChild;
if (topChild != null && topChild.WindowState == WindowState.Maximized)
mdiChild.Loaded += (s, a) => mdiChild.WindowState = WindowState.Maximized;
mdiChild.Loaded += (s, a) => ActiveMdiChild = mdiChild;

if (mdiChild.Position.X < 0 || mdiChild.Position.Y < 0)
mdiChild.Position = new Point(_windowOffset, _windowOffset);
Expand Down
10 changes: 5 additions & 5 deletions WPF.MDI/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("WPF.MDI")]
[assembly: AssemblyDescription("http://wpfmdi.codeplex.com/")]
[assembly: AssemblyDescription("A library to add the traditional Windows Forms Multiple Document Interface (MDI) features to WPF. The aim is to resemble the original as much as possible.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("xadet")]
[assembly: AssemblyCompany("xadet,flames")]
[assembly: AssemblyProduct("WPF.MDI")]
[assembly: AssemblyCopyright("2009 xadet, 2010 stbear")]
[assembly: AssemblyCopyright("2009 xadet, 2010 stbear, 2021 flames")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -25,5 +25,5 @@
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
[assembly: AssemblyVersion("1.1.1.0")]
[assembly: AssemblyFileVersion("1.1.1.0")]
[assembly: AssemblyVersion("1.1.4.0")]
[assembly: AssemblyFileVersion("1.1.4.0")]
48 changes: 48 additions & 0 deletions WPF.MDI/WPF.MDI.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<package >
<metadata>
<!-- Identifier that must be unique within the hosting gallery -->
<id>$id$</id>

<!-- Package version number that is used when resolving dependencies -->
<version>$version$</version>

<title>$title$</title>

<!-- Authors contain text that appears directly on the gallery -->
<authors>$author$</authors>

<!-- If true, this value prompts the user to accept the license when installing the package. -->
<requireLicenseAcceptance>false</requireLicenseAcceptance>

<!-- License information is displayed on the gallery -->
<license type="expression">MIT</license>

<!-- Project URL provides a link for the gallery -->
<projectUrl>https://github.com/flamegreat/wpfmdi.git</projectUrl>

<!-- Icon is used in Visual Studio's package manager UI -->
<icon>images\icon.png</icon>

<!-- The description can be used in package manager UI. Note that the nuget.org gallery uses information you add in the portal. -->
<description>$description$</description>
<releaseNotes>代码相较之前的版本没有任何变化,只是更新一些Nuget包信息。</releaseNotes>

<!-- Copyright information -->
<copyright>$copyright$</copyright>

<!-- Tags appear in the gallery and can be used for tag searches -->
<tags>WPF MDI</tags>

<!-- Dependencies are automatically installed when the package is installed -->
<dependencies>
<group targetFramework=".NETFramework4.0-Client" />
</dependencies>
</metadata>

<!-- A readme.txt to display when the package is installed -->
<files>
<file src="icon.png" target="images\" />
</files>

</package>
Binary file added WPF.MDI/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.