Beispiel #1
0
        private static void OnIconContentChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
        {
            // オブジェクトを取得して処理する
            MenuIcon ctrl = obj as MenuIcon;

            if (ctrl != null)
            {
                ctrl.IconName.Text = ctrl.IconText;
            }
        }
Beispiel #2
0
        // 依存プロパティが変更されたとき呼ばれるコールバック関数の定義
        private static void OnIconSourceChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
        {
            // オブジェクトを取得して処理する
            MenuIcon ctrl = obj as MenuIcon;

            if (ctrl != null)
            {
                ctrl.IconImage.Source = new BitmapImage(new Uri(ctrl.IconSource, UriKind.RelativeOrAbsolute));
                //ctrl.TitleTextBlock.Text = ctrl.Title;
            }
        }
Beispiel #3
0
 public void AddMenu(MenuIcon menuIcon)
 {
 }