Skip to content

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 into
mainfrom
feat/examples-working-with-window-elements-20260829
Aug 29, 2026
Merged

feat(working-with-window-elements): add 30 compiler-validated C# examples - Working With Window Elements [26.8.0/net8.0]#105
amjad-sahi merged 37 commits into
mainfrom
feat/examples-working-with-window-elements-20260829

Conversation

@agent-aspose-diagram-examples

Copy link
Copy Markdown
Collaborator

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

Check Result
dotnet build ✅ Passed — zero compiler errors
dotnet run ✅ Passed — clean execution
Aspose.Diagram Version 26.8.0
Target Framework net8.0
Examples Added 30

Pipeline

Each example was generated and validated through:

  1. Attempt 1 — MCP direct code retrieval and assembly
  2. Attempt 2 — MCP retrieval with injected API correction rules
  3. Attempt 3 — LLM repair pass with compiler errors and rules

Only examples that passed both dotnet build and dotnet run are included in this PR.

Examples Added

File Task Description
add-unit-tests-to-ensure-showpagebreaks-remains-true-after-saving-and-reloading-the-diagram.cs Add unit tests to ensure showpagebreaks remains true after saving and reloading the diagram
compare-performance-of-adding-windows-individually-versus-adding-them-in-a-loop-for-large-diagrams.cs Compare performance of adding windows individually versus adding them in a loop for large diagrams
create-a-custom-ui-panel-that-reflects-the-current-showgrid-state-of-the-active-window.cs Create a custom ui panel that reflects the current showgrid state of the active window
create-a-new-window-enable-showgrid-disable-showguides-then-add-it-to-the-diagram.cs Create a new window enable showgrid disable showguides then add it to the diagram
create-a-powershell-script-that-iterates-over-a-folder-of-visio-files-and-toggles-showrulers-globally.cs Create a powershell script that iterates over a folder of visio files and toggles showrulers globally
create-a-unit-test-verifying-showpagebreaks-changes-persist-after-diagram-serialization-and-reload.cs Create a unit test verifying showpagebreaks changes persist after diagram serialization and reload
create-a-visual-diff-tool-that-compares-window-visibility-configurations-between-two-visio-files.cs Create a visual diff tool that compares window visibility configurations between two visio files
design-a-configuration-class-encapsulating-showgrid-showguides-showrulers-and-showpagebreaks-options.cs Design a configuration class encapsulating showgrid showguides showrulers and showpagebreaks options
develop-a-batch-process-that-loads-several-visio-files-sets-showguides-to-false-and-saves-each-file.cs Develop a batch process that loads several visio files sets showguides to false and saves each file
develop-a-plugin-that-automatically-sets-showguides-to-false-when-a-diagram-exceeds-a-specified-page-count.cs Develop a plugin that automatically sets showguides to false when a diagram exceeds a specified page count
develop-a-test-harness-that-randomly-flips-showgrid-and-showguides-flags-to-stress-test-the-api.cs Develop a test harness that randomly flips showgrid and showguides flags to stress test the api
document-the-effect-of-showpagebreaks-being-true-on-printed-output-by-generating-a-pdf-preview.cs Document the effect of showpagebreaks being true on printed output by generating a pdf preview
generate-a-diagnostic-report-listing-each-window-s-visibility-settings-and-the-pages-they-apply-to.cs Generate a diagnostic report listing each window s visibility settings and the pages they apply to
implement-a-caching-mechanism-for-window-settings-to-reduce-redundant-api-calls-during-batch-processing.cs Implement a caching mechanism for window settings to reduce redundant api calls during batch processing
implement-a-command-line-tool-that-accepts-a-visio-file-path-and-toggles-showrulers-based-on-user-input.cs Implement a command line tool that accepts a visio file path and toggles showrulers based on user input
implement-a-rollback-routine-that-restores-original-window-settings-if-an-error-occurs-during-processing.cs Implement a rollback routine that restores original window settings if an error occurs during processing
implement-asynchronous-loading-of-a-visio-file-and-asynchronous-updating-of-its-window-properties.cs Implement asynchronous loading of a visio file and asynchronous updating of its window properties
implement-error-handling-to-catch-exceptions-when-adding-a-window-to-a-diagram-without-a-windowcollection.cs Implement error handling to catch exceptions when adding a window to a diagram without a windowcollection
iterate-through-each-window-and-log-showgrid-showguides-showrulers-showpagebreaks-values.cs Iterate through each window and log showgrid showguides showrulers showpagebreaks values
load-a-visio-diagram-and-retrieve-all-window-objects-from-its-windowcollection.cs Load a visio diagram and retrieve all window objects from its windowcollection
log-before-and-after-states-of-each-window-property-when-applying-bulk-visibility-changes.cs Log before and after states of each window property when applying bulk visibility changes
measure-memory-usage-when-loading-diagrams-with-many-windows-to-identify-optimization-opportunities.cs Measure memory usage when loading diagrams with many windows to identify optimization opportunities
save-the-modified-visio-diagram-to-a-new-file-after-updating-window-visibility-properties.cs Save the modified visio diagram to a new file after updating window visibility properties
set-showrulers-to-true-and-showpagebreaks-to-false-on-the-first-retrieved-window.cs Set showrulers to true and showpagebreaks to false on the first retrieved window
use-linq-to-filter-window-objects-where-showrulers-is-false-and-enable-rulers-for-those-windows.cs Use linq to filter window objects where showrulers is false and enable rulers for those windows
validate-that-window-visibility-settings-apply-globally-by-confirming-multiple-pages-share-identical-configurations.cs Validate that window visibility settings apply globally by confirming multiple pages share identical configurations
verify-that-changing-showrulers-on-one-page-does-not-affect-other-pages-within-the-same-diagram.cs Verify that changing showrulers on one page does not affect other pages within the same diagram
write-a-function-that-toggles-showgrid-for-all-open-windows-in-a-visio-session.cs Write a function that toggles showgrid for all open windows in a visio session
write-a-script-that-restores-default-window-settings-grid-guides-rulers-page-breaks-for-a-diagram.cs Write a script that restores default window settings grid guides rulers page breaks for a diagram
write-documentation-comments-explaining-the-purpose-of-each-window-property-used-in-the-project.cs Write documentation comments explaining the purpose of each window property used in the project

Validation Details


This PR was created automatically by the Aspose.Diagram Examples Generator Agent. Merge after reviewing the examples above.

…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
@amjad-sahi
amjad-sahi merged commit a513649 into main Aug 29, 2026
1 check passed
@amjad-sahi
amjad-sahi deleted the feat/examples-working-with-window-elements-20260829 branch August 29, 2026 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants