View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002578 | NoesisGUI | Unity3D | public | 2023-04-23 18:03 | 2023-08-23 19:09 |
Reporter | stonstad | Assigned To | sfernandez | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.2.0 | ||||
Target Version | 3.2.2 | Fixed in Version | 3.2.2 | ||
Summary | 0002578: Unwanted Blur Effect Margin Behavior | ||||
Description | In Noesis 3.2, when a blur effect is applied to the top-level user control the UI is shown off-screen. See video here: https://tonstad.blob.core.windows.net/media/Movie_024.mp4 The blur radius in the example shown is 25, which is equal to the offset behavior shown. I am including the code used to enable and disable the blur effect. Note that if I comment out storyboard.Begin() in the enclosed code, the behavior does not manifest. It is isolated to the storyboard begin behavior. No other code appears to be responsible for the behavior. This behavior is new to Noesis 3.2. Encl. FrameworkExtensionMethods.cs. | ||||
Tags | No tags attached. | ||||
Platform | Any | ||||
related to | 0002615 | resolved | sfernandez | BackgroundEffect behavior being invalidated per frame |
FrameworkExtentionMethods.cs (3,525 bytes)
public static void Unblur(this FrameworkElement frameworkElement, FrameworkElement parent, TimeSpan duration, Action completed = null) { if (!(frameworkElement.Effect is BlurEffect blurEffect)) return; string key = "Blur" + frameworkElement.GetHashCode(); if (frameworkElement.Tag is StoryboardTag tag) { tag.Item1.Stop(); parent.Resources.Remove(key); } float from = blurEffect.Radius; DoubleAnimation animation = new DoubleAnimation(); animation.Duration = new Duration(duration); animation.AutoReverse = false; animation.FillBehavior = FillBehavior.Stop; Storyboard storyboard = new Storyboard(); storyboard.AutoReverse = false; storyboard.Duration = animation.Duration; storyboard.FillBehavior = FillBehavior.Stop; storyboard.Children.Add(animation); parent.Resources.Add(key, storyboard); frameworkElement.Tag = new StoryboardTag(storyboard, 1); Storyboard.SetTarget(animation, frameworkElement); Storyboard.SetTargetProperty(animation, new PropertyPath("Effect.Radius")); animation.From = from; animation.To = 0; storyboard.Completed += (sender2, e2) => { parent.Resources.Remove(key); frameworkElement.Tag = null; blurEffect.Radius = 0; frameworkElement.Effect = null; completed?.Invoke(); }; storyboard.Begin(); } public static void Blur(this FrameworkElement frameworkElement, FrameworkElement parent, float radius, TimeSpan duration, Action completed = null) { if (!(frameworkElement.Effect is BlurEffect blurEffect)) { blurEffect = new BlurEffect(); frameworkElement.Effect = blurEffect; } string key = "Blur" + frameworkElement.GetHashCode(); if (frameworkElement.Tag is StoryboardTag tag) { tag.Item1.Stop(); parent.Resources.Remove(key); } float from = blurEffect.Radius; DoubleAnimation animation = new DoubleAnimation(); animation.Duration = new Duration(duration); animation.AutoReverse = false; animation.FillBehavior = FillBehavior.Stop; Storyboard storyboard = new Storyboard(); storyboard.AutoReverse = false; storyboard.Duration = animation.Duration; storyboard.FillBehavior = FillBehavior.Stop; storyboard.Children.Add(animation); parent.Resources.Add(key, storyboard); frameworkElement.Tag = new StoryboardTag(storyboard, 1); Storyboard.SetTarget(animation, frameworkElement); Storyboard.SetTargetProperty(animation, new PropertyPath("Effect.Radius")); animation.From = from; animation.To = radius; storyboard.Completed += (sender2, e2) => { parent.Resources.Remove(key); frameworkElement.Tag = null; blurEffect.Radius = radius; completed?.Invoke(); }; storyboard.Begin(); } |
|
Resolved in changesets 12541 and 12542 | |
Date Modified | Username | Field | Change |
---|---|---|---|
2023-04-23 18:03 | stonstad | New Issue | |
2023-04-23 18:03 | stonstad | File Added: FrameworkExtentionMethods.cs | |
2023-05-02 11:56 | sfernandez | Assigned To | => sfernandez |
2023-05-02 11:56 | sfernandez | Status | new => assigned |
2023-05-02 11:56 | sfernandez | Product Version | 3.2 => 3.2.0 |
2023-05-02 11:56 | sfernandez | Target Version | => 3.2.1 |
2023-05-10 00:14 | jsantos | Target Version | 3.2.1 => 3.2.2 |
2023-08-23 19:07 | sfernandez | Relationship added | related to 0002615 |
2023-08-23 19:08 | sfernandez | Status | assigned => resolved |
2023-08-23 19:08 | sfernandez | Resolution | open => fixed |
2023-08-23 19:08 | sfernandez | Note Added: 0008663 | |
2023-08-23 19:09 | sfernandez | Fixed in Version | => 3.2.2 |