diff --git a/src/client/spark/view/Controls/SparkMenu/SparkMenuItem.cs b/src/client/spark/view/Controls/SparkMenu/SparkMenuItem.cs index 8fbc5846f..1d1ee666c 100644 --- a/src/client/spark/view/Controls/SparkMenu/SparkMenuItem.cs +++ b/src/client/spark/view/Controls/SparkMenu/SparkMenuItem.cs @@ -1,43 +1,26 @@ -using bts.api; -using bts.spark; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Media; namespace mbts.ui.controls { public class SparkMenuItem : Button { - static SparkMenuItem() { + static SparkMenuItem() => DefaultStyleKeyProperty.OverrideMetadata(typeof(SparkMenuItem), new FrameworkPropertyMetadata(typeof(SparkMenuItem))); - } - public ImageSource Icon - { + public static readonly DependencyProperty IconProperty = + DependencyProperty.Register("Icon", typeof(ImageSource), typeof(SparkMenuItem), new PropertyMetadata(default(ImageSource))); + + public ImageSource Icon { get { return (ImageSource)GetValue(IconProperty); } set { SetValue(IconProperty, value); } } - // Using a DependencyProperty as the backing store for Icon. This enables animation, styling, binding, etc... - public static readonly DependencyProperty IconProperty = - DependencyProperty.Register("Icon", typeof(ImageSource), typeof(SparkMenuItem), new PropertyMetadata(default(ImageSource))); + public static readonly DependencyProperty CollapsedProperty = + DependencyProperty.Register("Collapsed", typeof(bool), typeof(SparkMenuItem), new PropertyMetadata(default(bool))); - - - - public bool Collapsed - { + public bool Collapsed { get { return (bool)GetValue(CollapsedProperty); } set { SetValue(CollapsedProperty, value); } } - - // Using a DependencyProperty as the backing store for Collapsed. This enables animation, styling, binding, etc... - public static readonly DependencyProperty CollapsedProperty = - DependencyProperty.Register("Collapsed", typeof(bool), typeof(SparkMenuItem), new PropertyMetadata(default(bool))); - - } }