private void Button_Click(object sender, RoutedEventArgs e)
        {
            Button btn;

            foreach (UIElement element in ButtonsHolder.Children)
            {
                btn = element as Button;
                if (btn != null)
                {
                    VisualStateManager.GoToState(btn, "UnSelected", false);
                }
            }

            btn = sender as Button;
            VisualStateManager.GoToState(btn, "Selected", false);

            SelectionButtonEnum index = GetButtonEnum(btn);
            string tooltip            = ToolTipService.GetToolTip(btn) as string;

            Status = tooltip;

            if (ToolbarClicked != null)
            {
                SelectionToolbarItemArgs args = new SelectionToolbarItemArgs();
                args.Index = index;
                ToolbarClicked(this, args);
            }
        }
Example #2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            Button btn;
            foreach (UIElement element in ButtonsHolder.Children)
            {
                btn = element as Button;
                if (btn != null)
                {
                    VisualStateManager.GoToState(btn, "UnSelected", false);
                }
            }

            btn = sender as Button;
            VisualStateManager.GoToState(btn, "Selected", false);

            SelectionButtonEnum index = GetButtonEnum(btn);
            string tooltip = ToolTipService.GetToolTip(btn) as string;
            Status = tooltip;

            if (ToolbarClicked != null)
            {
                SelectionToolbarItemArgs args = new SelectionToolbarItemArgs();
                args.Index = index;
                ToolbarClicked(this, args);
            }
        }