### App.xaml Resources
Source: https://benruehl.github.io/adonis-ui/docs/getting-started
Adds the default light color scheme and classic theme resources to the application.
```xaml
```
--------------------------------
### SplitButton Example
Source: https://benruehl.github.io/adonis-ui/docs/guides/custom-controls
An example of how to implement a SplitButton with a ContextMenu in XAML.
```xaml
```
--------------------------------
### MainWindow Constructor Example
Source: https://benruehl.github.io/adonis-ui/docs/guides/space
An example of implementing the `SetSpaceResourceOwnerFallback` method within a WPF MainWindow's constructor before calling `InitializeComponent()`.
```C#
public partial class MainWindow : Window
{
public MainWindow()
{
AdonisUI.SpaceExtension.SetSpaceResourceOwnerFallback(this);
InitializeComponent();
}
}
```
--------------------------------
### Window Style
Source: https://benruehl.github.io/adonis-ui/docs/getting-started
Derives the window's style from the default Adonis UI style.
```xaml
```
--------------------------------
### Quick Start
Source: https://benruehl.github.io/adonis-ui/docs/guides/message-box
Shows how to open the message box using AdonisUI.Controls.MessageBox.Show() with basic and more advanced parameters.
```csharp
using AdonisUI.Controls;
MessageBox.Show("Hello world!");
MessageBox.Show("Hello world!", "Info", MessageBoxButton.OKCancel, MessageBoxImage.Information);
```
--------------------------------
### Localized Button Labels Example
Source: https://benruehl.github.io/adonis-ui/docs/guides/message-box
C# code example demonstrating how to provide custom, localized labels for MessageBoxButtons.
```C#
var messageBox = new MessageBoxModel
{
Text = "Hallo welt!",
Buttons = MessageBoxButtons.YesNoCancel("Ja", "Nein", "Abbrechen"),
};
MessageBox.Show(messageBox);
```
--------------------------------
### Using a color and brush
Source: https://benruehl.github.io/adonis-ui/docs/guides/colors-and-brushes
Examples of how to use color and brush resource keys in XAML.
```xaml
Color="{DynamicResource {x:Static adonisUi:Colors.Layer1BackgroundColor}}"
```
```xaml
Background="{DynamicResource {x:Static adonisUi:Brushes.Layer1BackgroundBrush}}"
```
--------------------------------
### Using LoadingCircle Template
Source: https://benruehl.github.io/adonis-ui/docs/guides/styles-and-templates
Example of using a loading circle template with a ContentControl for displaying loading states.
```XAML
```
--------------------------------
### Using AccentButtonStyle
Source: https://benruehl.github.io/adonis-ui/docs/guides/styles-and-templates
Example of applying an accent button style to a Button component using ComponentResourceKeys.
```XAML
```
--------------------------------
### Switching Color Schemes at Runtime
Source: https://benruehl.github.io/adonis-ui/docs/guides/colors-and-brushes
Example of how to switch between light and dark color schemes using ResourceLocator.
```csharp
private bool _isDark;
private void ChangeTheme(object sender, RoutedEventArgs e)
{
ResourceLocator.SetColorScheme(Application.Current.Resources, _isDark ? ResourceLocator.LightColorScheme : ResourceLocator.DarkColorScheme);
_isDark = !_isDark;
}
```
--------------------------------
### Using Loading Circle Template
Source: https://benruehl.github.io/adonis-ui/docs/guides/loading
Example of how to apply a predefined loading indicator template (LoadingCircle) to a ContentControl.
```xml
```
--------------------------------
### Setting Watermark on a TextBox
Source: https://benruehl.github.io/adonis-ui/docs/guides/watermark
Example of how to apply a watermark to a TextBox control using the WatermarkExtension.
```XAML
```
--------------------------------
### Switching Custom Color Schemes
Source: https://benruehl.github.io/adonis-ui/docs/guides/colors-and-brushes
Example of how to switch between two custom color schemes, specifying the URI for the replaced scheme.
```csharp
Uri replacedColorSchemeUri = new Uri("pack://application:,,,/MyApp;component/ColorSchemes/CustomColorScheme1.xaml", UriKind.Absolute)
Uri replacingColorSchemeUri = new Uri("pack://application:,,,/MyApp;component/ColorSchemes/CustomColorScheme2.xaml", UriKind.Absolute)
AdonisUI.ResourceLocator.SetColorScheme(Application.Current.Resources, replacingColorSchemeUri, replacedColorSchemeUri);
```
--------------------------------
### Customizing a Shipped Color Scheme
Source: https://benruehl.github.io/adonis-ui/docs/guides/colors-and-brushes
Example of creating a custom ResourceDictionary that merges a shipped color scheme and overrides specific resources.
```xaml
Green
```
--------------------------------
### Overriding accent color
Source: https://benruehl.github.io/adonis-ui/docs/guides/colors-and-brushes
Example of overriding the default accent color in App.xaml.
```xaml
#0BAC08
```
--------------------------------
### Set Layer Property
Source: https://benruehl.github.io/adonis-ui/docs/guides/layers
Example of how to explicitly set the Layer property on a GroupBox to a specific value.
```xml
```
--------------------------------
### Progress Bar with ContentTemplate
Source: https://benruehl.github.io/adonis-ui/docs/guides/loading
Example of using 'ContentTemplate' for complex content within a progress bar, such as child controls, and customizing foreground colors.
```xml
```
--------------------------------
### Defining a New Custom Color Scheme
Source: https://benruehl.github.io/adonis-ui/docs/guides/colors-and-brushes
Example of defining a new custom color scheme by setting colors and brushes for Adonis UI resource keys.
```xaml
#0BAC08
```
--------------------------------
### Increase Layer Property
Source: https://benruehl.github.io/adonis-ui/docs/guides/layers
Example of how to use the IncreaseLayer property on a GroupBox to make its children belong to a different layer.
```xml
```
--------------------------------
### Override Dimensions
Source: https://benruehl.github.io/adonis-ui/docs/guides/dimensions
Example of overriding default dimension values for CornerRadius and BorderThickness in Adonis UI.
```xaml
21
```
--------------------------------
### Place Title Bar Over Content
Source: https://benruehl.github.io/adonis-ui/docs/guides/window
This example demonstrates how to place the title bar over the window content for a blending effect, and how to use TitleBarActualHeight to set margins for window elements.
```xaml
Sidebar contentMain content
```
--------------------------------
### Setting Cursor Spotlight Size on a Window
Source: https://benruehl.github.io/adonis-ui/docs/guides/cursor-spotlight
Example of how to set the relative spotlight size for a specific window, which will be inherited by its children.
```XAML
```
--------------------------------
### Disable Progress Bar Animation
Source: https://benruehl.github.io/adonis-ui/docs/guides/loading
Example of how to disable the ripple animation on a determinate progress bar.
```xml
```
--------------------------------
### Set Corner Radius Individually
Source: https://benruehl.github.io/adonis-ui/docs/guides/dimensions
Example of setting the CornerRadius on an individual Button control using the CornerRadiusExtension.
```xaml
```
--------------------------------
### Configuring Error Message Placement
Source: https://benruehl.github.io/adonis-ui/docs/guides/data-validation
This example demonstrates how to change the placement of the error message popup to be below the error icon for a TextBox.
```xaml
```
--------------------------------
### Custom Title Bar Content
Source: https://benruehl.github.io/adonis-ui/docs/guides/window
This example shows how to add custom content, such as a button, to the title bar between the window title and the window buttons.
```xaml
```
--------------------------------
### Customizing Cursor Spotlight Colors
Source: https://benruehl.github.io/adonis-ui/docs/guides/cursor-spotlight
Example of how to change the background and border brush of the cursor spotlight for individual controls using the CursorSpotlightExtension.
```XAML
```
--------------------------------
### Disable Shrinking Title Bar When Maximized
Source: https://benruehl.github.io/adonis-ui/docs/guides/window
This example shows how to disable the title bar shrinking when the window is maximized.
```xaml
```
--------------------------------
### Processing Message Box Result
Source: https://benruehl.github.io/adonis-ui/docs/guides/message-box
Provides an example of how to process the result of a message box, including handling custom button presses.
```csharp
switch (messageBox.Result)
{
case MessageBoxResult.Yes:
ApplyAllExtras();
break;
case MessageBoxResult.Custom:
if (messageBox.ButtonPressed.Id == CHEESE_BUTTON_ID)
ApplyExtraCheese();
else if (messageBox.ButtonPressed.Id == BACON_BUTTON_ID)
ApplyExtraBacon();
break;
}
```
--------------------------------
### Customizing Maximum Blur Radius
Source: https://benruehl.github.io/adonis-ui/docs/guides/cursor-spotlight
Example of how to change the maximum blur radius for the cursor spotlight effect using the CursorSpotlightExtension on a Window.
```XAML
```
--------------------------------
### Overriding Global Cursor Spotlight Size
Source: https://benruehl.github.io/adonis-ui/docs/guides/cursor-spotlight
Example of how to override the global setting for the cursor spotlight's relative size in App.xaml.
```XAML
0.75
```
--------------------------------
### Applying Cursor Spotlight to Custom Controls
Source: https://benruehl.github.io/adonis-ui/docs/guides/cursor-spotlight
Example of how to apply the cursor spotlight effect to a custom control like a Border by setting the MouseEventSource property.
```XAML
```
--------------------------------
### Enabling Error Message Visibility on Focus and Mouse Over
Source: https://benruehl.github.io/adonis-ui/docs/guides/data-validation
This example shows how to explicitly enable the visibility of error messages on keyboard focus and mouse hover for a TextBox using ValidationExtension attached properties.
```xaml
```
--------------------------------
### Custom MessageBox Style
Source: https://benruehl.github.io/adonis-ui/docs/guides/message-box
Example XAML style to customize the MessageBoxWindow, including properties for maximum screen dimensions, button styles, checkbox styles, and button container styles.
```XAML
```
--------------------------------
### App.xaml Resources
Source: https://benruehl.github.io/adonis-ui/docs/getting-started/introduction
Add Adonis UI and ClassicTheme resources to your application in App.xaml.
```xaml
```
--------------------------------
### Window Style
Source: https://benruehl.github.io/adonis-ui/docs/getting-started/introduction
Derive your window's style from the default style of Adonis UI.
```xaml
```
--------------------------------
### Setting Space Resource Owner Fallback in C#
Source: https://benruehl.github.io/adonis-ui/docs/guides/space
Demonstrates how to manually set the resource owner fallback in C# code, typically in a window's constructor, to ensure space values are found when Adonis UI resources are not in application-wide resources.
```C#
AdonisUI.SpaceExtension.SetSpaceResourceOwnerFallback(resourceOwner);
```
--------------------------------
### Progress Bar with Direct Content
Source: https://benruehl.github.io/adonis-ui/docs/guides/loading
Demonstrates using the 'Content' property to display text directly within a progress bar, with automatic foreground adjustment.
```xml
```
--------------------------------
### Manual Orientation Specification
Source: https://benruehl.github.io/adonis-ui/docs/guides/space
Shows how to manually specify the orientation (Vertical or Horizontal) when the system cannot infer it for non-Thickness properties.
```XAML
```
--------------------------------
### Space Usage in XAML for Row Definitions
Source: https://benruehl.github.io/adonis-ui/docs/guides/space
Demonstrates how to apply the Space extension to RowDefinition Height, showing calculations with base values, multiples, and additions/subtractions.
```XAML
```
--------------------------------
### Space Usage in XAML for Thickness Properties
Source: https://benruehl.github.io/adonis-ui/docs/guides/space
Illustrates applying the Space extension to Thickness properties like Margin, showing single value, horizontal/vertical pairs, and custom order.
```XAML
```
--------------------------------
### Override default styles
Source: https://benruehl.github.io/adonis-ui/docs/getting-started/configuration
Change all instances of a particular control type by overriding the default style. Use the control type as the resource key and set BasedOn if you don’t want to create a style from scratch.
```xaml
```
--------------------------------
### Override named resources
Source: https://benruehl.github.io/adonis-ui/docs/getting-started/configuration
Override colors and dimensions by assigning the appropriate resource key and using the correct resource type.
```xaml
#0BAC0821
```
--------------------------------
### Advanced Usage with MessageBoxModel
Source: https://benruehl.github.io/adonis-ui/docs/guides/message-box
Demonstrates using MessageBoxModel for more detailed control over message box properties like text, caption, icon, and buttons.
```csharp
using AdonisUI.Controls;
var messageBox = new MessageBoxModel
{
Text = "Hello world!",
Caption = "Info",
Icon = MessageBoxImage.Information,
Buttons = MessageBoxButtons.OkCancel(),
};
MessageBox.Show(messageBox);
```
--------------------------------
### Advanced Usage with Custom Buttons and Checkboxes
Source: https://benruehl.github.io/adonis-ui/docs/guides/message-box
Illustrates a more complex message box configuration with custom button labels, custom buttons identified by IDs, checkboxes with specific placement, and disabling the sound.
```csharp
using AdonisUI.Controls;
const string CHEESE_BUTTON_ID = "cheese";
const string BACON_BUTTON_ID = "bacon";
var messageBox = new MessageBoxModel
{
Text = "Would you like to apply some extras?",
Caption = "Extra cheese maybe?",
Icon = MessageBoxImage.Question,
Buttons = new []
{
MessageBoxButtons.Yes("Yes, all you have!"),
MessageBoxButtons.Custom("Extra cheese", CHEESE_BUTTON_ID),
MessageBoxButtons.Custom("Extra bacon", BACON_BUTTON_ID),
MessageBoxButtons.No("No, no extras"),
MessageBoxButtons.Cancel(),
},
CheckBoxes = new []
{
new MessageBoxCheckBoxModel("Apply to all items of the order")
{
IsChecked = true,
Placement = MessageBoxCheckBoxPlacement.BelowText,
},
},
IsSoundEnabled = false,
};
MessageBox.Show(messageBox);
```
--------------------------------
### Customizing Default Space Values
Source: https://benruehl.github.io/adonis-ui/docs/guides/space
Provides XAML snippets to override the default base values for horizontal and vertical space by defining them in application resources.
```XAML
88
```
--------------------------------
### Placement for ScrollViewers
Source: https://benruehl.github.io/adonis-ui/docs/guides/scrollbars
Configuring the placement of vertical and horizontal scroll bars for ScrollViewers.
```XAML
```
--------------------------------
### Expansion Mode for ScrollBars
Source: https://benruehl.github.io/adonis-ui/docs/guides/scrollbars
Directly setting the expansion mode for ScrollBar elements.
```XAML
```
--------------------------------
### Expansion Mode for ScrollViewers
Source: https://benruehl.github.io/adonis-ui/docs/guides/scrollbars
Customizing vertical and horizontal scroll bar expansion modes for ScrollViewers.
```XAML
```
--------------------------------
### Customizing ripple durations
Source: https://benruehl.github.io/adonis-ui/docs/guides/ripple
The ripple effect uses an animation to appear and afterwards another one to disappear. For both animations the duration can be controlled separately. For the first one use `FadeInDuration` and for the second one `FadeOutDuration`. Both are set to 200 milliseconds by default. Their values are inherited to children so they can be set for individual controls, containers like grids or windows or the whole application.
```xaml
```
--------------------------------
### Application-wide Default ScrollBar Expansion Mode
Source: https://benruehl.github.io/adonis-ui/docs/guides/scrollbars
Overriding the default scroll bar style to set a consistent expansion mode across the application.
```XAML
```
--------------------------------
### Placement for Controls with ScrollViewers
Source: https://benruehl.github.io/adonis-ui/docs/guides/scrollbars
Configuring scroll bar placement for controls like ComboBox that contain ScrollViewers.
```XAML
```
--------------------------------
### Expansion Mode for Controls with ScrollViewers
Source: https://benruehl.github.io/adonis-ui/docs/guides/scrollbars
Customizing scroll bar expansion modes for controls like ComboBox that contain ScrollViewers.
```XAML
```
--------------------------------
### Customizing ripple colors
Source: https://benruehl.github.io/adonis-ui/docs/guides/ripple
Properties of the ripple effect can be customized using the `RippleExtension`. The ripple effect makes use of a background brush, a border brush and a foreground brush. By default, their values are provided by the `Interaction` colors of the respective layer (See Colors and Brushes). To set them directly on individual controls, use the `RippleExtension`.
```xaml
```
--------------------------------
### Hide Scroll Bars Until Hover for ScrollViewers
Source: https://benruehl.github.io/adonis-ui/docs/guides/scrollbars
Enabling the feature to hide scroll bars until the mouse hovers over the ScrollViewer.
```XAML
```
--------------------------------
### Hide Scroll Bars Until Hover for Controls with ScrollViewers
Source: https://benruehl.github.io/adonis-ui/docs/guides/scrollbars
Enabling the feature to hide scroll bars until mouse hover for controls like ComboBox that contain ScrollViewers.
```XAML
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.