コード例 #1
0
        FontData GetWidgetFont()
        {
            if (!(Widget is Control))
            {
                return(FontData.SystemDefault);
            }

            return(FontData.FromControl((Control)Widget));
        }
コード例 #2
0
        FontData GetWidgetFont()
        {
            if (!(Widget is Control))
            {
                double size = WpfFontBackendHandler.GetPointsFromDeviceUnits(SystemFonts.MessageFontSize);

                return(new FontData(SystemFonts.MessageFontFamily, size)
                {
                    Style = SystemFonts.MessageFontStyle,
                    Weight = SystemFonts.MessageFontWeight
                });
            }

            return(FontData.FromControl((Control)Widget));
        }