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;
            }
        }
Beispiel #2
0
        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 += new SizeChangedEventHandler(EsmsInput_SizeChanged);
                if (!IsReadOnly)
                {
                    this.txtBox.Visibility           = Visibility.Collapsed;
                    this.lblIndicatorName.Visibility = Visibility.Visible;
                }
            }
            this.txtBox.IsReadOnly = IsReadOnly;
        }
Beispiel #4
0
 void Content_FullScreenChanged(object sender, EventArgs e)
 {
     System.Windows.Interop.SilverlightHost host = Application.Current.Host;
     if (host.Content.IsFullScreen)
     {
         (Application.Current.RootVisual as Page).FullScreenRectangle.Height = host.Content.ActualHeight;
         (Application.Current.RootVisual as Page).FullScreenRectangle.Width  = host.Content.ActualWidth;
         VideoBrush vb = new VideoBrush();
         vb.SetSource(myME);
         vb.Stretch = Stretch.Uniform;
         (Application.Current.RootVisual as Page).FullScreenRectangle.Fill = vb;
         (Application.Current.RootVisual as Page).FullScreenRectangleBackground.Visibility = Visibility.Visible;
     }
     else
     {
         (Application.Current.RootVisual as Page).FullScreenRectangle.Fill = null;
         (Application.Current.RootVisual as Page).FullScreenRectangleBackground.Visibility = Visibility.Collapsed;
     }
 }
Beispiel #5
0
 void myFullScreenButton_Clicked(object sender, MouseEventArgs e)
 {
     System.Windows.Interop.SilverlightHost host = Application.Current.Host;
     host.Content.FullScreenChanged += new EventHandler(Content_FullScreenChanged);
     host.Content.IsFullScreen       = !host.Content.IsFullScreen;
 }