private FrameworkElement GetRootIcon()
    {
        Noesis.Grid root = new Noesis.Grid();
        root.Background = new SolidColorBrush(Colors.White);

        Viewbox box = new Viewbox();

        box.Margin = new Thickness(10);

        if (_faces.Count > 0 && target != null)
        {
            NoesisFont font = (NoesisFont)target;

            TextBlock text = new TextBlock();
            text.Foreground  = new SolidColorBrush(Colors.Black);
            text.FontFamily  = new FontFamily(System.IO.Path.GetDirectoryName(font.source) + "/#" + _faces[0].family);
            text.FontWeight  = _faces[0].weight;
            text.FontStyle   = _faces[0].style;
            text.FontStretch = _faces[0].stretch;
            text.Text        = "Abg";

            box.Child = text;
        }

        root.Children.Add(box);
        return(root);
    }
Exemple #2
0
        private void InitializeComponent()
        {
            Noesis.GUI.LoadComponent(this, "Assets/Xaml/MainUI.xaml");

            _mainContextMenu = (Noesis.ContextMenu)FindName("MainContextMenu");
            _mainContainer   = (Noesis.Grid)FindName("MainContainer");
        }