### SplitButton Example Source: https://github.com/benruehl/adonis-ui/blob/master/docs/docs/guides/custom-controls.md An example of how to implement a SplitButton with a ContextMenu in XAML. ```xml ``` -------------------------------- ### Assigning Colors and Brushes Source: https://github.com/benruehl/adonis-ui/blob/master/docs/docs/guides/colors-and-brushes.md Examples of how to assign colors and brushes using ComponentResourceKeys in XAML. ```xml Color color = "{DynamicResource {x:Static adonisUi:Colors.Layer1BackgroundColor}}" Background brush = "{DynamicResource {x:Static adonisUi:Brushes.Layer1BackgroundBrush}}" ``` -------------------------------- ### Switching Color Schemes at Runtime Source: https://github.com/benruehl/adonis-ui/blob/master/docs/docs/guides/colors-and-brushes.md 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; } ``` -------------------------------- ### Localized Button Labels Example Source: https://github.com/benruehl/adonis-ui/blob/master/docs/docs/guides/message-box.md C# code example demonstrating how to provide custom, localized labels for MessageBoxButtons. ```csharp var messageBox = new MessageBoxModel { Text = "Hallo welt!", Buttons = MessageBoxButtons.YesNoCancel("Ja", "Nein", "Abbrechen"), }; MessageBox.Show(messageBox); ``` -------------------------------- ### Watermark Example Source: https://github.com/benruehl/adonis-ui/blob/master/docs/docs/guides/watermark.md Example of setting a watermark on a TextBox control using AdonisUI.Extensions.WatermarkExtension. ```xml ``` -------------------------------- ### Override named resources Source: https://github.com/benruehl/adonis-ui/blob/master/docs/docs/getting-started/configuration.md This example shows how to override named resources like colors and dimensions. ```xml #0BAC08 2 1 ``` -------------------------------- ### ContentControl Template Usage Source: https://github.com/benruehl/adonis-ui/blob/master/docs/docs/guides/styles-and-templates.md Example of using a ContentControl to display a loading circle template. ```xml ``` -------------------------------- ### Using Loading Circle Template Source: https://github.com/benruehl/adonis-ui/blob/master/docs/docs/guides/loading.md Example of how to apply the `LoadingCircle` DataTemplate to a `ContentControl` for a loading indicator. ```xml ``` -------------------------------- ### Switching Custom Color Schemes Source: https://github.com/benruehl/adonis-ui/blob/master/docs/docs/guides/colors-and-brushes.md Example of how to switch between two custom color schemes using ResourceLocator, specifying the URIs for both. ```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); ``` -------------------------------- ### MainWindow Constructor Example Source: https://github.com/benruehl/adonis-ui/blob/master/docs/docs/guides/space.md Shows a practical implementation of setting the space resource owner fallback in a WPF MainWindow constructor. ```csharp public partial class MainWindow : Window { public MainWindow() { AdonisUI.SpaceExtension.SetSpaceResourceOwnerFallback(this); InitializeComponent(); } } ``` -------------------------------- ### Enabling PlaceTitleBarOverContent Source: https://github.com/benruehl/adonis-ui/blob/master/docs/docs/guides/window.md Example of an AdonisWindow with the PlaceTitleBarOverContent property set to True, and binding TitleBarActualHeight for margins. ```xml Sidebar content Main content ``` -------------------------------- ### Override default styles Source: https://github.com/benruehl/adonis-ui/blob/master/docs/docs/getting-started/configuration.md This example demonstrates how to override default styles for control types, such as changing the border thickness of all buttons. ```xml ``` -------------------------------- ### Button Style Usage Source: https://github.com/benruehl/adonis-ui/blob/master/docs/docs/guides/styles-and-templates.md Example of how to reference and apply an accent button style using ComponentResourceKeys. ```xml