### Basic DockSite Hierarchy with Workspace and Tool Windows
Source: https://www.actiprosoftware.com/docs/controls/avalonia/docking/control-hierarchy
This example demonstrates a fundamental DockSite setup. It includes a Workspace for MDI content and a ToolWindowContainer for docked tool windows on the right.
```xml
xmlns:actipro="http://schemas.actiprosoftware.com/avaloniaui"
...
```
--------------------------------
### Basic DockSite with Workspace and Tool Windows
Source: https://www.actiprosoftware.com/docs/controls/wpf/docking/control-hierarchy
This example demonstrates a basic DockSite setup containing a SplitContainer. The SplitContainer holds a Workspace with a TabbedMdiHost and a ToolWindowContainer with two ToolWindows.
```xaml
xmlns:docking="http://schemas.actiprosoftware.com/winfx/xaml/docking"
...
```
--------------------------------
### Start Method
Source: https://www.actiprosoftware.com/docs/controls/winforms/api/actiprosoftware.text.parsing.llparser.debugging.implementation.debugger
Initiates the debugging process on the attached document. Returns true if debugging started successfully.
```csharp
public bool Start()
```
--------------------------------
### UniqueId
Source: https://www.actiprosoftware.com/docs/controls/winforms/api/actiprosoftware.ui.winforms.controls.syntaxeditor.primitives.textview
Gets the Guid that uniquely identifies the view.
```APIDOC
## UniqueId
### Description
Gets the Guid that uniquely identifies the view.
### Property Value
`Guid`: The Guid that uniquely identifies the view.
```
--------------------------------
### Get Expression Start Context Location
Source: https://www.actiprosoftware.com/docs/controls/winforms/api/actiprosoftware.text.languages.vb.vbcontextlocations
Retrieves the IDotNetContextLocation for the start of an expression. This can be used to identify where expressions begin within the code.
```csharp
public static IDotNetContextLocation ExpressionStart { get; }
```
--------------------------------
### Register Example Text Provider
Source: https://www.actiprosoftware.com/docs/controls/winforms/syntaxeditor/language-creation/feature-services/example-text
Register an ExampleTextProvider with a syntax language to supply sample code for classification and highlighting demonstrations. Ensure the ActiproSoftware.Text namespace is imported to use the extension method.
```csharp
language.RegisterExampleTextProvider(new ExampleTextProvider(""));
```
--------------------------------
### Create PreviewableDelegateCommand for Text Styling
Source: https://www.actiprosoftware.com/docs/controls/avalonia/bars/controls/using-commands
This example demonstrates creating a PreviewableDelegateCommand to apply text styles with live preview support. It requires a current document object with methods for applying styles and managing preview modes.
```csharp
var setTextStyleCommand = new PreviewableDelegateCommand(
executeAction: p => {
currentDocument?.ApplyTextStyle(p);
},
canExecuteFunc: p => currentDocument != null,
previewAction: p => {
currentDocument?.StartPreviewMode();
currentDocument?.ApplyTextStyle(p);
},
cancelPreviewAction: p => {
currentDocument?.CancelPreviewMode();
}
);
```
--------------------------------
### Acronym Pattern Example
Source: https://www.actiprosoftware.com/docs/controls/wpf/syntaxeditor/text-parsing/advanced-text/searching
Shows an example of an acronym search pattern. This pattern matches characters at the start of a word and subsequent capital letters or characters following an underscore.
```text
fr
```
--------------------------------
### PreviewableCompositeCommand Constructors
Source: https://www.actiprosoftware.com/docs/controls/wpf/api/actiprosoftware.windows.input.previewablecompositecommand
Initializes a new instance of the PreviewableCompositeCommand class.
```APIDOC
## PreviewableCompositeCommand()
### Description
Initializes an instance of the class.
### Signature
```csharp
public PreviewableCompositeCommand()
```
```
--------------------------------
### UniqueId Property
Source: https://www.actiprosoftware.com/docs/controls/wpf/api/actiprosoftware.windows.controls.docking.serialization.xmltrack
Gets or sets the unique identifier for the window. This property is of type Guid.
```csharp
public Guid UniqueId { get; set; }
```
--------------------------------
### PreviewableCompositeCommand Constructor
Source: https://www.actiprosoftware.com/docs/controls/wpf/api/actiprosoftware.windows.input.previewablecompositecommand
Initializes a new instance of the PreviewableCompositeCommand class. No specific setup is required beyond instantiation.
```csharp
public PreviewableCompositeCommand()
```
--------------------------------
### Add Customized Column Guide
Source: https://www.actiprosoftware.com/docs/controls/winforms/syntaxeditor/user-interface/editor-view/column-guides
Adds a customized column guide at column 80 with a 2px wide dash line style. This example demonstrates using the ColumnGuide class for more advanced customization.
```csharp
editor.ColumnGuides.Add(new ColumnGuide(ColumnGuidePlacement.Column, 80, LineKind.Dash, 2, null));
```
--------------------------------
### Get First Visible View Line Start Position
Source: https://www.actiprosoftware.com/docs/controls/winforms/syntaxeditor/user-interface/editor-view/view-lines
Obtains the starting TextPosition of the first visible view line in the active editor view. This is useful for determining the current viewport's beginning.
```csharp
var firstVisiblePosition = editor.ActiveView.VisibleViewLines[0].VisibleStartPosition;
```
--------------------------------
### IndentationGuidesBackground Property
Source: https://www.actiprosoftware.com/docs/controls/winforms/api/actiprosoftware.ui.winforms.controls.syntaxeditor.implementation.textviewdrawcontext
Gets a cached Brush used for the background of indentation guides. This property is part of the TextViewDrawContext class.
```csharp
public Brush? IndentationGuidesBackground { get; }
```
--------------------------------
### ColumnGuidesBackground Property
Source: https://www.actiprosoftware.com/docs/controls/winforms/api/actiprosoftware.ui.winforms.controls.syntaxeditor.implementation.textviewdrawcontext
Gets a cached Brush used for the background of column guides. This property is part of the TextViewDrawContext class.
```csharp
public Brush? ColumnGuidesBackground { get; }
```
--------------------------------
### Implement Live Preview Command
Source: https://www.actiprosoftware.com/docs/controls/avalonia/bars/controls/gallery
Use PreviewableDelegateCommand to define actions for when live preview starts and is canceled. This is useful for temporarily applying changes while a user hovers over a gallery item.
```csharp
public ICommand SetFontSizeCommand {
get {
if (setFontSizeCommand is null) {
setFontSizeCommand = new PreviewableDelegateCommand(
executeAction: p => {
OnRequestSaveAndExitPreviewMode();
UpdateSelectionTextStyle(x => x.FontSize = p?.Size ?? FontSettings.DefaultFontSize);
},
canExecuteFunc: p => true,
previewAction: p => {
OnRequestActivatePreviewMode();
UpdateSelectionTextStyle(x => x.FontSize = p?.Size ?? FontSettings.DefaultFontSize);
},
cancelPreviewAction: p => {
OnRequestCancelPreviewMode();
}
);
}
return setFontSizeCommand;
}
}
```
--------------------------------
### Create SettingsGroup with Header and Description
Source: https://www.actiprosoftware.com/docs/controls/wpf/views/controls/settings-group
Demonstrates how to initialize a SettingsGroup with a header and description. Ensure the necessary xmlns namespace is included.
```xaml
xmlns:views="http://schemas.actiprosoftware.com/winfx/xaml/views"
...
```
--------------------------------
### SourceFileLocation Key Property
Source: https://www.actiprosoftware.com/docs/controls/winforms/api/actiprosoftware.text.languages.dotnet.reflection.implementation.sourcefilelocation
Gets the unique key identifying the source file, typically a file path or GUID.
```csharp
public string Key { get; }
```
--------------------------------
### SourceFileLocation NavigationOffset Property
Source: https://www.actiprosoftware.com/docs/controls/winforms/api/actiprosoftware.text.languages.dotnet.reflection.implementation.sourcefilelocation
Gets the optional offset within the source file for navigation, usually the start of the type/member name.
```csharp
public int? NavigationOffset { get; }
```
--------------------------------
### Create a QuickInfoSession
Source: https://www.actiprosoftware.com/docs/controls/winforms/syntaxeditor/user-interface/intelliprompt/quick-info
Instantiate a new QuickInfoSession object to begin the process of displaying quick info.
```csharp
QuickInfoSession session = new QuickInfoSession();
```
--------------------------------
### Show Quick Info on Button Click
Source: https://www.actiprosoftware.com/docs/controls/winforms/syntaxeditor/language-creation/provider-services/quick-info-provider
Handles a button click event to display quick info. Focuses the editor, retrieves the IQuickInfoProvider, creates a context based on the caret offset, and requests a quick info session, ignoring pointer input.
```csharp
private void OnShowQuickInfoButtonClick(object sender, RoutedEventArgs e) {
// Focus the editor
editor.Focus();
// Get the IQuickInfoProvider that is registered with the language
IQuickInfoProvider provider = editor.Document.Language.GetService();
if (provider != null) {
// Create a context
object context = provider.GetContext(editor.ActiveView, editor.Caret.Offset);
if (context != null) {
// Request that a session is created based on the context, and disable pointer tracking since
// this request is initiated from a button click
provider.RequestSession(editor.ActiveView, context, false);
}
}
}
```
--------------------------------
### XML Smart Indent Example
Source: https://www.actiprosoftware.com/docs/controls/wpf/syntaxeditor/web-languages-addon/xml/indent-provider
Demonstrates how the indent provider automatically indents content between start and end tags when Enter is pressed.
```xml
|
```
--------------------------------
### Basic WPF DataGrid Setup
Source: https://www.actiprosoftware.com/docs/controls/wpf/datagrid/getting-started
Use this XAML to create a fundamental DataGrid with standard column types. Ensure the 'datagrid' namespace is correctly defined.
```xaml
xmlns:datagrid="http://schemas.actiprosoftware.com/winfx/xaml/datagrid"
...
...
```
--------------------------------
### TokenBase StartPosition Property
Source: https://www.actiprosoftware.com/docs/controls/wpf/api/actiprosoftware.text.lexing.implementation.tokenbase
Gets the TextPosition of the first character in the token. This property represents the start boundary of the token in terms of line and column.
```csharp
public TextPosition StartPosition { get; }
```
--------------------------------
### TokenBase StartOffset Property
Source: https://www.actiprosoftware.com/docs/controls/wpf/api/actiprosoftware.text.lexing.implementation.tokenbase
Gets or sets the offset of the first character in the token. This property allows modification of the token's starting offset.
```csharp
public int StartOffset { get; set; }
```
--------------------------------
### Queueing Source Code and Files for Parsing
Source: https://www.actiprosoftware.com/docs/controls/winforms/syntaxeditor/dotnet-languages-addon/assemblies
Demonstrates how to queue parsing for source code or files to create ISourceFile instances for a project assembly. Ensure an ambient parse request dispatcher is set up for background thread parsing.
```csharp
project.SourceFiles.QueueCode(cSharpSyntaxLanguage, "MyFile1.cs", "class Foo { public void Bar() {} }");
project.SourceFiles.QueueFile(cSharpSyntaxLanguage, @"C:\MyFile2.cs");
```
--------------------------------
### Get ITextSnapshotReader for a Snapshot
Source: https://www.actiprosoftware.com/docs/controls/winforms/syntaxeditor/text-parsing/core-text/scanning-text
Retrieves an ITextSnapshotReader for the current text in a document, starting at offset 0. Ensure you have an ITextSnapshot instance before calling this method.
```csharp
ITextSnapshotReader reader = document.CurrentSnapshot.GetReader(0);
```
--------------------------------
### Create SettingsGroup with Header and Description
Source: https://www.actiprosoftware.com/docs/controls/avalonia/fundamentals/controls/settings-group
Demonstrates how to define a SettingsGroup with an optional header and description. Ensure the Actipro namespace is correctly imported.
```xml
xmlns:actipro="http://schemas.actiprosoftware.com/avaloniaui"
...
```
--------------------------------
### SettingsCard with Header and Description
Source: https://www.actiprosoftware.com/docs/controls/wpf/views/controls/settings-card
Demonstrates basic usage of SettingsCard with string values for Header and Description. Ensure the correct xmlns is included.
```xaml
xmlns:views="http://schemas.actiprosoftware.com/winfx/xaml/views"
...
```
--------------------------------
### Atomic Zero-Width Assertion Examples
Source: https://www.actiprosoftware.com/docs/controls/winforms/syntaxeditor/regular-expressions/language-elements
Demonstrates atomic zero-width assertions that check positions without consuming characters. These include start of line (^), end of line ($), start of document (\A), end of document (\z), word boundaries (\b), and non-word boundaries (\B).
```regex
^#region
```
```regex
\b(?!un)\w+\b
```
```regex
(?<=19)99
```
--------------------------------
### Standard MDI Hierarchy Example
Source: https://www.actiprosoftware.com/docs/controls/wpf/docking/control-hierarchy
This XAML code demonstrates how to set up a single document window within a standard MDI host. Ensure the necessary docking namespace is declared.
```xaml
xmlns:docking="http://schemas.actiprosoftware.com/winfx/xaml/docking"
...
```
--------------------------------
### Get ITextSnapshotReader for ITextChange
Source: https://www.actiprosoftware.com/docs/controls/winforms/syntaxeditor/text-parsing/core-text/text-changes
Retrieves an ITextSnapshotReader for the ITextChange's snapshot, starting at offset 0. Ensure you use the ITextSnapshot associated with the ITextChange to maintain offset synchronization.
```csharp
ITextSnapshotReader reader = change.Snapshot.GetReader(0);
```
--------------------------------
### Initialize RibbonCommandUIProvider with Label, Images, and ScreenTip
Source: https://www.actiprosoftware.com/docs/controls/wpf/api/actiprosoftware.windows.controls.ribbon.input.ribboncommanduiprovider
Initializes a new instance of the RibbonCommandUIProvider class with a label, image URLs, and a screen tip description. The screen tip provides additional information displayed when hovering over controls.
```csharp
public RibbonCommandUIProvider(string label, string imageSourceLarge, string imageSourceSmall, object screenTipDescription)
```
--------------------------------
### TokenBase PositionRange Property
Source: https://www.actiprosoftware.com/docs/controls/wpf/api/actiprosoftware.text.lexing.implementation.tokenbase
Gets a TextPositionRange that specifies the text position range of the token. This property provides a convenient way to access the token's start and end positions.
```csharp
public TextPositionRange PositionRange { get; }
```
--------------------------------
### Activate Method
Source: https://www.actiprosoftware.com/docs/controls/wpf/api/actiprosoftware.windows.controls.docking.windowcontrol
Attempts to bring the window to the foreground and activates it.
```APIDOC
## Activate() Method
### Description
Attempts to bring the window to the foreground and activates it.
```csharp
public virtual bool Activate()
```
#### Returns
bool:
`true` if the window was successfully activated; otherwise, `false`.
```
--------------------------------
### Create PreviewableDelegateCommand for Text Styling
Source: https://www.actiprosoftware.com/docs/controls/wpf/bars/controls/using-commands
Employ PreviewableDelegateCommand to add live preview capabilities to commands. This is useful for actions like applying text styles, allowing users to see the effect before committing.
```csharp
var setTextStyleCommand = new PreviewableDelegateCommand(
executeAction: p => {
currentDocument?.ApplyTextStyle(p);
},
canExecuteFunc: p => currentDocument != null,
previewAction: p => {
currentDocument?.StartPreviewMode();
currentDocument?.ApplyTextStyle(p);
},
cancelPreviewAction: p => {
currentDocument?.CancelPreviewMode();
}
);
```
--------------------------------
### Set Predicate Filter for Tree Control
Source: https://www.actiprosoftware.com/docs/controls/wpf/grids/tree-control-features/filtering
Use a PredicateFilter to filter items based on a custom lambda expression. This example filters for items where the 'Name' property starts with 'Foo', assuming items are of type TreeNodeModel.
```csharp
treeListBox.DataFilter = new PredicateFilter(i => ((TreeNodeModel)i).Name.StartsWith("Foo"));
```
--------------------------------
### Show() Method
Source: https://www.actiprosoftware.com/docs/controls/wpf/api/actiprosoftware.windows.controls.docking.windowcontrol
Shows the window. This method has no default implementation and an intermediate class might implement it. It is recommended to call the base implementation in your implementation.
```APIDOC
## Show()
### Description
Shows the window.
### Signature
```csharp
public void Show()
```
```
--------------------------------
### SettingsExpander with Header and Description
Source: https://www.actiprosoftware.com/docs/controls/wpf/views/controls/settings-expander
Demonstrates creating a SettingsExpander with basic string values for its Header and Description properties. Ensure the necessary xmlns is included.
```xaml
xmlns:views="http://schemas.actiprosoftware.com/winfx/xaml/views"
...
```
--------------------------------
### XAML Tool Window Inner-Fill Example
Source: https://www.actiprosoftware.com/docs/controls/avalonia/docking/layout-features/tool-window-inner-fill
This XAML code demonstrates the setup for a tool window inner-fill scenario. It configures multiple tool windows within various containers inside a DockSite, omitting a Workspace to enable inner-fill mode.
```xaml
```
--------------------------------
### Custom Delimiter Auto-Completer for C# String Literals
Source: https://www.actiprosoftware.com/docs/controls/winforms/syntaxeditor/user-interface/input-output/delimiter-auto-completion
Implement custom logic in IsValidStartDelimiter for languages like C# to handle single-token string literals where the delimiter character is the same for start and end. This example checks for double quotes within string literal tokens.
```csharp
public class CSharpDelimiterAutoCompleter : DelimiterAutoCompleter {
...
protected override bool IsValidStartDelimiter(ITextSnapshotReader reader, char startDelimiter) {
if (base.IsValidStartDelimiter(reader, startDelimiter))
return true;
if ((reader != null) && (startDelimiter == '"')) {
var token = ((reader.IsAtTokenStart || reader.IsAtSnapshotEnd) ? reader.PeekTokenReverse() : reader.Token);
if ((token != null) && (token.Id == CSharpTokenId.LiteralString))
return (token.StartOffset == reader.Offset - 1);
}
return false;
}
}
```
--------------------------------
### Configure Help Button with Callback
Source: https://www.actiprosoftware.com/docs/controls/avalonia/fundamentals/user-prompt/user-prompt-buttons
Use the WithHelpCommand method to add a Help button that executes a callback action when clicked. The prompt will not close automatically when this button is invoked.
```csharp
await UserPromptBuilder.Configure()
// ... other configuration options here
.WithHelpCommand(() => OpenHelp())
.Show();
```
--------------------------------
### Create TextRange with Start Offset and Length
Source: https://www.actiprosoftware.com/docs/controls/winforms/syntaxeditor/text-parsing/core-text/offsets-ranges-positions
Use this to create a TextRange using a starting offset and the desired length. This is an alternative to specifying start and end offsets.
```csharp
TextRange range = TextRange.FromSpan(3, 2);
```
--------------------------------
### Register Quick Info Provider
Source: https://www.actiprosoftware.com/docs/controls/winforms/syntaxeditor/language-creation/provider-services/quick-info-provider
Registers an IQuickInfoProvider service with a syntax language. Ensure the 'quickInfoProvider' and 'language' variables are properly initialized.
```csharp
language.RegisterService(quickInfoProvider);
```
--------------------------------
### Initialize ImageProvider
Source: https://www.actiprosoftware.com/docs/controls/avalonia/api/actiprosoftware.ui.avalonia.media.imageprovider
Initializes a new instance of the ImageProvider class. No specific setup is required beyond instantiation.
```csharp
public ImageProvider()
```
--------------------------------
### Create TextSnapshotRange with Start Offset and Length
Source: https://www.actiprosoftware.com/docs/controls/winforms/syntaxeditor/text-parsing/core-text/offsets-ranges-positions
Create a TextSnapshotRange using a starting offset and length, referencing a specific ITextSnapshot. This is an alternative to specifying start and end offsets.
```csharp
TextSnapshotRange snapshotRange = TextSnapshotRange.FromSpan(document.CurrentSnapshot, 3, 2);
```
--------------------------------
### Standard MDI Hierarchy Example
Source: https://www.actiprosoftware.com/docs/controls/avalonia/docking/control-hierarchy
This XAML demonstrates a single document window within a StandardMdiHost. It requires the Actipro AvaloniaUI namespace. Use this to set up a basic MDI environment.
```XAML
xmlns:actipro="http://schemas.actiprosoftware.com/avaloniaui"
...
```
--------------------------------
### Add Customized Column Guide
Source: https://www.actiprosoftware.com/docs/controls/wpf/syntaxeditor/user-interface/editor-view/column-guides
Create and add a custom column guide with specific placement, line style, thickness, and color. This allows for more visual control over guide appearance.
```csharp
editor.ColumnGuides.Add(new ColumnGuide(ColumnGuidePlacement.Column, 80, LineKind.Dash, 2, null));
```
--------------------------------
### Project Constructor
Source: https://www.actiprosoftware.com/docs/controls/winforms/api/actiprosoftware.text.languages.python.reflection.implementation.project
Initializes a new instance of the Project class.
```APIDOC
## Project()
### Description
Initializes an instance of the class.
### Method
Constructor
### Code
```csharp
public Project()
```
```
--------------------------------
### Add Default Column Guide at Column 80
Source: https://www.actiprosoftware.com/docs/controls/winforms/syntaxeditor/user-interface/editor-view/column-guides
Adds a default column guide at column 80 using a convenience method. This is the most common way to add a basic column guide.
```csharp
editor.ColumnGuides.Add(80);
```
--------------------------------
### Get or Set XmlNamespaceExpression Alias
Source: https://www.actiprosoftware.com/docs/controls/wpf/api/actiprosoftware.text.languages.dotnet.ast.implementation.xmlnamespaceexpression
Gets or sets the alias for the XmlNamespaceExpression. The alias is a string value.
```csharp
public string Alias { get; set; }
```
--------------------------------
### Showing a MessageBox with Advanced Configuration
Source: https://www.actiprosoftware.com/docs/controls/avalonia/fundamentals/user-prompt/message-box
Shows how to use the `configure` callback for advanced customization of the message box using the UserPromptBuilder.
```APIDOC
## Showing a MessageBox with Advanced Configuration
### Description
Allows for advanced configuration of the message box by providing a callback that receives the `UserPromptBuilder` before the message box is shown.
### Method
`MessageBox.Show(string messageBoxText, Action configure)`
### Parameters
#### Path Parameters
- **messageBoxText** (string) - Required - The primary message text to be displayed.
- **configure** (Action) - Optional - A callback that receives the `UserPromptBuilder` for advanced configuration.
### Request Example
```csharp
await MessageBox.Show(
"The project was successfully compiled and deployed to the remote server.",
configure: builder => builder.WithHeaderContent("Deploy successful!")
);
```
```
--------------------------------
### PreviewableDelegateCommand Constructor
Source: https://www.actiprosoftware.com/docs/controls/avalonia/api/actiprosoftware.ui.avalonia.input.previewabledelegatecommand-1
Initializes an instance of the PreviewableDelegateCommand class with execute, can-execute, preview, and cancel preview actions.
```APIDOC
## PreviewableDelegateCommand(Action, Func?, Action, Action)
### Description
Initializes an instance of the `PreviewableDelegateCommand` class.
### Parameters
#### Parameters
- **executeAction** (Action) - The execute action.
- **canExecuteFunc** (Func) - The can-execute function.
- **previewAction** (Action) - The preview action.
- **cancelPreviewAction** (Action) - The cancel preview action.
```
--------------------------------
### Get or Set Ribbon Property
Source: https://www.actiprosoftware.com/docs/controls/wpf/api/actiprosoftware.windows.controls.ribbon.controls.toggleminimizationbutton
This property allows you to get or set the Ribbon control to which the ToggleMinimizationButton is attached.
```csharp
public Ribbon Ribbon { get; set; }
```
--------------------------------
### Configure Ambient Package Repository
Source: https://www.actiprosoftware.com/docs/controls/winforms/syntaxeditor/python-language-addon/python/getting-started
Set up the ambient package repository in your application startup code using FileBasedPackageRepository. This ensures IntelliPrompt features work correctly by caching package data.
```csharp
protected override void OnStartup(StartupEventArgs e) {
...
// Use a path like this if in full trust
string appDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
@"YourCompanyName\YourApplicationName\Package Repository");
AmbientPackageRepositoryProvider.Repository = new FileBasedPackageRepository(appDataPath);
...
}
```
--------------------------------
### Register Quick Info Provider
Source: https://www.actiprosoftware.com/docs/controls/wpf/syntaxeditor/language-creation/provider-services/quick-info-provider
Register an IQuickInfoProvider service with a syntax language. This allows the language to utilize the registered provider for quick info popups.
```csharp
language.RegisterService(quickInfoProvider);
```
--------------------------------
### Get or Set Label Property
Source: https://www.actiprosoftware.com/docs/controls/wpf/api/actiprosoftware.windows.controls.ribbon.controls.primitives.zerowidthlabel
Gets or sets the text content displayed by the ZeroWidthLabel. This property is bindable.
```csharp
public string Label { get; set; }
```
--------------------------------
### Set and Get XmlNavigationPane Visibility
Source: https://www.actiprosoftware.com/docs/controls/wpf/api/actiprosoftware.windows.controls.navigation.serialization.xmlnavigationpane
Gets or sets the Visibility of the navigation pane. This property is used during XML serialization.
```csharp
public Visibility Visibility { get; set; }
```
--------------------------------
### PreviewableDelegateCommand Constructor
Source: https://www.actiprosoftware.com/docs/controls/avalonia/api/actiprosoftware.ui.avalonia.input.previewabledelegatecommand-1
Initializes a new instance of the PreviewableDelegateCommand class. It accepts actions for execution, preview, and cancellation of preview, along with an optional can-execute function.
```csharp
public PreviewableDelegateCommand(Action executeAction, Func? canExecuteFunc, Action previewAction, Action cancelPreviewAction)
```
--------------------------------
### Get or Set ValueTemplate
Source: https://www.actiprosoftware.com/docs/controls/wpf/api/actiprosoftware.windows.controls.editors.interop.grids.propertyeditors.primitives.propertyeditorbase
Gets or sets the DataTemplate used for editing the property value. This property is inherited and can be overridden.
```csharp
public override DataTemplate ValueTemplate { get; set; }
```
--------------------------------
### Configure Ambient Assembly Repository on Startup
Source: https://www.actiprosoftware.com/docs/controls/winforms/syntaxeditor/dotnet-languages-addon/csharp/getting-started
Set up the ambient assembly repository in your application startup code to enable caching of binary assembly reflection data and improve loading performance. Specify a cache folder for storing binary assembly data.
```csharp
protected override void OnStartup(StartupEventArgs e) {
...
// Use a path like this if in full trust; otherwise, pass null
string appDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
@"YourCompanyName\YourApplicationName\Assembly Repository");
AmbientAssemblyRepositoryProvider.Repository = new FileBasedAssemblyRepository(appDataPath);
...
}
```
--------------------------------
### ShowFileOpen
Source: https://www.actiprosoftware.com/docs/controls/winforms/api/actiprosoftware.ui.winforms.services.iuserpromptservice
Displays a dialog prompting the user to open a file, based on the provided options. Returns an IOpenFileResult.
```APIDOC
## ShowFileOpen(IOpenFileOptions options)
### Description
Displays a dialog prompting the user to open a file.
### Parameters
#### Path Parameters
- **options** (IOpenFileOptions) - Required - The options defining the characteristics of the file prompt.
### Returns
IOpenFileResult: The result of the user interaction.
### See Also
- ShowFileOpenAsync(IOpenFileOptions)
```
--------------------------------
### Fix 'LC.exe was not found' Error
Source: https://www.actiprosoftware.com/docs/controls/wpf/troubleshooting
This error indicates an issue with the Visual Studio SDK installation. Ensure the SDK option is installed via the Visual Studio Installer. This error is not specific to Actipro components but affects any project using licensed controls.
```text
Task failed because "LC.exe" was not found, or the correct Microsoft Windows SDK is not installed.
```
--------------------------------
### Register and Use Custom Theme Definition
Source: https://www.actiprosoftware.com/docs/controls/wpf/themes/architecture
Demonstrates how to create a custom `ThemeDefinition`, register it with the `ThemeManager`, and set it as the current application theme. This example also enables theming for native WPF controls.
```csharp
public partial class App : Application {
protected override void OnStartup(StartupEventArgs e) {
// Configure the Actipro theme manager
ThemeManager.BeginUpdate();
try {
// Register the theme definitions for your application
ThemeManager.RegisterThemeDefinition(new ThemeDefinition("Custom") {
Intent = ThemeIntent.Dark,
PrimaryAccentColorFamilyName = ColorFamilyName.Green,
WindowColorFamilyName = ColorFamilyName.Green,
});
// Use the Actipro styles for native WPF controls that look great with Actipro's control products
ThemeManager.AreNativeThemesEnabled = true;
// Set the current app theme via a registered theme definition name
ThemeManager.CurrentTheme = "Custom";
}
finally {
ThemeManager.EndUpdate();
// ...
// Call the base method
base.OnStartup(e);
}
}
```
--------------------------------
### Get or Set Foreground Brush
Source: https://www.actiprosoftware.com/docs/controls/wpf/api/actiprosoftware.windows.controls.docking.primitives.toolwindowcontainertitlebargripper
Gets or sets the Brush used for rendering the foreground of the ToolWindowContainerTitleBarGripper. The default value is null.
```csharp
public Brush Foreground { get; set; }
```
--------------------------------
### SettingsExpander with Header and Description
Source: https://www.actiprosoftware.com/docs/controls/avalonia/fundamentals/controls/settings-expander
Use this snippet to create a SettingsExpander with a basic string header and description. Ensure the Actipro Avalonia UI namespace is imported.
```xaml
xmlns:actipro="http://schemas.actiprosoftware.com/avaloniaui"
...
```
--------------------------------
### Create TextSnapshotRange with Start and End Offsets
Source: https://www.actiprosoftware.com/docs/controls/winforms/syntaxeditor/text-parsing/core-text/offsets-ranges-positions
Define a TextSnapshotRange by specifying the snapshot and the start and end offsets. The end offset is exclusive.
```csharp
TextSnapshotRange snapshotRange = new TextSnapshotRange(document.CurrentSnapshot, 3, 5);
```
--------------------------------
### Get MarkerBrushKind Property
Source: https://www.actiprosoftware.com/docs/controls/wpf/api/actiprosoftware.windows.controls.charts.palettes.seriespalettestyleselector
Gets or sets the kind of brush to use for markers. This property determines the general type of brush applied.
```csharp
public SeriesBrushKind MarkerBrushKind { get; set; }
```
--------------------------------
### Initialize PrintPreviewWindow
Source: https://www.actiprosoftware.com/docs/controls/wpf/api/actiprosoftware.windows.controls.syntaxeditor.dialogs.printpreviewwindow
Initializes a new instance of the PrintPreviewWindow class. This is the default constructor.
```csharp
public PrintPreviewWindow()
```
--------------------------------
### Get PredefinedValueTemplateKey
Source: https://www.actiprosoftware.com/docs/controls/wpf/api/actiprosoftware.windows.controls.editors.interop.grids.propertyeditors.primitives.propertyeditorbase
Gets the resource key for a pre-defined DataTemplate used internally for editing property values. This must be implemented by derived classes.
```csharp
protected abstract object PredefinedValueTemplateKey { get; }
```
--------------------------------
### SquiggleTagQuickInfoProvider Constructor
Source: https://www.actiprosoftware.com/docs/controls/winforms/api/actiprosoftware.ui.winforms.controls.syntaxeditor.intelliprompt.implementation.squiggletagquickinfoprovider
Initializes a new instance of the SquiggleTagQuickInfoProvider class. No specific setup is required beyond instantiation.
```csharp
public SquiggleTagQuickInfoProvider()
```
--------------------------------
### Get or Set Min Value of UnicodeRange
Source: https://www.actiprosoftware.com/docs/controls/winforms/api/actiprosoftware.ui.winforms.controls.rendering.unicoderange
Gets or sets the minimum value of this UnicodeRange. This property defines the lower bound of the character range.
```csharp
public int Min { get; set; }
```
--------------------------------
### PrintPreviewWindow Constructor
Source: https://www.actiprosoftware.com/docs/controls/wpf/api/actiprosoftware.windows.controls.syntaxeditor.dialogs.printpreviewwindow
Initializes a new instance of the PrintPreviewWindow class.
```APIDOC
## PrintPreviewWindow()
### Description
Initializes a new instance of the `PrintPreviewWindow` class.
### Method
```csharp
public PrintPreviewWindow()
```
```
--------------------------------
### Get or Set Max Value of UnicodeRange
Source: https://www.actiprosoftware.com/docs/controls/winforms/api/actiprosoftware.ui.winforms.controls.rendering.unicoderange
Gets or sets the maximum value of this UnicodeRange. This property defines the upper bound of the character range.
```csharp
public int Max { get; set; }
```
--------------------------------
### BuildOpenFilePrompt
Source: https://www.actiprosoftware.com/docs/controls/winforms/api/actiprosoftware.ui.winforms.services.iuserpromptservice
Creates a new model that can be used to prompt the user to open a file. Returns an IOpenFilePromptBuilder.
```APIDOC
## BuildOpenFilePrompt()
### Description
Creates a new model which can be used to prompt the user to open a file.
### Returns
IOpenFilePromptBuilder
```
--------------------------------
### Get Provider Attached Property
Source: https://www.actiprosoftware.com/docs/controls/avalonia/api/actiprosoftware.ui.avalonia.media.imageprovider
Retrieves the value of the 'Provider' attached property from an AvaloniaObject. This is used to get the associated ImageProvider for a UI element.
```csharp
public static ImageProvider? GetProvider(AvaloniaObject obj)
```
--------------------------------
### Initialize XamlGlyphImageRepository
Source: https://www.actiprosoftware.com/docs/controls/winforms/api/actiprosoftware.ui.winforms.drawing.xaml.xamlglyphimagerepository
Initializes a new instance of the XamlGlyphImageRepository class. This is the default constructor.
```csharp
public XamlGlyphImageRepository()
```
--------------------------------
### WindowControlOverlayHost Constructors
Source: https://www.actiprosoftware.com/docs/controls/avalonia/api/actiprosoftware.ui.avalonia.controls.primitives.windowcontroloverlayhost
Initializes a new instance of the WindowControlOverlayHost class.
```APIDOC
## WindowControlOverlayHost()
### Description
Initializes an instance of the class.
### Code
```csharp
public WindowControlOverlayHost()
```
```