private void InitializeResources() { // Resource - [DataTemplateKey(Ceriyo.Infrastructure.Network.TransferObjects.PCTransferObject)] DataTemplate Func <UIElement, UIElement> r_0_dtFunc = r_0_dtMethod; this.Add(typeof(Ceriyo.Infrastructure.Network.TransferObjects.PCTransferObject), new DataTemplate(typeof(Ceriyo.Infrastructure.Network.TransferObjects.PCTransferObject), r_0_dtFunc)); GeneratedPropertyInfo.RegisterGeneratedProperty(typeof(Ceriyo.Infrastructure.Network.TransferObjects.PCTransferObject), "Name", typeof(EmptyKeys.UserInterface.Generated.Dictionary_Bindings.PCTransferObject_Name_PropertyInfo)); }
public CustomWindow() : base("CustomWindowTemplate") { TextData = "Custom Window"; Top = 10; Left = 700; Height = 100; Width = 200; Opacity = 0.9f; IsHitTestVisible = true; IsOnTop = true; Title = "Title"; IsVisible = true; HideCommand = new RelayCommand(new Action <object>(OnHide)); GeneratedPropertyInfo.RegisterGeneratedProperty(this.GetType(), "ManualBinding", typeof(ManualBindingProperty)); }
private void InitializeResources() { // Resource - [buttonAnimStyle] Style var r_0_s_bo = this[typeof(Button)]; Style r_0_s = new Style(typeof(Button), r_0_s_bo as Style); Setter r_0_s_S_0 = new Setter(Button.WidthProperty, 200F); r_0_s.Setters.Add(r_0_s_S_0); Setter r_0_s_S_1 = new Setter(Button.MarginProperty, new Thickness(0F, 1F, 0F, 1F)); r_0_s.Setters.Add(r_0_s_S_1); Setter r_0_s_S_2 = new Setter(Button.SnapsToDevicePixelsProperty, false); r_0_s.Setters.Add(r_0_s_S_2); EventTrigger r_0_s_ET_0 = new EventTrigger(Button.MouseEnterEvent); r_0_s.Triggers.Add(r_0_s_ET_0); BeginStoryboard r_0_s_ET_0_AC_0 = new BeginStoryboard(); r_0_s_ET_0_AC_0.Name = "r_0_s_ET_0_AC_0"; r_0_s_ET_0.AddAction(r_0_s_ET_0_AC_0); Storyboard r_0_s_ET_0_AC_0_SB = new Storyboard(); r_0_s_ET_0_AC_0.Storyboard = r_0_s_ET_0_AC_0_SB; r_0_s_ET_0_AC_0_SB.Name = "r_0_s_ET_0_AC_0_SB"; ThicknessAnimation r_0_s_ET_0_AC_0_SB_TL_0 = new ThicknessAnimation(); r_0_s_ET_0_AC_0_SB_TL_0.Name = "r_0_s_ET_0_AC_0_SB_TL_0"; r_0_s_ET_0_AC_0_SB_TL_0.Duration = new Duration(new TimeSpan(0, 0, 0, 0, 500)); r_0_s_ET_0_AC_0_SB_TL_0.From = new Thickness(0F, 1F, 0F, 1F); r_0_s_ET_0_AC_0_SB_TL_0.To = new Thickness(0F, 5F, 0F, 5F); SineEase r_0_s_ET_0_AC_0_SB_TL_0_EA = new SineEase(); r_0_s_ET_0_AC_0_SB_TL_0.EasingFunction = r_0_s_ET_0_AC_0_SB_TL_0_EA; Storyboard.SetTargetProperty(r_0_s_ET_0_AC_0_SB_TL_0, Button.MarginProperty); r_0_s_ET_0_AC_0_SB.Children.Add(r_0_s_ET_0_AC_0_SB_TL_0); FloatAnimation r_0_s_ET_0_AC_0_SB_TL_1 = new FloatAnimation(); r_0_s_ET_0_AC_0_SB_TL_1.Name = "r_0_s_ET_0_AC_0_SB_TL_1"; r_0_s_ET_0_AC_0_SB_TL_1.Duration = new Duration(new TimeSpan(0, 0, 0, 0, 500)); r_0_s_ET_0_AC_0_SB_TL_1.To = 220F; SineEase r_0_s_ET_0_AC_0_SB_TL_1_EA = new SineEase(); r_0_s_ET_0_AC_0_SB_TL_1.EasingFunction = r_0_s_ET_0_AC_0_SB_TL_1_EA; Storyboard.SetTargetProperty(r_0_s_ET_0_AC_0_SB_TL_1, Button.WidthProperty); r_0_s_ET_0_AC_0_SB.Children.Add(r_0_s_ET_0_AC_0_SB_TL_1); EventTrigger r_0_s_ET_1 = new EventTrigger(Button.MouseLeaveEvent); r_0_s.Triggers.Add(r_0_s_ET_1); BeginStoryboard r_0_s_ET_1_AC_0 = new BeginStoryboard(); r_0_s_ET_1_AC_0.Name = "r_0_s_ET_1_AC_0"; r_0_s_ET_1.AddAction(r_0_s_ET_1_AC_0); Storyboard r_0_s_ET_1_AC_0_SB = new Storyboard(); r_0_s_ET_1_AC_0.Storyboard = r_0_s_ET_1_AC_0_SB; r_0_s_ET_1_AC_0_SB.Name = "r_0_s_ET_1_AC_0_SB"; ThicknessAnimation r_0_s_ET_1_AC_0_SB_TL_0 = new ThicknessAnimation(); r_0_s_ET_1_AC_0_SB_TL_0.Name = "r_0_s_ET_1_AC_0_SB_TL_0"; r_0_s_ET_1_AC_0_SB_TL_0.Duration = new Duration(new TimeSpan(0, 0, 0, 0, 500)); r_0_s_ET_1_AC_0_SB_TL_0.From = new Thickness(0F, 5F, 0F, 5F); r_0_s_ET_1_AC_0_SB_TL_0.To = new Thickness(0F, 1F, 0F, 1F); SineEase r_0_s_ET_1_AC_0_SB_TL_0_EA = new SineEase(); r_0_s_ET_1_AC_0_SB_TL_0.EasingFunction = r_0_s_ET_1_AC_0_SB_TL_0_EA; Storyboard.SetTargetProperty(r_0_s_ET_1_AC_0_SB_TL_0, Button.MarginProperty); r_0_s_ET_1_AC_0_SB.Children.Add(r_0_s_ET_1_AC_0_SB_TL_0); FloatAnimation r_0_s_ET_1_AC_0_SB_TL_1 = new FloatAnimation(); r_0_s_ET_1_AC_0_SB_TL_1.Name = "r_0_s_ET_1_AC_0_SB_TL_1"; r_0_s_ET_1_AC_0_SB_TL_1.Duration = new Duration(new TimeSpan(0, 0, 0, 0, 500)); r_0_s_ET_1_AC_0_SB_TL_1.To = 200F; SineEase r_0_s_ET_1_AC_0_SB_TL_1_EA = new SineEase(); r_0_s_ET_1_AC_0_SB_TL_1.EasingFunction = r_0_s_ET_1_AC_0_SB_TL_1_EA; Storyboard.SetTargetProperty(r_0_s_ET_1_AC_0_SB_TL_1, Button.WidthProperty); r_0_s_ET_1_AC_0_SB.Children.Add(r_0_s_ET_1_AC_0_SB_TL_1); this.Add("buttonAnimStyle", r_0_s); // Resource - [buttonStyle] Style var r_1_s_bo = this[typeof(Button)]; Style r_1_s = new Style(typeof(Button), r_1_s_bo as Style); Setter r_1_s_S_0 = new Setter(Button.BackgroundProperty, new SolidColorBrush(new ColorW(255, 140, 0, 255))); r_1_s.Setters.Add(r_1_s_S_0); this.Add("buttonStyle", r_1_s); // Resource - [CustomWindowTemplate] ControlTemplate Func <UIElement, UIElement> r_2_ctFunc = r_2_ctMethod; ControlTemplate r_2_ct = new ControlTemplate(r_2_ctFunc); this.Add("CustomWindowTemplate", r_2_ct); // Resource - [DataTemplateKey(GameData.CustomWindow)] DataTemplate Func <UIElement, UIElement> r_3_dtFunc = r_3_dtMethod; this.Add(typeof(GameData.CustomWindow), new DataTemplate(typeof(GameData.CustomWindow), r_3_dtFunc)); // Resource - [DataTemplateKey(GameData.DragDropItem)] DataTemplate Func <UIElement, UIElement> r_4_dtFunc = r_4_dtMethod; this.Add(typeof(GameData.DragDropItem), new DataTemplate(typeof(GameData.DragDropItem), r_4_dtFunc)); // Resource - [DataTemplateKey(GameData.TestTreeDataItem)] DataTemplate Func <UIElement, UIElement> r_5_dtFunc = r_5_dtMethod; this.Add(typeof(GameData.TestTreeDataItem), new DataTemplate(typeof(GameData.TestTreeDataItem), r_5_dtFunc)); // Resource - [Image] BitmapImage BitmapImage r_6_bm = new BitmapImage(); r_6_bm.TextureAsset = "Images/MonoGameLogo"; this.Add("Image", r_6_bm); // Resource - [Sounds] SoundSourceCollection var r_7_sounds = new SoundSourceCollection(); SoundManager.Instance.AddSound("Click"); r_7_sounds.Add(new SoundSource { SoundType = SoundType.ButtonsClick, SoundAsset = "Click", Volume = 1f }); SoundManager.Instance.AddSound("KeyPress"); r_7_sounds.Add(new SoundSource { SoundType = SoundType.TextBoxKeyPress, SoundAsset = "KeyPress", Volume = 1f }); SoundManager.Instance.AddSound("Move"); r_7_sounds.Add(new SoundSource { SoundType = SoundType.TabControlMove, SoundAsset = "Move", Volume = 1f }); SoundManager.Instance.AddSound("Select"); r_7_sounds.Add(new SoundSource { SoundType = SoundType.TabControlSelect, SoundAsset = "Select", Volume = 1f }); this.Add("Sounds", r_7_sounds); // Resource - [TetrisBorderBrush] SolidColorBrush this.Add("TetrisBorderBrush", new SolidColorBrush(new ColorW(114, 176, 218, 255))); // Resource - [TetrisBorderStyle] Style Style r_9_s = new Style(typeof(Border)); Setter r_9_s_S_0 = new Setter(Border.SnapsToDevicePixelsProperty, true); r_9_s.Setters.Add(r_9_s_S_0); Setter r_9_s_S_1 = new Setter(Border.BackgroundProperty, new ResourceReferenceExpression("TetrisWindowBackground")); r_9_s.Setters.Add(r_9_s_S_1); Setter r_9_s_S_2 = new Setter(Border.BorderBrushProperty, new ResourceReferenceExpression("TetrisBorderBrush")); r_9_s.Setters.Add(r_9_s_S_2); Setter r_9_s_S_3 = new Setter(Border.BorderThicknessProperty, new Thickness(1F)); r_9_s.Setters.Add(r_9_s_S_3); Setter r_9_s_S_4 = new Setter(Border.OpacityProperty, 0.9F); r_9_s.Setters.Add(r_9_s_S_4); this.Add("TetrisBorderStyle", r_9_s); // Resource - [TetrisForeground] SolidColorBrush this.Add("TetrisForeground", new SolidColorBrush(new ColorW(255, 255, 255, 255))); // Resource - [TetrisWindowBackground] SolidColorBrush this.Add("TetrisWindowBackground", new SolidColorBrush(new ColorW(0, 0, 0, 255))); // Resource - [TitleResource] String this.Add("TitleResource", "Basic UI Example"); ImageManager.Instance.AddImage("Images/MonoGameLogo"); GeneratedPropertyInfo.RegisterGeneratedProperty(typeof(GameData.CustomWindow), "TextData", typeof(EmptyKeys.UserInterface.Generated.Dictionary_Bindings.CustomWindow_TextData_PropertyInfo)); GeneratedPropertyInfo.RegisterGeneratedProperty(typeof(GameData.CustomWindow), "HideCommand", typeof(EmptyKeys.UserInterface.Generated.Dictionary_Bindings.CustomWindow_HideCommand_PropertyInfo)); GeneratedPropertyInfo.RegisterGeneratedProperty(typeof(GameData.DragDropItem), "Name", typeof(EmptyKeys.UserInterface.Generated.Dictionary_Bindings.DragDropItem_Name_PropertyInfo)); GeneratedPropertyInfo.RegisterGeneratedProperty(typeof(GameData.TestTreeDataItem), "Name", typeof(EmptyKeys.UserInterface.Generated.Dictionary_Bindings.TestTreeDataItem_Name_PropertyInfo)); }