예제 #1
0
        private void BtnTest_Click(object sender, Interactivity.RoutedEventArgs e)
        {
            PropertyItem prop = propertyGrid.Properties["Name"];

            if (prop != null)
            {
                //workaround because setting isbrowsable is not working right now
                var result = propertyGrid.Categories.FirstOrDefault(x => x.Properties.Contains(prop));

                if (result != null)
                {
                    _tempItem  = result;
                    _tempIndex = propertyGrid.Categories.IndexOf(result);
                    propertyGrid.Categories.Remove(result);
                }
                else
                {
                    propertyGrid.Categories.Insert(_tempIndex, _tempItem);
                }



                //prop.IsReadOnly = !prop.IsReadOnly;
                //prop.IsReadOnly = !prop.IsReadOnly;

                // propertyGrid.ReloadCommand.Execute(null);
            }
        }
예제 #2
0
        private void Item_Click(object sender, Interactivity.RoutedEventArgs e)
        {
            MenuItem       item    = e.Source as MenuItem;
            OutlookSection section = item.Tag as OutlookSection;

            this.SelectedSection = section;
        }
예제 #3
0
 private void BtnSwitchObjects_Click(object sender, Interactivity.RoutedEventArgs e)
 {
     propertyGrid.SelectedObject = new BusinessObject
     {
         Name           = Path.GetRandomFileName(),
         Password       = Path.GetRandomFileName(),
         RegisteredDate = DateTime.Now,
         Integer1       = random.Next(1000),
         Integer2       = random.Next(1000),
         Integer3       = random.Next(1000),
         Integer4       = random.Next(1000),
         Attachment     = Path.GetRandomFileName()
     };
 }
예제 #4
0
        private void BtnSelectMultiple_Click(object sender, Interactivity.RoutedEventArgs e)
        {
            object[] objects = new object[]
            {
                new BusinessObject {
                    Name = "AC DC", Integer1 = 10
                },
                new BusinessObject {
                    Name = "Marilyn Manson", Integer1 = 10
                },
                new BusinessObject {
                    Name = "Charles Darvin", Integer1 = 10
                }
            };

            this.propertyGrid.SelectedObjects = objects;
        }
예제 #5
0
 private void RootGotFocus(object sender, Interactivity.RoutedEventArgs e)
 {
     UnmanagedMethods.SetFocus(WindowHandle);
 }
 private void OnLightDismiss(object sender, Interactivity.RoutedEventArgs e)
 {
     this.SetValue(IsPaneOpenProperty, false);
 }
예제 #7
0
 private void BtnShowFirst_Click(object sender, Interactivity.RoutedEventArgs e)
 {
     ToggleFlyout(0);
 }
 private void RootGotFocus(object sender, Interactivity.RoutedEventArgs e)
 {
     UnmanagedMethods.SetFocus(_root.PlatformImpl.Handle.Handle);
 }
예제 #9
0
 private void RefreshClick(object sender, Interactivity.RoutedEventArgs e)
 {
 }
예제 #10
0
 /// <summary>
 /// Event handler for when the Hex RGB value TextBox looses focus.
 /// This is used to trigger re-evaluation of the color based on the TextBox value.
 /// </summary>
 private void HexTextBox_LostFocus(object?sender, Interactivity.RoutedEventArgs e)
 {
     GetColorFromHexTextBox();
 }