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();
        }
Ejemplo n.º 2
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();
    }