Exemplo n.º 1
0
        private void designController_StyleDeleted(object sender, StyleEventArgs e)
        {
            if (styleListBox.Items.Contains(e.Style))
            {
                propertyGrid.SuspendLayout();
                styleListBox.SuspendLayout();

                if (propertyController != null)
                {
                    if (propertyController.GetSelectedObject(0) == e.Style)
                    {
                        propertyController.SetObject(0, null);
                    }
                }
                // remove deleted item and select the previous one
                int idx = styleListBox.Items.IndexOf(e.Style);
                styleListBox.Items.RemoveAt(idx);
                --idx;
                if (idx < 0 && styleListBox.Items.Count > 0)
                {
                    idx = 0;
                }
                styleListBox.SelectedIndex = idx;

                styleListBox.ResumeLayout();
                propertyGrid.ResumeLayout();
            }
        }
Exemplo n.º 2
0
 private void designController_StyleCreated(object sender, StyleEventArgs e)
 {
     if (!styleListBox.Items.Contains(e.Style))
     {
         styleListBox.SuspendLayout();
         styleListBox.Items.Add(e.Style);
         styleListBox.SelectedItem = e.Style;
         styleListBox.ResumeLayout();
     }
 }
Exemplo n.º 3
0
 void OnStyleChanged(object sender, StyleEventArgs e)
 {
     if (ReferenceEquals(e.Key, WidgetStyle.Visibility))
     {
         if (Visibility == Visibility.Visible)
         {
             fadeInAnim.StartAnimation();
         }
     }
 }
Exemplo n.º 4
0
 void OnStyleChanged(object sender, StyleEventArgs e)
 {
     if (ReferenceEquals(e.Key, styleDefinition.CaretBlinking))
     {
         blinkAnimation.Stopped = !Style.GetValue(styleDefinition.CaretBlinking);
     }
     if (ReferenceEquals(e.Key, styleDefinition.CaretBlinkRate))
     {
         blinkAnimation.Duration = Style.GetValue(styleDefinition.CaretBlinkRate);
     }
 }
Exemplo n.º 5
0
        private void designController_StyleChanged(object sender, StyleEventArgs e)
        {
            int idx = styleListBox.Items.IndexOf(e.Style);

            if (idx >= 0)
            {
                bool isSelectedStyle = (styleListBox.SelectedItem == e.Style);
                styleListBox.SuspendLayout();
                styleListBox.Items.RemoveAt(idx);
                styleListBox.Items.Insert(idx, e.Style);
                if (isSelectedStyle)
                {
                    styleListBox.SelectedItem = e.Style;
                }
                styleListBox.ResumeLayout();
            }
            StyleUITypeEditor.Design = e.Design;
            if (propertyGrid.SelectedObject == e.Style)
            {
                propertyGrid.Refresh();
            }
        }
Exemplo n.º 6
0
 private void designController_StyleDeleted(object sender, StyleEventArgs e)
 {
     // nothing to do
 }
Exemplo n.º 7
0
 private void designController_StyleDeleted(object sender, StyleEventArgs e)
 {
     // nothing to do
 }
Exemplo n.º 8
0
 void OnStyleValueChanged(object sender, StyleEventArgs e)
 {
     ResetDocumentView();
 }
Exemplo n.º 9
0
        private void designController_StyleDeleted(object sender, StyleEventArgs e)
        {
            if (styleListBox.Items.Contains(e.Style)) {
                propertyGrid.SuspendLayout();
                styleListBox.SuspendLayout();

                if (propertyController != null) {
                    if (propertyController.GetSelectedObject(0) == e.Style)
                        propertyController.SetObject(0, null);
                }
                // remove deleted item and select the previous one
                int idx = styleListBox.Items.IndexOf(e.Style);
                styleListBox.Items.RemoveAt(idx);
                --idx;
                if (idx < 0 && styleListBox.Items.Count > 0)
                    idx = 0;
                styleListBox.SelectedIndex = idx;

                styleListBox.ResumeLayout();
                propertyGrid.ResumeLayout();
            }
        }
Exemplo n.º 10
0
 private void designController_StyleCreated(object sender, StyleEventArgs e)
 {
     if (!styleListBox.Items.Contains(e.Style)) {
         styleListBox.SuspendLayout();
         styleListBox.Items.Add(e.Style);
         styleListBox.SelectedItem = e.Style;
         styleListBox.ResumeLayout();
     }
 }
Exemplo n.º 11
0
 private void designController_StyleChanged(object sender, StyleEventArgs e)
 {
     int idx = styleListBox.Items.IndexOf(e.Style);
     if (idx >= 0) {
         bool isSelectedStyle = (styleListBox.SelectedItem == e.Style);
         styleListBox.SuspendLayout();
         styleListBox.Items.RemoveAt(idx);
         styleListBox.Items.Insert(idx, e.Style);
         if (isSelectedStyle)
             styleListBox.SelectedItem = e.Style;
         styleListBox.ResumeLayout();
     }
     StyleUITypeEditor.Design = e.Design;
     if (propertyGrid.SelectedObject == e.Style)
         propertyGrid.Refresh();
 }