Esempio n. 1
0
        private void InitializeMainButton3()
        {
            var MainButton = new CxControlLibrary.CxRoundButton();

            MainButton.HorizontalAlignment = HorizontalAlignment.Center;
            MainButton.Enabled             = true;


            //ImageButton icon save and change
            var saveIconBitMap = new BitmapImage();

            saveIconBitMap.BeginInit();
            saveIconBitMap.UriSource = new Uri(@"C:\\Users\Yuriy\Desktop\temp2.PNG");
            saveIconBitMap.EndInit();

            MainButton.IconRegular  = saveIconBitMap;
            MainButton.IconHover    = saveIconBitMap;
            MainButton.IconPressed  = saveIconBitMap;
            MainButton.IconDisabled = saveIconBitMap;

            XAMLStackPanel.Children.Add(MainButton); //add to Xaml

            MainButton.Name   = "MainButton";
            MainButton.Margin = new Thickness(5);
            MainButton.Width  = 1000;
        }
Esempio n. 2
0
        private void InitializeMainButton2()
        {
            var MainButton = new CxControlLibrary.CxRoundButton();

            MainButton.HorizontalAlignment = HorizontalAlignment.Center;
            MainButton.Enabled             = true;
            MainButton.Width      = 300;
            MainButton.Label      = "Hello how you do?";
            MainButton.FixedWidth = 5;
            //ImageButton icon save and change
            var saveIconBitMap = new BitmapImage();

            saveIconBitMap.BeginInit();
            saveIconBitMap.UriSource = new Uri("pack://application:,,,/tempIco.PNG");
            saveIconBitMap.EndInit();

            MainButton.IconRegular  = saveIconBitMap;
            MainButton.IconHover    = saveIconBitMap;
            MainButton.IconPressed  = saveIconBitMap;
            MainButton.IconDisabled = saveIconBitMap;

            XAMLStackPanel.Children.Add(MainButton); //add to Xaml

            MainButton.Name   = "MainButton";
            MainButton.Margin = new Thickness(5);
        }
        private void MainButton_ButtonClick(object sender, EventArgs e)
        {
            CxRoundButton btn = sender as CxRoundButton;

            if (btn.Label == "Yes")
            {
                DialogResult = CxDialogResultEnum.Yes;
            }
            if (btn.Label == "No")
            {
                DialogResult = CxDialogResultEnum.No;
            }

            MessageBox.Show(DialogResult.ToString());
            this.Close();
        }
Esempio n. 4
0
        private void InitializeSubButton()
        {
            var SubButton = new CxControlLibrary.CxRoundButton();

            SubButton.HorizontalAlignment = HorizontalAlignment.Center;
            SubButton.Enabled             = true;
            SubButton.Label = String.Empty;//if string is Empty MainButton convert to SubButton

            //Change Beackgroound
            SubButton.BackgroundRegular  = new SolidColorBrush(Colors.White);
            SubButton.BackgroundHover    = new SolidColorBrush(Color.FromRgb(198, 233, 253));
            SubButton.BackgroundPressed  = new SolidColorBrush(Color.FromRgb(114, 179, 216));
            SubButton.BackgroundDisabled = new SolidColorBrush(Color.FromRgb(183, 183, 183));

            XAMLStackPanel.Children.Add(SubButton); //add to Xaml

            SubButton.Name   = "SubButton";
            SubButton.Margin = new Thickness(5);
        }
Esempio n. 5
0
        private void InitializeMainButton()
        {
            var MainButton = new CxControlLibrary.CxRoundButton();

            MainButton.HorizontalAlignment = HorizontalAlignment.Center;
            MainButton.Enabled             = true;


            //ImageButton icon save and change
            var saveIconBitMap = new BitmapImage();

            saveIconBitMap.BeginInit();
            saveIconBitMap.UriSource = new Uri("pack://application:,,,/Icon/MainButton/ProtectAndSave.png");
            saveIconBitMap.EndInit();

            MainButton.IconRegular  = saveIconBitMap;
            MainButton.IconHover    = saveIconBitMap;
            MainButton.IconPressed  = saveIconBitMap;
            MainButton.IconDisabled = saveIconBitMap;

            XAMLStackPanel.Children.Add(MainButton); //add to Xaml

            MainButton.Name   = "MainButton";
            MainButton.Margin = new Thickness(5);


            MainButton.ToolTip = "Hey i am ToolTip";

            MainButton.Tag = "MyTag";

            MainButton.BackgroundDisabled = new SolidColorBrush(Colors.Red);


            MainButton.Label = String.Empty;

            MainButton.DropShdow = true;
        }