public PacmanUC() { InitializeComponent(); System.Windows.Interop.SilverlightHost host = Application.Current.Host; System.Windows.Interop.Settings settings = host.Settings; settings.MaxFrameRate = 30; // Read/write properties of the Settings object. #if DEBUG settings.EnableCacheVisualization = true; settings.EnableFrameRateCounter = true; // settings.EnableRedrawRegions = true; #endif this.Loaded += new RoutedEventHandler(PacmanUC_Loaded); tb.KeyDown += new KeyEventHandler(PacmanUC_KeyDown); tb.TextInput += new TextCompositionEventHandler(PacmanUC_Input); }
protected override void OnLoad() { System.Windows.Interop.SilverlightHost host = Application.Current.Host; System.Windows.Interop.Settings setting = host.Settings; _iswindowless = setting.Windowless; if (_iswindowless) { CreateHtmlElement(); this.SizeChanged += SLDatePicker_SizeChanged; this.TimePicker.Visibility = Visibility.Collapsed; } else { TextBox.MouseLeftButtonDown += TextBox_MouseLeftButtonDown; } }
protected override void OnLoad() { System.Windows.Interop.SilverlightHost host = Application.Current.Host; System.Windows.Interop.Settings setting = host.Settings; _iswindowless = setting.Windowless; if (_iswindowless) { CreateHtmlElement(); this.SizeChanged += new SizeChangedEventHandler(EsmsInput_SizeChanged); if (!IsReadOnly) { this.txtBox.Visibility = Visibility.Collapsed; this.lblIndicatorName.Visibility = Visibility.Visible; } } this.txtBox.IsReadOnly = IsReadOnly; }