Ejemplo n.º 1
0
        private void MenuSettings_Click(object sender, RoutedEventArgs e)
        {
            Action <Grid> setCustomCursor = (grid) =>
            {
                CursorArrow arrow = new CursorArrow();
                arrow.SetCursorSize(50);
                arrow.BindToColor(Context.AppConfig.Settings, "CursorColor.B");
                grid.Cursor = CursorFromControl.Create(arrow, new Size(80, 80));
            };

            OptionsWindow.ShowOptionsEx(this, Context.AppConfig, "Settings", setCustomCursor, "Settings", "Clock Configuration", "Clock Font");
        }
Ejemplo n.º 2
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            CursorArrow arrow = new CursorArrow();

            arrow.Background = Brushes.Transparent;
            arrow.Stroke     = Brushes.Lime;
            arrow.SetCursorSize(70);

            //arrow.BindToColor(Context.AppConfig.Configuration, "CursorColor.B");
            this.Cursor = CursorFromControl.Create(arrow, new Size(80, 80));
            _cmb.Cursor = this.Cursor;

            //_gridMain.Children.Add(arrow);
        }
Ejemplo n.º 3
0
        private void Button1_Click(object sender, RoutedEventArgs e)
        {
            CursorArrow arrow = new CursorArrow();

            arrow.Background = Brushes.Transparent;
            arrow.Stroke     = Brushes.Lime;
            arrow.SetCursorSize(70);

            //arrow.BindToColor(Context.AppConfig.Configuration, "CursorColor.B");
            this.Cursor = CursorFromControl.Create(arrow, new Size(80, 80));
            _cmb.Cursor = this.Cursor;

            double left = r.Next(30, (int)(this.ActualWidth - 100.0));
            double top  = r.Next(30, (int)(this.ActualHeight - 100.0));

            arrow.Margin = new Thickness(left, top, 0, 0);

            RenderTargetBitmap bmp = CursorFromControl.CreateBitmap(arrow, new Size(80, 80));

            CursorFromControl.SaveBitmap(bmp);
            _image.Source = bmp;

            _gridMain.Children.Add(arrow);
        }