### MyExample class usage example Source: https://github.com/wieslawsoltes/librewpf/blob/progpu-rendering-port/src/Microsoft.DotNet.Wpf/specs/0spec_template.md Basic usage example for the MyExample class. ```c# ... ``` -------------------------------- ### Install a WPF template Source: https://github.com/wieslawsoltes/librewpf/blob/progpu-rendering-port/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/readme.MD Use the dotnet new install command to install a specific WPF template from the local repository path. ```bash > dotnet new install \wpf\packaging\Microsoft.Dotnet.Wpf.ProjectTemplates\content\WpfApplication-CSharp ``` -------------------------------- ### Trace Configuration File Format Example Source: https://github.com/wieslawsoltes/librewpf/blob/progpu-rendering-port/src/Microsoft.DotNet.Wpf/src/PresentationCore/AvTraceMessages.txt Example of defining a trace section and using the generated wrapper class in C# code. ```text [System.Windows,Area,TraceClass] TraceBasic=,,{"basic msg", "data1", "data2"} TraceFormat=,FORMAT,{" {0} is doing something to {1}.", "data1", "data2"} [end] ``` ```csharp // basic message TraceClass.Trace(TraceEventType.Error, TraceClass.TraceBasic, data1, data2 ); // message with format string TraceClass.Trace(TraceEventType.Error, TraceClass.TraceFormat( arg1, arg2 ), data1, data2 ); ``` -------------------------------- ### Install Microsoft.WindowsDesktop.App via PowerShell Source: https://github.com/wieslawsoltes/librewpf/blob/progpu-rendering-port/Documentation/developer-guide.md Uses the dotnet-install.ps1 script to download and install specific 32-bit and 64-bit versions of the runtime into designated directories. ```ps1 $dotnet_install = "$env:TEMP\dotnet-install.ps1" $x64InstallDir = "$env:ProgramFiles\dotnet" $x86InstallDir = "${env:ProgramFiles(x86)}\dotnet" Invoke-WebRequest https://dot.net/v1/dotnet-install.ps1 -OutFile $dotnet_install .$dotnet_install -Channel master -Version 3.0.0-preview5-27619-18 -Runtime windowsdesktop -Architecture x64 -InstallDir $x64InstallDir .$dotnet_install -Channel master -Version 3.0.0-preview5-27619-18 -Runtime windowsdesktop -Architecture x86 -InstallDir $x86InstallDir ``` -------------------------------- ### Run the Xceed Paid Sample Source: https://github.com/wieslawsoltes/librewpf/blob/progpu-rendering-port/samples/ProGPU.Wpf.XceedPaidApp/README.md Execute the run script to start the WPF application. ```bash ./eng/run-progpu-wpf-xceed-paid.sh ``` -------------------------------- ### Copy WPF binaries to a test host installation Source: https://github.com/wieslawsoltes/librewpf/blob/progpu-rendering-port/Documentation/developer-guide.md Use the -testhost parameter with the copy-wpf.ps1 script to target a specific test host installation directory. ```powershell eng\copy-wpf.ps1 -testhost -destination "c:\testhost\x86" ``` -------------------------------- ### List installed templates Source: https://github.com/wieslawsoltes/librewpf/blob/progpu-rendering-port/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/readme.MD Run the dotnet new uninstall command to view currently installed templates. ```bash > dotnet new uninstall ``` -------------------------------- ### Configure Project SDK Source: https://github.com/wieslawsoltes/librewpf/blob/progpu-rendering-port/docs/progpu-wpf-release.md Example of updating a WPF project file to use the LibreWPF SDK for the specified preview version. ```xml WinExe net10.0-windows true ``` -------------------------------- ### Create an app from a template Source: https://github.com/wieslawsoltes/librewpf/blob/progpu-rendering-port/packaging/Microsoft.Dotnet.Wpf.ProjectTemplates/readme.MD Generate a new application from the installed template using the dotnet new command. ```bash > dotnet new wpf -n testapp1 ``` -------------------------------- ### MyExample Class Source: https://github.com/wieslawsoltes/librewpf/blob/progpu-rendering-port/src/Microsoft.DotNet.Wpf/specs/0spec_template.md The MyExample class provides functionality for example usage in WPF. This section covers the class definition and its primary members. ```APIDOC ## MyExample Class ### Description Brief description of this class. ### Remarks Remarks about the MyExample class ## MyExample.PropertyOne property ### Description Brief description about the MyExample.PropertyOne property. ## Other MyExample members | Name | Description | | - | - | | PropertyTwo | Brief description of the PropertyTwo property (defaults to ...) | | MethodOne | Brief description of the MethodOne method | ``` -------------------------------- ### Create and run a new WPF application Source: https://github.com/wieslawsoltes/librewpf/blob/progpu-rendering-port/Documentation/getting-started.md Use the dotnet CLI to scaffold a new WPF project and execute it. ```cmd dotnet new wpf -o MyWPFApp cd MyWPFApp dotnet run ``` -------------------------------- ### Build and launch the apphost Source: https://github.com/wieslawsoltes/librewpf/blob/progpu-rendering-port/samples/ProGPU.Wpf.HelloApp/README.md Executes the SDK-produced apphost from the repository root. ```bash ./eng/run-progpu-wpf-hello.sh ``` -------------------------------- ### NotificationEventArgs.DisplayString Source: https://github.com/wieslawsoltes/librewpf/blob/progpu-rendering-port/src/Microsoft.DotNet.Wpf/specs/AutomationUpdate.md Gets the display string of the notification. ```APIDOC ## NotificationEventArgs.DisplayString ### Description Gets the display string of the notification. ### Property Value - **Type**: string - **Description**: A display string describing the event. ``` -------------------------------- ### Restore and Run Application Source: https://github.com/wieslawsoltes/librewpf/blob/progpu-rendering-port/README.md Use standard .NET CLI commands to restore dependencies and execute the migrated application. ```bash dotnet restore dotnet run ``` -------------------------------- ### Build FamilyShow project Source: https://github.com/wieslawsoltes/librewpf/blob/progpu-rendering-port/reports/familyshow-librewpf-integration.md Builds the FamilyShow project using the dotnet CLI. ```bash dotnet build /Users/wieslawsoltes/GitHub/FamilyShow/FamilyShow/FamilyShow.csproj -v:minimal ``` -------------------------------- ### NotificationEventArgs.NotificationKind Property Source: https://github.com/wieslawsoltes/librewpf/blob/progpu-rendering-port/src/Microsoft.DotNet.Wpf/specs/AutomationUpdate.md Gets the type of the notification. ```APIDOC ## NotificationKind ### Description Gets the type of the notification. ### Property Value - **Type**: AutomationNotificationKind ``` -------------------------------- ### ActiveTextPositionChangedEventArgs.TextRange Source: https://github.com/wieslawsoltes/librewpf/blob/progpu-rendering-port/src/Microsoft.DotNet.Wpf/specs/AutomationUpdate.md Gets the text range where the change occurred. ```APIDOC ## ActiveTextPositionChangedEventArgs.TextRange Property ### Description Gets the text range where the change occurred, if applicable. ### Property Value - **ITextRangeProvider** - The text range where the change occurred, or null to indicate the entire content of the text provider. ``` -------------------------------- ### NotificationEventArgs.ActivityId Source: https://github.com/wieslawsoltes/librewpf/blob/progpu-rendering-port/src/Microsoft.DotNet.Wpf/specs/AutomationUpdate.md Gets the activity ID string of the notification. ```APIDOC ## NotificationEventArgs.ActivityId ### Description Gets the activity ID string of the notification. ### Property Value - **Type**: string - **Description**: A unique non-localized string to identify an action or group of actions. ``` -------------------------------- ### NotificationEventArgs.DisplayString Property Source: https://github.com/wieslawsoltes/librewpf/blob/progpu-rendering-port/src/Microsoft.DotNet.Wpf/specs/AutomationUpdate.md Gets the display string of the notification. ```c# public string DisplayString { get; } ``` -------------------------------- ### NotificationEventArgs.NotificationProcessing Property Source: https://github.com/wieslawsoltes/librewpf/blob/progpu-rendering-port/src/Microsoft.DotNet.Wpf/specs/AutomationUpdate.md Gets the order in which to process the notification. ```APIDOC ## NotificationProcessing ### Description Gets the order in which to process the notification. ### Property Value - **Type**: AutomationNotificationProcessing ``` -------------------------------- ### Define MyExample runtime class Source: https://github.com/wieslawsoltes/librewpf/blob/progpu-rendering-port/src/Microsoft.DotNet.Wpf/specs/0spec_template.md A sample runtime class definition demonstrating property and method signatures. ```c# runtimeclass MyExample { int PropertyOne { get; set; } string PropertyTwo { get; private set; } void MethodOne(); } ``` -------------------------------- ### ItemAutomationPeer.GetHeadingLevelCore Source: https://github.com/wieslawsoltes/librewpf/blob/progpu-rendering-port/src/Microsoft.DotNet.Wpf/specs/AutomationUpdate.md Gets the heading level of the element associated with the ItemAutomationPeer. ```APIDOC ## ItemAutomationPeer.GetHeadingLevelCore ### Description Gets the heading level of the element that is associated with this automation peer. ### Signature `protected override AutomationHeadingLevel GetHeadingLevelCore();` ### Returns - **AutomationHeadingLevel** - The heading level. ``` -------------------------------- ### Build ProGPU.Wpf.Tests on macOS Source: https://github.com/wieslawsoltes/librewpf/blob/progpu-rendering-port/reports/progpu-wpf-renderdata-redirection.md Command to build the ProGPU test project. ```bash DOTNET_ROLL_FORWARD=Major .dotnet/dotnet build src/ProGPU.Wpf.Tests/ProGPU.Wpf.Tests.csproj --no-restore --verbosity minimal -m:1 ``` -------------------------------- ### DateTimeAutomationPeer.GetHeadingLevelCore Source: https://github.com/wieslawsoltes/librewpf/blob/progpu-rendering-port/src/Microsoft.DotNet.Wpf/specs/AutomationUpdate.md Gets the heading level of the element associated with the DateTimeAutomationPeer. ```APIDOC ## DateTimeAutomationPeer.GetHeadingLevelCore ### Description Gets the heading level of the element that is associated with this automation peer. ### Signature `protected override AutomationHeadingLevel GetHeadingLevelCore();` ### Returns - **AutomationHeadingLevel** - The heading level. ``` -------------------------------- ### Identify Bundled Runtime Versions in Microsoft.NETCoreSdk.BundledVersions.props Source: https://github.com/wieslawsoltes/librewpf/blob/progpu-rendering-port/Documentation/developer-guide.md Example entry from the SDK folder showing how to map a TargetFramework to a specific Microsoft.WindowsDesktop.App runtime version. ```xml ``` -------------------------------- ### DataGridCellItemAutomationPeer.GetHeadingLevelCore Source: https://github.com/wieslawsoltes/librewpf/blob/progpu-rendering-port/src/Microsoft.DotNet.Wpf/specs/AutomationUpdate.md Gets the heading level of the element associated with the DataGridCellItemAutomationPeer. ```APIDOC ## DataGridCellItemAutomationPeer.GetHeadingLevelCore ### Description Gets the heading level of the element that is associated with this automation peer. ### Signature `protected override AutomationHeadingLevel GetHeadingLevelCore();` ### Returns - **AutomationHeadingLevel** - The heading level. ``` -------------------------------- ### NotificationEventArgs.ActivityId Property Source: https://github.com/wieslawsoltes/librewpf/blob/progpu-rendering-port/src/Microsoft.DotNet.Wpf/specs/AutomationUpdate.md Gets the activity ID string of the notification. ```c# public string ActivityId { get; } ``` -------------------------------- ### Run the live ProGPU/Silk.NET apphost input probe Source: https://github.com/wieslawsoltes/librewpf/blob/progpu-rendering-port/samples/ProGPU.Wpf.ToolkitApp/README.md Execute the application with the live input probe validation enabled. ```bash PROGPU_WPF_TOOLKIT_LIVE_VALIDATE=1 ./eng/run-progpu-wpf-toolkit.sh ``` -------------------------------- ### AutomationProperties.HeadingLevel Source: https://github.com/wieslawsoltes/librewpf/blob/progpu-rendering-port/src/Microsoft.DotNet.Wpf/specs/AutomationUpdate.md Gets or sets a value that indicates the heading level for an element. ```APIDOC ## AutomationProperties.HeadingLevel ### Description Gets or sets a value that indicates the heading level for an element. Heading elements organize the user interface and make it easier to navigate for assistive technology. ### Remarks Headings have a level from 1 to 9. ```