summaryrefslogtreecommitdiff
path: root/Juick/Classes/ParagraphBindingBehavior.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/Classes/ParagraphBindingBehavior.cs')
-rw-r--r--Juick/Classes/ParagraphBindingBehavior.cs36
1 files changed, 0 insertions, 36 deletions
diff --git a/Juick/Classes/ParagraphBindingBehavior.cs b/Juick/Classes/ParagraphBindingBehavior.cs
deleted file mode 100644
index 524f4db..0000000
--- a/Juick/Classes/ParagraphBindingBehavior.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System.Collections.Generic;
-using System.Windows;
-using System.Windows.Documents;
-
-namespace Juick.Classes
-{
- public static class ParagraphBindingBehavior
- {
- public static readonly DependencyProperty AssignedInlinesProperty =
- DependencyProperty.RegisterAttached("AssignedInlines", typeof(IEnumerable<Inline>), typeof(Paragraph), new PropertyMetadata(null, AssignedInlinesCallback));
-
- static void AssignedInlinesCallback(DependencyObject target, DependencyPropertyChangedEventArgs e)
- {
- var inlines = ((Paragraph)target).Inlines;
- inlines.Clear();
- var value = e.NewValue as IEnumerable<Inline>;
- if (value != null)
- {
- foreach (var inline in value)
- {
- inlines.Add(inline);
- }
- }
- }
-
- public static IEnumerable<Inline> GetAssignedInlines(DependencyObject obj)
- {
- return (IEnumerable<Inline>)obj.GetValue(AssignedInlinesProperty);
- }
-
- public static void SetAssignedInlines(DependencyObject obj, IEnumerable<Inline> value)
- {
- obj.SetValue(AssignedInlinesProperty, value);
- }
- }
-}