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(); } }
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(); } }
void OnStyleChanged(object sender, StyleEventArgs e) { if (ReferenceEquals(e.Key, WidgetStyle.Visibility)) { if (Visibility == Visibility.Visible) { fadeInAnim.StartAnimation(); } } }
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); } }
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(); } }
private void designController_StyleDeleted(object sender, StyleEventArgs e) { // nothing to do }
private void designController_StyleDeleted(object sender, StyleEventArgs e) { // nothing to do }
void OnStyleValueChanged(object sender, StyleEventArgs e) { ResetDocumentView(); }
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(); } }
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(); } }
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(); }