Example #1
0
 public Object ConvertBack(Object value,
                           Type targetType,
                           Object parameter,
                           CultureInfo culture)
 {
     CachyFont.Glyph glyph = (CachyFont.Glyph)value;
     return(glyph.ToString());
 }
Example #2
0
 public BurgerMenuCommandItem(string key,
                              string menuTitle,
                              CachyFont.Glyph glyph,
                              BurgerMenuViewItem parentViewItem,
                              string methodName) :
     base(key, menuTitle, glyph, true)
 {
     _parentViewItem = parentViewItem;
     _methodName     = methodName;
 }
Example #3
0
 private void EnumerateGlyphs()
 {
     _items = new ObservableCollection <GlyphSelectViewItem>();
     NotifyPropertyChanged("Items");
     String[] glyphs = Enum.GetNames(typeof(CachyFont.Glyph));
     foreach (String curGlyph in glyphs)
     {
         CachyFont.Glyph glyph = (CachyFont.Glyph)Enum.Parse(typeof(CachyFont.Glyph), curGlyph);
         _items.Add(new GlyphSelectViewItem(glyph, glyph == SelectedGlyph));
     }
 }
Example #4
0
 public BurgerMenuItem(string key,
                       string menuTitle,
                       CachyFont.Glyph glyph,
                       bool isVisible)
 {
     _key        = key;
     _menuTitle  = menuTitle;
     _glyph      = glyph;
     _isVisible  = isVisible;
     _childItems = new ObservableCollection <BurgerMenuItem>();
 }
Example #5
0
 public BurgerMenuViewItem(string key,
                           string menuTitle,
                           CachyFont.Glyph glyph,
                           string pageTitle,
                           Type pageViewType,
                           bool clearInstanceOnNavigate) :
     base(key, menuTitle, glyph, true)
 {
     _pageTitle               = pageTitle;
     _pageViewType            = pageViewType;
     _clearInstanceOnNavigate = clearInstanceOnNavigate;
 }
Example #6
0
        public BurgerMenuCommandItem AddChildCommandItem(string key,
                                                         string menuTitle,
                                                         CachyFont.Glyph glyph,
                                                         string methodName)
        {
            BurgerMenuCommandItem commandItem = new BurgerMenuCommandItem(string.Format("{0}.{1}", Key, key),
                                                                          menuTitle,
                                                                          glyph,
                                                                          this,
                                                                          methodName);

            ChildItems.Add(commandItem);
            return(commandItem);
        }
Example #7
0
        public BurgerMenuViewItem AddChildViewItem(string key,
                                                   string menuTitle,
                                                   CachyFont.Glyph glyph,
                                                   string pageTitle,
                                                   Type pageViewType,
                                                   bool clearInstanceOnNavigate)
        {
            BurgerMenuViewItem viewItem = new BurgerMenuViewItem(string.Format("{0}.{1}", Key, key),
                                                                 menuTitle,
                                                                 glyph,
                                                                 pageTitle,
                                                                 pageViewType,
                                                                 clearInstanceOnNavigate);

            ChildItems.Add(viewItem);
            return(viewItem);
        }
Example #8
0
        public Object Convert(Object value,
                              Type targetType,
                              Object parameter,
                              CultureInfo culture)
        {
            String glyphKey = (String)value;

            CachyFont.Glyph glyph = (CachyFont.Glyph)Enum.Parse(typeof(CachyFont.Glyph), glyphKey, true);
            String          param = parameter as String;

            if (param == "Unicode")
            {
                return(CachyFont.GetString(glyph));
            }
            else
            {
                return(glyph);
            }
        }
Example #9
0
 public GlyphSelectViewItem(CachyFont.Glyph glyph,
                            Boolean selected)
 {
     _glyph    = glyph;
     _selected = selected;
 }