private void txtfont_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            var previewtextblock = (sender as TextBlock);

            var initialfont = new GISServer.Core.Client.Symbols.Font
            {
                Size   = previewtextblock.FontSize,
                Family = previewtextblock.FontFamily.Source
            };



            var window = new FontWindow(initialfont);

            window.Closed += (s, eve) =>
            {
                var w = (FontWindow)s;
                if (w.DialogResult == true)
                {
                    simplemarkersymbol.Font = w.fontsymbol;

                    Update(w.fontsymbol);
                    txtjson.Text = simplemarkersymbol.ToJSON();
                }
            };

            window.Show();
        }
Exemplo n.º 2
0
        private void OpenStyleWindow()
        {
            var fontWindow = new FontWindow();

            fontWindow.DataContext = Format;
            fontWindow.ShowDialog();
        }
Exemplo n.º 3
0
    public static void OpenFontTool()
    {
        FontWindow win = EditorWindow.GetWindow <FontWindow>();

        win.titleContent.text = "字体设置";
        win.minSize           = new Vector2(635, 200);
        win.maxSize           = new Vector2(635, 630);
        win.Show();
    }
Exemplo n.º 4
0
        void OnfontMenuClick(object sender, RoutedEventArgs e)
        {
            FontWindow fw = new FontWindow();

            fw.Title = "글꼴";
            fw.Owner = Owner;
            fw.Font  = FontInfo.GetControlFont(this.beforeTextBox);
            if (fw.ShowDialog() == true)
            {
                FontInfo selectedFont = fw.Font;
                if (selectedFont != null)
                {
                    FontInfo.ApplyFont(this.beforeTextBox, selectedFont);
                    FontInfo.ApplyFont(this.afterTextBox, selectedFont);
                }
            }
        }