feat(working-with-window-elements): add 30 compiler-validated C# examples - Working With Window Elements [26.8.0/net8.0] - #105
Merged
amjad-sahi merged 37 commits intoAug 29, 2026
Conversation
…pagebreaks-remains-true-after-saving-and-reloading-the-diagram Task: Add unit tests to ensure showpagebreaks remains true after saving and reloading the diagram - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…-windows-individually-versus-adding-them-in-a-loop-for-large-diagrams Task: Compare performance of adding windows individually versus adding them in a loop for large diagrams - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…-reflects-the-current-showgrid-state-of-the-active-window Task: Create a custom ui panel that reflects the current showgrid state of the active window - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…owgrid-disable-showguides-then-add-it-to-the-diagram Task: Create a new window enable showgrid disable showguides then add it to the diagram - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…at-iterates-over-a-folder-of-visio-files-and-toggles-showrulers-globally Task: Create a powershell script that iterates over a folder of visio files and toggles showrulers globally - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…showpagebreaks-changes-persist-after-diagram-serialization-and-reload Task: Create a unit test verifying showpagebreaks changes persist after diagram serialization and reload - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…t-compares-window-visibility-configurations-between-two-visio-files Task: Create a visual diff tool that compares window visibility configurations between two visio files - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…encapsulating-showgrid-showguides-showrulers-and-showpagebreaks-options Task: Design a configuration class encapsulating showgrid showguides showrulers and showpagebreaks options - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…loads-several-visio-files-sets-showguides-to-false-and-saves-each-file Task: Develop a batch process that loads several visio files sets showguides to false and saves each file - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…ically-sets-showguides-to-false-when-a-diagram-exceeds-a-specified-page-count Task: Develop a plugin that automatically sets showguides to false when a diagram exceeds a specified page count - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…andomly-flips-showgrid-and-showguides-flags-to-stress-test-the-api Task: Develop a test harness that randomly flips showgrid and showguides flags to stress test the api - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…gebreaks-being-true-on-printed-output-by-generating-a-pdf-preview Task: Document the effect of showpagebreaks being true on printed output by generating a pdf preview - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…listing-each-window-s-visibility-settings-and-the-pages-they-apply-to Task: Generate a diagnostic report listing each window s visibility settings and the pages they apply to - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…-for-window-settings-to-reduce-redundant-api-calls-during-batch-processing Task: Implement a caching mechanism for window settings to reduce redundant api calls during batch processing - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…-that-accepts-a-visio-file-path-and-toggles-showrulers-based-on-user-input Task: Implement a command line tool that accepts a visio file path and toggles showrulers based on user input - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…that-restores-original-window-settings-if-an-error-occurs-during-processing Task: Implement a rollback routine that restores original window settings if an error occurs during processing - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…g-of-a-visio-file-and-asynchronous-updating-of-its-window-properties Task: Implement asynchronous loading of a visio file and asynchronous updating of its window properties - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…atch-exceptions-when-adding-a-window-to-a-diagram-without-a-windowcollection Task: Implement error handling to catch exceptions when adding a window to a diagram without a windowcollection - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…nd-log-showgrid-showguides-showrulers-showpagebreaks-values Task: Iterate through each window and log showgrid showguides showrulers showpagebreaks values - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…ieve-all-window-objects-from-its-windowcollection Task: Load a visio diagram and retrieve all window objects from its windowcollection - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…f-each-window-property-when-applying-bulk-visibility-changes Task: Log before and after states of each window property when applying bulk visibility changes - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…ding-diagrams-with-many-windows-to-identify-optimization-opportunities Task: Measure memory usage when loading diagrams with many windows to identify optimization opportunities - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…am-to-a-new-file-after-updating-window-visibility-properties Task: Save the modified visio diagram to a new file after updating window visibility properties - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…owpagebreaks-to-false-on-the-first-retrieved-window Task: Set showrulers to true and showpagebreaks to false on the first retrieved window - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…ects-where-showrulers-is-false-and-enable-rulers-for-those-windows Task: Use linq to filter window objects where showrulers is false and enable rulers for those windows - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…ty-settings-apply-globally-by-confirming-multiple-pages-share-identical-configurations Task: Validate that window visibility settings apply globally by confirming multiple pages share identical configurations - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…rs-on-one-page-does-not-affect-other-pages-within-the-same-diagram Task: Verify that changing showrulers on one page does not affect other pages within the same diagram - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…-showgrid-for-all-open-windows-in-a-visio-session Task: Write a function that toggles showgrid for all open windows in a visio session - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…default-window-settings-grid-guides-rulers-page-breaks-for-a-diagram Task: Write a script that restores default window settings grid guides rulers page breaks for a diagram - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
…explaining-the-purpose-of-each-window-property-used-in-the-project Task: Write documentation comments explaining the purpose of each window property used in the project - Validated: dotnet build passed - Validated: dotnet run passed - Generator: Aspose.Diagram Examples Generator Agent v2.0 - Library: Aspose.Diagram for .NET 26.8.0 - Framework: net8.0 - Pipeline: MCP retrieval → rules injection → LLM repair
… with API index and example table
… example catalogue for Working With Window Elements category
amjad-sahi
deleted the
feat/examples-working-with-window-elements-20260829
branch
August 29, 2026 20:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Working With Window Elements — Compiler-Validated C# Examples
What this PR does
Adds 30 AI-generated, compiler-validated C# examples for the Working With Window Elements category of Aspose.Diagram for .NET.
All examples were generated by the Aspose.Diagram Examples Generator Agent and passed the full three-attempt validation pipeline before being included.
Validation Summary
dotnet builddotnet runPipeline
Each example was generated and validated through:
Only examples that passed both
dotnet buildanddotnet runare included in this PR.Examples Added
add-unit-tests-to-ensure-showpagebreaks-remains-true-after-saving-and-reloading-the-diagram.cscompare-performance-of-adding-windows-individually-versus-adding-them-in-a-loop-for-large-diagrams.cscreate-a-custom-ui-panel-that-reflects-the-current-showgrid-state-of-the-active-window.cscreate-a-new-window-enable-showgrid-disable-showguides-then-add-it-to-the-diagram.cscreate-a-powershell-script-that-iterates-over-a-folder-of-visio-files-and-toggles-showrulers-globally.cscreate-a-unit-test-verifying-showpagebreaks-changes-persist-after-diagram-serialization-and-reload.cscreate-a-visual-diff-tool-that-compares-window-visibility-configurations-between-two-visio-files.csdesign-a-configuration-class-encapsulating-showgrid-showguides-showrulers-and-showpagebreaks-options.csdevelop-a-batch-process-that-loads-several-visio-files-sets-showguides-to-false-and-saves-each-file.csdevelop-a-plugin-that-automatically-sets-showguides-to-false-when-a-diagram-exceeds-a-specified-page-count.csdevelop-a-test-harness-that-randomly-flips-showgrid-and-showguides-flags-to-stress-test-the-api.csdocument-the-effect-of-showpagebreaks-being-true-on-printed-output-by-generating-a-pdf-preview.csgenerate-a-diagnostic-report-listing-each-window-s-visibility-settings-and-the-pages-they-apply-to.csimplement-a-caching-mechanism-for-window-settings-to-reduce-redundant-api-calls-during-batch-processing.csimplement-a-command-line-tool-that-accepts-a-visio-file-path-and-toggles-showrulers-based-on-user-input.csimplement-a-rollback-routine-that-restores-original-window-settings-if-an-error-occurs-during-processing.csimplement-asynchronous-loading-of-a-visio-file-and-asynchronous-updating-of-its-window-properties.csimplement-error-handling-to-catch-exceptions-when-adding-a-window-to-a-diagram-without-a-windowcollection.csiterate-through-each-window-and-log-showgrid-showguides-showrulers-showpagebreaks-values.csload-a-visio-diagram-and-retrieve-all-window-objects-from-its-windowcollection.cslog-before-and-after-states-of-each-window-property-when-applying-bulk-visibility-changes.csmeasure-memory-usage-when-loading-diagrams-with-many-windows-to-identify-optimization-opportunities.cssave-the-modified-visio-diagram-to-a-new-file-after-updating-window-visibility-properties.csset-showrulers-to-true-and-showpagebreaks-to-false-on-the-first-retrieved-window.csuse-linq-to-filter-window-objects-where-showrulers-is-false-and-enable-rulers-for-those-windows.csvalidate-that-window-visibility-settings-apply-globally-by-confirming-multiple-pages-share-identical-configurations.csverify-that-changing-showrulers-on-one-page-does-not-affect-other-pages-within-the-same-diagram.cswrite-a-function-that-toggles-showgrid-for-all-open-windows-in-a-visio-session.cswrite-a-script-that-restores-default-window-settings-grid-guides-rulers-page-breaks-for-a-diagram.cswrite-documentation-comments-explaining-the-purpose-of-each-window-property-used-in-the-project.csValidation Details
dotnet build— compiled without errors against Aspose.Diagram for .NET 26.8.0dotnet run— executed without unhandled exceptionsThis PR was created automatically by the Aspose.Diagram Examples Generator Agent. Merge after reviewing the examples above.