client/src/Iri.Modernisation.Controls/View/ClickMenu/ClickMenuItem.xaml.cs
changeset 8 2482ddb44cb6
parent 0 249d70e7b32d
child 27 f292db96b050
equal deleted inserted replaced
7:de7ba61f66c7 8:2482ddb44cb6
     8 using System.Windows.Media.Animation;
     8 using System.Windows.Media.Animation;
     9 using System.Windows.Shapes;
     9 using System.Windows.Shapes;
    10 
    10 
    11 namespace Iri.Modernisation.Controls.View
    11 namespace Iri.Modernisation.Controls.View
    12 {
    12 {
    13 	public partial class ClickMenuItem : ContentControl
    13     public enum ClickMenuItemOrientation { Up = 90, Down = 126 }
    14 
    14 	public partial class ClickMenuItem : UserControl
    15 	{
    15 	{
    16         /*
    16         
    17          public ImageSource ImageSource {
    17          public ImageSource ImageSource {
    18             get { return imgItem.Source; }
    18             get { return imgItem.Source; }
    19             set { imgItem.Source = value; }
    19             set { imgItem.Source = value; }
    20         }
    20         }
    21          */
    21 
       
    22         public ClickMenuItemOrientation Orientation
       
    23         {
       
    24             get { return (ClickMenuItemOrientation)GetValue(OrientationProperty); }
       
    25             set { 
       
    26                 SetValue(OrientationProperty, value);
       
    27                 path78339.RenderTransform = new RotateTransform() {Angle=(double)value };
       
    28             }
       
    29         }
       
    30 
       
    31         // Using a DependencyProperty as the backing store for Orientation.  This enables animation, styling, binding, etc...
       
    32         public static readonly DependencyProperty OrientationProperty =
       
    33             DependencyProperty.Register("Orientation", typeof(ClickMenuItemOrientation), typeof(ClickMenuItem), new PropertyMetadata(ClickMenuItemOrientation.Up));
       
    34 
       
    35 
       
    36 
    22 
    37 
    23 
    38 
    24         public String Title { get; set; }
    39         public String Title { get; set; }
    25         
    40         
    26         public event EventHandler<ClickMenuItemHooverEventArgs> ClickMenuItemHooverSelected;
    41         public event EventHandler<ClickMenuItemHooverEventArgs> ClickMenuItemHooverSelected;