All the controls missing in WPF. Over 1 million downloads.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
2.1 KiB

/**************************************************************************************
Toolkit for WPF
Copyright (C) 2007-2016 Xceed Software Inc.
This program is provided to you under the terms of the Microsoft Public
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
For more features, controls, and fast professional support,
pick up the Plus Edition at https://xceed.com/xceed-toolkit-plus-for-wpf/
Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids
**************************************************************************************/
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.MaterialControls.Views
{
/// <summary>
/// Interaction logic for MaterialToastView.xaml
/// </summary>
public partial class MaterialToastView : MaterialDemoView
{
public MaterialToastView()
{
InitializeComponent();
}
#if !OPEN_SOURCE
private void ToastButton_Click( object sender, RoutedEventArgs e )
{
var materialToast = new MaterialToast( ( ( ComboBoxItem )toastOwnerComboBox.SelectedItem ).Tag as FrameworkElement );
materialToast.MaterialAccentBrush = (SolidColorBrush)toastMaterialAccentBrushComboBox.SelectedItem;
materialToast.Location = ( MaterialToastLocationEnum )toastLocationComboBox.SelectedItem;
materialToast.SlidingDirection = ( Orientation )toastSlidingDirectionComboBox.SelectedItem;
materialToast.Content = "Simple Toast";
materialToast.DisplayTime = System.TimeSpan.FromMilliseconds( toastDisplayTimeIntegerUpDown.Value.Value );
materialToast.HideOnClick = toastHideOnclickCheckBox.IsChecked.Value;
materialToast.IsCloseButtonVisible = toastIsCloseButtonVisibleCheckBox.IsChecked.Value;
materialToast.CloseButtonStyle = ( ( ComboBoxItem )toastClosebuttonStyleComboBox.SelectedItem ).Tag as Style;
materialToast.CornerRadius = new CornerRadius( toastCornerRadiusIntegerUpDown.Value.Value );
materialToast.ShowToast();
}
#endif
}
}